LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

converting ieee 488 string to number

Hi all,

 

   So here is the situation, I am comunicating with PID controller (Colmer 2404) that puts out IEEE ascii 7bit info. The VI reads a temperature attached is the VI. It works fine except it does not output a decimal, on the PID controller you can set it to display a decimal point, the info that is read from it has to be divide by 10(see fudge factor in VI) this is fine reading temperatures of 77 K to 256 K, when it get to 256 the number reported Labview 1000+. This tells me something is wrong with my code. I have searced the forums and tried several similar routines, but to no avail. In the VI there are 2 different approaches, the one with the ForLoop does not work, the one where it splits the string into a byte array works only up to 256. 

 

without the divisor of 10 & PID set without a Decimal point here is some Hex info from the string and its corresponding temp

 

Hex                                Truncated Hex

0103 0202 A8B8 9A         02 A8B8               680.0

 

This is LV8.6 but is actually run in 6.0, so if you can open it let me know, and I will up a lower version.

 

Thanks for any help and advice.

 

William

0 Kudos
Message 1 of 6
(2,974 Views)

What do you mean by it puts out ASCII 7 bit info?  In the example you gave, it has bytes A8 and B8.  Both of those require 8 bits.

 

What does the raw data string look like when the value is above 256 (or 2560)?

0 Kudos
Message 2 of 6
(2,970 Views)

The IEEE 488.2 standard puts out ASCII 7 bit info as described here under chapter 9.1(http://standards.ieee.org/reading/ieee/std_public/description/im/488.2-1992_desc.html), there are several ways to display this in a string indicator by telling the string indicator to display with "\ Codes" "Hex" "Decimal" and so on. In order to trouble shoot this, anyone else would need to enter the info in manually where as I am reading it from a device. That info displayed with the Hex designator on the String Indicator is the hex info above. As for what it displays at 256 or 2560 I would have to go into the lab and generate that condition to see what the Hex display is of the string info. Hope that helps to clarify. Thanks

 

William

0 Kudos
Message 3 of 6
(2,968 Views)

Please do get some more data.

 

What I am saying is that it can't be 7 bit data.  A8 is 168, B8 is 184.  Both of those bytes require 8 bits to represent them.  There is no way for a 7 bit byte to become those values.  7 bits max out as 7F in hex.

 

256.0 would be 2560 and show up as 0A 00 ?? on the hex display according to the examples you presented so far.

0 Kudos
Message 4 of 6
(2,964 Views)

Ok, so I have recieved some clarification from the manufacturer of the PID controller, apparently this works off MODBUS communications standards and not GPIB although GPIB card could be used to communicate with PID controller which is more common according to the tech I spoke with. I have done a little rooting around NI's site for MODBUS info and found libraries and such, however thre all seem to be for labview 7.1+. Are you aware of any MODBUS libraries/VIs for Labview 6 or 6.1?

 

Thanks again

 

Wil

0 Kudos
Message 5 of 6
(2,921 Views)
found one for 6.1,
0 Kudos
Message 6 of 6
(2,915 Views)