reading Pokeys pins
reading Pokeys pins
I put this in a new library I know I am doing a lot wrong don't seem to be able to trigger the pin when I trigger it with my switch i'm sure its being triggered
I have other software that is reading it correct high or low..
so far the only script I have had any luck with is putting a button on screen and getting it to print when pressed but I assume it because the script is in the screen script
and not the library.
How far off am I ???
global ServiceIOPin19 = function()
{
while(1)
{
print("IoPin19");
block("IOPin19");
//do what you wish to happen
// on pin19 change here.
}
};
Thanks gary
I have other software that is reading it correct high or low..
so far the only script I have had any luck with is putting a button on screen and getting it to print when pressed but I assume it because the script is in the screen script
and not the library.
How far off am I ???
global ServiceIOPin19 = function()
{
while(1)
{
print("IoPin19");
block("IOPin19");
//do what you wish to happen
// on pin19 change here.
}
};
Thanks gary
Re: reading Pokeys pins
Hi Gary:
Ill look this up in the morning and show you how to do what I think
your trying to do. Do you have 2 pokeys, a master and an IO one, or just one
pokeys and your trying to trigger on its pin19?
Art
Ill look this up in the morning and show you how to do what I think
your trying to do. Do you have 2 pokeys, a master and an IO one, or just one
pokeys and your trying to trigger on its pin19?
Art
Re: reading Pokeys pins
Hi Gary:
The syntax you need is
global ServiceIOPin19 = function()
{
while(1)
{
print("MainPokeysPin19");
block("MotionPin19");
//do what you wish to happen
// on pin19 change here.
}
};
You have it correct except that Auggie will control up to
two Pokeys at once. The main pokeys is a 57CNC type,
while the IO pokeys can be almost any type. So to block
on the 2nd pokeys is your original code, while the main one is called with
MotionPin19. The two pokeys are refered to as Motion and IO.
The above script will block on pin19
of the 57cnc.
Also, if you add this script to the GCode library for example,
you should call it in the library at the end with
ServiceIOPin19(); to start it up as the library is added.
Im still looking into the question of probing for you. When I wrote
Auggie it was with the intent of creating a cnc controller of
basic abilities which is why I didnt add threading or probing,
while the code exists for both in the engine, I knew from Mach3's
development that few used probeing or threading and they tended
to create the most support, so for Auggie I didnt support the more
obscure functions that caused all the tech support.
Auggie is pretty powerful for laser as I use it frequently for that myself,
and its pretty good at general things in cnc, but I tend to use
Mach3 myself for milling, though a special copy of my own design.
It may , however, be possible to give access to the probing calls
via script, if I can do that I will turn on an interface for it, and then the G31
command could be scripted to do a probe. Any GCode not handled by Auggie
will elicit a call to a Script under that Gcodes number. For example, as
Auggie has no internal hook for G31, it will at the right time in the code
call for a script called "GCode31", and if the GCode library has such a
named function it will be executed.
So Ill check to see if I can do that this week, its all a question of
how much code would be required to give access to that function
as Im deeply into some pwm work to enhance laser engraving.
Thx
Art
The syntax you need is
global ServiceIOPin19 = function()
{
while(1)
{
print("MainPokeysPin19");
block("MotionPin19");
//do what you wish to happen
// on pin19 change here.
}
};
You have it correct except that Auggie will control up to
two Pokeys at once. The main pokeys is a 57CNC type,
while the IO pokeys can be almost any type. So to block
on the 2nd pokeys is your original code, while the main one is called with
MotionPin19. The two pokeys are refered to as Motion and IO.
The above script will block on pin19
of the 57cnc.
Also, if you add this script to the GCode library for example,
you should call it in the library at the end with
ServiceIOPin19(); to start it up as the library is added.
Im still looking into the question of probing for you. When I wrote
Auggie it was with the intent of creating a cnc controller of
basic abilities which is why I didnt add threading or probing,
while the code exists for both in the engine, I knew from Mach3's
development that few used probeing or threading and they tended
to create the most support, so for Auggie I didnt support the more
obscure functions that caused all the tech support.
Auggie is pretty powerful for laser as I use it frequently for that myself,
and its pretty good at general things in cnc, but I tend to use
Mach3 myself for milling, though a special copy of my own design.
It may , however, be possible to give access to the probing calls
via script, if I can do that I will turn on an interface for it, and then the G31
command could be scripted to do a probe. Any GCode not handled by Auggie
will elicit a call to a Script under that Gcodes number. For example, as
Auggie has no internal hook for G31, it will at the right time in the code
call for a script called "GCode31", and if the GCode library has such a
named function it will be executed.
So Ill check to see if I can do that this week, its all a question of
how much code would be required to give access to that function
as Im deeply into some pwm work to enhance laser engraving.
Thx
Art
Re: reading Pokeys pins
Thanks Art
I will try it later, I have only on pokeys57cnc..
I will try it later, I have only on pokeys57cnc..
Re: reading Pokeys pins
Ok I made the changes to the code as per your suggestion, but doesn't seem to trigger the pin or at least see it being triggered, I don't get the printed message displayed from the code.
I did create a library folder called pokeys57 and added the script to that library also have it turned on and checked
you said maybe put it in the gcode library does it need to be there ?.
or could I be missing something else.
tested the pin in mach3 and mach4 today and both read the pin so I sending the signal correctly.
also some times when I boot auggie it asks if I want to use pokeys config or auggies I have been choosing pokeys..
Im supprised no one has asked for probing but I guess auggie is mostly for laser and I mostly use the mill...
I have problems with pokeys and mach3 probing no matter what I change in the config the probe led flashes on and off looks like a false trigger constantly
if I invert the pin the led stays on but on flashing but mach3 thinks its triggered...
Mach4 seems to read it ok no flashing but I don't have mach4 on the mill's computer.
and I like the scripting better in auggie not a fan of lua?
Thanks gary
I did create a library folder called pokeys57 and added the script to that library also have it turned on and checked
you said maybe put it in the gcode library does it need to be there ?.
or could I be missing something else.
tested the pin in mach3 and mach4 today and both read the pin so I sending the signal correctly.
also some times when I boot auggie it asks if I want to use pokeys config or auggies I have been choosing pokeys..
Im supprised no one has asked for probing but I guess auggie is mostly for laser and I mostly use the mill...
I have problems with pokeys and mach3 probing no matter what I change in the config the probe led flashes on and off looks like a false trigger constantly
if I invert the pin the led stays on but on flashing but mach3 thinks its triggered...
Mach4 seems to read it ok no flashing but I don't have mach4 on the mill's computer.
and I like the scripting better in auggie not a fan of lua?
Thanks gary
Re: reading Pokeys pins
Gary
I talked to Mat, the pokeys firmware author and he tells me its a normal buffered waypoint move
that I set to a probeing state to make probeing work, Ill take a look at it. The pokeys stops motion
and switches to internal; planner waiting for the trigger point to be read.
Your script shouldnt have to be in the Gcode library, can be in any. If you run it from
the script window does the script running led flash showing one is running? Ill take a look at the
block triggering code to see why it might not answer.
Art
I talked to Mat, the pokeys firmware author and he tells me its a normal buffered waypoint move
that I set to a probeing state to make probeing work, Ill take a look at it. The pokeys stops motion
and switches to internal; planner waiting for the trigger point to be read.
Your script shouldnt have to be in the Gcode library, can be in any. If you run it from
the script window does the script running led flash showing one is running? Ill take a look at the
block triggering code to see why it might not answer.
Art
Re: reading Pokeys pins
Not sure which led but when I run it in the script window I get the message end of mdi script run no led's flashing
also having jog problems now only will jog one direction and only .010 distance can't jog past that.. or the other direction.
also do you have it setup to read the homing pins or will that also need to be done with a script?.. haven't got that far yet so going to ask before I start on the homing..
Thanks gary
also having jog problems now only will jog one direction and only .010 distance can't jog past that.. or the other direction.
also do you have it setup to read the homing pins or will that also need to be done with a script?.. haven't got that far yet so going to ask before I start on the homing..
Thanks gary
Re: reading Pokeys pins
Gary:
Homing should work fine. Also, turn off softlimits, it may be those that are affecting you, until homing is setup, turn off softlimits in the config.
That will probably fix your jogging.
Art
Homing should work fine. Also, turn off softlimits, it may be those that are affecting you, until homing is setup, turn off softlimits in the config.
That will probably fix your jogging.
Art
Re: reading Pokeys pins
Gary:
Test homing in the pokeys setup program, it should work there, if so it should work in Auggie. I use
it daily.
Art
Test homing in the pokeys setup program, it should work there, if so it should work in Auggie. I use
it daily.
Art
Re: reading Pokeys pins
homing pins are showing being triggered in pokeys...
I have been looking for a doc file to show how dome of the build in commands are used haven't found one the file in the auggie folder shows the calls but not how to use them
like what they may need to be passed to then or read from them say like SetStateMask that's all that's in the doc file but not what to pass to it like maybe the led variable name
and a value to set it just an example, is there a doc file with how values need to be passed and read from the built in functions?
Thanks gary
I have been looking for a doc file to show how dome of the build in commands are used haven't found one the file in the auggie folder shows the calls but not how to use them
like what they may need to be passed to then or read from them say like SetStateMask that's all that's in the doc file but not what to pass to it like maybe the led variable name
and a value to set it just an example, is there a doc file with how values need to be passed and read from the built in functions?
Thanks gary
Re: reading Pokeys pins
Hi Gary:
Check the AuggieProgrammersGuide.chm file in your folder. It shows erxamples of all the script calls and hwo they are
used in general.
Art
Check the AuggieProgrammersGuide.chm file in your folder. It shows erxamples of all the script calls and hwo they are
used in general.
Art
Re: reading Pokeys pins
Gary:
That help file is only complete through the direct Engine commands, its parameters are not entered forthe other groupings. IF you see one of interest
that isnt complete, yell and Ill fill it in. Im looking at completeing that list and removing obsolete groups such as the contour drawing groups and such.
Too much was added into auggie that it didnt need, so much is being removed.
Art
That help file is only complete through the direct Engine commands, its parameters are not entered forthe other groupings. IF you see one of interest
that isnt complete, yell and Ill fill it in. Im looking at completeing that list and removing obsolete groups such as the contour drawing groups and such.
Too much was added into auggie that it didnt need, so much is being removed.
Art
Re: reading Pokeys pins
Gary:
One final thought, make sure you read the code contained in the default libraries, they are the best example of how
to use the various calls. Most of them are used in one way or another in the examples shown. You get a pretty good
idea how to script from those scripts. You can see some of them instantiate functions and also call them to run at startup
by simply calling the declared function in the library file.
Art
One final thought, make sure you read the code contained in the default libraries, they are the best example of how
to use the various calls. Most of them are used in one way or another in the examples shown. You get a pretty good
idea how to script from those scripts. You can see some of them instantiate functions and also call them to run at startup
by simply calling the declared function in the library file.
Art
Re: reading Pokeys pins
Ok did a button to call this script
The Word help prints to the screen but the led doesn't turn on.
I created a led with the var name to XhomeTest
global Main_BUT_20 = function( current )
{
print("Help");
led = Led("XhomeTest");
led.SetStateMask(1);
//sleep(30);
//led.SetStateMask(0); //this makes the LED turn off, then on again in 3 seconds.
return;
};
So doing something wrong sorry for all the questions once I wrap my head around this stuff I should be good to go..
I didn't see anything like this in the scripts in the script folder...
Thanks gary
I
The Word help prints to the screen but the led doesn't turn on.
I created a led with the var name to XhomeTest
global Main_BUT_20 = function( current )
{
print("Help");
led = Led("XhomeTest");
led.SetStateMask(1);
//sleep(30);
//led.SetStateMask(0); //this makes the LED turn off, then on again in 3 seconds.
return;
};
So doing something wrong sorry for all the questions once I wrap my head around this stuff I should be good to go..
I didn't see anything like this in the scripts in the script folder...
Thanks gary
I
Re: reading Pokeys pins
Hi Gary:
Your problem is the name of the led, your using the led variable name , not the actual led id name.
Start the scripter with the scripter checkbox in config dropdown. Turn on the scripter with its power button.
At this point you can right click any LED and its identifier will be shown. In the case of your XhomeTest youll see
a name like LED_USERPANEL_6 or some such thing. Thats the identifier needed for getting an LED hook.
The variable name can be used with variable manipulation routines. As you type the right LED identifier it will
autocorrect in the window your typing it in.
Art
Your problem is the name of the led, your using the led variable name , not the actual led id name.
Start the scripter with the scripter checkbox in config dropdown. Turn on the scripter with its power button.
At this point you can right click any LED and its identifier will be shown. In the case of your XhomeTest youll see
a name like LED_USERPANEL_6 or some such thing. Thats the identifier needed for getting an LED hook.
The variable name can be used with variable manipulation routines. As you type the right LED identifier it will
autocorrect in the window your typing it in.
Art
Who is online
Users browsing this forum: No registered users and 0 guests