configuring a rotary axis on a CNC Rrouter

More
17 Dec 2019 09:52 #152784 by aaron
Hi
I am struggling to configure a rotary axis on a xyz gantry router with two steppers on the x axis. I have attached hal and ini files for the working xyz machine and the hal and ini files I am trying to configure as a rotary. Any help on this issue would be very gratefully received.
Thanks
Aaron
Attachments:

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

More
22 Dec 2019 02:00 #153010 by tommylight
On the 3 axis ini file:
The joint 3 section must be under the joint 1 section of AXIS X.
The hal file for that ini is set up as XYZA, not XYZX as you have it set in the ini.
As you have it set, you have a 4 axis setup that has outputs active for the first 3 axis.

On the 4 axis HAL file:
remove all lines with "setp parport.0.pin-02-out-reset 1", you are reseting the parallel port so you do not need to reset pins, and the pin 4 is written in two lines
on the 4 axis ini file, again the joint 3 is in the wrong place, it has to be at the Axis X section, under joint 0

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

More
02 Jan 2020 16:53 #153798 by aaron
Hi Tommylight

Thanks very much for your answer, sorry it has taken a while to get back to you.

The 3 axis configuration is working okay. In the ini. file I have moved the joint 3 section to under the joint 0 in the A axis block, so thanks for that.

In the 4 axis configuration, when I try to home the machine the the Y axis homes fine, but only one motor of the x axis moves the gantry to home, the other motor moves the gantry in the wrong direction. I can jog the Y and the Z axis, but not the rotary. There is no power going to the rotary axis.

Unfortunately I don't understand how to do the edits you suggest. I would be very grateful if you could give me a more detailed set of instructions.

Thanks again

Aaron

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

More
03 Jan 2020 06:22 #153865 by tommylight
The joints that are for the same axis, the X axis in your case must have "HOME_SEQUENCE = -1" for both joints.
Editing hal and ini files is easy, just open them with a text editor and edit as described, save and try to start Linucnc again to test the changes.
The following user(s) said Thank You: aaron

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

More
04 Jan 2020 09:37 #153973 by aaron
Hi.
Please, can some one tell me how to add the rotary axis to to the attached hal and ini files. I have also attached pin assignment diagram. I have looked at these files in gedit but cannot understand what is wrong. I can home and jog the X Y and Z axis but the rotary stepper has no power to it.
Thanks.
Attachments:

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

More
04 Jan 2020 10:55 - 04 Jan 2020 10:56 #153980 by Leon82
On some of those Chinese breakout boards when you use the spindle speed feature you lose the 5th axis control. You might be able to reassign some but I'm not sure. It may have a jumperthat needs to move also
Last edit: 04 Jan 2020 10:56 by Leon82.
The following user(s) said Thank You: aaron

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

More
04 Jan 2020 19:20 #154013 by aaron
Thanks for your response.
As far as I know I am not using the spindle speed option. I change the spindle speed on the 3 phase frequency converter. I just want to know how to edit the hal and ini files.
Thanks again
Aaron

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

More
08 Jan 2020 22:02 #154352 by andypugh
Copy and paste error:
net ystep           => parport.0.pin-04-out
setp parport.0.pin-04-out-reset 1
net ydir            => parport.0.pin-05-out
net zstep           => parport.0.pin-06-out
setp parport.0.pin-06-out-reset 1
net zdir            => parport.0.pin-07-out
net x2step           => parport.0.pin-08-out
setp parport.0.pin-08-out-reset 1
net x2dir            => parport.0.pin-09-out
net home-x          <= parport.0.pin-10-in
net home-y          <= parport.0.pin-11-in
net home-z          <= parport.0.pin-12-in
net home-x2         <= parport.0.pin-13-in
net estop-ext       <= parport.0.pin-15-in
net astep           => parport.0.pin-16-out
net adir            => parport.0.pin-17-out
setp parport.0.pin-04-out-reset 1

You reset pin 04 twice, and pin 16 never.

It might not be that, though.

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

More
09 Jan 2020 11:29 #154427 by aaron
andypugh
Thank you very much. That did the trick.
If you have a moment would you mind explaining why some of the pins need to be reset and some not.
Gratefully
Aaron

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

More
09 Jan 2020 12:53 #154432 by andypugh
In principle LinuxCNC can only step at half the base thred frequency, turning a pin on during one thread cycle, then turning it off on the next.

The parallel port driver has an extra function called "reset". If a channel is specified with reset active, then the driver sets it high when required on one thread cycle, then, in the same cycle, but at the end, it checks to see if the "reset time" has elapsed and resets the registered pins back to zero. If the time has not elapsed it waits until it has and then resets (note that this wait is blocking, and should not be too long)

linuxcnc.org/docs/2.7/html/hal/parallel-...ml#_using_doublestep

Setting STEP_SPACE to 0 in the HAL / INI is the hint to the driver that you want to use reset. If you set the step space to zero )as you did) but don't add it to the reset list, then the write thread will only ever set the pin high, and with no reset function to set it low, you will get no steps.
The following user(s) said Thank You: aaron

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

Time to create page: 0.109 seconds
Powered by Kunena Forum