07-30-2008 11:14 AM
−1073807298 | = Could not perform operation because of I/O error. |
For the command in the driver above,
The code is written in number form of ascii format >> e.g. <STX> = ascii 02
and The Code is written as
\02ST600\03\r
But sending this code>> nothing happens
Which is quite confusing for me.
1. Is it general to write \02 to send <STX> signal??
2. actually <LF> = ascii 10 >> so why does it use /r instead?
3. What should I do, is my format correct??? I can't even send one signal to operate it at all.
Thank you very much for help
08-01-2008 10:16 AM
A string control can set for 4 different types of display. When you right click on it, you can select Normal, '\' Codes, Hex, or Password. Normal is ASCII character and the unprintable characters such as <STX> cannot be entered. The <STX> is hex 02 so you enter this as \02. The '\' says to interpret the next byte as hex. A <LF> is not ASCII 10 at all. It is hex 0A. For readability, it was decided a long time ago that certain '\' characters could be represented a bit differently. If \n, that was hex 0A. A \r is hex 0D or the CR. You can find documentation on these stand C Escape Sequences. In LabVIEW, you can type \0A into your control and it will automatically convert or \n.
Your other option is to use hex display. You just enter all of the hex equivalents though it makes entering the ST600 a bit more difficult in your case.
I'm not sure if the data entry in MAX is set for '\' Code Display and whether it is interpretting your string correctly. I know that the Basic Serial Write and Read example in LabVIEW is set this way and you might want to try that.