1

**General Mach Discussion / Skipping movements intermettently, & work offsets**

« **on:**September 27, 2011, 05:22:38 PM »

When engraving identification letters on various components the machine is sometimes missing part of the movements, giving rise to various problems. Here is the latest programme to give problems:

G90

G0 X121.0 Y-75.0 Z0.0 M3

Z-32.5

F 200

G91

G0 x -1.75

G51 X0.7 Y0.7

M98 P066

G50

G90

G0 Z0.0

G0 X0.0 Y0.0 Z0.0

M30

O066 (upper case B)

G91

G0 Y0.500

G1 Z-2.00

X2.50

G3 X0.00 Y4.00 I0.00 J2.00

G1 X-2.5

Y-9.00

X2.50

G3 X0.00 Y5.00 I0.00 J2.50

G0 Z2.00

X5.50 Y-0.5

M99

The sub-routine is from a library of alphabetic characters used with different engraving jobs. The G51 scales it from 10 mm high to 7 mm.

The B starts with the middle bar, then the upper curve, horizontal to the left, down the main upright, horizontally across the base then up with the lower curve to complete the letter in one continuous cut.

Today, two times out of four, the first curve of the B was not completed so the remaining lines were out of position, maybe 1.5 mm right and 0.5 mm down, so the upright is displaced to the right and the end of the line does not meet the middle bar as it should. This has wrecked the job at the last operation, which is very annoying.

At an earlier stage in developing the interface to this machine I got crosstalk between the watchdog signal and the X axis drive in a short section of ribbon cable used to extend the parallel cable into the machine. This gave rise to un-programmed moves on the X axis. Getting rid of the ribbon cable and taking the printer lead direct to the interface board seems to have solved that one, but it might be relevant. I still suspect the quality of printer cables when used for machine control.

Another programme on the same machine but using a different setup profile resulted on one occasion in the last character being out of position, showing that one rapid move had missed the X Y moves, and a second time the last character was overwritten on the second last, and the cutter dug in deep indicating an entire rapid move had been missed. Programme (without all the subroutines) below:

G90

G0 X1.0 Y-75.0 Z0.0 A-121.0 M3

Z-32.5

F 200

G91

G0 Y2.50

G51 X0.3 Y0.3

M98 P050

M98 P046

M98 P048

M98 P032

M98 P109

M98 P109

M98 P032

M98 P083

M98 P084

M98 P065

M98 P073

M98 P078

M98 P076

M98 P069

M98 P083

M98 P083

M98 P032

M98 P083

M98 P084

M98 P069

M98 P069

M98 P076

M98 P032

M98 P040

M98 P051

M98 P049

M98 P054

M98 P041

M98 P032

M98 P067

M98 P069

M98 P082

M98 P084

M98 P046

M98 P032

M98 P050

M98 P056

M98 P051

M98 P051

M98 P052

M98 P054

G90

G50

G0 X0.0 Y-78.0 Z0.0 A-121.0

Z-32.5

G91

G51 X0.3 Y0.30

M98 P083

M98 P078

M98 P066

M98 P032

M98 P069

M98 P108

M98 P101

M98 P099

M98 P116

M98 P114

M98 P111

M98 P110

M98 P105

M98 P099

M98 P032

M98 P083

M98 P101

M98 P114

M98 P118

M98 P105

M98 P099

M98 P101

M98 P115

M98 P032

M98 P050

M98 P052

M98 P072

M98 P114

M98 P032

M98 P084

M98 P101

M98 P108

M98 P032

M98 P048

M98 P055

M98 P055

M98 P049

M98 P048

M98 P056

M98 P052

M98 P048

M98 P051

M98 P054

M98 P049

G50

G90

G0 Z0.0

G0 X0.0 Y0.0 Z0.0

M30

O049 (numeral 1)

G91

G0 Y2.50

G1 Z-2.0

X2.00 Y2.00

Y-9.0

G0 Z2.00

X5.00 Y4.50

M99

O054 (numeral 6)

G91

G0 X3.00 Y4.50

G1 Z-2.0

G3 X-3.0 Y-4.0 I1.1667 J-4.0

G1 Y-3.0

G3 X4.00 Y0.00 I2.00 J0.00

G1 Y1.25

G3 X-1.75 Y1.75 I-1.75 J0.00

G1 X-2.25

G0 Z2.0

X7.00 Y-0.5

M99

Two lines of text are written using X Y scaling to set the character height, with a non-scaled move between lines to set the line spacing and centring.

I've only included the last two character subs - 61 - as that's where the problems occurred. Most of the subs have been used successfully in various combinations, so I don't think there is anything wrong with them in principle, although one or two may have errors in them. I would say the last G0 in sub 049 was being missed.

The only hint I can find, and it may not be relevant, is that I can't get the axes to zero when I issue G28.1. The initialising code at switch on is G28.1 X0 Y0 Z0 A0. This usually leaves X at 3.44, Y at 2.55, not at zero. If I look at the offsets, G54 Is also at X 3.44, Y at 2.55. If I zero them in G54, then the Machine Coordinates change from all zero to X3.44, Y 2.55. If I zero the machine coordinates the values reappear in the G54 offsets.

How do I, once and for all, make all coordinates zero when the machine has homed and (officially) zeroed all axes? My suspicion is that this discrepancy is giving rise to movement errors, but I can't prove it.

The computer is a VIA ITX running windows XP, configured by Les Caine as "Mach in a box", using Mach R3.042.020, and with his interface card. Motor drivers are IM483.

