02-09-2011 11:35 AM
Hello,
I am trying to communicate with a device that takes hexadecimal input. Normally I send the commands 01 05 or 01 0C. I can use these commands in Hyperterminal and get a response; however, the labview program does not provide me with the right response.
I would like someone to check my code so I know if the problem is with how I am sending the message or with the device.
Thank you
02-09-2011 12:01 PM
Hi
You are sending in hex format this: 0x30 0x31 0x30 0x35 0x0D 0x0A
Your code is wrong, 0 dec is 30 hex, 1 dec is 31 hex and you are putting "2" in width, that's why you are sending also 0x30. I recommend you to use the "Byte Array To String Function"
Best regards,
Jorge N.
02-09-2011 12:02 PM
Hi all,
See attached for an example of how to do hex com. Remember, the device is expecting hex number. If you send a string to your device, the device will get the ASCII equivalent of the string, which is not what you want. An easy way to see this is to put an indicator at the input string of the VISA write, and change the indicator to code view, you will see that it is not the hex that you intended to send. You need to use byte array to string function.
Yik