I've setup my U3 to run two timers (one for a 8 bit PWM output and the other to measure the time between external pulses). To get the time values I have a C# application that reads the stream every 100 ms from a system timer callback. This has been working fine. I've now added reading an analog input using the LJUD.eAIN function within the same timer callback. If I run the stream by itself it works fine. If I run the analog input by itself it works fine. But if I run them both I get a Communications failure exception thrown by LJUDDotNet.DLL when performing the analog input. Any idea what is going on?
Thanks
Stream mode takes over the analog input system, even if you are not streaming any analog inputs. While a stream is active, you can't do command-response reads of analog inputs.
I would have expected a more precise errorcode, but I just tested and get the same 1008 errorcode.
Thank you for your really prompt feedback. Do I have any option available to me as I would really like to be able to read the analog channel?
The 2 options I see are add the analog input to your stream or use a 2nd LabJack.
Thanks - that is what I figured. Adding it to the stream works.
Thanks again.
In regards to the first post and the "Communications failure" (1008) error, as pointed out there will be an error when using command-response reads while stream mode is running. "Communication failure" is being returned in general when there is a specific error from U3, but it should have been the "Stream is running" (25) error. This will be fixed in an upcoming release. Thanks for making us aware of this.