10 Axis stepgen Mcode
- sharp_reaper
- Offline
- Senior Member
Less
More
- Posts: 73
- Thank you received: 7
06 Jun 2019 13:41 #136045
by sharp_reaper
Replied by sharp_reaper on topic 10 Axis stepgen Mcode
No, put manually the other joints, it can be up to 9, my tenth joint is controled via m-code I need only two positions and just work fine
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23178
- Thank you received: 4864
06 Jun 2019 13:49 #136046
by andypugh
Replied by andypugh on topic 10 Axis stepgen Mcode
Except that you are asking how to home the joint.
This is easy to do with extrajoints, but not so easy when you are using something like limit3
You could write a HAL component that applies an offset to the command position, and learns that offset when given a homing command.
You could also do this with existing HAL components, using a mux2 as a latch triggered by the home switch state changing. (But more logic would be needed to. You probably need to create a HAL signal to store the homed state, for example, to operate the mux, you can sets that to 0 when doing the homing move.
This is easy to do with extrajoints, but not so easy when you are using something like limit3
You could write a HAL component that applies an offset to the command position, and learns that offset when given a homing command.
You could also do this with existing HAL components, using a mux2 as a latch triggered by the home switch state changing. (But more logic would be needed to. You probably need to create a HAL signal to store the homed state, for example, to operate the mux, you can sets that to 0 when doing the homing move.
The following user(s) said Thank You: sharp_reaper
Please Log in or Create an account to join the conversation.
- sharp_reaper
- Offline
- Senior Member
Less
More
- Posts: 73
- Thank you received: 7
06 Jun 2019 16:00 #136071
by sharp_reaper
Replied by sharp_reaper on topic 10 Axis stepgen Mcode
That would be perfect to get homed, latch and the value to be 0.
Im fresh in linuxcnc. If I connect a signal to an input of stepgen I can't put the signal to zero because the signal has own writer (input of stepgen) and I can't put that value into 0 because is not writable.
Don't know if makes sense.
any question go ahead
Im fresh in linuxcnc. If I connect a signal to an input of stepgen I can't put the signal to zero because the signal has own writer (input of stepgen) and I can't put that value into 0 because is not writable.
Don't know if makes sense.
any question go ahead
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17997
- Thank you received: 4842
06 Jun 2019 17:38 #136075
by PCW
Replied by PCW on topic 10 Axis stepgen Mcode
This is why you would need a mux2 component:
You cannot assign a signal or pin 2 or more different values, that doesn't make sense.
What you can do is drive the stepgen pin with the output of a mux2 component
The mux2 is basically a SPDT selector switch that selects between 2 inputs depending on the "sel" input
man mux2
You cannot assign a signal or pin 2 or more different values, that doesn't make sense.
What you can do is drive the stepgen pin with the output of a mux2 component
The mux2 is basically a SPDT selector switch that selects between 2 inputs depending on the "sel" input
man mux2
The following user(s) said Thank You: sharp_reaper
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23178
- Thank you received: 4864
10 Jun 2019 15:53 #136481
by andypugh
Replied by andypugh on topic 10 Axis stepgen Mcode
Also, a mux2 with the output looped back to the input can be used as a sample-and-hold component to store an offset.
<thinks>I really should make an alternative to the existing int-only sample-and-hold component to avoid this silliness.
<thinks>I really should make an alternative to the existing int-only sample-and-hold component to avoid this silliness.
Please Log in or Create an account to join the conversation.
Time to create page: 0.200 seconds