1 minute read
Elaborado por el Ing. Jovanny Duque Pa g
E3 = ((E3 | (E2 & A_1)) & (~E4) & (~E1)); E4 = ((E4 | (E3 & T1)) & (~E5) & (~E1)); E5 = ((E5 | (E4 & A_0)) & (~E1) & (~E10) & (~E11) & (~E14)); E10 = ((E10 | (E5 & MCC & (~MCX3))) & (~E1) & (~E2)); E11 = ((E11 | (E5 & MCX3 & (~MCC) & (CONTADOR < PSCONTADOR)) ) & (~E1) & (~E2)); E14 = ((E14 | (E5 & MCX3 & (~MCC) & (CONTADOR >= PSCONTADOR)) ) & (~E1));
// ECUACIONES GRAFCET C CONTINUO E6 = ((E6 | (E61 & E61) ) & (~E7)); E7 = ((E7 | (E6 & CC & (~MCX3) & (~FIN_CX3) & (~EMERG))) & (~E61)); E61 = ((E61 | (E7 & (CU | (~PIEZA) | (~PE) ))) & (~E6));
Advertisement
// ECUACIONES GRAFCET CX3 E8 = ((E8 | (E81 & E81) ) & (~E9)); E9 = ((E9 | (E8 & CX3 & (~MCC) & (~EMERG) )) & (~E81)); E81 = ((E81 | (E9 & (CU | (~PE) | (~PIEZA) | FIN_CX3))) & (~E8));
// ECUACIONES GRAFCET P EMERGENCIA E12 = ((E12 | (E120 & E120 & (PE)) ) & (~E13)); E13 = ((E13 | (E12 & (~PE))) & (~E120)); E120 = ((E120 | (E13 & A_0)) & (~E12));
//TRATAMIENTO POSTERIOR if (E1 == HIGH) {Serial.println("Etapa1"); Serial.print("VALOR DEL CONTADOR : "); Serial.println(CONTADOR); } if (E3 == HIGH) { Serial.println("Etapa3 33333333"); activetemp1(); } else { desactivetemp1(); } if ((E3 & MCX3) != ESTADOPREVIO_E3) { if (E3 == HIGH) { CONTADOR++; Serial.print("CONTADOR CONTADOR : "); Serial.println(CONTADOR); } ESTADOPREVIO_E3 = E3; }
if (E4 == HIGH) { digitalWrite(Y2, HIGH); Serial.println("Etapa4"); } if (E5 == HIGH) { digitalWrite(Y2,LOW); Serial.println("Etapa5555555555555555"); } if (E6 == HIGH) { Serial.println("Etapa6"); }
if (E7 == HIGH) { MCC = HIGH; Serial.println("Etapa7 MCC"); } else { MCC = LOW; }
if (E8 == HIGH) {Serial.println("Etapa 8 8 8"); } if (E9 == HIGH) { MCX3 = HIGH; Serial.println("Etapa9 MCX3"); } else { MCX3 = LOW; } if (E10 == HIGH) { Serial.println("Etapa10"); activetemp2(); } else { desactivetemp2(); }
if (E2 == HIGH) { digitalWrite(Y1, HIGH); Serial.println("Etapa2"); } if (E11 == HIGH) {Serial.println("Etapa11 11"); activetemp3(); } else { desactivetemp3(); }