PathPilot, 7i92, G540 HAL file
11 May 2022 03:21 #242565
by phomann
PathPilot, 7i92, G540 HAL file was created by phomann
Hi All,
I'm attempting to get PathPilot 2.8.3 to interface to a G540 controller via a Mesa 7i92 Ethernet card.I'm selecting the machine as a 1110-3 and can set the G540 .bit file in tormach_1100-3_7i92_specific.ini
I now need to modify the HAL file to link the necessary PathPilot signals to the Mesa card input/output pins.
This is where my talent has run out.
Has someone done this previously and have the files with the necessary changes? My understanding is that I need to change the HAL file tormach_mill_mesa.hal
I understand the concept around the HALfile but have no experiencing creating or editing one.
I have a backup solution of using a small circuit board to do the rerouting the signals but I'd prefer to to it in software. I did jury rig the connections to the G540 using a RS232 DB25 breakout box to show that it would work. I'd need to use a small micro to convert the step frequency spindle control to a PWM signal for the G540.
Cheers,
Peter
I'm attempting to get PathPilot 2.8.3 to interface to a G540 controller via a Mesa 7i92 Ethernet card.I'm selecting the machine as a 1110-3 and can set the G540 .bit file in tormach_1100-3_7i92_specific.ini
I now need to modify the HAL file to link the necessary PathPilot signals to the Mesa card input/output pins.
This is where my talent has run out.
Has someone done this previously and have the files with the necessary changes? My understanding is that I need to change the HAL file tormach_mill_mesa.hal
I understand the concept around the HALfile but have no experiencing creating or editing one.
I have a backup solution of using a small circuit board to do the rerouting the signals but I'd prefer to to it in software. I did jury rig the connections to the G540 using a RS232 DB25 breakout box to show that it would work. I'd need to use a small micro to convert the step frequency spindle control to a PWM signal for the G540.
Cheers,
Peter
Please Log in or Create an account to join the conversation.
11 May 2022 03:47 #242568
by PCW
Replied by PCW on topic PathPilot, 7i92, G540 HAL file
I would use firmware that matches the hardware
and get things working one section at a time:
Axis motion, home switches, spindle, chargepump etc
Can you post the hal and ini files here?
and get things working one section at a time:
Axis motion, home switches, spindle, chargepump etc
Can you post the hal and ini files here?
Please Log in or Create an account to join the conversation.
11 May 2022 08:47 #242593
by phomann
I've attached the three files below, although I'm not sure that for this issue I need to change the tormach_mill_base.ini as the items in tormach_1100-3_7i92_specific.ini overwrite the same named items in the base ini file.
In the tormach_1100-3_7i92_specific.ini you can see I changed the bit file to 7i92_G540x2D.bit
The issue with this is that the HAL file does not match it.
Below are the current pin assignments on the left. On the right is what I need it changed to for the G540. Apart from the different pin assignments, the other change is that the G540 need to accept a PWM spindle control signal with a base frequency of 50 Hz
The charge pump needs to be a frequency of 10Khz or above.
Current G540
Mill Function 7192 DB25 Pin 7192 DB25 Pin
Spindle Speed 1 14 (Needs to be PWM with 100Hz base frequency
Coolant 14 1
X Direction 2 3
Estop Reset 15 15
X Step 3 2
Spindle Dir 16 17
Y Direction 4 5
Charge Pump 17 16 Frequency of 10Kz or above.
Y Step 5 4
Z Direction 6 7
Z Step 7 6
A Direction 8 9
A Step 9 8
X Limit 10 10
Y Limit 11 11
Z Limit 12 12
Probe In 13 13
Cheers,
Peter
Replied by phomann on topic PathPilot, 7i92, G540 HAL file
Thanks for the reply.I would use firmware that matches the hardware
and get things working one section at a time:
Axis motion, home switches, spindle, chargepump etc
Can you post the hal and ini files here?
I've attached the three files below, although I'm not sure that for this issue I need to change the tormach_mill_base.ini as the items in tormach_1100-3_7i92_specific.ini overwrite the same named items in the base ini file.
In the tormach_1100-3_7i92_specific.ini you can see I changed the bit file to 7i92_G540x2D.bit
The issue with this is that the HAL file does not match it.
Below are the current pin assignments on the left. On the right is what I need it changed to for the G540. Apart from the different pin assignments, the other change is that the G540 need to accept a PWM spindle control signal with a base frequency of 50 Hz
The charge pump needs to be a frequency of 10Khz or above.
Current G540
Mill Function 7192 DB25 Pin 7192 DB25 Pin
Spindle Speed 1 14 (Needs to be PWM with 100Hz base frequency
Coolant 14 1
X Direction 2 3
Estop Reset 15 15
X Step 3 2
Spindle Dir 16 17
Y Direction 4 5
Charge Pump 17 16 Frequency of 10Kz or above.
Y Step 5 4
Z Direction 6 7
Z Step 7 6
A Direction 8 9
A Step 9 8
X Limit 10 10
Y Limit 11 11
Z Limit 12 12
Probe In 13 13
Cheers,
Peter
Please Log in or Create an account to join the conversation.
11 May 2022 10:02 #242608
by rodw
Replied by rodw on topic PathPilot, 7i92, G540 HAL file
I know you've been on this for a while.
I sometimes think it would be a better path to just get linuxcnc working on a default axis install and then migrate to PathPilot once you have a working config and a better understanding of linuxcnc.
Unless you have Tormach hardware, PathPilot just adds a whole layer of complexity and to deal with that first up before understanding how linuxcnc works just makes a much bigger and more complex job. I have no interest in even trying it.
You never know, you may find another config that meets your needs and never go to PP. Gmaocappy is not bad really.
I sometimes think it would be a better path to just get linuxcnc working on a default axis install and then migrate to PathPilot once you have a working config and a better understanding of linuxcnc.
Unless you have Tormach hardware, PathPilot just adds a whole layer of complexity and to deal with that first up before understanding how linuxcnc works just makes a much bigger and more complex job. I have no interest in even trying it.
You never know, you may find another config that meets your needs and never go to PP. Gmaocappy is not bad really.
Please Log in or Create an account to join the conversation.
11 May 2022 12:49 #242630
by phomann
Replied by phomann on topic PathPilot, 7i92, G540 HAL file
Hi Rod,
If I can't sort this out I'm sure I'll be following your advice.Then I'll be asking you questions.
I quite like this screen set used by Dr Flo
www.drdflo.com/pages/Projects/CNC-Mill.html#linuxcnc
It uses the Simple Probe screenset here;
kcjengr.github.io/probe_basic/index.html
That said I just like the PathPilot interface and I want to use the probing routines and the rigid tapping.
Currently, I'm using Mach3 and the Aqua screenset. It's similar to PathPilot and suits my workflow.
www.machsupport.com/forum/index.php?topic=11115.0
Cheers,
Peter
If I can't sort this out I'm sure I'll be following your advice.Then I'll be asking you questions.
I quite like this screen set used by Dr Flo
www.drdflo.com/pages/Projects/CNC-Mill.html#linuxcnc
It uses the Simple Probe screenset here;
kcjengr.github.io/probe_basic/index.html
That said I just like the PathPilot interface and I want to use the probing routines and the rigid tapping.
Currently, I'm using Mach3 and the Aqua screenset. It's similar to PathPilot and suits my workflow.
www.machsupport.com/forum/index.php?topic=11115.0
Cheers,
Peter
Attachments:
Please Log in or Create an account to join the conversation.
11 May 2022 15:25 #242649
by PCW
Replied by PCW on topic PathPilot, 7i92, G540 HAL file
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
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
Please Log in or Create an account to join the conversation.
11 May 2022 20:25 #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.
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.
12 May 2022 08:09 #242760
by phomann
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
Replied by phomann on topic PathPilot, 7i92, G540 HAL file
Hi PCW,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
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.
12 May 2022 09:09 #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:
This looks more like 2.7 syntax to me.
If you had a gantry machine under 2.8 it might be:
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
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:
[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:
[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.
01 Jul 2022 03:25 #246338
by phomann
Replied by phomann on topic PathPilot, 7i92, G540 HAL file
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
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
Please Log in or Create an account to join the conversation.
Moderators: cncbasher
Time to create page: 0.266 seconds