axis.n.in-position does not work in mdi/auto
- strykerg
- Offline
- Senior Member
-
- Posts: 53
- Thank you received: 0
i modified my controller so that now it has an input which is used to decreasese torque and decay when the axis is idle.
i used the axis.n.in-position which worked like a charm when jogging manually. however it doesn't when you issue an mdi or run gcode
is it supposed to be like this?
is there any way i can get a pin to change state when a specific axis is moving?
Please Log in or Create an account to join the conversation.
- Rick G
-
- Offline
- Junior Member
-
- Posts: 26
- Thank you received: 155
When axis.n.joint-vel-cmd = 0 reduce power.
Rick G
Please Log in or Create an account to join the conversation.
- strykerg
- Offline
- Senior Member
-
- Posts: 53
- Thank you received: 0
sorry im a total noob on emc2 and linux
Please Log in or Create an account to join the conversation.
- Rick G
-
- Offline
- Junior Member
-
- Posts: 26
- Thank you received: 155
I used that on one of my machines for parked, regular and high speed values.
If you like I can send youa copy tomorrow.
Rick G
Please Log in or Create an account to join the conversation.
- Rick G
-
- Offline
- Junior Member
-
- Posts: 26
- Thank you received: 155
Please Log in or Create an account to join the conversation.
- Rick G
-
- Offline
- Junior Member
-
- Posts: 26
- Thank you received: 155
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
- Posts: 23182
- Thank you received: 4869
but that is a floating point variable. i can just connect that to a physical pin?
Not directly, no. You would need to take the floating point into a HAL component with a bit-type output. The most likely ones for this application are probably "near" and "wcomp".
There is a custom HAL component here that does what you want, too. (buried in quite a large discussion thread)
thread.gmane.org/gmane.linux.distributio...er/26042/focus=26086
Please Log in or Create an account to join the conversation.
- strykerg
- Offline
- Senior Member
-
- Posts: 53
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
- Posts: 23182
- Thank you received: 4869
this is rather complicated for my level. i assume i have to use the match8 component?
No, you would probably use "near"
www.linuxcnc.org/docview/html/man/man9/near.9.html
Please Log in or Create an account to join the conversation.
- strykerg
- Offline
- Senior Member
-
- Posts: 53
- Thank you received: 0
loadrt near count=3
addf near.0 base-thread
...same for 1 and 2
(sice i need this to be fast i would add it to the base thread...)
net axis.0.joint-vel-cmd near.0.in1
(since i want near.0.in2 to be 0 i could just ignore it?)
net parport.... <= near.0.out
Please Log in or Create an account to join the conversation.