

When relay energized, this high-rated power will go to the field via junction box. The +24 VDC high-rated current also looped in the NO contact of this relay. When PLC gives the command to the Digital Output (DO) card.

The wiring connections and power supply units will be changed accordingly. Note: Solenoid can be operated with +12 VDC, +48 VDC, 110 VAC, 120 VAC, 230 VAC, etc. Relays are used such that solenoid receives power from these bus bar (+24 VDC) but relay controlled from the digital output cards. Solenoid power will be used from this bus bar using intermediate relays. These are usually small positive and negative bus bar units that can supply +24 VDC with high-rated currents. To solve this problem, we have to use a separate power supply which is available in the marshalling cabinets. So it’s not possible to directly use the PLC power supply which is used to power-up PLC cards. The PLC and its I/O modules uses low-rating currents only. Solenoid needs high-rating currents to operate. Then it is connected from the marshalling cabinet to the respective digital output (DO) card channel in the system cabinet. The main cable (home run) is used to connect from the junction box to the marshalling cabinet in the control room. A branch cable (spur) is used to connect from the solenoid to the junction box in the field. Relay5 with a 0 time for the on period can not possibly work correctly.The solenoid valve is connected to the digital output module of the PLC. The times define a period of time when the relay is off, and a period of time when the relay is on.
#CONTROLAIR FLOW ARDUINO CODE#
What is the point of operating the relays in this fashion? The comments do not match what the code actually does.
#CONTROLAIR FLOW ARDUINO HOW TO#
Now that you are looping very fast, how to you detect the very short time period for the state before it changes. How can you tell? All four of the relays which are not working have very short on times compared to the ones which are performing as expected. #define RELAY1_ON_TIME 1 // this define the time in milliseconds when relay 1 turn on If (millis() - lastMillis1 >= ((relay1_state = HIGH) ? RELAY1_OFF_TIME : RELAY1_ON_TIME)) īut 1,5,9,10 are not working. #define RELAY10_OFF_TIME 3000 // this define the time in milliseconds when relay 2 turn off #define RELAY10_ON_TIME 1 // this define the time in milliseconds when relay 10 turn on #define RELAY9_OFF_TIME 3000 // this define the time in milliseconds when relay 9 turn off #define RELAY9_ON_TIME 1 // this define the time in milliseconds when relay 9 turn on #define RELAY8_OFF_TIME 6000 // this define the time in milliseconds when relay 8 turn off

#define RELAY8_ON_TIME 3000 // this define the time in milliseconds when relay 8 turn on #define RELAY7_OFF_TIME 6000 // this define the time in milliseconds when relay 7 turn off #define RELAY7_ON_TIME 3000 // this define the time in milliseconds when relay 7 turn on #define RELAY6_OFF_TIME 6000 // this define the time in milliseconds when relay 6 turn off #define RELAY6_ON_TIME 3000 // this define the time in milliseconds when relay 6 turn on #define RELAY5_OFF_TIME 3000 // this define the time in milliseconds when relay 5 turn off #define RELAY5_ON_TIME 0 // this define the time in milliseconds when relay 5 turn on

#define RELAY4_ON_TIME 0 // relay 4 is always on during the cycle #define RELAY3_ON_TIME 0 // relay 3 is always on during the cycle #define RELAY2_OFF_TIME 6000 // this define the time in milliseconds when relay 2 turn off #define RELAY2_ON_TIME 3000 // this define the time in milliseconds when relay 2 turn on #define RELAY1_OFF_TIME 3000 // this define the time in milliseconds when relay 1 turn off Pin 13 to IN6 - RELAY10(recirculating solenoid chamber 2) Pin 12 to IN5 - RELAY9(recirculating solenoid chamber 2) Pin 11 to IN4 - RELAY8(recirculating solenoid chamber 1) Pin 10 to IN3 - RELAY7(recirculating solenoid chamber 1) Pin 9 to IN2 - RELAY6(flush solenoid chamber 2) Pin 8 to IN1 - RELAY5(flush solenoid chamber 1) Pin 7 to IN4 - RELAY4(recirculated pump chamber 2) Pin 6 to IN3 - RELAY3(recirculating pump chamber 1) Pin 5 to IN2 - RELAY2(flush pump chamber 2) Pin 4 to IN1 - RELAY1(flush pump chamber 1) When relay is turned on a corresponding red light will light up I’m surely doing something wrong but i don’t get what, maybe you can help me. I’m having an infinite loop and this is what i wanted, relay 2-6-7-8 are working, 3-4 are always on wich is what i want, but 1,5,9,10 are not working.īefore using lastMillis1 = millis() in each relay all relay was working but not 1 and i hadn’t an infinite loop. I’m a newbie with arduino coding, i’m working on a scientific project (repirometry chambers) and to make it work i need to control 4 pumps and 6 solenoid valves to obtain an infinite intermittent flow through an arduino mega controller
