The probably of a conflict is relatively low for a shared variable, is it not?
First you can choose to use any variable from a fair range, and then you have a fairly large number base that you could use as a variable
Ger do you fill the same way about the controllers at work ???
The probably of a conflict is relatively low for a shared variable, is it not?
new Thread(delegate () {
ChangeCurrTool ();
}).Start();
#Events
private void ChangeCurrTool ()
{
while (AS3.GetLED (25));
Thread.Sleep (500);
try
{
exec.Setcurrenttool (Convert.ToInt32 (exec.Readkey ("MyCNC", "CurrentTool", "False")));
}
catch ()
{
// do something to handle the exception
}
}
dezsoe wrote:Nice! But, instead of "False" use "0", because "False" cannot be converted to Int32.
kig23 wrote: if the value of a key in the .pro file is missing that will raise an exception
[MyCNC]
CurrentTool=
new Thread(delegate () {
LoadCurrToolValue ();
}).Start();
#Events
private void LoadCurrToolValue ()
{
while (AS3.GetLED (25));
Thread.Sleep (500);
exec.Setcurrenttool (Convert.ToInt32 (exec.Readkey ("MyCNC", "CurrentTool", "0")));
}
Users browsing this forum: No registered users and 3 guests