Hello,
I have a new LabJack U6 and an existing LabJack U3-LV setup. The original setup with the U3 has a LabVIEW VI using the easy stream and read functions. I've tried to keep the VI intact and modify the easy stream and read functions so that the U6 can get data from our instruments. However, I've hit a few roadblocks.
I've plugged in the instumentation, and the easy stream sub VI works, however, the read sub VI is giving the error code 7003 when trying to run the VI. I'm not really sure where this error is coming from and how to troubleshoot it.
The VI can be found, attached.
The LabVIEW examples/VIs we provide add 6000 to the UD driver errorcode number, so you are seeing error 1003 which is LJE_INVALID_HANDLE. Our list of errors codes are here:
https://labjack.com/support/datasheets/u6/high-level-driver/errorcodes
We haven't looked at the VI yet, but it seems like you are passing an invalid LabJack handle somewhere. Make sure that you OpenLabJack call is opening the U6 properly without error, and that the valid handle it returns is being passed to your LabJack UD driver calls.
A quick follow up, I'm not seeing the 7003 error when running your VI and it is running without error when a U6 is connected. The first found U6 is being used. I am using the easy stream VIs from our LabVIEW examples download and removed the "BELT - U3 - Write To File Util.vi" portion of the wiring diagram which is a VI we don't have. If you have modified the easy stream VIs, to add to my previous response, make sure your VIs aren't changing the valid handle from the OpenLabJack call.
Thanks for your response.
How do I check that the VI's aren't changing the valid handle? From your previous post, I checked the LJUD_OpenLabJack VI, and while it ran normally, the values for the connection type and device number were incorrect. Could this be causing the issue?
How do I check that the VI's aren't changing the valid handle?
Anywhere and anytime you make a call to OpenLabJack, observe what handle is returned by the call. You could use standard LabVIEW debugging tools for this, or just make indicators to display the handle wherever convenient.
In particular, note the handle you get the first time you make the Open call, and compare that to the handle passed to the function call that first gives you the 1003 errorcode.
From your previous post, I checked the LJUD_OpenLabJack VI, and while it ran normally, the values for the connection type and device number were incorrect. Could this be causing the issue?
Could be the source of this problem, and certainly points to unexpected program operation that could cause various problems. I would figure out why you are passing unexpected values for CT and DT.
One general comment is that if you have or might ever have multiple LabJacks connected, I would not use FirstFound. Set FirstFound = FALSE for Open calls you make in your program.
We were able to resolve the 1003 errorcode, and ran the U6 VI successfully. However, the VI only works when the scan rate is set to 10,000 and not the original 15,000 that we used on the U3. Is there anyway that this value can be increased?
How many channels are you doing? The U3 and U6 support the same stream limit of 50k samples/second:
https://labjack.com/support/datasheets/u6/operation/stream-mode
Try testing with LJStreamUD and confirm that you can stream 3 channels at 15000 scans/second, which equals 45000 samples/second.