DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

RS232 Input and Output in the same time

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

 

Input.jpg

 

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>

 

Output.jpg

 

After sending string by RS232 Output the data form RS232 are readed incorrectly.

 

0 Kudos
Message 1 of 4
(6,751 Views)

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.

 

 

 

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 2 of 4
(6,726 Views)

Thank You CJ.

It work 🙂

You're great. 

0 Kudos
Message 3 of 4
(6,710 Views)

So sorry for the delay in answering.... I didn't check my email at all last week. Smiley Wink

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 4 of 4
(6,708 Views)