What's new
What's new

Using M1 in a Dialog 4 program

Mud

Diamond
Joined
May 20, 2002
Location
South Central PA
After receiving my D4 machine, I backed up all the programs that were on the control. I've been reviewing them for hints the last few days and discovered M1s in a few of them. There's no mention of M1 in my manuals and I don't recall it being discussed here. Has anyone else used M1 on a D4? I assume this is an optional stop, as it would be in another Gcode control. If it is, how do you turn the stops on and off? I haven't found that either in the manuals or by poking through the control. Here's a sample program, you can see M1s and M30 used at the end of sequences. Which brings another question - The M30 on line N703, will the program proceed to the next line if you push the cycle start button, or do you need to realign the program? Would M0 also work here for a program stop? There's no one to ask at the previous owner, and I'm hesitant to just load it and run it to see what happens without understanding this

$%182

T1 R A L6.159 A (.375CNTR)
T2 R A L10.607 A (.257 DRILL)
T3 R A L7.393 A (.312*18TAP)
T4 R A L9.159 A (.187 DRILL)
T5 R A L8.683 A (.218 DRILL)
T6 R A L11.59 A (.187 CNTR)
T7 R A L11.946 A (.136 DRILL)
T8 R A L A (8*32 TAP)





%
($%182/000848"ALFAPE6278-1REVF OP*1)
N100 G18 T1
N101 S+800 M3
N102 G0 C0
N103 G0 X0 Y2.05 Z0 M8
N104 G88 N*1 L8 R3.435 G3 W0 I0 K0 G1
N105 G0 X3.0488 Y2.05 Z1.2629
N106 N*2 G0 X3.0488 Z1.2629
N107 N*2 G0 X-1.2629 Z3.0488
N108 N*2 G0 X1.2629 Z-3.0488
N109 G0 X-3.0488 Y2.05 Z-1.2629
N110 G82 F1.5 S+800 Y-0.055 Y-0.1 Y0.002 G4 F1 Y2
N111 S0 T0 M9
N112 G0 X10 Y18 Z10
N113 M1
N200 G18 T2
N201 S+800 M3
N202 G0 C0
N203 G0 X0 Y2.05 Z0 M8
N204 G88 N*3 L8 R3.435 G3 W0 I0 K0 G1
N205 S0 T0 M9
N206 G0 X10 Y18 Z10
N207 M1
N300 G18 T3
N301 S+90 M3
N302 G0 C0
N303 G0 X0 Y2.2 Z0
N304 G88 N*4 L8 R3.435 G3 W0 I0 K0 G1
N305 S0 T0 M9
N306 G0 X10 Y17 Z10
N307 M1
N400 G18 T4
N401 S+1000 M3
N402 G0 C0
N403 G0 X3.0488 Y2.05 Z1.2629 M8
N404 G83 F1.5 S+1000 Y-2.8 Y-0.05 Y-0.01 Y-0 Y2
N405 G0 X-1.2629 Y2.05 Z3.0488
N406 G83 F1.5 S+1000 Y-3.7 Y-0.05 Y-0.01 Y-0 Y2
N407 G0 X1.2629 Y2.05 Z-3.0488
N408 G83 F1.5 S+1000 Y-4.55 Y-0.05 Y-0.01 Y-0 Y2
N409 S0 T0 M9
N410 G0 X10 Y17 Z10
N411 M1
N500 G18 T5
N501 S+1000 M3
N502 G0 C0
N503 G0 X3.0488 Y2.05 Z1.2629 M8
N504 N*5 G0 X3.0488 Z1.2629
N505 N*5 G0 X-1.2629 Z3.0488
N506 N*5 G0 X1.2629 Z-3.0488
N507 S0 T0 M9
N508 G0 X10 Y17 Z15
N509 M1
N600 G18 T6
N601 S+1400 M3
N602 G0 C180.047
N603 G0 X0 Y2.05 Z0 M8
N604 G88 N*6 L8 R2.725 G3 W0 I0 K0 G1
N605 S0 T0 M9
N606 G0 X10 Y17 Z10
N607 M1
N700 G18 T7
N701 S+1400 M3
N702 L1 N602 N606 N*7
N703 M30
N800 G18 T8
N801 S+160 M3
N802 G0 C180.047
N803 G0 X0 Y2.2 Z0 M8
N804 G88 N*8 L8 R2.725 G3 W0 I0 K0 G1
N805 S0 T0 M9
N806 G0 X15 Y20 Z17
N807 G0 C0
N808 M30

N*1 G82 F1.5 S+800 Y-0.395 Y-0.035 Y0.002 G4 F1 Y2
N*2 G82 F1.5 S+800 Y-0.26 Y-0.035 Y0.002 G4 F1 Y2
N*3 G83 F2.0 S+800 Y-1.625 Y-0.06 Y-0.01 Y-0 Y2
N*4 G84 F5.0 S+90 Y-0.6 Y2
N*5 G82 F1.0 S+1000 Y-0.365 Y-0.03 Y0.002 G4 F2 Y2
N*6 G82 F1.0 S+1400 Y-0.22 Y-0.035 Y0.002 G4 F1 Y2
N*7 G83 F1.0 S+1400 Y-0.71 Y-0.04 Y-0.01 Y-0 Y2
N*8 G84 F5.0 S+160 Y-0.5 Y2

?
4855
 
In my limited experience, most manufacturer's M-codes can be specific to their control and they do not always perform the same function as a different manufacturer/control using the same M or G command.

Never used M1 and do not see any mention of it in any manuals here.
In your sample program it looks like they are using it to stop/pause the program before the tool change, if that is the case, it could be omitted without issue (possibly the M1 comes from a post processor that was originally written for a different control?).

In Dialog 4, M30 ends the program and returns/rewinds to the beginning of the program and you have to press "Cycle Start" to get things going again. Ie; N703 would stop the machine and rewind you back to N100.
 
Mud
Do you have the graphics playback option? If so, you can try the code in that mode while avoiding risk of a wreck. The other possibility is to run the code block by block in Mode 8 with the feed rate dialed way down and Y0 set far from anything risky. I have not used M1, but I use M0 occasionally, usually to stop the program so I can manually turn a tap wrench on a tap guide to tap a hole I just drilled.
RKlopp
 
In my limited experience, most manufacturer's M-codes can be specific to their control and they do not always perform the same function as a different manufacturer/control using the same M or G command.

Never used M1 and do not see any mention of it in any manuals here.
In your sample program it looks like they are using it to stop/pause the program before the tool change, if that is the case, it could be omitted without issue (possibly the M1 comes from a post processor that was originally written for a different control?).

In Dialog 4, M30 ends the program and returns/rewinds to the beginning of the program and you have to press "Cycle Start" to get things going again. Ie; N703 would stop the machine and rewind you back to N100.

From discussion with the PO I'm pretty sure this was written at the control. they did some pretty big and pretty odd parts on this machine, I suspect the stop would have been to measure a bored hole. M30 is described as program end, M2 is described as program end with rewind, and that's how they work for me, M30 just stops and sits there, I have to manually find the beginning to run again, but I've never put it anywhere but at the end.
 
M30 always rewinds for me. I have a spindle warmup program that steps up the speed incrementally in 99-second steps, in which I move the M30 depending on what speed I want to warm up to. The M30 stops the program and, if I press cycle start again, the program restarts at the beginning.
 
Have 2 FP4NC with D4, all the documentation and guide cards show M2 as just "End of Program" and M30 as "End of program, with rewind to the beginning".

Could be the FP7 has some differences in the control for whatever reason(s) vs the smaller FPNC models. There are some differences in the way some of the control card DIP switches are configured for the FP7 vs FP4, so it would not be surprising if there are M and G-code nuances.

Here we would use M0 to stop the program for something like checking a bore or pocket. Never use M2 because when I started programming I learned M30 first and became accustomed to the program rewinding and prefer it now vs the program just ending and staying at the end.

If you have graphics mode enabled in your software, you can go to Mode 16 and type in "GXY" (or "GXZ", "GYZ"), the machine goes into a sort of safe mode and you run the program on screen in Mode 8 or 9.
 
You're right, I have it backwards, M30 rewinds M2 doesn't. I'm guessing that program got edited, maybe they didn't need the last operation and just plugged an M30 there instead of deleting the rest.
 
maybe they didn't need the last operation and just plugged an M30 there instead of deleting the rest.

Do this often because its easier than rewriting the program if you just want to run a certain section and because M30 is rare and therefore easy to find in the edited program when you go back there later. Could be that is why they used M1. - there are a few tricks like this that come in handy when you program on the console vs programming in CAD offline.
 
Do this often because its easier than rewriting the program if you just want to run a certain section and because M30 is rare and therefore easy to find in the edited program when you go back there later. Could be that is why they used M1. - there are a few tricks like this that come in handy when you program on the console vs programming in CAD offline.


That's clever, I would not have thought to do that! I'm 5 days into a 30 day trial of Fusion, trying to learn Fusion which I've never seen before, trying to develop the code generator using Javascript, which I've never used before, and trying to understand obtuse error messages from the D4 control, not knowing the control all that well either. I wish the error messages were documented better, one message covers a lot of possibilities. I have produced code with it that runs, but It's far from great.
I appreciate the help guys!
 
The error messages are generally pretty good but sometimes the error is not in the exact block listed- it's in a nearby block or you have a sequence of events laid out wrong in several blocks.

Sometimes you will get an error message but it isn't for exactly the error described in the manual- it might be in the named block but a slightly different error than described. So you have to learn to think outside the box a little at times- occasionally the error will be correct but the block that requires correction is before or after the named error block, especially when in tool compensation mode like G41/G42.

Occasionally there are important nuances, like when you enter a pocket you should always enter the long axis first, regardless of the first axis prompted- otherwise the control calculations for the pocket will be off. Most of this stuff is explained in the manual but some of them are not, you have to really know the manual (which is pretty good) and then kind of figure them out via deduction.

Generally, if you program on the console and get the sequencing correct, things program very fast and pretty smoothly with very view errors.
 
I don’t use Fusion much to generate Dialog 4 code. It usually makes bloat ware and jerky movement. I do occasionally use Fusion to simply pull out a particular complicated compensated contour. I then copy and paste that into a hand-written program body.


Sent from my iPhone using Tapatalk
 
I don’t use Fusion much to generate Dialog 4 code. It usually makes bloat ware and jerky movement. I do occasionally use Fusion to simply pull out a particular complicated compensated contour. I then copy and paste that into a hand-written program body.


Sent from my iPhone using Tapatalk


I saw you post that in another thread, I've done that successfully, I'm trying to improve on that now. decent CAM results would make this machine more useful.
 
The error messages are generally pretty good but sometimes the error is not in the exact block listed- it's in a nearby block or you have a sequence of events laid out wrong in several blocks.

Sometimes you will get an error message but it isn't for exactly the error described in the manual- it might be in the named block but a slightly different error than described. So you have to learn to think outside the box a little at times- occasionally the error will be correct but the block that requires correction is before or after the named error block, especially when in tool compensation mode like G41/G42.

Occasionally there are important nuances, like when you enter a pocket you should always enter the long axis first, regardless of the first axis prompted- otherwise the control calculations for the pocket will be off. Most of this stuff is explained in the manual but some of them are not, you have to really know the manual (which is pretty good) and then kind of figure them out via deduction.

Generally, if you program on the console and get the sequencing correct, things program very fast and pretty smoothly with very view errors.


That's exactly what I'm running into, and why I'm looking at old code that I thought ran correctly, The current error I have is an 81 which is described as a compensation plane error, there are no plane codes near the line pointed to - that sort of thing.
 
Can't recall ever having had that particular error and it might not be that exactly.
I imagine what happens sometimes is sort of like this (over simplified explanation): the control decides there is an error but doesn't know how to catalog it and throws whatever code it thinks is the closest.

Usually when you get error codes like this, it means the control doesn't like the order of operations, or you have asked the control to make a move it can't make- various things like a programmed radius that is too big or too small, or if you are in tool comp mode (G41/G42) and trying to reverse back exactly the way you arrived, or the control can't process the approach path to contour that you programmed.

Feel free to post the code here or email it for troubleshooting.
 
The most common errors I run into involve the following:

1. Under G41, cutter too big to fit a corner such that it bridges across a whole leg of the contour.
2. Forgetting to establish a feed rate before using M70 and G41. To fix this, I always rapid to, say, G0 Z0.06 and then feed at a rate, such as Z0.05 F10.0, and then do the M70/G41 business.
3. Forgetting to establish a spindle speed before using M70 and G41.
4. Just plain hosing start point, target point, and I J K values for compensated circular moves.
5. Forgetting G17/G18 at first tool change, especially if I jump to the middle of a program to redo some cut.
 
Here's the toolpath
111.jpg
Here's the code

%8

T2 R A L1.000 A





%
($%8/000000"FusionTest01)
N1G17T2
N2G0Z2.000
N4 S+1000
N5 M8
N6 G0 X2.0577 Y0.0625
N7 G0 Z0.6
N8 G0 Z0.2
N9 G1 Z-0.2 F126
N10 G1 Y0.125
N11 G1 X0
N12 G17 G3 X0 Y-0.125 I0 J-0.125
N13 G1 X1.0577
N14 G1 X1.4142
N15 G1 X1.8077
N16 G1 X2.0577
N17 G1 Y-0.0625
N18 G1 X2.0523 Y0.125
N19 G1 G41 Y0.1875 +52 G64 M62
N20 G1 X0
N21 G3 X0 Y-0.1875 I0 J-0.1875
N22 G1 X1.0522
N23 G1 X1.4142
N24 G1 X1.8022
N25 G1 X2.0522
N26 G1 G40 Y-0.125
N27 G1 X2.0577 Y0.0625
N28 G1 Z-0.4 F42
N29 G1 Y0.125 F126
N30 G1 X0
N31 G3 X0 Y-0.125 I0 J-0.125
N32 G1 X1.0577
N33 G1 X1.4142
N34 G1 X1.8077
N35 G1 X2.0577
N36 G1 Y-0.0625
N37 G1 X2.0523 Y0.125
N38 G1 G41 Y0.1875 +52 G64 M62
N39 G1 X0
N40 G3 X0 Y-0.1875 I0 J-0.1875
N41 G1 X1.0522
N42 G1 X1.4142
N43 G1 X1.8022
N44 G1 X2.0522
N45 G1 G40 Y-0.125
N46 G1 X2.0577 Y0.0625
N47 G1 Z-0.6 F42
N48 G1 Y0.125 F126
N49 G1 X0
N50 G3 X0 Y-0.125 I0 J-0.125
N51 G1 X1.0577
N52 G1 X1.4142
N53 G1 X1.8077
N54 G1 X2.0577
N55 G1 Y-0.0625
N56 G1 X2.0523 Y0.125
N57 G1 G41 Y0.1875 +52 G64 M62
N58 G1 X0
N59 G3 X0 Y-0.1875 I0 J-0.1875
N60 G1 X1.0522
N61 G1 X1.4142
N62 G1 X1.8022
N63 G1 X2.0522
N64 G1 G40 Y-0.125
N65 G1 X2.0577 Y0.0625
N66 G1 Z-0.715 F42
N67 G1 Y0.125 F126
N68 G1 X0
N69 G3 X0 Y-0.125 I0 J-0.125
N70 G1 X1.0577
N71 G1 X1.4142
N72 G1 X1.8077
N73 G1 X2.0577
N74 G1 Y-0.0625
N75 G1 X2.0523 Y0.125
N76 G1 G41 Y0.1875 +52 G64 M62
N77 G1 X0
N78 G3 X0 Y-0.1875 I0 J-0.1875
N79 G1 X1.0522
N80 G1 X1.4142
N81 G1 X1.8022
N82 G1 X2.0522
N83 G1 G40 Y-0.125
N84 G1 X2.0577 Y0.0625
N85 G1 Z-0.83 F42
N86 G1 Y0.125 F126
N87 G1 X0
N88 G3 X0 Y-0.125 I0 J-0.125
N89 G1 X1.0577
N90 G1 X1.4142
N91 G1 X1.8077
N92 G1 X2.0577
N93 G1 Y-0.0625
N94 G1 X2.0523 Y0.125
N95 G1 G41 Y0.1875 +52 G64 M62
N96 G1 X0
N97 G3 X0 Y-0.1875 I0 J-0.1875
N98 G1 X1.0522
N99 G1 X1.4142
N100 G1 X1.8022
N101 G1 X2.0522
N102 G1 G40 Y-0.125
N103 G0 Z0.6
N104 M9
N105 G0 Z5 T3
N106 S+3820
N107 M8
N108 G0 X3.6559 Y-0.2248
N109 G0 Z0.36
N110 G0 Z0.2
N111 G1 Z-0.7244 F126
N112 G19 G3 Y-0.1092 Z-0.84 J0.1156 K0
N113 G1 Y0.0064
N114 G17 G3 X3.5403 Y0.122 I-0.1156 J0
N115 G1 X2.0739
N116 G1 X0
N117 G3 X0 Y-0.122 I0 J-0.122
N118 G1 X1.3266
N119 G1 X2.0739
N120 G3 X2.1895 Y-0.0064 I0 J0.1156
N121 G1 Y0.1092
N122 G19 G3 Y0.2248 Z-0.7244 J0 K0.1156
N123 G0 Z0.36
N124 G17
N125 M9
N126 G0 Z5
N127 M30

?
0000

I get N21 81 on the CRT

I tried taking the +52 G64 M62 out of line 19, that made no difference. What does the +52 do?
I'm using a post supplied by Autodesk for Deckel Dialog 4 with a few edits so far mostly for formatting.
It puts D #s in, I take them out and add the Tool info line so I don't have to manually enter that after every upload in order to test it.

Your thoughts?
 
+52 is not doing anything, could be what is causing your Error 81
G1 is a "constant on/default" command in Dialog - it is on unless you override it with a G2, G3 or similar. Any superfluous commands like this use precious memory and processing speed- would suggest getting rid of those G1.

Are you aware that G19 is for when you have the vertical spindle configured pointing horizontal? G18 is the correct command for Y length compensation when you are using the native horizontal spindle of the machine.

You don't have a radius specified for T2 in the register?- if you are writing the program using the tool centerline, and CAD calculating the tool offsets, then you do not need any G41s. If you want to the Dialog control to calculate offsets for you and also to be able to tweak the tool size on the control- then you need to tell the tool register what size the tool is.

PS later versions of Dialog 4 will allow you to make 3 axis moves while under tool compensation and do not require the use of M70 as mentioned by Russ
 
+52 is not doing anything, could be what is causing your Error 81
I took that out and reran it, no change.
G1 is a "constant on/default" command in Dialog - it is on unless you override it with a G2, G3 or similar. Any superfluous commands like this use precious memory and processing speed- would suggest getting rid of those G1.
I will as soon as I understand the post system better. The post was not outputting G0s, in order to make that happen had to turn g0 to g3 on always, and I'm just letting that happen for the moment until I learn how to make G0 non modal while G1 to G3 are modal..

Are you aware that G19 is for when you have the vertical spindle configured pointing horizontal? G18 is the correct command for Y length compensation when you are using the native horizontal spindle of the machine.
Yes, and I see them now. I didn't look very far past the point where it was pointing the error. I think they are there because part of the leadins fusion created are vertical radii ( around a horizontal axis) (and too small to see in the photo) The D3 post created a series of short line segments to produce that path, this one does G3 &G19. I can make it not do those vertical radii but it's kind of cool how it does that to gently feed the tool to the Z level. This model has them along the Y axis because it's leading into lines parallel to the Y, if I turn it to a 45° angle it reverts back to short line segments for those radii. I ran a simpler program with G18s in it for the leadins and it ran.

You don't have a radius specified for T2 in the register?- if you are writing the program using the tool centerline, and CAD calculating the tool offsets, then you do not need any G41s. If you want to the Dialog control to calculate offsets for you and also to be able to tweak the tool size on the control- then you need to tell the tool register what size the tool is.

The tool path is one roughing pass at each level then one finish pass at the same level. Odd maybe, but I'm still figuring fusion out and that was it's default. G41 is turned on for the finish pass. If I want to follow the centerline with no offset do I need a 0 value in the tool register - will that work?

Thank you
 
Machines tied up for a bit so I can't run this for a little while.

If you have a Tool Call, then there must be a corresponding tool in the register, but, it does not have to have any values assigned to it at all- the control will calculate the machine moves as if the tool diameter is "0". You can use "0" if that helps you keep track of what is going on and do remember that radius compensation is only active under G41 and G42, and also when using certain canned cycles (with or without G41/42).

That is a good trick you are doing with the G19, there are some other similar techniques you can use if you think outside the box like that. I use the G81 (drilling) function a lot to make horizontal grooves, for example.
 
I turned off cutter compensation, so no G41s are output, now it runs. For some reason X moves of about 1.5" are being broken up into 4 separate moves and the machine pauses slightly at each line. Is that normal for the machine to pause? I don't think I've ever programmed 2 co-linear lines before. I tried the same model with another post for a different brand of control and that still is output the same way, so it's something in fusion that I have to find. I'll continue working.

This code runs

$%1003

T2 R A L1.000 A
T3 R A L1.000 A





%
($%1003/0000)
N1 G17 T2
N3 G0 Z5
N4 S+1000
N5 M8
N6 G0 X2.5577 Y0.125
N7 G0 Z0.6
N8 G0 Z0.2
N9 G1 Z-0.2 F126
N10 G1 X2.0577
N11 G1 X0
N12 G17 G3 X0 Y-0.125 I0 J-0.125
N13 G1 X1.0577
N14 G1 X1.4142
N15 G1 X1.8077
N16 G1 X2.0577
N17 G1 X2.5577
N18 G1 X2.5523 Y0.1875
N19 G1 X2.0523
N20 G1 X0
N21 G3 X0 Y-0.1875 I0 J-0.1875
N22 G1 X1.0522
N23 G1 X1.4142
N24 G1 X1.8022
N25 G1 X2.0522
N26 G1 X2.5522
N27 G1 X2.5577 Y0.125
N28 G1 Z-0.4 F42
N29 G1 X2.0577 F126
N30 G1 X0
N31 G3 X0 Y-0.125 I0 J-0.125
N32 G1 X1.0577
N33 G1 X1.4142
N34 G1 X1.8077
N35 G1 X2.0577
N36 G1 X2.5577
N37 G1 X2.5523 Y0.1875
N38 G1 X2.0523
N39 G1 X0
N40 G3 X0 Y-0.1875 I0 J-0.1875
N41 G1 X1.0522
N42 G1 X1.4142
N43 G1 X1.8022
N44 G1 X2.0522
N45 G1 X2.5522
N46 G1 X2.5577 Y0.125
N47 G1 Z-0.6 F42
N48 G1 X2.0577 F126
N49 G1 X0
N50 G3 X0 Y-0.125 I0 J-0.125
N51 G1 X1.0577
N52 G1 X1.4142
N53 G1 X1.8077
N54 G1 X2.0577
N55 G1 X2.5577
N56 G1 X2.5523 Y0.1875
N57 G1 X2.0523
N58 G1 X0
N59 G3 X0 Y-0.1875 I0 J-0.1875
N60 G1 X1.0522
N61 G1 X1.4142
N62 G1 X1.8022
N63 G1 X2.0522
N64 G1 X2.5522
N65 G1 X2.5577 Y0.125
N66 G1 Z-0.715 F42
N67 G1 X2.0577 F126
N68 G1 X0
N69 G3 X0 Y-0.125 I0 J-0.125
N70 G1 X1.0577
N71 G1 X1.4142
N72 G1 X1.8077
N73 G1 X2.0577
N74 G1 X2.5577
N75 G1 X2.5523 Y0.1875
N76 G1 X2.0523
N77 G1 X0
N78 G3 X0 Y-0.1875 I0 J-0.1875
N79 G1 X1.0522
N80 G1 X1.4142
N81 G1 X1.8022
N82 G1 X2.0522
N83 G1 X2.5522
N84 G1 X2.5577 Y0.125
N85 G1 Z-0.83 F42
N86 G1 X2.0577 F126
N87 G1 X0
N88 G3 X0 Y-0.125 I0 J-0.125
N89 G1 X1.0577
N90 G1 X1.4142
N91 G1 X1.8077
N92 G1 X2.0577
N93 G1 X2.5577
N94 G1 X2.5523 Y0.1875
N95 G1 X2.0523
N96 G1 X0
N97 G3 X0 Y-0.1875 I0 J-0.1875
N98 G1 X1.0522
N99 G1 X1.4142
N100 G1 X1.8022
N101 G1 X2.0522
N102 G1 X2.5522
N103 G0 Z0.6
N104 M9
N105 G0 Z5
N106 M30

?
0000
 








 
Back
Top