Re: Script+Pokeys
Posted: Sat Jul 30, 2016 1:29 am
Hi A:
>>Thank you for so complete explanati ons. Script is VERY powerful tool!
It IS, its more powerfull than most any contoller has near as I can see. It can run a great many scripts simultaneously
and in various situations. While pretty heavily tested, it definitely has limitations and problems we're unaware of, Auggie
has few safeties, its designed to let you do what YOU Want, because its designed for and by me for my experiments. Ive only
used it for lasers so many normal cnc bugs may exist, but eventually Ill get to the spot where I need more normal cnc
so problems there will get addressed.
>> 1. Engine.Go Parallel(); - ok,
>>2. GlobalGet/Set Button, LED, Slider - ok,
>>3. I set LED ID number "0" on Main Screen. Following script does not work:
myled = Led("MAIN_LED_ 0");
myled.Set StateMask (7);
where is my mistake?
I just tested here with an LED I dropped on the screen..with this script.
led = Led("Main_LED_6");
led.SetStateMask(0);
sleep(3);
led.SetStateMask(1); //this makes the LED turn off, then on again in 3 seconds.
It may be because your using a number thats not 1 or 0 on a single led, a 7 should
only be used on an LED with at least 3 leds. Also, make sure no other system is controlling that
led, whatever signal is controlling it may override your script control. Also, make sure you restart
after editing the screen, sometimes a control will not be seen until a restart. Also, very important,
make sure only the LED is the only MAIN_LED_ 0, if other led's have a 0 as their ID, only the first
one will work, set the ID to 666 as a test, then MAIN_LED_666 should work.
4. How Get/Set Label?
Much the same way.
Mylabel = Label("Main_Label_2");
MyLabel.SetText("new text");
or Mylabel.SetBkColor( 0x444400 );
5. Help please with Block. I have Button (VarName "Pin_1") and LED (VarName "Pin_9"). Is it possible to start parallel looped Script to test "Pin_1" and set "Pin_9".
If you have a button named "Pin_1" , then if you create a library function of
global Pin_1 = function( state )
{
//if state is 1, then button is pressed, if 0, it is released. "Toggle" property
//of button will change how this is called, once per click or on press AND release.
GlobalSet("Pin_9", state);
}
So generally, you wouldnt waste cpu time polling a button, allow the button to call you instead.
By making a function equal to the variable name, that function will be called automatically when the
item changes. This is much more efficient than polling. Use signal and block to "poll" an input signal
as that too is fast and efficient and requires no polling. (Though you CAN poll if you like with simple sleep
call in a script.)
6. Mach3 has a very powerful tool - screens . Does Auggie has the similar?
Do you mean Screen4? (Scream4 as I call it? ). Auggie is really a replacement for Scream4, or started
to be. It got too powerfull so I made it auggie and called it a controller. Auggies power is as a screen
designer, when you enter EDIT mode, you can control the screen, redesign it completely or do any
other function related to screens. Auggies editing mode is much more powerfull and easier to use
than Scream4 ever was. Its also much less buggy or annoying, so long as one remembers to save
and restarts after a full edit, youll find the screen editing is very powerfull and allows for scripts to be
attached to any control even at design time. Watch the video's on screen design, once you start doing it,
its incredibly easy to do. Auggie is a good way to make a scripted control panel to do almost
anything hardware related, (Ill be driving galvos with it soon..) not only CNC.
Auggie is a strange program, its better than Mach3 by quite a bit for any experimenter, and for a custom
machine that doesnt do conventional cnc and needs custom screens, I think its one of the best on the web but will never
replace Mach3 as I have no intention of pushing it there. Like all gearotics tools, it was written for my use,
but Im gratified others find it useful. Unlike the other tools in Gearotics package, a controller needs quite a base
of users to get known, and after running Mach3 for a decade, Im far too into retirement to go there.
(Although I know if I attached an ESS and a PMDX we'd be awful busy around here.) , Auggie will be a group success
to me if 20 of us end up controlling machines with it and are happy with its speed and power, though as I use it
almost everyday myself, its already a success to me. Mach3 has around 100,000 users ( as a comparison.. :-) ).
While I screamed at Screen4 daily, I get annoyed with Auggie's designing only periodically, thats quite an improvment.
So when your bored, Id recommend deleting the things on Auggies screen you dont need, and redesigning it, a couple
hours of doing that and youll find your quite an expert on control panels in general.
Auggie will continue to grow as I go, though much more will be in Gearotic in terms of function. Gearotic will now call
Auggie for functions like Wizards, so the two programs are about to merge more tightly together so that people can use
what they like and ignore what they dont need. I have ordered some surplus galvos to work with on a new laser machine, so Ill
be attaching an Arduino to help , likley only a very small few will use something like galvo's, but the arduino communications
interface may be of interest to people when I get there. Auggies powerfull scripting combined with the cheapness of an arduino
may allow for some interesting projects.
Sorry for the long letter, I thought maybe youd be interested in the future plans for Auggie.. (and its early and Im bored and
stuck on a piece of code.. :) anyone know a good solution for malfatti circles?
Hope it helps,
Art
>>Thank you for so complete explanati ons. Script is VERY powerful tool!
It IS, its more powerfull than most any contoller has near as I can see. It can run a great many scripts simultaneously
and in various situations. While pretty heavily tested, it definitely has limitations and problems we're unaware of, Auggie
has few safeties, its designed to let you do what YOU Want, because its designed for and by me for my experiments. Ive only
used it for lasers so many normal cnc bugs may exist, but eventually Ill get to the spot where I need more normal cnc
so problems there will get addressed.
>> 1. Engine.Go Parallel(); - ok,
>>2. GlobalGet/Set Button, LED, Slider - ok,
>>3. I set LED ID number "0" on Main Screen. Following script does not work:
myled = Led("MAIN_LED_ 0");
myled.Set StateMask (7);
where is my mistake?
I just tested here with an LED I dropped on the screen..with this script.
led = Led("Main_LED_6");
led.SetStateMask(0);
sleep(3);
led.SetStateMask(1); //this makes the LED turn off, then on again in 3 seconds.
It may be because your using a number thats not 1 or 0 on a single led, a 7 should
only be used on an LED with at least 3 leds. Also, make sure no other system is controlling that
led, whatever signal is controlling it may override your script control. Also, make sure you restart
after editing the screen, sometimes a control will not be seen until a restart. Also, very important,
make sure only the LED is the only MAIN_LED_ 0, if other led's have a 0 as their ID, only the first
one will work, set the ID to 666 as a test, then MAIN_LED_666 should work.
4. How Get/Set Label?
Much the same way.
Mylabel = Label("Main_Label_2");
MyLabel.SetText("new text");
or Mylabel.SetBkColor( 0x444400 );
5. Help please with Block. I have Button (VarName "Pin_1") and LED (VarName "Pin_9"). Is it possible to start parallel looped Script to test "Pin_1" and set "Pin_9".
If you have a button named "Pin_1" , then if you create a library function of
global Pin_1 = function( state )
{
//if state is 1, then button is pressed, if 0, it is released. "Toggle" property
//of button will change how this is called, once per click or on press AND release.
GlobalSet("Pin_9", state);
}
So generally, you wouldnt waste cpu time polling a button, allow the button to call you instead.
By making a function equal to the variable name, that function will be called automatically when the
item changes. This is much more efficient than polling. Use signal and block to "poll" an input signal
as that too is fast and efficient and requires no polling. (Though you CAN poll if you like with simple sleep
call in a script.)
6. Mach3 has a very powerful tool - screens . Does Auggie has the similar?
Do you mean Screen4? (Scream4 as I call it? ). Auggie is really a replacement for Scream4, or started
to be. It got too powerfull so I made it auggie and called it a controller. Auggies power is as a screen
designer, when you enter EDIT mode, you can control the screen, redesign it completely or do any
other function related to screens. Auggies editing mode is much more powerfull and easier to use
than Scream4 ever was. Its also much less buggy or annoying, so long as one remembers to save
and restarts after a full edit, youll find the screen editing is very powerfull and allows for scripts to be
attached to any control even at design time. Watch the video's on screen design, once you start doing it,
its incredibly easy to do. Auggie is a good way to make a scripted control panel to do almost
anything hardware related, (Ill be driving galvos with it soon..) not only CNC.
Auggie is a strange program, its better than Mach3 by quite a bit for any experimenter, and for a custom
machine that doesnt do conventional cnc and needs custom screens, I think its one of the best on the web but will never
replace Mach3 as I have no intention of pushing it there. Like all gearotics tools, it was written for my use,
but Im gratified others find it useful. Unlike the other tools in Gearotics package, a controller needs quite a base
of users to get known, and after running Mach3 for a decade, Im far too into retirement to go there.
(Although I know if I attached an ESS and a PMDX we'd be awful busy around here.) , Auggie will be a group success
to me if 20 of us end up controlling machines with it and are happy with its speed and power, though as I use it
almost everyday myself, its already a success to me. Mach3 has around 100,000 users ( as a comparison.. :-) ).
While I screamed at Screen4 daily, I get annoyed with Auggie's designing only periodically, thats quite an improvment.
So when your bored, Id recommend deleting the things on Auggies screen you dont need, and redesigning it, a couple
hours of doing that and youll find your quite an expert on control panels in general.
Auggie will continue to grow as I go, though much more will be in Gearotic in terms of function. Gearotic will now call
Auggie for functions like Wizards, so the two programs are about to merge more tightly together so that people can use
what they like and ignore what they dont need. I have ordered some surplus galvos to work with on a new laser machine, so Ill
be attaching an Arduino to help , likley only a very small few will use something like galvo's, but the arduino communications
interface may be of interest to people when I get there. Auggies powerfull scripting combined with the cheapness of an arduino
may allow for some interesting projects.
Sorry for the long letter, I thought maybe youd be interested in the future plans for Auggie.. (and its early and Im bored and
stuck on a piece of code.. :) anyone know a good solution for malfatti circles?
Hope it helps,
Art