Automatic Querying

8 years 6 months ago #29527407 by taylorapgar
Hello,

I was wondering if the MD2250 can be set up so that it would automatically send the two motor currents and encoder counts every 10 ms. I saw the section on the query history but was a little confused. If after initialization of the motor controller I clear the history buffer then send the querries for current and two encoders (3 querries). And then set the automatic query to every 10 ms would it send me the results of those 3 querries every 10 ms?

Thanks,
Taylor Apgar

Please Log in or Create an account to join the conversation.

8 years 6 months ago #29527409 by roboteq
Replied by roboteq on topic Re:Automatic Querying
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.

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.076 seconds