How does pid.x.command interact with hm2_7i76e.0.stepgen

More
17 Nov 2021 14:51 #226741 by umfan110
Hows it going guys. I am trying to understand conceptually how x-pos-com interacts with pid.x.command and joint.o.motor-pos-cmd. This is hal file was generated with PnCConfig for the 7i76e. I signals going from joint.0.motor-pos-cmd (which is generated by axis?) and connecting it to pid.x.xommand but how does that send signals to hm2_7i76e component. What am I missing?

 
Attachments:

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

More
17 Nov 2021 15:25 #226744 by PCW
The PID output is a velocity command to the stepgens
rate register.

This output is basically the current joint velocity
(Via the PIDs FF1 term) with a correction (the PIDs P term)
based on the difference between the commanded position
and the stepgens actual position.

The net result is that the stepgen's position is forced to trace the
commanded position to a small fraction of a step

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

More
17 Nov 2021 15:53 #226750 by umfan110
Ok I think I understand. But how does that output signal tie into the hm2_7i76e component? I was expecting a net x-pos-cmd => hm2_7i76e.0.stepgen.00.position, or something along those lines. the only signals I see going to hm2 is hm2_7i76e.0.stepgen.00.enable.

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

More
17 Nov 2021 15:57 #226753 by PCW
net x-output <= pid.x.output
net x-output => hm2_7i76e.0.stepgen.00.velocity-cmd
The following user(s) said Thank You: umfan110

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

More
17 Nov 2021 16:04 #226756 by umfan110
Oh I see sorry in the screenshot I sent the => is flipped in net x-output => hm2_7i76e.0.stepgen.00.velocity-cmd. I know those are optional arrows to show the flow of data. Is there a rule of thumb you follow because that has been tripping me up. I was under the impression, looking at the screenshot, that x-output <= hm2_7i76e.0.stepgen.00.velocity-cmd was connecting the hm2 velocity-cmd to x-output.

Thanks for clarifying!

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

More
17 Nov 2021 16:13 - 17 Nov 2021 16:13 #226757 by PCW
Yeah the arrow direction is probably a pncconf bug

If in doubt you can display the pins with halshow or halcmd
to get the pin directions

halcmd show pin

will list all pins

halcmd show pin hm2

will list all mesa hardware pins
Last edit: 17 Nov 2021 16:13 by PCW.
The following user(s) said Thank You: umfan110

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

More
17 Nov 2021 16:18 #226760 by umfan110
Sounds good thanks !

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

More
17 Nov 2021 16:40 #226764 by umfan110
Apologies for all the questions but what other components can be used to drive stepper motors? Does PnCConfig default to using PID for the mesa. Because I see in some of the sim files that ddt is used. Do you know why that is ?

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

Time to create page: 0.805 seconds
Powered by Kunena Forum