how do you write an "and" statement
how do you write an "or" statement
Using C# syntax:
AND -> &&
OR -> ||
ok, ill be more specific, my fault
I am going through the tutorial package again, this time I am attempting to do them all in script instead of ladder. (maybe not a good idea?) I'm currently on exercise 2.
I am attempting to create an AND statement with 2 inputs,
Example of what I think I need to achieve:
If(StartButton == true) AND if(Lever == false)
{
Motor = true;
}
thank you,
OK not problem to write the logic using the script code.
The syntax is:
if (StartButton && !Lever)
{
Motor = true;
}
Or also:
if (StartButton == true && Lever == false)
{
Motor = true;
}