ggrice_71
Member
Hi Guys,
New Crimson user here. I would like to create a Hand/Off/Auto from a 3-State Toggle button as I would in Wonderware with "Hand" and "Auto" turning on discrete bits on my Modicon PLC. I have 6 pumps that I need to control. Tech support said the toggle is designed to send an integer to the PLC. I can make it do that without issue. However, everything I try to convert my integer value ( 1= hand, 2= auto), fails to turn on my bits in C3.0. I created a program with a switch command and set it to background to monitor the integer status. Is there a better way, a tutorial, or am I missing something simple? Thanks for your help.
P1_Mode is the integer associated with toggle
P1_Hand and P1_Auto are linked to PLC bits
switch (P1_Mode) {
case 1:
P1_Hand = 1;
Break;
case 2:
P1_Auto = 1
Break;
}
New Crimson user here. I would like to create a Hand/Off/Auto from a 3-State Toggle button as I would in Wonderware with "Hand" and "Auto" turning on discrete bits on my Modicon PLC. I have 6 pumps that I need to control. Tech support said the toggle is designed to send an integer to the PLC. I can make it do that without issue. However, everything I try to convert my integer value ( 1= hand, 2= auto), fails to turn on my bits in C3.0. I created a program with a switch command and set it to background to monitor the integer status. Is there a better way, a tutorial, or am I missing something simple? Thanks for your help.
P1_Mode is the integer associated with toggle
P1_Hand and P1_Auto are linked to PLC bits
switch (P1_Mode) {
case 1:
P1_Hand = 1;
Break;
case 2:
P1_Auto = 1
Break;
}