Hi,
I am using LabJack U3 to obtain pressure and audio sensor data in LabVIEW. I saw the examples of using LabJack with LabVIEW. I used "U3 eAIN Loop with Chart .vi" to read pressure sensor data and "U3 Stream with FFT.vi" example to read audio sensor data. Now, I am required to combine these two to 1 labVIEW file. Is this possible?. Also, I would like to know where to set the channel number in the stream mode example. Please help me with this.
Thank you
Stream takes over the analog input system, so while streaming you can't use command-response to read your pressure AIN. Rather, you will have to add the pressure sensor to your stream scan list and acquire it with the audio signal. See the following about command-response and stream mode:
https://labjack.com/support/datasheets/u3/operation
"Scan List (+)" is the list of positive channels you are going to scan in that stream example. See the following for details about the UD driver handles stream mode:
https://labjack.com/support/datasheets/u3/high-level-driver/example-pseu...
Thank you for your response. But, can't I use these both as 2 seperate sub vi's and bring them together as 1 labVIEW program?
No. Try it now. Start the stream example and leave it running. Then go to the eAIN loop example and try running it at the same time. I would expect an error.
Hi, as you said, I couldn't run stream and command response mode simultaneously. It gives me a communication error.
Also, I am looking to read 6 sensors' values in stream mode using scan list + in labVIEW. I would give AIN0-AIN3 as channels 0-3 in scan list +. For FIO4 and FIO5, should I give them as channel 4 and 5 respectively or is there a seperate procedure for FIOs. And what is the use of scan list - ?.
Use channel 193:
https://labjack.com/support/datasheets/u3/operation/stream-mode/digital-...
ScanList- is specifying the negative channels, which is usually used with differential AIN:
https://labjack.com/support/datasheets/u3/hardware-description/ain/chann...
Use Ch- = 199 for single-ended channels. Ch- does not matter for Ch+ = 193.
Hi,
I tried reading voltage from 6 channels (AIN0-AIN3,FIO4-FIO5) in stream mode by adding the channels to scan list+. I used the U3 Stream with FFT.vi example. But, it doesn't allow me to read more than 3 channels. Is there a way to achieve this?. Please let me know.
What do you mean by "it doesn't allow me to read more than 3 channels"? Are you getting an error? Please post a screenshot showing the problem.
Thank you. I am really new with this. I couldn't understand completely. It would be helpful if you could send a screenshot or a program describing the procedure.
If you are having some problem with the example, please post a screenshot showing the problem.
Perhaps start with a simpler example such as "U3 easy Stream Example.vi".
It might be because of the scan rate too. I am required to set the scan rate to 20000 Hz. I have attached the screenshot for your reference.
In your screenshot you are attempting to scan 6 analog inputs (AIN0-AIN5) at 20 kscans/second. That is 120 ksamples/second which is too fast:
https://labjack.com/support/datasheets/u3/operation/stream-mode
Should I reduce my scan rate?.
And I would like to know if I have entered the channel numbers correctly ( for AIN0-AIN3, FIO4,FIO5) in scan list+ ?
Yes, you need to keep NumChannels*ScanRate to <=50k. See post #13 above.
No, you have entered the channel numbers for AIN0-AIN5. See post #7 above.
I kept the scan rate as 10000 and gave the same channel list and I was able to get the values. Is it like it won't work for a long run?
5 channels at 10 kscans/second is 50 ksamples/second, so that is fine. That is the limit, but should run continuously.
Not 5 channels. I have used 6 channels. AIN0-AIN3, FIO4,FIO5. But it is still working with scan rate of 10000 Hz and the channel list as given in the screenshot.
Okay, but again channels 4 and 5 are AIN4 and AIN5, not FIO4 and FIO5. See post #7 above.
If you are acquiring 6 channels at 10 kscans/second, that is 60 ksamples/second. The spec is 50k, but 60k might work fine. I would tweak your scan rate up to find the actual limit where you start to get overlap errors, then back off by 5% or so.