More help with two steppers on one axis please

More
18 Jul 2017 10:03 #95963 by aaron
aaron replied the topic: More help with two steppers on one axis please
Joel
I am not the person to ask, because I barely understand what I did.
But basically I created a configuration with step config as an xyza machine.
In the inil file I edited the a axis to be an x axis, told the machine it was an xyzx contraption in the KINS section and an xyz in the coordinates section. Then edited the hal file,but this is where I get lost so you will have to go back over the thread
Sorry
Aaron
More
18 Jul 2017 10:20 #95964 by rodw
rodw replied the topic: More help with two steppers on one axis please

aaron wrote: Thanks both very much
Thats done it. Finally.
Yes, I do have a rotary attachment so I did want to keep another axis in the mix somehow, but for now I am more than happy with just XY and Z.
Kindest regards
Aaron

You can still do this. I would just cut and paste one of the axes setups in both the ini file and hal file and edit them to be joint 4, axis A. I will do this to my machine later and have got as far as adding the 5th stepper driver... You probably have learnt enough to do this by now.
More
18 Jul 2017 10:31 #95965 by joel0407
joel0407 replied the topic: More help with two steppers on one axis please
Thanks Aaron.

I spoke with Rodw this afternoon on the phone and I've worked out I need to have a look at the INI and HAL files to get a bit of an understanding what is going on.

Happy Days
The following user(s) said Thank You: rodw
More
18 Jul 2017 10:57 #95966 by joel0407
joel0407 replied the topic: More help with two steppers on one axis please
I think I'm getting somewhere. I am posting this blind as I am at work and don't have access to my LinuxCNC machine that is at home.

From "8.2.2.13 [JOINT_<num>] Section" in the manual.

I'm thinking somewhere in the INI file I will find a section with values like:

"• JOINT_0 = X
• JOINT_1 = Y
• JOINT_2 = Z
• JOINT_3 = A"

I am hoping I will be right in modifying them to be something like this:

• JOINT_0 = X
• JOINT_1 = X
• JOINT_2 = Y
• JOINT_3 = Z

That should get JOINT_0 and JOINT_1 moving together as the X axis.

I found somewhere that there will be the number of Joints specified as well.

I found the homing section which specifies the homing for each joint and I can specify for JOINT_0 and JOINT_1 to home together in section "8.3.3.10 HOME_SEQUENCE" of the manual.

I guess the INI file will look like section "8.4.2 INI Settings" details in the manual.


Think I'm getting somewhere. Just need to find the pinouts for the parallel port. It's confusing when Stepconf has drop down for Axis "Step" and "Dir" but LinixCNC 2.8 actually outputs to joints, not axis.

Happy Days. More Reading
More
18 Jul 2017 11:42 #95969 by rodw
rodw replied the topic: More help with two steppers on one axis please

joel0407 wrote: Thanks Aaron.

I spoke with Rodw this afternoon on the phone and I've worked out I need to have a look at the INI and HAL files to get a bit of an understanding what is going on.

Happy Days


Us Aussies have to stick together even if we live 6000 odd km apart...

This is the .ini file docs for master
linuxcnc.org/docs/devel/html/config/ini-config.html

The .ini files describes the static config of the hardware that does not change

This bit maps axes to joints in ascending numerical order
[KINS]
JOINTS = 4
KINEMATICS = trivkins coordinates=XXYZ

Joint 0 = X
Joint 1 = X1 (not really an X1, just part of X)
Joint 2 = Y
Joint 3 = Z

NOw copying an example earlier in this thread, this bit sets the Joint 0 defaults
[JOINT_0]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -10.0
MAX_LIMIT = 2430.0
MAX_VELOCITY = 75.0
MAX_ACCELERATION = 380.0
STEPGEN_MAXACCEL = 475.0
SCALE = 72.7272727273
FERROR = 1
MIN_FERROR = .25
HOME_OFFSET = -10.000000
HOME_SEARCH_VEL = -5.000000
HOME_LATCH_VEL = -5.000000
HOME_SEQUENCE = -1

