Quote Originally Posted by OlfCNC View Post
Comparion for equal value is == and not =.in C#.
= is giving value and not comparion.
This is definietly wrong: AS3.Getfielddouble(869) = 8000 in your if statement.
OR is || and not | , if I recall | is bitwise or ... probably, not sure.

Should be OK like this: if ((AS3.Getfielddouble(869) == 8000) || (AS3.Getfielddouble(869) < 10000) )
Yes and no.

Yes of course, it should be == not just =
No for || vs. | but if you use || or | in this case makes no difference. If you use || then if the first evaluation is true the second will not be executed. Some times you want to make sure (especially in checking for intervals) that both evaluations are executed, even if the first evaluation is true. In other words, in my opinion it is better to use | here because what we are doing is checking for intervals. Of course, this is now irrelevant since Dan can now read and set any spindle speed and don't have to look for intervals and set it step wise.