Hello everyone!
I am trying to write a program in Crimson 3.0 that will turn on an output if a number of tags are not equal to zero. When I hit the translate button a message box pops up and says "The left-handed side of operator '=' must be writable.
Here is my code:
// If any alarms are present on any of the controllers, sound the audible alarm via Output 1
if ( PLC1.Alarms != 0 ) {
[Module1.Variables.OutputCoil1] = 1;
}
else if ( PLC2.Alarms != 0 ) {
[Module1.Variables.OutputCoil1] = 1;
}
else if ( PLC3.Alarms !=0 ) {
[Module1.Variables.OutputCoil1] = 1;
}
else {
[Module1.Variables.OutputCoil1] = 0;
}
end
Is it possible to turn on an output with a program or not?
I am trying to write a program in Crimson 3.0 that will turn on an output if a number of tags are not equal to zero. When I hit the translate button a message box pops up and says "The left-handed side of operator '=' must be writable.
Here is my code:
// If any alarms are present on any of the controllers, sound the audible alarm via Output 1
if ( PLC1.Alarms != 0 ) {
[Module1.Variables.OutputCoil1] = 1;
}
else if ( PLC2.Alarms != 0 ) {
[Module1.Variables.OutputCoil1] = 1;
}
else if ( PLC3.Alarms !=0 ) {
[Module1.Variables.OutputCoil1] = 1;
}
else {
[Module1.Variables.OutputCoil1] = 0;
}
end
Is it possible to turn on an output with a program or not?