Can anyone shed any light on the missing movements, the zeroing problem, and any possible link between them?

G90

G0 X121.0 Y-75.0 Z0.0 M3

Z-32.5

F 200

G91

G0 x -1.75

G51 X0.7 Y0.7

M98 P066

G50

G90

G0 Z0.0

G0 X0.0 Y0.0 Z0.0

M30

O066 (upper case B)

G91

G0 Y0.500

G1 Z-2.00

X2.50

G3 X0.00 Y4.00 I0.00 J2.00

G1 X-2.5

Y-9.00

X2.50

G3 X0.00 Y5.00 I0.00 J2.50

G0 Z2.00

X5.50 Y-0.5

M99

The sub-routine is from a library of alphabetic characters used with different engraving jobs. The G51 scales it from 10 mm high to 7 mm.

The B starts with the middle bar, then the upper curve, horizontal to the left, down the main upright, horizontally across the base then up with the lower curve to complete the letter in one continuous cut.

Today, two times out of four, the first curve of the B was not completed so the remaining lines were out of position, maybe 1.5 mm right and 0.5 mm down, so the upright is displaced to the right and the end of the line does not meet the middle bar as it should. This has wrecked the job at the last operation, which is very annoying.

At an earlier stage in developing the interface to this machine I got crosstalk between the watchdog signal and the X axis drive in a short section of ribbon cable used to extend the parallel cable into the machine. This gave rise to un-programmed moves on the X axis. Getting rid of the ribbon cable and taking the printer lead direct to the interface board seems to have solved that one, but it might be relevant. I still suspect the quality of printer cables when used for machine control.

Another programme on the same machine but using a different setup profile resulted on one occasion in the last character being out of position, showing that one rapid move had missed the X Y moves, and a second time the last character was overwritten on the second last, and the cutter dug in deep indicating an entire rapid move had been missed. Programme (without all the subroutines) below:

G90

G0 X1.0 Y-75.0 Z0.0 A-121.0 M3

Z-32.5

F 200

G91

G0 Y2.50

G51 X0.3 Y0.3

M98 P050

M98 P046

M98 P048

M98 P032

M98 P109

M98 P109

M98 P032

M98 P083

M98 P084

M98 P065

M98 P073

M98 P078

M98 P076

M98 P069

M98 P083

M98 P083

M98 P032

M98 P083

M98 P084

M98 P069

M98 P069

M98 P076

M98 P032

M98 P040

M98 P051

M98 P049

M98 P054

M98 P041

M98 P032

M98 P067

M98 P069

M98 P082

M98 P084

M98 P046

M98 P032

M98 P050

M98 P056

M98 P051

M98 P051

M98 P052

M98 P054

G90

G50

G0 X0.0 Y-78.0 Z0.0 A-121.0

Z-32.5

G91

G51 X0.3 Y0.30

M98 P083

M98 P078

M98 P066

M98 P032

M98 P069

M98 P108

M98 P101

M98 P099

M98 P116

M98 P114

M98 P111

M98 P110

M98 P105

M98 P099

M98 P032

M98 P083

M98 P101

M98 P114

M98 P118

M98 P105

M98 P099

M98 P101

M98 P115

M98 P032

M98 P050

M98 P052

M98 P072

M98 P114

M98 P032

M98 P084

M98 P101

M98 P108

M98 P032

M98 P048

M98 P055

M98 P055

M98 P049

M98 P048

M98 P056

M98 P052

M98 P048

M98 P051

M98 P054

M98 P049

G50

G90

G0 Z0.0

G0 X0.0 Y0.0 Z0.0

M30

O049 (numeral 1)

G91

G0 Y2.50

G1 Z-2.0

X2.00 Y2.00

Y-9.0

G0 Z2.00

X5.00 Y4.50

M99

O054 (numeral 6)

G91

G0 X3.00 Y4.50

G1 Z-2.0

G3 X-3.0 Y-4.0 I1.1667 J-4.0

G1 Y-3.0

G3 X4.00 Y0.00 I2.00 J0.00

G1 Y1.25

G3 X-1.75 Y1.75 I-1.75 J0.00

G1 X-2.25

G0 Z2.0

X7.00 Y-0.5

M99

Two lines of text are written using X Y scaling to set the character height, with a non-scaled move between lines to set the line spacing and centring.

I've only included the last two character subs - 61 - as that's where the problems occurred. Most of the subs have been used successfully in various combinations, so I don't think there is anything wrong with them in principle, although one or two may have errors in them. I would say the last G0 in sub 049 was being missed.

The only hint I can find, and it may not be relevant, is that I can't get the axes to zero when I issue G28.1. The initialising code at switch on is G28.1 X0 Y0 Z0 A0. This usually leaves X at 3.44, Y at 2.55, not at zero. If I look at the offsets, G54 Is also at X 3.44, Y at 2.55. If I zero them in G54, then the Machine Coordinates change from all zero to X3.44, Y 2.55. If I zero the machine coordinates the values reappear in the G54 offsets.

How do I, once and for all, make all coordinates zero when the machine has homed and (officially) zeroed all axes? My suspicion is that this discrepancy is giving rise to movement errors, but I can't prove it.

The computer is a VIA ITX running windows XP, configured by Les Caine as "Mach in a box", using Mach R3.042.020, and with his interface card. Motor drivers are IM483.

Can anyone shed any light on the missing movements, the zeroing problem, and any possible link between them?