4 Axes Machine Questions
- Todd Zuercher
- Topic Author
- Offline
- Platinum Member
- Posts: 5007
- Thank you received: 1441
Please Log in or Create an account to join the conversation.
As it is a stepper config it is easy for us to try it out. Can you attach the whole config directory as a Zip file?
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Topic Author
- Offline
- Platinum Member
- Posts: 5007
- Thank you received: 1441
someone mentioned writing a script to adjust the G code files. This might be my best option, but something tells me this might be harder than it sounds.
I'd need something that could take code like this:
G1 X7.286672 Y10.920909 Z-0.165422
G1 X7.290075 Y10.882176 Z-0.162863
G1 X7.289496 Y0.985702 Z-0.161858
G1 X7.286561 Y0.942836 Z-0.161923
G1 X7.280504 Y0.912766 Z-0.166510
G1 X7.256354 Y0.833603 Z-0.159223
G00 Z0.25
G00 X7.006710 Y0.939417 Z0.25
G00 Z0.0
G1 X7.006710 Y0.939417 Z-0.079312
G1 X6.995858 Y0.916412 Z-0.086247
G1 X6.980558 Y0.899274 Z-0.080125
G1 X6.937673 Y0.867952 Z-0.085329
G1 X6.918087 Y0.863142 Z-0.087211
G1 X6.889543 Y0.859730 Z-0.086135
and turn it into code like this:
(the axis letter W would need to be what ever the 4th axis is)
G1 X7.286672 Y10.920909 Z-0.165422 W-0.165422
G1 X7.290075 Y10.882176 Z-0.162863 W-0.162863
G1 X7.289496 Y0.985702 Z-0.161858 W-0.161858
G1 X7.286561 Y0.942836 Z-0.161923 W-0.161923
G1 X7.280504 Y0.912766 Z-0.166510 W-0.166510
G1 X7.256354 Y0.833603 Z-0.159223 W-0.159223
G00 Z0.25 W0.25
G00 X7.006710 Y0.939417 Z0.25 W0.25
G00 Z0.0 W0.0
G1 X7.006710 Y0.939417 Z-0.079312 W-0.079312
G1 X6.995858 Y0.916412 Z-0.086247 W-0.086247
G1 X6.980558 Y0.899274 Z-0.080125 W-0.080125
G1 X6.937673 Y0.867952 Z-0.085329 W-0.085329
G1 X6.918087 Y0.863142 Z-0.087211 W-0.087211
G1 X6.889543 Y0.859730 Z-0.086135 W-0.086135
Please Log in or Create an account to join the conversation.
[1] ie net fb-loop axis.8.motor-pos-cmd => axis.8.motor-pos-fb
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Topic Author
- Offline
- Platinum Member
- Posts: 5007
- Thank you received: 1441
So what could the M code look like (using A instead of W, using W as a 4th axis will be a topic of another discussion)
for ZZ
#!/bin/sh
halcmd net Apos-cmd axis.2.motor-pos-cmd => stepgen.3.position-cmd
and for ZA
#!/bin/sh
halcmd net Apos-cmd axis.3.motor-pos-cmd => stepgen.3.position-cmd
Please Log in or Create an account to join the conversation.
for ZZ
#!/bin/sh
halcmd net Apos-cmd axis.2.motor-pos-cmd => stepgen.3.position-cmd
Yes, that is pretty much it (using, as you said, trivkins).
However, you need to remove the old link before creating the new one, which you should be able to do with halcmd delsig Apos-cmd (you can try these commands out in a terminal window to see if they work)
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Topic Author
- Offline
- Platinum Member
- Posts: 5007
- Thank you received: 1441
Debug file information:
core_stepper.hal:32: Pin 'axis.2.motor-pos-cmd' was already linked to signal 'Zpos-cmd'
7643
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Topic Author
- Offline
- Platinum Member
- Posts: 5007
- Thank you received: 1441
Zpos-cmd axis.2.motor-pos-cmd => stepgen.3.position-cmd
Then when I try to jog z I get a joint 3 following error
Please Log in or Create an account to join the conversation.
I tried it and received the error
Debug file information:
core_stepper.hal:32: Pin 'axis.2.motor-pos-cmd' was already linked to signal 'Zpos-cmd'
7643
Ah, yes.
In that case, you probably need to use "linkps"
halcmd unlinkp axis.3.motor-pos-cmd
halcmd linkps axis.3.motor-pos-cmd Zpos-cmd
And
halcmd unlinkp axis.3.motor-pos-cmd
halcmd linkps axis.3.motor-pos-cmd Apos-cmd
(except, of course, that I just told you to delsig Apos-cmd, so you will need to restart the config to recreate it)
I am shooting from the hip here, I have never tried this.
Please Log in or Create an account to join the conversation.
(I should have said, the feedback from the stepgen just reports that the pulse generator can keep up with the commanded speed, so is semi-optional)
Please Log in or Create an account to join the conversation.