This document contains code for a simulation program. It defines variables to represent different states of a machine, including which functions (FC1, FC2, etc.) it is in and which motors (subir, bajar, dcha, izda) are active. Logical expressions are used to combine these variables, for example to represent being in FC2 and FC3 with the motor for moving down active. The code also contains an if statement to set a variable called MxP_T1 if certain motor and function combinations are present.
This document contains code for a simulation program. It defines variables to represent different states of a machine, including which functions (FC1, FC2, etc.) it is in and which motors (subir, bajar, dcha, izda) are active. Logical expressions are used to combine these variables, for example to represent being in FC2 and FC3 with the motor for moving down active. The code also contains an if statement to set a variable called MxP_T1 if certain motor and function combinations are present.
This document contains code for a simulation program. It defines variables to represent different states of a machine, including which functions (FC1, FC2, etc.) it is in and which motors (subir, bajar, dcha, izda) are active. Logical expressions are used to combine these variables, for example to represent being in FC2 and FC3 with the motor for moving down active. The code also contains an if statement to set a variable called MxP_T1 if certain motor and function combinations are present.
Sección "Simulacion" (*Marcas para la pantalla de operador*) If %S13 then set (MxP_Paro); set (MxP_FC4); set (MxP_FC2); (*lo sitúa de mano abajo y en FC4*) end_if;
MtP_tiempo_Electrolisis:=S_Electrolisis.t;
MxP_FC1_FC3:=Mx_FC1 and Mx_FC3;
MxP_FC1_FC4:=Mx_FC1 and Mx_FC4; MxP_FC1_FC5:=Mx_FC1 and Mx_FC5; MxP_FC1_FC6:=Mx_FC1 and Mx_FC6; MxP_FC1_FC3_sub:= Mx_FC1 and Mx_FC3 and Qx_mot_subir; MxP_FC1_FC4_sub:= Mx_FC1 and Mx_FC4 and Qx_mot_subir; MxP_FC1_FC5_sub:= Mx_FC1 and Mx_FC5 and Qx_mot_subir; MxP_FC1_FC6_sub:= Mx_FC1 and Mx_FC6 and Qx_mot_subir;
MxP_FC2_FC3:=Mx_FC2 and Mx_FC3;
MxP_FC2_FC4:=Mx_FC2 and Mx_FC4; MxP_FC2_FC5:=Mx_FC2 and Mx_FC5; MxP_FC2_FC6:=Mx_FC2 and Mx_FC6; MxP_FC2_FC3_baj:= Mx_FC2 and Mx_FC3 and Qx_mot_bajar; MxP_FC2_FC4_baj:= Mx_FC2 and Mx_FC4 and Qx_mot_bajar; MxP_FC2_FC5_baj:= Mx_FC2 and Mx_FC5 and Qx_mot_bajar; MxP_FC2_FC6_baj:= Mx_FC2 and Mx_FC6 and Qx_mot_bajar;
MxP_FC2_FC3_dcha:= Mx_FC2 and Mx_FC3 and Qx_mot_dcha;
MxP_FC2_FC4_dcha:= Mx_FC2 and Mx_FC4 and Qx_mot_dcha; MxP_FC2_FC5_dcha:= Mx_FC2 and Mx_FC5 and Qx_mot_dcha;
MxP_FC2_FC4_izda:= Mx_FC2 and Mx_FC4 and Qx_mot_izda;
MxP_FC2_FC5_izda:= Mx_FC2 and Mx_FC5 and Qx_mot_izda; MxP_FC2_FC6_izda:= Mx_FC2 and Mx_FC6 and Qx_mot_izda;
MxP_NoFC1FC2_FC3:= not Mx_FC1 and not Mx_FC2 and Mx_FC3;
MxP_NoFC1FC2_FC3_sub:= not Mx_FC1 and not Mx_FC2 and Mx_FC3 and Qx_mot_subir; MxP_NoFC1FC2_FC3_baj:= not Mx_FC1 and not Mx_FC2 and Mx_FC3 and Qx_mot_bajar; MxP_NoFC1FC2_FC4:= not Mx_FC1 and not Mx_FC2 and Mx_FC4; MxP_NoFC1FC2_FC4_sub:= not Mx_FC1 and not Mx_FC2 and Mx_FC4 and Qx_mot_subir; MxP_NoFC1FC2_FC4_baj:= not Mx_FC1 and not Mx_FC2 and Mx_FC4 and Qx_mot_bajar; MxP_NoFC1FC2_FC5:= not Mx_FC1 and not Mx_FC2 and Mx_FC5; MxP_NoFC1FC2_FC5_sub:= not Mx_FC1 and not Mx_FC2 and Mx_FC5 and Qx_mot_subir; MxP_NoFC1FC2_FC5_baj:= not Mx_FC1 and not Mx_FC2 and Mx_FC5 and Qx_mot_bajar; MxP_NoFC1FC2_FC6:= not Mx_FC1 and not Mx_FC2 and Mx_FC6; MxP_NoFC1FC2_FC6_sub:= not Mx_FC1 and not Mx_FC2 and Mx_FC6 and Qx_mot_subir; MxP_NoFC1FC2_FC6_baj:= not Mx_FC1 and not Mx_FC2 and Mx_FC6 and Qx_mot_bajar;