There will be a corresponding probably identical section for Joint 1
And then this section defines the X axis (joints 0 & 1)
[AXIS_X]
MAX_VELOCITY = 75.0
MAX_ACCELERATION = 380.0
MIN_LIMIT = -10.0
MAX_LIMIT = 2430.0

Then finally in the hal file, the rest of the X axis config is set up
setp stepgen.0.position-scale [JOINT_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 52000
setp stepgen.0.dirsetup 52000
setp stepgen.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL
net xpos-cmd joint.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => joint.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable joint.0.amp-enable-out => stepgen.0.enable
net home-x => joint.0.home-sw-in

Don't take any of this as being correct. It was just the handiest hal and in files around.

Hope that helps. Remember, HAL stands for Hardware Abstraction Layer so it is the programming interface that tells LCNC how to use your hardware.
More
18 Jul 2017 13:27 #95976 by joel0407
joel0407 replied the topic: More help with two steppers on one axis please
Thanks Rodw.

Now this gets confusing. Part "8.8.3 Pinout" of the manual.

"8.8.3.1 Standard Pinout HAL" says:

# finally connect physical pins to the signals
net Xstep => parport.0.pin-03-out
net Xdir => parport.0.pin-02-out
net Ystep => parport.0.pin-05-out
net Ydir => parport.0.pin-04-out
net Zstep => parport.0.pin-07-out
net Zdir => parport.0.pin-06-out

What?

So I have 2 motors on X Axis. So I can define for example pins 2 and 3 to be xdir and xstep then 4 and 5 to be the same. Connect a motor driver to each pair. Makes a little bit of sense as both motors will need to make the same number of steps. Right up to the "Homing". How will LinuxCNC know which motor is connected to which joint for homing as they are both referred to as axis not joints in the pinout?
More
18 Jul 2017 13:28 #95977 by joel0407
joel0407 replied the topic: More help with two steppers on one axis please
Further down, inputs are linked to joints but still not seeing outputs linked to joints.
More
18 Jul 2017 20:42 #96019 by rodw
rodw replied the topic: More help with two steppers on one axis please
Xstep in your example is just an arbitrary signal name that can be anything you want. It is created elsewhere in hal. In the example hal code I quoted it is like this.
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir

In this case, the Stepgen for joint 0 is connected to the signal so you need something like
net Xstep <= stepgen.0.step
net Xdir <= stepgen.0.dir
net Xstep => parport.0.pin-03-out
net Xdir => parport.0.pin-02-out
net X1step <= stepgen.1.step
net X1dir <= stepgen.1.dir
net X1step => parport.0.pin-n1-out
net X1dir => parport.0.pin-n2-out

eg, you need other par port pins for parport.0.pin-n1-out and parport.0.pin-n2-out
Now you have the joints connected.
Please don't take my word as gospel as I've never used a par port.
More
22 Jul 2017 10:08 #96271 by joel0407
joel0407 replied the topic: More help with two steppers on one axis please

Todd Zuercher wrote: If your joints are X-0, Y-1, Z-2, and X2-3, in the TRAJ section there should be a line
COORDINATES = XYZA
(or something like that). This designates the axis letters that are displayed. There can be no duplicate letters on this line. Change it to:
COORDINATES = XYZ


This says otherwise:

linuxcnc.org/docs/html/man/man9/gantrykins.9.html#FUNCTIONS
More
22 Jul 2017 10:23 #96274 by rodw
rodw replied the topic: More help with two steppers on one axis please
Joel, Todd was referring to the [DISPLAY] section, not kinematics.

With the release of Joint axis which is now embedded in Master (v 2.8), gantrykins is obsolete. You must be careful you are referring to the correct version of docs as there are many of them. There have been many changes...

Always make sure you find the development docs from the main linuxcnc.org home page.
See linuxcnc.org/docs/devel/html/

As a rule the, info is current now.
Moderators: Rick G
Time to create page: 0.076 seconds
Powered by Kunena Forum