Dual X Servo

More
28 Apr 2013 05:23 #33300 by juwi
Dual X Servo was created by juwi
Hi

www.linuxcnc.org/index.php/english/forum...in-closed-loop#23714

Andy told me "simply" to:

"connect axis.1.motor-pos-cmd to both PID modules in the HAL"

How is this done? If I just change:

net a-pos-cmd axis.3.motor-pos-cmd
to
net a-pos-cmd axis.1.motor-pos-cmd

There comes an "net already connected" error on Startup...

HAL File is attached, INI too, A axis is second Y axis

Help?

best regards
Attachments:

Please Log in or Create an account to join the conversation.

More
28 Apr 2013 05:52 - 28 Apr 2013 05:52 #33301 by juwi
Replied by juwi on topic Dual X Servo
michas_kleine.hal:164: Signal 'y-pos-cmd' can not add OUT pin 'axis.3.motor-pos-cmd', it already has OUT pin 'axis.1.motor-pos-cmd'
Attachments:
Last edit: 28 Apr 2013 05:52 by juwi.

Please Log in or Create an account to join the conversation.

More
28 Apr 2013 07:27 #33308 by andypugh
Replied by andypugh on topic Dual X Servo

Hi
www.linuxcnc.org/index.php/english/forum...in-closed-loop#23714
Andy told me "simply" to:
"connect axis.1.motor-pos-cmd to both PID modules in the HAL"
How is this done?


I just tried to make your HAL file work as suggested, and I have realised that it is rather important to know if you intend to use index-homing on both sides of the gantry.

I think I need to have a good long think about how to do homing on a gantry axis that uses servos and trivkins.

Please Log in or Create an account to join the conversation.

More
28 Apr 2013 07:30 #33309 by andypugh
Replied by andypugh on topic Dual X Servo
This is the HAL file I came up with, but I can't really test it.
The main point is that the HAL is now assuming a 3-axis machine, but with 4 PID controllers and 4 motors to drive.
Attachments:
The following user(s) said Thank You: juwi

Please Log in or Create an account to join the conversation.

More
28 Apr 2013 07:53 #33311 by juwi
Replied by juwi on topic Dual X Servo
michas_kleine.hal:111: Pin 'axis.0.motor-pos-cmd' was already linked to signal 'x1-pos-cmd'

exactly my problem...

Please Log in or Create an account to join the conversation.

More
28 Apr 2013 08:25 #33312 by juwi
Replied by juwi on topic Dual X Servo

Hi
www.linuxcnc.org/index.php/english/forum...in-closed-loop#23714
Andy told me "simply" to:
"connect axis.1.motor-pos-cmd to both PID modules in the HAL"
How is this done?


I just tried to make your HAL file work as suggested, and I have realised that it is rather important to know if you intend to use index-homing on both sides of the gantry.

I think I need to have a good long think about how to do homing on a gantry axis that uses servos and trivkins.


Homing is almost irrelevant, because I can home the machine by hand - its quite small - or by a special homing config with gantrykins...

My Problem is that hal forbids to add more than one outs to a net...

best regards

Please Log in or Create an account to join the conversation.

More
28 Apr 2013 19:03 #33323 by andypugh
Replied by andypugh on topic Dual X Servo

My Problem is that hal forbids to add more than one outs to a net...


Yes, only one of the pins in the net can be an output (such as axis.0.motor-pos-cmd). This is logical, as otherwise the value of the net is ambiguous.

To use one output to drive multiple inputs you can use any of the following structures.

net x-pos axis.0.motor-pos-cmd => pid.0.command pid.1.command

or

net x-pos axis.0.motor-pos-cmd=> pid.0.command
net x-pos pid.1.command

or

net x-pos axis.0.motor-pos-cmd
net x-pos pid.0.command
net x-pos pid.1.command

So, each signal (the label directly after the "net" command) can have only one output pin connected, but can have as many input pins as you need.

Please Log in or Create an account to join the conversation.

More
28 Apr 2013 19:07 #33324 by juwi
Replied by juwi on topic Dual X Servo
This works, but leads to a following error on the slave axis after exceeding max-ferror...

Please Log in or Create an account to join the conversation.

More
28 Apr 2013 19:12 #33325 by andypugh
Replied by andypugh on topic Dual X Servo
If the motors point in different directions then you will need a negative encoder scale on one of them.

Each PID component needs to be connected to the same command position pin, but to its own feedback position pin.

Please Log in or Create an account to join the conversation.

More
28 Apr 2013 19:26 #33327 by juwi
Replied by juwi on topic Dual X Servo
I write on my mobile, therefore short...

I left everything of the slave axis as it was, just connect the pid.commanded from y.pos to both. Result is following error after exceeding fferror-max.

Both are setup identical and rotate in the same direction...

Please Log in or Create an account to join the conversation.

Time to create page: 0.160 seconds
Powered by Kunena Forum