PathPilot, 7i92, G540 HAL file

More
4 years 5 months ago #242671 by rodw
Replied by rodw on topic PathPilot, 7i92, G540 HAL file
Rigid tapping is supported in Linuxcnc by default
Probe Basic is out of tree and requires a lot of additional dependencies to run. I would skip it for a while too.
I would start by building a standard axis install with pncconf and once you have all your homing etc sorted, look at migrating to the others that tickle your fancy.

By then, there will be large blocks of your hal and ini file you can cut and paste to a new config.
 

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

More
4 years 5 months ago #242760 by phomann

Note that none of the stepgen pins needs any changes
as they are addressed as stepgen 0..4 in the hal file
not by pin number so there are only a few GPIO changes
needed (1/14 - GPIO 0,1 and 16/17 = GPIO 5/7)

There's a lot of Tormach specific code on the hal file that
IMHO is best removed (especially the shared probe/limit pins
and the spindle control stuff)

You will also need to delete all the step output inversions
since the G540 has active high step inputs:

# P3 pin 3 gpio 004
# X step
setp hm2_[HOSTMOT2](BOARD).0.gpio.004.invert_output 1
^^^^^^^^^^^^ delete all lines like this
This is using a deprecated (GPIO dependent) way to invert the step outputs
but you dont want inversion at all
Hi PCW,

Thanks for that. The bit I'm missing from my understanding is that in the HAL file, say for the X axis, I can't see where StepGen channel 0 sets the;
 X Step signal to I/O 4
 X Dir signal to I/O 2

Is that not done in the HAL file? I expected it to be in the X Axis section where it sets up all the parameters for the StepGen channel 00, which is used by the X-axis.

Cheers,

Peter

 

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

More
4 years 5 months ago #242765 by rodw
Replied by rodw on topic PathPilot, 7i92, G540 HAL file
I'm not sure what version of Lcnc PP follows.  V 2.7 and below had joints (motors)  mapped to ZYZ... axes  (to joints 0,1,2...) and this was hard coded.
V 2.8 introduced a new feature, sometimes called joint axes which is a bit of a misnomer. Independent axes might have been a better term. This feature lets you map the joints to axes as you see fit. This is done in the ini file where you will see:
Code:
[TRAJ] AXES = 4 COORDINATES = X Y Z A

This looks more like 2.7 syntax to me.

If you had a gantry machine under 2.8 it might be:
Code:
[TRAJ] JOINTS = 5 COORDINATES = X X Y Z A

The ini file describes the physical machine parameters and the hal file sets the configuration nad connects wiring and sensors etc to the Linuxcnc internals

 

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

More
4 years 4 months ago #246338 by phomann
Hi all,
Just a quick update.
I ended up using the the 440 mill configuration as a starting base, as this machine uses the Leadshine MX3660 controller, which has the same parallel port interface pin assignments as the G540. 

Also, the 440 has 5mm ballscrews that match my TM20VL machine so that was a help. I’ve also left the speeds alone as they seem ok. I did have to adjust the travel limits to suite my TM20LV machine.

I did do a few changed though. Pin 1 in the configuration was assigned to Spindle enable and Pin 17 is for the coolant.
I changed Pin 1 to be spindle direction, pin 17 to be spindle enable, and move the coolant enable to Pin 17 on the other port of the 7i92.

The 440 spindle is a configured for FWD only, I enabled the spindle reverse, set up Pin 1 for spindle direction.

I now have the spindle controlled FWD and REV from PathPilot.
When running the machine from Mach3 I used Modbus to control the spindle speed so it was dead on the commanded speed. This was great for semi rigid tapping. 
With PathPilot I am using the PWM to 10V converter in the G540. I played around with the values for PWM voltage min and max in the Hal file and got it quite close, about 5% error.
I then used the linearize function and got it to be quite accurate in the forward direction, but off a bit in the REV direction, I  traded using the speed absolute value bu it didn’t seen to do much. I may need to remove the linearize function and play around with the min max PWM voltage values to get the speed to be accurate in the tapping speed range I use, 500 - 700 rpm.

The VFD I’m using requires a +/- 10V to control the forward and reverse direction. As the G540 only produces a 0-10V output, I converted this to +/- 10V by;
1. Feeding the G540 VFD +10V supply from a separate 10V dc isolated supply.
2. Used the spindle dir signal to control a DPDT signal relay
3 Wired the relay so that when the spindle rev is comanded the relay is energized and it swaps the 0V and Vin signals to the VFD so that the 0-10V signal connects to the VFD potentiometer 0V terminal, and the G540 VFD 0V output connects to the VFD potentiometer Vin terminal. This way the VFD sees a negative voltage causing the spindle to run in reverse.

I also took a bit of time to add home switches to the machine (3D printed all the parts to ensure their fit first)
I sent some time  to learn and understand the ini and Hal files, but still know almost nothing.
I still have a lot to do but I’m making a lot of progress.
Cheers,

Peter
 
The following user(s) said Thank You: andypugh, Clive S, Whitebarn

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

More
3 years 3 months ago #276546 by Whitebarn
Hi, I'm dealing with the same issues as you were. Thanks for sharing so much with the group. :)

You mentioned, since the 440 spindle is a configured for FWD only, I enabled the spindle reverse. And you set up Pin 1 for spindle direction.

How did you enable spindle reverse? And what did you have to do to set Pin 1 for direction?

Thanks!

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

More
3 years 3 months ago - 3 years 3 months ago #276669 by phomann
Hi,
When I get home tonight, I’ll dig out the files I modified.
In the end it was quite simple once I understood what was going on?
Cheers
Peter.
Last edit: 3 years 3 months ago by phomann. Reason: Typo
The following user(s) said Thank You: Whitebarn

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

Time to create page: 0.066 seconds
Powered by Kunena Forum