|
You can configure the controller to automatically and periodically send you the information you need.
You can easily do this by using the command history feature. It lets you recall up to 16 queries that were sent earlier.
For example, if you send
# C (to clear the buffer)
?A (Motor Amps)
?V (Voltages)
and then
# 10
You will see the controller continuously sends the results of the above. A different result will be sent every 10ms, in this case (because # 10)
Then, you should just capture the strings as they arrive and parse the data.
You can configure the controller to send a particular set of queries at startup. This is done using the Telemetry node, in the Startup configuration. For the above, you would enter ?A:?V:# 10:
If your microcomputer or PLC has difficulties parsing the data that is output, you can always write a small script that gets the various parameters you need and sends them in any other format you like, using a customized print statement.
Again, the trick here is to avoid the polling because it adds unecessary traffic. Also, if for any reason the response to a polling query is lost, the polling technique may hang if not done carefuly.
|