reading Pokeys pins
Re: reading Pokeys pins
hi art
Thanks will test it out.. I found out why the G888 Wasn't running in the g code.. my error in script..
I attached the updated script and the g code file I ran in the air, and my dialog did pop up on tool changes never seen the continue dialog at all..
The only thing I see going on with this g code file is that it doesn't show up in the display window. most likely the G888 messing it up, but it did run ok..
I am assuming as long as nothing was weird going on then it didn't call the continue dialog..
Thanks gary
Thanks will test it out.. I found out why the G888 Wasn't running in the g code.. my error in script..
I attached the updated script and the g code file I ran in the air, and my dialog did pop up on tool changes never seen the continue dialog at all..
The only thing I see going on with this g code file is that it doesn't show up in the display window. most likely the G888 messing it up, but it did run ok..
I am assuming as long as nothing was weird going on then it didn't call the continue dialog..
Thanks gary
- Attachments
-
- XballscrewmountFinal4.zip
- (3.83 KiB) Downloaded 281 times
Re: reading Pokeys pins
Hi Gary:
>>I am assuming as long as nothing was weird going on then it didn't call the continue dialog..
I updated the executing line display, I think that was screwing with the continue dialog, it triggers
if you press run and the last line executed doesnt end at your current line. It then wants to safely move there
to continue the file.
>>he only thing I see going on with this g code file is that it doesn't show up in the display window. m
The file doesnt show up? lol, Ill check that out.
Thx
Art
>>I am assuming as long as nothing was weird going on then it didn't call the continue dialog..
I updated the executing line display, I think that was screwing with the continue dialog, it triggers
if you press run and the last line executed doesnt end at your current line. It then wants to safely move there
to continue the file.
>>he only thing I see going on with this g code file is that it doesn't show up in the display window. m
The file doesnt show up? lol, Ill check that out.
Thx
Art
Re: reading Pokeys pins
Gary:
The file shows up eventually, you have a 2 second delay sleep(2) after each peck, so in loading its executing that,
remove it and the file shows up almost immediately. Ill see some way to ignore a sleep while loading a file. While
loading the file is executed to make a toolpath so the sleeps make it slow to load.
Other than that , I had to fix the SetSpindleState to remove the calls to SpindleOn and SpindleOff, then the file
runs as youd expect and I can see it pecking. File seems to run OK now.
Art
The file shows up eventually, you have a 2 second delay sleep(2) after each peck, so in loading its executing that,
remove it and the file shows up almost immediately. Ill see some way to ignore a sleep while loading a file. While
loading the file is executed to make a toolpath so the sleeps make it slow to load.
Other than that , I had to fix the SetSpindleState to remove the calls to SpindleOn and SpindleOff, then the file
runs as youd expect and I can see it pecking. File seems to run OK now.
Art
Re: reading Pokeys pins
Gary:
I just upped version 3.6g. This fixes your sleeps slowing the load down. Sleep(x) will be interpreted as sleep(0)
during a load ( essentially a yield()), so the slowdown isnt very noticeable. The files loads very quick here now
and when running delays 2 seconds after each peck of the peck drilling as called for.
Art
I just upped version 3.6g. This fixes your sleeps slowing the load down. Sleep(x) will be interpreted as sleep(0)
during a load ( essentially a yield()), so the slowdown isnt very noticeable. The files loads very quick here now
and when running delays 2 seconds after each peck of the peck drilling as called for.
Art
Re: reading Pokeys pins
Thanks art
The pecking has been a problem with me I keep finding new problems I think I fixed a couple more here I a new peck a also changed the sleep time..
and if the cam program put a -0.1 I was loosing the 1 so would not peck with the 0 value losing values after the decimal..
removed the yield... do you think I should remove the stop program also ?
//G888 P.25 H1 R.2 I10
// M888 = Peck drilling Call with G888 H = Depth to drill R = retract hight P = Peck distance I Feed Rate
global GCode888 = function()
{
HoleDepth = ParmsH[0];
if (HoleDepth< 0)
{
HoleDepth = math.abs(HoleDepth);
}
//ok pos value lets do so pecking
print("Peck Drilling ");
for( pecking = 0; pecking <= HoleDepth; pecking+=ParmsPRI[0])
{
if (pecking + ParmsPRI[0] > HoleDepth)
{
pecking = HoleDepth;
}
print(" Pecking Z = "+pecking);
Engine.GCode("G90 G01 Z-"+pecking+" F"+ParmsPRI[2]);
block("MotionStill");
Engine.GCode("G90 G01 Z"+ParmsPRI[1]+" F"+ParmsPRI[2]);
block("MotionStill");
lastpos = pecking;
sleep(.5);
};
print("Finished pecking to the depth of "+lastpos);
Engine.StopProgram();
};
Thanks gary
The pecking has been a problem with me I keep finding new problems I think I fixed a couple more here I a new peck a also changed the sleep time..
and if the cam program put a -0.1 I was loosing the 1 so would not peck with the 0 value losing values after the decimal..
removed the yield... do you think I should remove the stop program also ?
//G888 P.25 H1 R.2 I10
// M888 = Peck drilling Call with G888 H = Depth to drill R = retract hight P = Peck distance I Feed Rate
global GCode888 = function()
{
HoleDepth = ParmsH[0];
if (HoleDepth< 0)
{
HoleDepth = math.abs(HoleDepth);
}
//ok pos value lets do so pecking
print("Peck Drilling ");
for( pecking = 0; pecking <= HoleDepth; pecking+=ParmsPRI[0])
{
if (pecking + ParmsPRI[0] > HoleDepth)
{
pecking = HoleDepth;
}
print(" Pecking Z = "+pecking);
Engine.GCode("G90 G01 Z-"+pecking+" F"+ParmsPRI[2]);
block("MotionStill");
Engine.GCode("G90 G01 Z"+ParmsPRI[1]+" F"+ParmsPRI[2]);
block("MotionStill");
lastpos = pecking;
sleep(.5);
};
print("Finished pecking to the depth of "+lastpos);
Engine.StopProgram();
};
Thanks gary
Re: reading Pokeys pins
Art
Tested new version Only main thing I see is when the g code file is loaded the G888 scripts seems be run also while the g code loads..
I uploaded The same g code file but did a little more on the post, so it should now have the X and Y moves before the peck starts..
Also I am not sure what I had changed while testing but I was getting the g code to display the paths but I lost it now no path display, but seems to run ok..
Thanks gary
Tested new version Only main thing I see is when the g code file is loaded the G888 scripts seems be run also while the g code loads..
I uploaded The same g code file but did a little more on the post, so it should now have the X and Y moves before the peck starts..
Also I am not sure what I had changed while testing but I was getting the g code to display the paths but I lost it now no path display, but seems to run ok..
Thanks gary
- Attachments
-
- XballscrewmountFinal4.zip
- (1.36 KiB) Downloaded 275 times
Re: reading Pokeys pins
Gary:
>>do you think I should remove the stop program also ?
The stop program only tells the program to stop and wait for a press of run after
the peckdrill. It should be its only effect.
>>G888 scripts seems be run also while the g code loads..
Did you mean it was actually moving the axis while loading? or just printing the messages?
All Gcodes have to run while loading, but in simulation, there should be no axis motion, but
any Gcode used will execute in sim as it has to to make the toolpath display properly. Each Gcode
file is parsed twice to create a toolpath and setup subroutine locations and such. There shouldnt be
any motion though...but if you print in the script, that will print.
Art
>>do you think I should remove the stop program also ?
The stop program only tells the program to stop and wait for a press of run after
the peckdrill. It should be its only effect.
>>G888 scripts seems be run also while the g code loads..
Did you mean it was actually moving the axis while loading? or just printing the messages?
All Gcodes have to run while loading, but in simulation, there should be no axis motion, but
any Gcode used will execute in sim as it has to to make the toolpath display properly. Each Gcode
file is parsed twice to create a toolpath and setup subroutine locations and such. There shouldnt be
any motion though...but if you print in the script, that will print.
Art
Re: reading Pokeys pins
Art
I went back and tested in motion mode and yes the Z axis was pecking while the G code file was loading...
That's if the estop was set if estop was off it only printed the pecking messages..
Thanks gary
I went back and tested in motion mode and yes the Z axis was pecking while the G code file was loading...
That's if the estop was set if estop was off it only printed the pecking messages..
Thanks gary
Re: reading Pokeys pins
Thanks Gary:
Ill fix that up right away..
Art
Ill fix that up right away..
Art
Re: reading Pokeys pins
Gary:
Version h is online, GCodes cannot now initiate motion during load.
It was already in effect for most other items, just missed that one.
Hadn't had GCode capability in the scripts till now.
Art
Version h is online, GCodes cannot now initiate motion during load.
It was already in effect for most other items, just missed that one.
Hadn't had GCode capability in the scripts till now.
Art
Re: reading Pokeys pins
Art
Good JOB No more pecking when g code loading...
Did you look at the pecking script do you think I should do anything different, I was thinking to except a positive or neg number and remove the Z- form the engine gcode ? I'm not a good programmer just hacking my way though and making a mess of things, but you get to fix the hard stuff.
Also have you looked at the g code file and have any idea why it doesn't display the tool path, is it the G888 messing it up..
Thanks gary
Good JOB No more pecking when g code loading...
Did you look at the pecking script do you think I should do anything different, I was thinking to except a positive or neg number and remove the Z- form the engine gcode ? I'm not a good programmer just hacking my way though and making a mess of things, but you get to fix the hard stuff.
Also have you looked at the g code file and have any idea why it doesn't display the tool path, is it the G888 messing it up..
Thanks gary
Re: reading Pokeys pins
Art
Don't know what I did but the display seems to be working now ???
When I first boot auggie and load a g code file then hit run it seems to do a m6 right away my dialog runs and I hit X end exit the code runs to the first M6 and runs my dialog again... a little strange but only happens on the first run its ok if I load a different g code and run it or stop and run same g code again..
Thanks gary
Don't know what I did but the display seems to be working now ???
When I first boot auggie and load a g code file then hit run it seems to do a m6 right away my dialog runs and I hit X end exit the code runs to the first M6 and runs my dialog again... a little strange but only happens on the first run its ok if I load a different g code and run it or stop and run same g code again..
Thanks gary
Re: reading Pokeys pins
Gary:
Thx, Ill do a few test runs. Your getting closer anyway, at least these bugs are
slowly going away. Ive found a few more small ones along the way as well for
next release. Laser didnt stress Auggie the way trying general cnc does it seems.
Art
Thx, Ill do a few test runs. Your getting closer anyway, at least these bugs are
slowly going away. Ive found a few more small ones along the way as well for
next release. Laser didnt stress Auggie the way trying general cnc does it seems.
Art
Re: reading Pokeys pins
Art
I am guessing you weren't planning on cnc milling with auggie, jest got lucky and stumbled across a pain in the BUTT like me...
Do have more request but will give you a little break...
Gary
I am guessing you weren't planning on cnc milling with auggie, jest got lucky and stumbled across a pain in the BUTT like me...
Do have more request but will give you a little break...
Gary
Re: reading Pokeys pins
Art
I am lost on the spindle setup
It looks like the 0-10volt is on PWM5 Pin 17 I assume its needs this - SetPWMDuty_1(5,0) - to get going but how does it know pin 17 or is pwm channel 5 all that needed and is connected to pin 17, and what would be the max output value to get 10volts ?
if the max RPM was say set to 3000.
or am I way off base and need to approach it differently Math is my weakest subject..
Thanks gary
I am lost on the spindle setup
It looks like the 0-10volt is on PWM5 Pin 17 I assume its needs this - SetPWMDuty_1(5,0) - to get going but how does it know pin 17 or is pwm channel 5 all that needed and is connected to pin 17, and what would be the max output value to get 10volts ?
if the max RPM was say set to 3000.
or am I way off base and need to approach it differently Math is my weakest subject..
Thanks gary
Who is online
Users browsing this forum: No registered users and 4 guests