I can't get any of the streaming examples to work in Labview. When an error does come up it is with the eGets function and is #4, but usually the vi just hangs and I have to end the program and restart Labview. The behaviour is the same for all of the streaming examples whether I change any of the settings on them or not. If I try building the streaming functions into my own vi I get error 6060 with eGets (DBL array) in Easy Stream Read. I have the latest drivers and firmware and I'm using Labview 2017.
Does LJStreamUD.exe work if you just open it and run with the default settings?
Try a different computer to see if the behavior is the same.
Try a different version of LabVIEW to see if that makes a difference, but we have not heard of anything unique about LabVIEW 2017.
There were no executables in the LabVIEW_LJUD package I downloaded but there is a LJStreamUD.vi that seems to build a standalone app when I run it.. is that the one? LJStreamUD.vi compiles with a handful of warnings, 5 of them about new file paths (expected ...\LabVIEW_LJM\LJStreamM\sub\... and new path is ...\LabVIEW_LJUD\Examples\LJStreamUD\sub\... ) and 2 are "Unbundle function inserted on output of File Dialog function". After clearing the warning dialog the app starts and analog value populate and refresh every half second or so. When I click the "Start Stream" button I either get error #4 or the app crashes and I have to end the process.
I tried running U6 easy Stream.vi in 32-bit LabVIEW 2016 (the only other version I have access to) and the first try gave error #4 but it did start streaming on the second try. That said, it shows the sine wave I'm applying to AIN1 on all four AIN channels albeit with varying amplitudes and offsets (the other three channels have negative offsets of around 4 to 5.5 volts). I've attached a screenshot of the output. The red trace is my applied signal of a 0 offset 5vpp sine wave. Nothing is connected to the other channels.
Correction to my last post; I just tried it in LabVIEW2017 32-bit and streaming does work there although with the same behaviour from the channels with no applied signal.
LJStreamUD.exe is included in the main software installer, and only the source is in the LabVIEW_LJUD archive. You will find the exe the same place you find LJControlPanel:
https://labjack.com/support/software/applications/ljstreamud
Errorcode 4 is LJE_UNABLE_TO_START_STREAM. We often see that when you have some sort of device configuration that is not valid. Close all software, run LJControlPanel, find & select your U6, click "Config IO Defaults", click "Write Factory Values", close LJControlPanel, and power-cycle your U6. Now go to LabVIEW and try running the unmodified example "U6 easy Stream.vi" with default values.
It is common for floating channels to return a value similar to whatever channel was sampled just before:
https://labjack.com/support/app-notes/floatingunconnected-inputs
So at this point you think the problem with stream hanging might just be in 64-bit LabVIEW?
It does appear to be just a problem with LabVIEW 64-bit. I tried resetting the configuration as you described and am seeing the same behaviour. Streaming examples work in 32 bit and crash in 64 bit. I also built streaming functionality into the app I'm creating based on the easy stream vi and that works in 32 bit but not 64 bit as well. I think I'll just keep working in 32-bit LabVIEW for the time being in the interest of meeting my deadline.
I tied the floating channels to ground with 10k's and all is well.. should have thought of that.
Thx!
I talked to a UD Library expert here and they suggested that we need to use eGetPtr rather than eGet for 64-bit compatibility. I've attached the new sub-vi for eGetPtr. Download it and copy it to \LabVIEW_LJUD\LabJackUD Dll Functions, along with the other similar VIs. Then go to "easy stream read.vi" and change it so it uses this new vi "LJUD_eGetPtrS (DBL Array).vi" rather than "LJUD_eGetS (DBL Array).vi". Then try running "U3 easy Stream Example.vi" in 32-bit and 64-bit. Let us know if that fixes the problem and we will update the entire LabVIEW_LJUD archive.
Switching eget for egetptr does make the easy stream example work for me in 64 and 32 bit. I'm using a U6 however, not a U3, so I've only tried the U6 easy stream example.
The LabVIEW_LJUD archive is now updated so all stream examples should work in 64-bit LabVIEW. Everything should work except the I2C examples (1 for the U3 and 2 for the UE9).
https://labjack.com/support/software/examples/ud/labview