DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure rs-232 if the format of the received strings can be different depending on the request

OK, I will try to describe the flow in more detail.

1. The external device waits for a command.

2. DL has to send a command as ascii-string. It must be possible to send these commands in any order.

3. The length and structure of answer from the external device differs depending on the DL request.

 

A few Example:

DL request: getserial     Device answer: xxxxx

DL request: getprodnr   Device answer: xxxx xxx xxx xx

DL request: getversion  Device answer: x.xx

 

There is no unique char at the beginning of the answerstring which could be used to select a dedicated receiver-channel in DL.

 

If it becomes too complicated and here are the limitations of Dasylab I make a workaround.

I will change the answerstrings of the Device, so that DL receives a string with always the same length. Then it becomes easy.

 

regards

Andreas 

 

 

 

0 Kudos
Message 11 of 12
(3,319 Views)

Andreas,

 

If you have the flexibility to change the device's response, I would suggest that it echo the command and then the data string. That would force the response to be sufficiently unique.

 

If you have a string that has a unique way to identify which type of string it is, then, you can create a worksheet with the rs232 Output, to send the command on demand, via action or control input to the module.

 

The RS232 Input would then just monitor the incoming data, and sort it according to a search string.  For some data,such as the date, it might make sense to store it as a Global String. In that case, the line must end with a distinctive terminator, such as the <CR> character.

 

Where are you located? Can you call us directly? See www.dasylab.com for the phone numbers for measX (Germany) and Measurement Computing (US). This sounds like a conversation best done interactively.

 

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 12 of 12
(3,317 Views)