Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

How to do multiple requests/responses sequentially to same COM port?

I can read 5 different values from my instrument. Each have their own command letter for sending over the value.
How do I read these values sequentially?
0 Kudos
Message 1 of 2
(2,827 Views)
_____________________________________________



I am attaching an example which demos this using the ASCII Object. The example, for simplicity, uses a loop-back on COM1. I suggest you do the same while studying the example: short pins 2 and 3 on your COM1.

In the example, values from Column A and Column B of the DataTable are packed and sent out as the "command." So, you would replace this with your intrument commands. The response (which is the same as "command" in this case because of the loop-back) is read, parsed (the number from the text) and then stored in Column C of the DataTable.

This can be easily made to run automatically using a Timer/Counter.

Hope this helps.

Regards,

Khalid :
)

_____________________________________________
Message 2 of 2
(2,827 Views)