Uso del lenguaje st en la programación de gráficos dcs de control central para implementar la siguiente lógica
Agregado más que 0~3, puedes considerarlo tú mismo. YB_G121A debe establecerse en un número entero (int).
si YB_G121A=0 ENTONCES
S7 = ENCENDIDO;
S8 = ENCENDIDO;
S9 = APAGADO;
ELSEIF YB_G121A=1 ENTONCES
S7 = ENCENDIDO;
S8 = APAGADO;
S9 = APAGADO;
ELSEIF YB_G121A= 2 ENTONCES
S7 = APAGADO;
S8 = ENCENDIDO;
S9 = APAGADO;
ELSEIF YB_G121A=3 ENTONCES
S7 = APAGADO;
S8 = APAGADO;
S9 = ENCENDIDO;
ELSE
S7 = APAGADO;
S8 = APAGADO;
S9 = APAGADO;
END_IF;