Cangialosi24
Member
Hello Everyone,
I'm new to programming and was looking for some assistance.
As a quick overview there is a SCADA system that sends commands to the PLC to start and stop motors, set motor speeds, etc.
I want to have logic to clear all of the BOOL type commands in the event of a communication failure to the PLC. I figured the cleanest way of doing this would be to make a UDT specifically for the commands. For example:
--------------------------------------------------------------------------------------
UDT = SCADA_CMD
-Motor1_Start BOOL
-Motor1_Stop BOOL
etc.
--------------------------------------------------------------------------------------
I planned on using a NEQ instruction to compare a tag named "CMD" of the "SCADA_CMD" data type to the value of 0. I thought that if the "CMD.Motor1_Start" tag went true, then that would set the "CMD" tag to the value of 1, causing the rung to execute.
Now I realized that you cannot use UDT's with the NEQ instruction. Does anyone have any suggestions? I wanted to try to avoid paralleling all of the commands around each other since there's more than just a few commands.
I hope I got my point across and I appreciate any input!
I'm new to programming and was looking for some assistance.
As a quick overview there is a SCADA system that sends commands to the PLC to start and stop motors, set motor speeds, etc.
I want to have logic to clear all of the BOOL type commands in the event of a communication failure to the PLC. I figured the cleanest way of doing this would be to make a UDT specifically for the commands. For example:
--------------------------------------------------------------------------------------
UDT = SCADA_CMD
-Motor1_Start BOOL
-Motor1_Stop BOOL
etc.
--------------------------------------------------------------------------------------
I planned on using a NEQ instruction to compare a tag named "CMD" of the "SCADA_CMD" data type to the value of 0. I thought that if the "CMD.Motor1_Start" tag went true, then that would set the "CMD" tag to the value of 1, causing the rung to execute.
Now I realized that you cannot use UDT's with the NEQ instruction. Does anyone have any suggestions? I wanted to try to avoid paralleling all of the commands around each other since there's more than just a few commands.
I hope I got my point across and I appreciate any input!