10-25-2005 12:52 PM
10-25-2005 01:01 PM - edited 10-25-2005 01:01 PM
After reading your hex byte, use TypeCast to convert it into an ASCII character. Send this character over the serial line. The picture below shows that Type Cast will convert the byte into an actual ASCII character, versus just converting to a string.
Message Edited by tbob on 10-25-2005 12:02 PM
10-25-2005 02:46 PM
10-25-2005 02:54 PM
That is exactly what you are asking.
The hex representation of the characters is sent out.
To send the real value you have to translate the hex string into 3 character before you send it to the serial port.
Do NOT typecast but a conversion is needed.
In the string/number conversion palette you find the "hexadecimal string to number" function.
That one should do it.
Eventual search for hexadecimal and that function should show up in the search view.
10-25-2005 03:20 PM - edited 10-25-2005 03:20 PM
You cannot wire a number (numeric type) into the VISA Serial Write function, it expects a string. If you simply send the string "0110FF", each character will be sent as is, meaning six characters (or 6 bytes) will be sent. If you want to send the value 0x01, 0x10, 0xFF, from a string "0110FF", you have to break the string into 3 2-character substrings, convert those to numbers, then type cast into a string to get the ASCII characters for those 3 numbers. See attached vi:
Message Edited by tbob on 10-25-2005 02:22 PM
Message Edited by tbob on 10-25-2005 02:23 PM
10-25-2005 04:16 PM
10-25-2005 04:22 PM