12-27-2011 06:50 AM
Hello
I have problem with rs232.
I read information from my power supply by RS232 Input:
Expected string: 1923456789<CR>OK<CR>
Channel 0
Measurement data request: GETD00\r
Measurement data format: 4a
Channel 1
Measurement data request: (empty)
Measurement data format: 4a
Channel 3
Measurement data request: (empty)
Measurement data format: 1a4x
Sample interval: 0.20s
The date are readed correctly until I don't send other string by RS232 Out.
Output [a]\r (VOLT00123)
After sending string Power Supply return data OK<CR>
After sending string by RS232 Output the data form RS232 are readed incorrectly.
01-03-2012 08:20 AM
In the Output format, you need to skip the OK<CR> so it doesn't confuse the input parsing.
The Help says the following
If there is the need to wait for the Response String of the external device the following string has to be attached to the format string.
‘\#x' (x=1-999)
That ensures that no other module will address the interface. If the response is received the defined number (x) of characters will be skipped.
So, the output string should be
[a]\r\#3
That will send the command, then wait for the OK<CR> before handing control of the serial port back to the RS232 Input module.
01-04-2012 03:58 PM
Thank You CJ.
It work 🙂
You're great.
01-04-2012 04:03 PM
So sorry for the delay in answering.... I didn't check my email at all last week. ![]()