reading Pokeys pins
Re: reading Pokeys pins
Art
Tried the errordialog as not global I think your right its closing now and I don't get the 2 oks and cancel buttons showing up on a second call to errordialog.
But the problem with the m6 call still there I have to hit estop to rerun the m code. the stop or rewind don't react till the estop is reset...
What is the command to read the ok and cancel buttons to see which one was pressed?
Curious What program you using for cam?
Gary
Tried the errordialog as not global I think your right its closing now and I don't get the 2 oks and cancel buttons showing up on a second call to errordialog.
But the problem with the m6 call still there I have to hit estop to rerun the m code. the stop or rewind don't react till the estop is reset...
What is the command to read the ok and cancel buttons to see which one was pressed?
Curious What program you using for cam?
Gary
Last edited by gburk on Sat Apr 13, 2019 12:40 pm, edited 1 time in total.
Re: reading Pokeys pins
Hi Gary:
>>Curious What program you using for cam?
I usually use Vectric for my mill, I use Vexx for Gcode for my laser generally, but I sometimes just code up a routine to give me what I want on a one off basis.
>>But the problem with the m6 call still there I have to hit estop to rerun them code. the stop or rewind don't react till the estop is reset...
It seems to me the basic macro for m6 does a pause after its call, it requires one to press run again to start the program after the toolchange. Perhaps there some interplay there.
>>What is the command to read the ok and cancel buttons to see which one was pressed?
There is none. All dialogs are based on scripts for any object or button you place. The system buttons of OK or Cancel are typically handled by the return value.
Ill have to check , but usually the return from a DoModal is checked to see if
its a 1 or zero. If 1, it was OK, if 0 it was cancel. There is no real feedback in
a do Modeless, and cancel or OK is usually enough, you dont need both as each do
basically the same thing..
Art
>>Curious What program you using for cam?
I usually use Vectric for my mill, I use Vexx for Gcode for my laser generally, but I sometimes just code up a routine to give me what I want on a one off basis.
>>But the problem with the m6 call still there I have to hit estop to rerun them code. the stop or rewind don't react till the estop is reset...
It seems to me the basic macro for m6 does a pause after its call, it requires one to press run again to start the program after the toolchange. Perhaps there some interplay there.
>>What is the command to read the ok and cancel buttons to see which one was pressed?
There is none. All dialogs are based on scripts for any object or button you place. The system buttons of OK or Cancel are typically handled by the return value.
Ill have to check , but usually the return from a DoModal is checked to see if
its a 1 or zero. If 1, it was OK, if 0 it was cancel. There is no real feedback in
a do Modeless, and cancel or OK is usually enough, you dont need both as each do
basically the same thing..
Art
Re: reading Pokeys pins
Art
>> It seems to me the basic macro for m6 does a pause after its call, it requires one to press run again to start the program after the toolchang e. Perhaps there some interplay there.
I think you may be right, there is a delay before my dialog loads seems like a few sec's maybe less haven't timed it, but seems to continue without the keypress I will check further .
I have another strange problem, only seems to happen in the probing lib, if I try to use a global table I have created in another lib, I get a compile error
I have a global Zreturn = table(-1,-2,-3,-4,-5,0,0); I can do most anything with the table in other library's but not the probing
if I just do a myreturn = Zreturn; I will get a compile error.. I can't see any reason for it the probe script runs fine and compiles till I try any call to one of my global tables.
Thanks gary
>> It seems to me the basic macro for m6 does a pause after its call, it requires one to press run again to start the program after the toolchang e. Perhaps there some interplay there.
I think you may be right, there is a delay before my dialog loads seems like a few sec's maybe less haven't timed it, but seems to continue without the keypress I will check further .
I have another strange problem, only seems to happen in the probing lib, if I try to use a global table I have created in another lib, I get a compile error
I have a global Zreturn = table(-1,-2,-3,-4,-5,0,0); I can do most anything with the table in other library's but not the probing
if I just do a myreturn = Zreturn; I will get a compile error.. I can't see any reason for it the probe script runs fine and compiles till I try any call to one of my global tables.
Thanks gary
Re: reading Pokeys pins
Gary:
>>Zreturn = table(-1,-2,-3,-4,-5,0,0); I can do most anything with the table in other library's but not the probing if I just do a myreturn = Zreturn;
Is the myreturn variable declared previously as anything other than a table?
I dont use tables generally, so I'm not much of an expert on how monkey-script
handles them. If the compilation fails on that line, I would think its
having trouble converting the table to Zreturn because it sees them as
incompatible for some reason. If Zreturn hasnt been seen, then it will
auto convert to a table variable.
As Auggie resets it first loads the libraries and executes them all in order
to set global variables as global. The second time through it can then use
those variables for compilation of the various scripts. If the checkmarks in the
library are on, and none of them have changed to X's, then the library is
signalling its satisfies that everything looks good. Whenever you check in a library
make sure it shows up with a checkmark on it, not an X.. (just a note..)
So Im not sure why you'd get a compilation error just on that one usage
of the variable.
As to the pause in the M6, if you check the toolchange script in the system
library you may find a Stop call or some sort of wait that is making it pause till
run is pressed again. I seem to remember doing that so I could always just
press run again after a tool change. I believe M6 is one of those controls
that is scripted in system lib to perform the way I like, but it may not match
what you may want to do.. Perhaps the two are conflicting?
Art
>>Zreturn = table(-1,-2,-3,-4,-5,0,0); I can do most anything with the table in other library's but not the probing if I just do a myreturn = Zreturn;
Is the myreturn variable declared previously as anything other than a table?
I dont use tables generally, so I'm not much of an expert on how monkey-script
handles them. If the compilation fails on that line, I would think its
having trouble converting the table to Zreturn because it sees them as
incompatible for some reason. If Zreturn hasnt been seen, then it will
auto convert to a table variable.
As Auggie resets it first loads the libraries and executes them all in order
to set global variables as global. The second time through it can then use
those variables for compilation of the various scripts. If the checkmarks in the
library are on, and none of them have changed to X's, then the library is
signalling its satisfies that everything looks good. Whenever you check in a library
make sure it shows up with a checkmark on it, not an X.. (just a note..)
So Im not sure why you'd get a compilation error just on that one usage
of the variable.
As to the pause in the M6, if you check the toolchange script in the system
library you may find a Stop call or some sort of wait that is making it pause till
run is pressed again. I seem to remember doing that so I could always just
press run again after a tool change. I believe M6 is one of those controls
that is scripted in system lib to perform the way I like, but it may not match
what you may want to do.. Perhaps the two are conflicting?
Art
Re: reading Pokeys pins
>>Is the myreturn variable declared previousl y as anything other than a table?
No not declared more that once, the strange thing I can use it any other lib
Even if I try to create a new variable table say with any random name in the probe lib it gives a compile error and soon as I run it..
I want to be able to return 2 values from a probing function and I though you said a table was the only way,
Zreturn does create in a different lib but still can't use in the probe lib even a whattable = Zreturn[0]; would error
>>make sure it shows up with a checkmark on it, not an X.. (just a note..)
funny thing is No X's
>>So Im not sure why you'd get a compilati on error just on that one usage
>>of the variable.
global ProbeReturn = table(0,0,0,0);
Ok exact error is script fails compilation
check back in and No X's for any lib's, bring back to in to edit global table still there try running again and get same error
Endless its reporting a false error
>> As to the pause in the M6, if you check the toolchang e script in the system
>>library you may find a Stop call or some sort of wait that is making it pause till
>>run is pressed again. I seem to remember doing that so I could always just
>>press run again after a tool change. I believe M6 is one of those controls
>>that is scripted in system lib to perform the way I like, but it may not match
>>what you may want to do.. Perhaps the two are conflicti ng?
I changed most of the M6 function commands but off the top of my head there may still be a Stop Engine in there I will look...
I did remove the call to my dialog from the m6 and it seemed to run fine, stop and rewind were ok didn't have to estop
So looks like its something to do with the dialog getting something in auggie stuck or messed up but I can't see where
all the dialogs close just can't rewind or run again till estop hit.
Gary
Thanks gary
No not declared more that once, the strange thing I can use it any other lib
Even if I try to create a new variable table say with any random name in the probe lib it gives a compile error and soon as I run it..
I want to be able to return 2 values from a probing function and I though you said a table was the only way,
Zreturn does create in a different lib but still can't use in the probe lib even a whattable = Zreturn[0]; would error
>>make sure it shows up with a checkmark on it, not an X.. (just a note..)
funny thing is No X's
>>So Im not sure why you'd get a compilati on error just on that one usage
>>of the variable.
global ProbeReturn = table(0,0,0,0);
Ok exact error is script fails compilation
check back in and No X's for any lib's, bring back to in to edit global table still there try running again and get same error
Endless its reporting a false error
>> As to the pause in the M6, if you check the toolchang e script in the system
>>library you may find a Stop call or some sort of wait that is making it pause till
>>run is pressed again. I seem to remember doing that so I could always just
>>press run again after a tool change. I believe M6 is one of those controls
>>that is scripted in system lib to perform the way I like, but it may not match
>>what you may want to do.. Perhaps the two are conflicti ng?
I changed most of the M6 function commands but off the top of my head there may still be a Stop Engine in there I will look...
I did remove the call to my dialog from the m6 and it seemed to run fine, stop and rewind were ok didn't have to estop
So looks like its something to do with the dialog getting something in auggie stuck or messed up but I can't see where
all the dialogs close just can't rewind or run again till estop hit.
Gary
Thanks gary
Re: reading Pokeys pins
Gary:
>>I want to be able to return 2 values from a probing function and I though you said a table was the only way,
Well, there are other ways. You can just use two global values at the top of the script so
any function can set them. Its why I dont use tables, Im lazy and tend to just use
Global variables. I tend to use the script editor itself when developing anythign complex, it has better erros and debugging so you can see in realtime what the problem is with compilation and fix it. Using the script tab you dont get as much debug info on whats
going on.
My use of dialogs has been restricted to ones showing videos or asking for an entry so
Im not sure of all the interactions with the system , your touring unknown country
for the most part. The script editor may help in identifying whats wrong with the
compilation at least..
Art
>>I want to be able to return 2 values from a probing function and I though you said a table was the only way,
Well, there are other ways. You can just use two global values at the top of the script so
any function can set them. Its why I dont use tables, Im lazy and tend to just use
Global variables. I tend to use the script editor itself when developing anythign complex, it has better erros and debugging so you can see in realtime what the problem is with compilation and fix it. Using the script tab you dont get as much debug info on whats
going on.
My use of dialogs has been restricted to ones showing videos or asking for an entry so
Im not sure of all the interactions with the system , your touring unknown country
for the most part. The script editor may help in identifying whats wrong with the
compilation at least..
Art
Re: reading Pokeys pins
Art
I removed //Engine.StopProgram(); line to test that didn't make a difference still no stop rewind.
Maybe you have another way to stop and wait for input and get input...
I don't see any other way to do the manual tool change and then do a touch off with the new tool and then reset the Z position.. to the new tool Hight..
I will try to run it though the script editor debugger and see what I find
if you are retuning 2 global variables i'm not sure how, as far as I can tell the return statement will only return 1 value return x,y; doesn't seem to work..
if it's a global table I can return all the values.
Just a quick update I am going to assume its the script edit run , somehow seems that's the problem, I put the line global TestReturn = ProbeReturn; at the beginning of the probe library and a print(TestReturn[1]);, ProbeReturn has been declared as a table in another library I get compilation error from the script edit when I hit run.
Now if I run the same code in the scripter debugger I get no compilation errors and the correct value printed -2 form TestReturn[1]
So This one I have no idea, I leave this one for you.
Getting strange behavior when trying to run some Gcode when I load the gcode I get no errors, when I run it I cutter comp errors and compile errors, the code runs at the to and after first t4 m6, it stops, and I hit run it runs, but the second tool change it stops and I get the dialog continuing job stopped at it shows the work and mach coordinates and what line to continue from I can enter any line number and then it seems to be running but gcode never continues past the tool change line...
Now if I stop all and rewind it seems that the Z axis gets lost if I click on the Z axis DRO to change to number 1.0 it changes to 0.0 if I change it to 2.0 it changes to 1.0
and so on... most of the time its 1 off the value I enter but only after running the gcode file..
I assuming auggie doesn't like g40 g41 ?
Gary
I removed //Engine.StopProgram(); line to test that didn't make a difference still no stop rewind.
Maybe you have another way to stop and wait for input and get input...
I don't see any other way to do the manual tool change and then do a touch off with the new tool and then reset the Z position.. to the new tool Hight..
I will try to run it though the script editor debugger and see what I find
if you are retuning 2 global variables i'm not sure how, as far as I can tell the return statement will only return 1 value return x,y; doesn't seem to work..
if it's a global table I can return all the values.
Just a quick update I am going to assume its the script edit run , somehow seems that's the problem, I put the line global TestReturn = ProbeReturn; at the beginning of the probe library and a print(TestReturn[1]);, ProbeReturn has been declared as a table in another library I get compilation error from the script edit when I hit run.
Now if I run the same code in the scripter debugger I get no compilation errors and the correct value printed -2 form TestReturn[1]
So This one I have no idea, I leave this one for you.
Getting strange behavior when trying to run some Gcode when I load the gcode I get no errors, when I run it I cutter comp errors and compile errors, the code runs at the to and after first t4 m6, it stops, and I hit run it runs, but the second tool change it stops and I get the dialog continuing job stopped at it shows the work and mach coordinates and what line to continue from I can enter any line number and then it seems to be running but gcode never continues past the tool change line...
Now if I stop all and rewind it seems that the Z axis gets lost if I click on the Z axis DRO to change to number 1.0 it changes to 0.0 if I change it to 2.0 it changes to 1.0
and so on... most of the time its 1 off the value I enter but only after running the gcode file..
I assuming auggie doesn't like g40 g41 ?
Gary
Last edited by gburk on Sun Apr 14, 2019 12:19 pm, edited 1 time in total.
Re: reading Pokeys pins
Hi Gary:
>>I removed //Engine.StopProgram(); line to test that didn't make a difference still no stop rewind.
>> Maybe you have another way to stop and wait for input and get input...
>>I don't see any other way to do the manual tool change and then do a touch off with the new tool and then reset >>the Z position. . to the new tool Hight..
>>I will try to run it though the script editor debugger and see what I find
No, I think the script dialog for input should work. IF the scripter doesnt help, zip up all
your script library and Ill see if I can simulate it here.
>>if you are retuning 2 global variables i'm not sure how, as far as I can tell the return statement will only return 1 >>value return x,y; doesn't seem to work..
>>if it's a global table I can return all the values.
You dont need to return globals, you just set them..
global MyProbeX = 0;
global MyProbeY = 0;
global MyProbe function()
{
...
...
MyProbeY = 10;
MyProbeX = 5;
}
global SomeOtherFunction = function()
{
if( MyProbeX == 10) ....
}
Any other script will now see the two variables as 10 and 5, nothing has to be returned. Thats
why I tended to use them as it was easier to simply declare a bunch of globals and not worry about returns.
>>Just a quick update I am going to assume its the script edit run , somehow seems that's the problem, I put the line global TestReturn = ProbeReturn; at the beginning of the probe library and a print(TestReturn[1]);, ProbeReturn has been declared as a table in another library I get compilation error from the script edit when I hit run.
Now if I run the same code in the scripter debugger I get no compilation errors and the correct value printed -2 form TestReturn[1] .So This one I have no idea, I leave this one for you.
Hmm , sounds like the script using ProbeReturn is being installed before the one that declares it. Ill have to do some checking to see how that can happen, the system loads twice to catch such things. IT might be best to simply send me your libraries and see if I can make them run. Might show me why its off..
>>Getting strange behavior when trying to run some Gcode when I load the gcode I get no errors, when I run it I cutter comp errors and compile errors g40 g41 ?
Its part of Auggies spec that it doesnt do cutter comp. G40,41 will cause errors and failures. It's whole design was
to try to eliminate the things most cnc hobbiests dont use and add things that others couldnt do. Cutter comp
is large enough a ball of worms it was left out purposely.
Art
>>I removed //Engine.StopProgram(); line to test that didn't make a difference still no stop rewind.
>> Maybe you have another way to stop and wait for input and get input...
>>I don't see any other way to do the manual tool change and then do a touch off with the new tool and then reset >>the Z position. . to the new tool Hight..
>>I will try to run it though the script editor debugger and see what I find
No, I think the script dialog for input should work. IF the scripter doesnt help, zip up all
your script library and Ill see if I can simulate it here.
>>if you are retuning 2 global variables i'm not sure how, as far as I can tell the return statement will only return 1 >>value return x,y; doesn't seem to work..
>>if it's a global table I can return all the values.
You dont need to return globals, you just set them..
global MyProbeX = 0;
global MyProbeY = 0;
global MyProbe function()
{
...
...
MyProbeY = 10;
MyProbeX = 5;
}
global SomeOtherFunction = function()
{
if( MyProbeX == 10) ....
}
Any other script will now see the two variables as 10 and 5, nothing has to be returned. Thats
why I tended to use them as it was easier to simply declare a bunch of globals and not worry about returns.
>>Just a quick update I am going to assume its the script edit run , somehow seems that's the problem, I put the line global TestReturn = ProbeReturn; at the beginning of the probe library and a print(TestReturn[1]);, ProbeReturn has been declared as a table in another library I get compilation error from the script edit when I hit run.
Now if I run the same code in the scripter debugger I get no compilation errors and the correct value printed -2 form TestReturn[1] .So This one I have no idea, I leave this one for you.
Hmm , sounds like the script using ProbeReturn is being installed before the one that declares it. Ill have to do some checking to see how that can happen, the system loads twice to catch such things. IT might be best to simply send me your libraries and see if I can make them run. Might show me why its off..
>>Getting strange behavior when trying to run some Gcode when I load the gcode I get no errors, when I run it I cutter comp errors and compile errors g40 g41 ?
Its part of Auggies spec that it doesnt do cutter comp. G40,41 will cause errors and failures. It's whole design was
to try to eliminate the things most cnc hobbiests dont use and add things that others couldnt do. Cutter comp
is large enough a ball of worms it was left out purposely.
Art
Re: reading Pokeys pins
Art
I can't even declare the global MyProbeX = 0 at the start of the probing lib I get the same error as the table, I will try it in a different lib and see if I can change it in the probe function...
I changed the post processor not to use g40 41 42 and 43...
but I get strange errors the gcode loads ok and look right in the display, but I will get an error script fails compilation same message will display 4 or 5 time
log shows
27:46:292 Script fails compilation.
27:46:292 See log for errors.
27:46:308 error (1) parse error, expecting `';''
it doesn't happen with all gcode files...
also still seems to get stuck on the second t4 m6 call seems like every thing gets lost there and if I hit run it will jog and when finished jogging then jogs back and stops for a tool change again its back on the same line, will not continue past the second m6 line..
I setup a global var in another lib it compiles ok
now I put this in the Zprobe function and get the compilation error still
ZprobeReturnPos = GlobalGet("ProbePos2");
almost seems like I cant call any global var form that function..
Update may have fixed using global in the probing lib, haven't seen this one yet but first time for everything it may have been a bad keyboard noticed some strange things happening when hitting keys swapped out the key board and now I can add global's to the probe lib...
thanks gary
I can't even declare the global MyProbeX = 0 at the start of the probing lib I get the same error as the table, I will try it in a different lib and see if I can change it in the probe function...
I changed the post processor not to use g40 41 42 and 43...
but I get strange errors the gcode loads ok and look right in the display, but I will get an error script fails compilation same message will display 4 or 5 time
log shows
27:46:292 Script fails compilation.
27:46:292 See log for errors.
27:46:308 error (1) parse error, expecting `';''
it doesn't happen with all gcode files...
also still seems to get stuck on the second t4 m6 call seems like every thing gets lost there and if I hit run it will jog and when finished jogging then jogs back and stops for a tool change again its back on the same line, will not continue past the second m6 line..
I setup a global var in another lib it compiles ok
now I put this in the Zprobe function and get the compilation error still
ZprobeReturnPos = GlobalGet("ProbePos2");
almost seems like I cant call any global var form that function..
Update may have fixed using global in the probing lib, haven't seen this one yet but first time for everything it may have been a bad keyboard noticed some strange things happening when hitting keys swapped out the key board and now I can add global's to the probe lib...
thanks gary
Last edited by gburk on Tue Apr 16, 2019 11:01 am, edited 1 time in total.
Re: reading Pokeys pins
Code: Select all
Hi art
Have a macro question I assume auggie doesn't use g83 peck drilling....
so I created a macro G888 to do peck drilling it works but when I am done and exit the G888 function the go code stops and doesn't continue to next line
I put a Engine.StopProgram and it will return to the next line in the g code but it sits and waits for the run to be pressed is there a way around that..
Also is there a way to stop the dialog that pops up at tool changes and seem to popup at other times I hit the run.. it must be built into auggie it show the work and mach cords and ask line # to run from..
Here is the code
[codeglobal DrillPeck = function(x,y,z,s,r,d)
{
for( pecking = 0; pecking <= d; pecking+=s)
{
print("Peck Drilling X "+x+" Y "+y+" Z "+z+ " R "+r+" S "+s+" D "+d+" Pecking = "+pecking);
Engine.GCode("G90 G01 Z-"+pecking);
block("MotionStill");
Engine.GCode("G91 G01 Z"+r);
block("MotionStill");
};
yield();
Engine.StopProgram();
};
global GCode888 = function()
{
print( "GCode peck drill is being executed. ");
print( "The following paameters were on the line.");
print( "-999999 means the parameter was not used.");
print("X:" + ParmsXYZ[0] + " Y:" + ParmsXYZ[1] + " Z:"+ ParmsXYZ[2]);
print("AQL is :" + ParmsAQL);
print("PRI is :" + ParmsPRI); //P Step distance // R Retract Hight
print("JKD is :" + ParmsJKD);
print("UVW is :" + ParmsUVW[0] + ", " + ParmsUVW[1] + ", " + ParmsUVW[2]);
print("H is :" + ParmsH[0]); //H max Z distance down
DrillPeck(ParmsXYZ[0],ParmsXYZ[1],ParmsXYZ[2],ParmsPRI[0],ParmsPRI[1],ParmsH[0]);
};
And in the gcode call like this
T7 M6
( Drill1 )
G17
M8
M3
G888 X-0.4456Y-0.5138Z0.4456P0.03R0.250H.125 (P = peck distance R = Retract Distance H = Distance to Drill)
G888 X0.4384Y-0.5138Z0.4456P0.03R0.250H.125
F10.0
M9
( Drill2 )
G0 Z0.125
( T6 : 0.25 )
T6 M6
M8
M3
G888 X0.4384Y-0.5138Z0.4456P0.03R0.250H1.0
G888 X-0.4456Y-0.5138Z0.4456P0.03R0.250H1.0
M9]
Also is there a way to have auggie invert the estop so pokeys config doesn't have to be run switches get changed from no or nc,
and also with the probe if the probe pin 19 get inverted to also change the GlobalSet("ProbeInvert",0); so now ProbeInvert 0 would be inverted so if using probe that n/closed and then switch to a touch plate that may be n/open you wouldn't have to go into the script every time and change ProbeInvert 0 to 1 or 1 to 0..
make any sense sometimes my expiations are a little cloudy, maybe all the time..
Thanks gary
Re: reading Pokeys pins
Hi Art
I modified the post processor in sheetcam and that seems to be working ok in auggie the only time I seem have trouble is during a tool change m6 call and I think it has something to do with the dialog that auggie displays and it looks like it has saved x y z positions not current positions and when you hit ok to continue it is jogging to those positions sometimes the z would be to low so on the next move the tool could break off..
But it looks like I don't need the peck drill script with sheetcam , I will need it with cambam?
Thanks gary
I modified the post processor in sheetcam and that seems to be working ok in auggie the only time I seem have trouble is during a tool change m6 call and I think it has something to do with the dialog that auggie displays and it looks like it has saved x y z positions not current positions and when you hit ok to continue it is jogging to those positions sometimes the z would be to low so on the next move the tool could break off..
But it looks like I don't need the peck drill script with sheetcam , I will need it with cambam?
Thanks gary
Re: reading Pokeys pins
Hi Gary:
Sorry for the delay, my development computer blew its OS drive this week. Ive just now
come back up to snuff..
Ill take these one at a time..
>>27:46:292 Script fails compilati on.
>>27:46:292 See log for errors.
>>27:46:308 error (1) parse error, expecting `';''
>>it doesn't happen with all gcode files...
This does sound like a script error in syntax somewhere. Id advise trying single line Gcodes
until you knbow what causes it. If the M6 causes it for example, look to all scripts called
by M6 and call them in the script window till we know which one exactly is missing the ";"
>>I setup a global var in another lib it compiles ok
>>now I put this in the Zprobe function and get the compilati on error still
>>ZprobeReturnPos = GlobalGet("ProbePos2");
>>almost seems like I cant call any global var from that function. .
and ZprobeReturnPos is defined as a global in an earlier file? Ill do some checking on the order
of execution.. But finding the ";" syntax may solve it, if the syntax error is found in the file, it may
have stopped the global from being defined. A syntax error is a non recoverable fault for that file.
This may be a clue the bad script is in the same file as the global?
Art
Sorry for the delay, my development computer blew its OS drive this week. Ive just now
come back up to snuff..
Ill take these one at a time..
>>27:46:292 Script fails compilati on.
>>27:46:292 See log for errors.
>>27:46:308 error (1) parse error, expecting `';''
>>it doesn't happen with all gcode files...
This does sound like a script error in syntax somewhere. Id advise trying single line Gcodes
until you knbow what causes it. If the M6 causes it for example, look to all scripts called
by M6 and call them in the script window till we know which one exactly is missing the ";"
>>I setup a global var in another lib it compiles ok
>>now I put this in the Zprobe function and get the compilati on error still
>>ZprobeReturnPos = GlobalGet("ProbePos2");
>>almost seems like I cant call any global var from that function. .
and ZprobeReturnPos is defined as a global in an earlier file? Ill do some checking on the order
of execution.. But finding the ";" syntax may solve it, if the syntax error is found in the file, it may
have stopped the global from being defined. A syntax error is a non recoverable fault for that file.
This may be a clue the bad script is in the same file as the global?
Art
Re: reading Pokeys pins
Gary:
>>Also is there a way to stop the dialog that pops up at tool changes and seem to popup at other times I hit the run..
That would be the "continue" dialog. It doesnt pop up unless it senses the current position
is not properly registered as a start position. Let me check to see why it pops up on you,
I never see it unless I stop a program and tell it to restart. I think the M0 may be stopping
the program without regard to continuing, it may instead need an M1 which should tell
it to stop temporarily ( pause) till its told to run. Running from stop will open
a continue dialog as its not sure where your starting from.
>>Also is there a way to have auggie invert the estop so pokeys config doesn't have to be run switches get changed from no or nc,
The polarity of the Estop switches are set by the Pokeys. I use whatever it is set to. If the pokeys software is expecting a no, thats what Auggie uses. If its mismatched with Mach3, I suspect Mach3
must override the settings of the Pokeys engine, or the engine setting is ignored in Mach3. To fix this
you should only have to open the Pokeys software, chck the setting of "Invert Estop" on that page so
that the estop works and resets properly. At that point Auggie should see the same thing.
>>and also with the probe if the probe pin 19 get inverted to also change the
GlobalSet("ProbeInvert",0); so now ProbeInve rt 0 would be inverted so if using probe that n/closed and then switch to a touch plate that may be n/open you wouldn't have to go into the script every time and change ProbeInve rt 0 to 1 or 1 to 0..make any sense sometimes my expiation s are a little cloudy, maybe all the time..
In Auggie, you set the probe to whether its normally Open or closed with the planner setting of "ProbeInvert", this isnt the same as the script setting. The planner setting in the config basically
tells Auggie if you want "normal" out of the box behaviour to be be a contact of normally open
or normally closed.
The Script Call to GlobalSet("ProbeInvert",true) is a different setting, it means to now
use the opposite of the planner setting. In other words you use it to temporarily swap
the pins so that you can probe off a plate instead of probing to it. After that move youd
then tell it GlobalSet("ProbeInvert",false) to set it back to "normal" which is whatever the
config planner setting is. So setting the planners config of "ProbeInvert" is the way to
set the normal condition. The last script call setting is forgotten upon restart.
Ill check the code this week to find out how to properly pause a program instead instead
of stopping it. I think the continue dialog occurs if the postion at last stop changed
prior to hitting run, but Ill check to be sure.
Art
>>Also is there a way to stop the dialog that pops up at tool changes and seem to popup at other times I hit the run..
That would be the "continue" dialog. It doesnt pop up unless it senses the current position
is not properly registered as a start position. Let me check to see why it pops up on you,
I never see it unless I stop a program and tell it to restart. I think the M0 may be stopping
the program without regard to continuing, it may instead need an M1 which should tell
it to stop temporarily ( pause) till its told to run. Running from stop will open
a continue dialog as its not sure where your starting from.
>>Also is there a way to have auggie invert the estop so pokeys config doesn't have to be run switches get changed from no or nc,
The polarity of the Estop switches are set by the Pokeys. I use whatever it is set to. If the pokeys software is expecting a no, thats what Auggie uses. If its mismatched with Mach3, I suspect Mach3
must override the settings of the Pokeys engine, or the engine setting is ignored in Mach3. To fix this
you should only have to open the Pokeys software, chck the setting of "Invert Estop" on that page so
that the estop works and resets properly. At that point Auggie should see the same thing.
>>and also with the probe if the probe pin 19 get inverted to also change the
GlobalSet("ProbeInvert",0); so now ProbeInve rt 0 would be inverted so if using probe that n/closed and then switch to a touch plate that may be n/open you wouldn't have to go into the script every time and change ProbeInve rt 0 to 1 or 1 to 0..make any sense sometimes my expiation s are a little cloudy, maybe all the time..
In Auggie, you set the probe to whether its normally Open or closed with the planner setting of "ProbeInvert", this isnt the same as the script setting. The planner setting in the config basically
tells Auggie if you want "normal" out of the box behaviour to be be a contact of normally open
or normally closed.
The Script Call to GlobalSet("ProbeInvert",true) is a different setting, it means to now
use the opposite of the planner setting. In other words you use it to temporarily swap
the pins so that you can probe off a plate instead of probing to it. After that move youd
then tell it GlobalSet("ProbeInvert",false) to set it back to "normal" which is whatever the
config planner setting is. So setting the planners config of "ProbeInvert" is the way to
set the normal condition. The last script call setting is forgotten upon restart.
Ill check the code this week to find out how to properly pause a program instead instead
of stopping it. I think the continue dialog occurs if the postion at last stop changed
prior to hitting run, but Ill check to be sure.
Art
Re: reading Pokeys pins
Gary:
In looking into why the "Continue" dialog opens after your scripts I figured Id explain how it work.
When you press run there are quite a few different things that will happen depending on context. IF the Tab window is on scripts for example it runs the script, if on MDI, it runs depending on the tab as to if its
single line or multiple line MDI . In Gcode though, it does a few checks. If your last end point is the same as the current start point, then it wont open the "continue" window. If it senses though, that you are in
a different coordinate that when you last ended a move, it will bring up the "continue" dialog to ensure
a smooth motion to the start of the move. This is in case you have jogged or something.
This is why in a default M6 call, the tool changes, the system waits for a run to be pressed in
order to start up on the next gcode line when RUN is pressed, and when you press RUN, the
dialog doesnt open, it just runs.
In your case, your moving the coordintes , so the system thinks your starting from a new
location. Try adding a Gcode("g1...") call to your new coordinates (( in essense a non move)
which will set the system so it thinks the last end was your new coordinates. When you next press
run the dialog shouldnt open.
I will add a command I think to disable the "continue dialog", or find soem way to properly
sync the last move so you wont have it open. I call to the planners sync() routine would stop
it from happening so it may be I only need to add a Sync Command after coordinates
have been changed.
Thx
Art
In looking into why the "Continue" dialog opens after your scripts I figured Id explain how it work.
When you press run there are quite a few different things that will happen depending on context. IF the Tab window is on scripts for example it runs the script, if on MDI, it runs depending on the tab as to if its
single line or multiple line MDI . In Gcode though, it does a few checks. If your last end point is the same as the current start point, then it wont open the "continue" window. If it senses though, that you are in
a different coordinate that when you last ended a move, it will bring up the "continue" dialog to ensure
a smooth motion to the start of the move. This is in case you have jogged or something.
This is why in a default M6 call, the tool changes, the system waits for a run to be pressed in
order to start up on the next gcode line when RUN is pressed, and when you press RUN, the
dialog doesnt open, it just runs.
In your case, your moving the coordintes , so the system thinks your starting from a new
location. Try adding a Gcode("g1...") call to your new coordinates (( in essense a non move)
which will set the system so it thinks the last end was your new coordinates. When you next press
run the dialog shouldnt open.
I will add a command I think to disable the "continue dialog", or find soem way to properly
sync the last move so you wont have it open. I call to the planners sync() routine would stop
it from happening so it may be I only need to add a Sync Command after coordinates
have been changed.
Thx
Art
Re: reading Pokeys pins
Hi Art
Glad to here you are up and running again...
I will try one thing at a time I think I keep getting ahead of my self OCD!
As for the Continue dialog it only pops up during a M6 Tool change, and right now I have removed any scripts I was working on for M6 calls and I am using only the ones you had in the scripts.. maybe be easier to trace down..
hers an example of what continue dialog displays on the very first M6
Mach cord X -0.4450 Y -0.6963 Z -0.3312 A 0.0000
Work cord X 0.0000 Y 0.0000 Z 0.0000 A 0.0000
auggies DRO's show X = 0.0000 Y = 0.0000 Z = 0.5000
I sent the Z axis to .5 before the M6....
As far as what's script is causing the ; error I don't know here is a clip from the error file. it error as soon as the g code is loaded seems like its in the screen regen
The image looks correct on the screen not messed up, looks like the correct tool path I guess is what I meant to say..
15:56:507 --System -- User has Regened the toolpath.
15:56:585 Script fails compilation.
15:56:585 See log for errors.
15:56:600 error (3) parse error
15:56:600 error (3) parse error
15:56:600 Script OnRegen() Called
15:56:600 error (1) parse error, expecting `';''
15:56:600 Script fails compilation.
15:56:616 See log for errors.
15:56:632 error (1) parse error, expecting `';''
15:56:632 Script fails compilation.
15:56:632 See log for errors.
15:56:647 error (1) parse error, expecting `';''
15:56:647 Script fails compilation.
15:56:663 See log for errors.
15:56:679 error (1) parse error, expecting `';''
15:56:741 Script fails compilation.
15:56:741 See log for errors.
15:56:757 error (1) parse error, expecting `';''
15:56:772 Script fails compilation.
15:56:772 See log for errors.
15:56:804 error (1) parse error, expecting `';''
15:56:819 Script fails compilation.
15:56:819 See log for errors.
15:56:835 error (1) parse error, expecting `';''
15:56:866 Script fails compilation.
15:56:866 See log for errors.
15:56:897 error (1) parse error, expecting `';''
15:56:929 --System -- User has Regened the toolpath.
15:56:929 GCode file loaded.
15:56:929 Processing Paths
do you think not having a space between line number and g code could be a problem example
N220G00G43Z0.8000H2
or space
N230 S2500M03
Thanks gary
Glad to here you are up and running again...
I will try one thing at a time I think I keep getting ahead of my self OCD!
As for the Continue dialog it only pops up during a M6 Tool change, and right now I have removed any scripts I was working on for M6 calls and I am using only the ones you had in the scripts.. maybe be easier to trace down..
hers an example of what continue dialog displays on the very first M6
Mach cord X -0.4450 Y -0.6963 Z -0.3312 A 0.0000
Work cord X 0.0000 Y 0.0000 Z 0.0000 A 0.0000
auggies DRO's show X = 0.0000 Y = 0.0000 Z = 0.5000
I sent the Z axis to .5 before the M6....
As far as what's script is causing the ; error I don't know here is a clip from the error file. it error as soon as the g code is loaded seems like its in the screen regen
The image looks correct on the screen not messed up, looks like the correct tool path I guess is what I meant to say..
15:56:507 --System -- User has Regened the toolpath.
15:56:585 Script fails compilation.
15:56:585 See log for errors.
15:56:600 error (3) parse error
15:56:600 error (3) parse error
15:56:600 Script OnRegen() Called
15:56:600 error (1) parse error, expecting `';''
15:56:600 Script fails compilation.
15:56:616 See log for errors.
15:56:632 error (1) parse error, expecting `';''
15:56:632 Script fails compilation.
15:56:632 See log for errors.
15:56:647 error (1) parse error, expecting `';''
15:56:647 Script fails compilation.
15:56:663 See log for errors.
15:56:679 error (1) parse error, expecting `';''
15:56:741 Script fails compilation.
15:56:741 See log for errors.
15:56:757 error (1) parse error, expecting `';''
15:56:772 Script fails compilation.
15:56:772 See log for errors.
15:56:804 error (1) parse error, expecting `';''
15:56:819 Script fails compilation.
15:56:819 See log for errors.
15:56:835 error (1) parse error, expecting `';''
15:56:866 Script fails compilation.
15:56:866 See log for errors.
15:56:897 error (1) parse error, expecting `';''
15:56:929 --System -- User has Regened the toolpath.
15:56:929 GCode file loaded.
15:56:929 Processing Paths
do you think not having a space between line number and g code could be a problem example
N220G00G43Z0.8000H2
or space
N230 S2500M03
Thanks gary
Last edited by gburk on Mon Apr 29, 2019 3:51 am, edited 1 time in total.
Who is online
Users browsing this forum: No registered users and 2 guests