06-19-2007 08:43 AM
06-19-2007 07:54 PM
06-20-2007 07:28 AM
06-20-2007 10:55 AM
Are you including the chr$ bit? If so that is not correct. Also don't include the linefeed "\n" at the end. The protocol said nothing about that so don't include it. The entire command string should only be 5 characters long.
Mike...
06-20-2007 11:11 AM
06-20-2007 11:56 AM
06-20-2007 12:16 PM - edited 06-20-2007 12:16 PM
In text based programming languages, the chr$() function will return the ASCII character specified by the value inside (). chr$(13) is the carriage return character. There are numerous ASCII tables available on the web that you find and use as a reference. Decimal 13 is hex 0D and in LabVIEW, you can specify hex characters by right clicking on the string control/constant and selecting Hex Display. You can also select '\' Codes display. The '\' code for a carriage return is \r. In your example of sending a CR, 1, T,1, and the 105 checksum, with hex display you would send 0D31 5431 6C. The type cast and Byte Array to String functions can be used to create the correct string. Shown below is a U8 array and the Byte Array to String. One byte array is set for hex display and one for decimal. They both create the same data.
Message Edited by Dennis Knutson on 06-20-2007 11:17 AM
06-20-2007 12:23 PM - edited 06-20-2007 12:23 PM
Message Edité par Matthieu42 le 06-20-2007 12:27 PM
06-20-2007 12:36 PM
06-20-2007 12:42 PM