by ArtF » Sun Jul 31, 2016 4:33 pm
>>4. How Get/Set Label?
>> Mylabel = Label("Main_LABE L_66");
>> MyLabel.S etText("Yho");
>>return mistake
>> Mylabel = Label("Main_LABE L_66");
>> Mylabel.S etBkgndCo lor(0x444400);
>>return mistake
I just tried ..
Mylabel = Label("JogPanel_LABEL_0");
Mylabel.SetText("fgh");
Mylabel.SetBkgndColor(0xfff,0x0f0);
Sorry about the color, you need 2 numbers, one for on segments, one for off.. other than that the above works fine here.
>>5. Help please with Block.
>>...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 automatic ally when the item changes.
Does it work fo Pokeys pin?
Pokeys1 Pin Dig IN(1);
Pokeys1.P in Dig OUT(9);
No. You need to have a screen interface object to deal with, its the object that calls
the script. So it must be a button or a dro..or even a label.. probably not good for monitoring a pin..
To do it with blocking, just add something like this to a library file..
global MonitorPin9 = function()
{
while(1)
{
block( "MotionPiin9"); //or you cold use IOPin9
//
// when you reach here, its because pin9 has changed..
pinstate = MyMotion.GetPinDig(9);
if( pinstate == 1 )
{
//do what you need to do. Take not that if you change pin9, youll get called again..
//so make sure you dont get into a loop where your change makes this gets called which then changes it..etc...
}
}
};
MonitorPin9();
In the library, the function will get declared, and then start runnign immediatley as you call it right after declaring it..
>>6. Mach3 has a very ...... I have placed wrong question.
>>The question is: How to change user interfase (like Program run, MDI, Settings, ets.) during Auggie works? Is it possible to set Hot Keys to load different screens or panels?
Ahh. You cannot as yet. I havent adding a call for a screen swap, though I plan to. I just havent had to as yet.
Thx
Art
>>4. How Get/Set Label?
>> Mylabel = Label("Main_LABE L_66");
>> MyLabel.S etText("Yho");
>>return mistake
>> Mylabel = Label("Main_LABE L_66");
>> Mylabel.S etBkgndCo lor(0x444400);
>>return mistake
I just tried ..
Mylabel = Label("JogPanel_LABEL_0");
Mylabel.SetText("fgh");
Mylabel.SetBkgndColor(0xfff,0x0f0);
Sorry about the color, you need 2 numbers, one for on segments, one for off.. other than that the above works fine here.
>>5. Help please with Block.
>>...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 automatic ally when the item changes.
Does it work fo Pokeys pin?
Pokeys1 Pin Dig IN(1);
Pokeys1.P in Dig OUT(9);
No. You need to have a screen interface object to deal with, its the object that calls
the script. So it must be a button or a dro..or even a label.. probably not good for monitoring a pin..
To do it with blocking, just add something like this to a library file..
global MonitorPin9 = function()
{
while(1)
{
block( "MotionPiin9"); //or you cold use IOPin9
//
// when you reach here, its because pin9 has changed..
pinstate = MyMotion.GetPinDig(9);
if( pinstate == 1 )
{
//do what you need to do. Take not that if you change pin9, youll get called again..
//so make sure you dont get into a loop where your change makes this gets called which then changes it..etc...
}
}
};
MonitorPin9();
In the library, the function will get declared, and then start runnign immediatley as you call it right after declaring it..
>>6. Mach3 has a very ...... I have placed wrong question.
>>The question is: How to change user interfase (like Program run, MDI, Settings, ets.) during Auggie works? Is it possible to set Hot Keys to load different screens or panels?
Ahh. You cannot as yet. I havent adding a call for a screen swap, though I plan to. I just havent had to as yet.
Thx
Art