- Posts: 5
- Thank you received: 0
Help with gantry machine. Dual motor setup
- Mulholland
- Topic Author
- Offline
- New Member
-
Less
More
4 years 1 month ago #252629
by Mulholland
Help with gantry machine. Dual motor setup was created by Mulholland
Hello Linuxcnc Forum,I have been using my router now with linuxcnc for about 6 years or so and mostly without a problem.
It's a XYYZ gantry machine and I have until yesterday been manually squaring the gantry (hard stops with power off).I recently decided to implement gantry squaring in the homing sequence, which took a bit of figuring out but it works like it should. The problem that I can't seem to work out now is the gantry motors wont reach full speed without stalling or missing steps! Obviously bad for a gantry!
The only thing different (that I can tell) is both Y motors are getting different step and direction signals. Before I changed things over both Y drivers were sharing parport pins, one step and direction for both drivers.I feel like it has something to do with timing or latency but maybe I missed a critical step? Do I need to sync the motors some other way after homing? I mean if it jogs like it should after homing it should be right, right?
I really tried to avoid starting a new thread on gantry/dual motor problems but I have been sitting here all day searching through old posts, reading about double-steps and going through the documentation but I can't seem to find it out. If anyone can point me to the right information I would greatly appreciate it.
Thanks,
Jeremy
It's a XYYZ gantry machine and I have until yesterday been manually squaring the gantry (hard stops with power off).I recently decided to implement gantry squaring in the homing sequence, which took a bit of figuring out but it works like it should. The problem that I can't seem to work out now is the gantry motors wont reach full speed without stalling or missing steps! Obviously bad for a gantry!
The only thing different (that I can tell) is both Y motors are getting different step and direction signals. Before I changed things over both Y drivers were sharing parport pins, one step and direction for both drivers.I feel like it has something to do with timing or latency but maybe I missed a critical step? Do I need to sync the motors some other way after homing? I mean if it jogs like it should after homing it should be right, right?
I really tried to avoid starting a new thread on gantry/dual motor problems but I have been sitting here all day searching through old posts, reading about double-steps and going through the documentation but I can't seem to find it out. If anyone can point me to the right information I would greatly appreciate it.
Thanks,
Jeremy
Attachment not found
Attachment not found
Please Log in to join the conversation.
4 years 1 month ago #252638
by rodw
Replied by rodw on topic Help with gantry machine. Dual motor setup
Looks like none of your joints have the following critical settings
Don't assume my values are correct. They are just a bit of a guess.
Code:
DIRSETUP = 5000
DIRHOLD = 5000
STEPLEN = 10000
STEPSPACE = 10000
STEP_SCALE = 10000
Don't assume my values are correct. They are just a bit of a guess.
Please Log in to join the conversation.
- Mulholland
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
4 years 1 month ago #252639
by Mulholland
Replied by Mulholland on topic Help with gantry machine. Dual motor setup
Hi, thanks for looking over it.
All joints have:
All joints have:
Code:
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 10200
setp stepgen.1.dirsetup 10200
setp stepgen.1.maxaccel
No sign of step scale though. Assuming your example, the values of Steplen and stepspace could be the issue?
Edit:
It looks like I need to simply declare them as variables?
Please Log in to join the conversation.
- tommylight
-
- Online
- Administrator
-
Less
More
- Posts: 22013
- Thank you received: 4
4 years 1 month ago #252640
by tommylight
Replied by tommylight on topic Help with gantry machine. Dual motor setup
Wait...
From your hal file:
Change the reset time to 5000 or start at 10000 and lower gradually till you are OK with it.
From your hal file:
Code:
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hal_parport cfg="0 out"
setp parport.0.reset-time 1000
loadrt stepgen step_type=0,0,0,0,0
loadrt pwmgen output_type=1
Please Log in to join the conversation.
- Mulholland
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
4 years 1 month ago #252752
by Mulholland
Replied by Mulholland on topic Help with gantry machine. Dual motor setup
Okay, so I had a few hours to play around and changing the reset time but alas to no avail.
I'll have a look at some more timing things but the problem still exists.
I need to get some more work done so I'll probably have to revert the changes I've made for gantry squaring for now but any help would be greatly appreciated!
I'll have a look at some more timing things but the problem still exists.
I need to get some more work done so I'll probably have to revert the changes I've made for gantry squaring for now but any help would be greatly appreciated!
Please Log in to join the conversation.
- Mulholland
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
4 years 1 month ago #252968
by Mulholland
Replied by Mulholland on topic Help with gantry machine. Dual motor setup
SOLVED.
For anybody in the future who happens to have the same problem, the issue was the choice of parallel port pins.
I have a rotary axis so pins 2-9 were in use and when I gave my Y2 motor it's own step and direction pins I just used the next free output pins, 16 and 17.
It worked just fine, until I sped things up and then one motor would lose steps and rack the gantry.
By moving Y2 to pin-02 and 03 and the rotary axis to 16 and 17 has fixed the problem on the gantry at least.
Is this a known problem? Or should that have worked just fine? Is it maybe a wire shielding issue?
At least it's working now anyway.
For anybody in the future who happens to have the same problem, the issue was the choice of parallel port pins.
I have a rotary axis so pins 2-9 were in use and when I gave my Y2 motor it's own step and direction pins I just used the next free output pins, 16 and 17.
It worked just fine, until I sped things up and then one motor would lose steps and rack the gantry.
By moving Y2 to pin-02 and 03 and the rotary axis to 16 and 17 has fixed the problem on the gantry at least.
Is this a known problem? Or should that have worked just fine? Is it maybe a wire shielding issue?
At least it's working now anyway.
Please Log in to join the conversation.
- tommylight
-
- Online
- Administrator
-
Less
More
- Posts: 22013
- Thank you received: 4
4 years 1 month ago #252973
by tommylight
Replied by tommylight on topic Help with gantry machine. Dual motor setup
It is not a problem, it is just how the parallel port works, there are 8 data pins 2-9, "service" pins 1,14,16,17,, and "i do not know" pins 10,11,12,13,15.
Pins 2-9 can be used as inputs or outputs, same with 1,14,16,17, but pins 10,11,12,13,15 can only be inputs.
There are also electrical differences between them, pins 2-9 are better at sinking than sourcing current, pins 1,14,16,17 when used as inputs require more current than pins 2-9 or 10,11,12,13,15, etc, etc.
It has 3 modes of operation:
-OUT = 12 outputs +5 inputs
-IN = 4 outputs +13 inputs / data pins 2-9 are inputs
-X = 8 outputs +9 inputs / only data pins are outputs
Pins 2-9 can be used as inputs or outputs, same with 1,14,16,17, but pins 10,11,12,13,15 can only be inputs.
There are also electrical differences between them, pins 2-9 are better at sinking than sourcing current, pins 1,14,16,17 when used as inputs require more current than pins 2-9 or 10,11,12,13,15, etc, etc.
It has 3 modes of operation:
-OUT = 12 outputs +5 inputs
-IN = 4 outputs +13 inputs / data pins 2-9 are inputs
-X = 8 outputs +9 inputs / only data pins are outputs
Please Log in to join the conversation.
- tommylight
-
- Online
- Administrator
-
Less
More
- Posts: 22013
- Thank you received: 4
4 years 1 month ago #252974
by tommylight
Replied by tommylight on topic Help with gantry machine. Dual motor setup
Strobe, one group of those pins is called strobe, or a pin, a bit fuzzy ...
Please Log in to join the conversation.
- Mulholland
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
4 years 1 month ago #252995
by Mulholland
Replied by Mulholland on topic Help with gantry machine. Dual motor setup
Wow, fantastic explanation, thank you.
But I guess this means the rotary axis shouldn't be on pins 16 and 17?
I mean, it works but I can't see if it's not keeping up like the obvious signs of a racking gantry.
I do have a second parallel port but that is not supposed be used for step and direction signals?
But I guess this means the rotary axis shouldn't be on pins 16 and 17?
I mean, it works but I can't see if it's not keeping up like the obvious signs of a racking gantry.
I do have a second parallel port but that is not supposed be used for step and direction signals?
Please Log in to join the conversation.
- tommylight
-
- Online
- Administrator
-
Less
More
- Posts: 22013
- Thank you received: 4
4 years 1 month ago #253004
by tommylight
Replied by tommylight on topic Help with gantry machine. Dual motor setup
Pins 16 and 17 can be used, it is just that they might not work as the data pins, or might not meet the drive requirements at higher speeds. Probably more to do with the drives, but i never investigated it thoroughly.
I know for sure some encoders will not work with pins 1,14,16,17 when used as inputs as they do require more current than the pins 10,11,12,13,15.
And yes, second parallel port can be used for everything, there is just one issue that might crop up, address change after a reboot, and that could be remedied by entering BIOS and seting the resourse assignment to manual. Most new boards/PC's do not have that option though.
Even if this happens, checking the address and changing it in the hal file takes about a minute of time.
I know for sure some encoders will not work with pins 1,14,16,17 when used as inputs as they do require more current than the pins 10,11,12,13,15.
And yes, second parallel port can be used for everything, there is just one issue that might crop up, address change after a reboot, and that could be remedied by entering BIOS and seting the resourse assignment to manual. Most new boards/PC's do not have that option though.
Even if this happens, checking the address and changing it in the hal file takes about a minute of time.
Please Log in to join the conversation.
Time to create page: 0.161 seconds
