I'm trying to use the dll for a LabJack USB datalogger. For this simple test I need to pass -1 or a serial number but if I try to pass a number with "ref:" I get an "invalid floating point operation". I've tried using Let and also sending the number directly eg ref:-1".
LibLoad>ljackuw,hDll
Let>idnum=-1
MessageModal> %idnum%
LibFunc>hDll,GetFirmwareVersion,firmwareVersion,ref:idnum
MessageModal>Firmware Version Response: %firmwareVersion%
LibFree>hDll
This is with 7.3.11.4 Pro.
Any suggestions how I might make this work?
LibFunc Help / FP Error
Moderators: JRL, Dorian (MJT support)
Looks like there may be a bug with LibFunc and negative numbers. We will investigate.
MJT Net Support
[email protected]
[email protected]
-
- Automation Wizard
- Posts: 1101
- Joined: Fri Jan 07, 2005 5:55 pm
- Location: Somewhere else on the planet
Hi, I tried the 7.4 beta 008 and it's looking better, no flop error, but not fully working yet.
This is the code:
LibLoad>ljackuw,hDll
Let>idnum=-1
MessageModal> %idnum%
LibFunc>hDll,GetFirmwareVersion,firmwareVersion,ref:idnum
MessageModal>Firmware Version Response: %firmwareVersion%
LibFree>hDll
There are two valid values for idnum, -1 and the device unique serial number. Using either of those returns a firmwareversion of 0 (zero). Using any other number results in getting a 515 error code (which is to be expected).
Per the vendor the device returns firmwareversion as a float = 1.100.
Do we have to define this some way in macroscheduler so that it can be read correctly?
This is the code:
LibLoad>ljackuw,hDll
Let>idnum=-1
MessageModal> %idnum%
LibFunc>hDll,GetFirmwareVersion,firmwareVersion,ref:idnum
MessageModal>Firmware Version Response: %firmwareVersion%
LibFree>hDll
There are two valid values for idnum, -1 and the device unique serial number. Using either of those returns a firmwareversion of 0 (zero). Using any other number results in getting a 515 error code (which is to be expected).
Per the vendor the device returns firmwareversion as a float = 1.100.
Do we have to define this some way in macroscheduler so that it can be read correctly?
The 7.4 documentation has already been updated to reflect this. We are also looking at the feasibility of supporting more data types.
MJT Net Support
[email protected]
[email protected]