
U6 stream mode and digital output parallel
#1
Posted 20 September 2012 - 01:15 AM
#2
Posted 20 September 2012 - 09:56 AM
Make sure you read Section 4.3.7 of the U6 User's Guide to get an understanding of how stream data is moved from the device to your application:
http://labjack.com/s...ers-guide/4.3.7
In the "U3 Stream With DO.vi" example, there is a constant on the wiring diagram called "Iterations per second". It is set to 2, so you will get a stream read and DO update every 500ms. You can increase that to do more stream reads per second, and thus more DO updates, at the expense of reducing max stream rates.
If you really want lots of DO updates, there are some advanced techniques you should use to do many small reads rather than few large reads. See "U6 Low Latency Stream.vi". I just ran this with ScanRate=100, ScansToReadPerIteration=1, and Delay=4ms, and did not see any backlog. That means the stream loop is iterating 100 times per second with a 4ms dummy delay that
could be your DO write.
#3
Posted 13 October 2012 - 07:48 AM
What sort of data flow do you have for your stream reads and digital output? Check out the example "U3 Stream With DO.vi". You can see that it puts an Add/Go/Get in series with the stream read eGet in the read loop, so you get one command/response operation per iteration of the stream read loop. You can then make adjustments to how often stream reads happen, and know exactly how many command/response updates you are getting. For example, using the SLEEP wait mode, if you scan at 100 scans/second, and read 50 scans/read, then the stream read loop will iterate 2 times per second.
Make sure you read Section 4.3.7 of the U6 User's Guide to get an understanding of how stream data is moved from the device to your application:
http://labjack.com/s...ers-guide/4.3.7
In the "U3 Stream With DO.vi" example, there is a constant on the wiring diagram called "Iterations per second". It is set to 2, so you will get a stream read and DO update every 500ms. You can increase that to do more stream reads per second, and thus more DO updates, at the expense of reducing max stream rates.
If you really want lots of DO updates, there are some advanced techniques you should use to do many small reads rather than few large reads. See "U6 Low Latency Stream.vi". I just ran this with ScanRate=100, ScansToReadPerIteration=1, and Delay=4ms, and did not see any backlog. That means the stream loop is iterating 100 times per second with a 4ms dummy delay that
could be your DO write.
Hello I'm having a similar problem but I'm working whit matlab, I need to read from analog input and at the same time send an PWM signal, so I'll change the PWM signal every 0.5 seg, but I need to read every 0.001 seg (1ms) but I'm havign a problem whit the stream mode I'm getting all the data from 0.5 seg at the end of the simulation, so can I use the same techniques whit matlab?? and how can I do it??
#4
Posted 15 October 2012 - 07:01 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users