Communicating through RS-232
30 Mar 2016 09:03 #72369
by andypugh
The calculated value is an output _from_ the component _to_ HAL.
Replied by andypugh on topic Communicating through RS-232
I guess I can. It just made sense to me that if I am getting an input through RS-232 I would set an input pin.
The calculated value is an output _from_ the component _to_ HAL.
Please Log in or Create an account to join the conversation.
30 Mar 2016 20:02 #72412
by squan09
Replied by squan09 on topic Communicating through RS-232
OK so to try and clarify I just looked at how the parport pin, stepgen pin, and xstep signal are connected. The stepgen pin is an out linked to the xstep signal and the parport pin is an in linked to the xstep signal. That is because the stepgen pin is sending out a value to the xstep signal which is passed on to the parport pin. Therefore the parport pin must be an in pin to accept that signal. Do I have this right so far?
I guess my confusion came because I have been assuming a pin like parport was an out pin communicating with the motor drive, but it is not the case that an out pin necessarily sends signals out of the computer and vice versa.
Thanks again for the help.
I guess my confusion came because I have been assuming a pin like parport was an out pin communicating with the motor drive, but it is not the case that an out pin necessarily sends signals out of the computer and vice versa.
Thanks again for the help.
Please Log in or Create an account to join the conversation.
30 Mar 2016 20:59 #72418
by andypugh
Yes, though the parport pins are the most confusing, as parport output pins have "in" HAL pins. Because they get written to by HAL.
Replied by andypugh on topic Communicating through RS-232
Therefore the parport pin must be an in pin to accept that signal. Do I have this right so far?.
Yes, though the parport pins are the most confusing, as parport output pins have "in" HAL pins. Because they get written to by HAL.
Please Log in or Create an account to join the conversation.
30 Mar 2016 21:26 #72421
by squan09
Replied by squan09 on topic Communicating through RS-232
OK thanks. So now that I have a better understanding of that I am trying to use my feedback to control a PID loop. I have a force gauge communicating through RS-232 and that value is read by python. I am passing that value to HAL, performing the PID loop and attempting to use offset to adjust my axis position, similar to this post: forum.linuxcnc.org/forum/38-general-linu...ealtime?limitstart=0
One problem I am having is that I get force values, obviously, from my force gauge, so if I use that as my input to the PID, the value does not really relate to my axis position. For this I built a table that relates force to axis displacement and I am now passing a true distance value into the PID loop.
Now the PID loop is attempting to compensate the axis, however I am using a stepper motor and it is losing steps. I assume this is because the output from the PID is telling the axis to move too fast. Is there a way to limit the feed rate when making the adjustment from the PID loop?
One problem I am having is that I get force values, obviously, from my force gauge, so if I use that as my input to the PID, the value does not really relate to my axis position. For this I built a table that relates force to axis displacement and I am now passing a true distance value into the PID loop.
Now the PID loop is attempting to compensate the axis, however I am using a stepper motor and it is losing steps. I assume this is because the output from the PID is telling the axis to move too fast. Is there a way to limit the feed rate when making the adjustment from the PID loop?
Please Log in or Create an account to join the conversation.
31 Mar 2016 11:41 #72453
by andypugh
The step generators have build in rate and accel limiting. You just need to set the parameters accordingly.
Replied by andypugh on topic Communicating through RS-232
Now the PID loop is attempting to compensate the axis, however I am using a stepper motor and it is losing steps. I assume this is because the output from the PID is telling the axis to move too fast. Is there a way to limit the feed rate when making the adjustment from the PID loop?
The step generators have build in rate and accel limiting. You just need to set the parameters accordingly.
Please Log in or Create an account to join the conversation.
Time to create page: 0.070 seconds