Arduino to “Click” Programmable Logic Controller Transitioning
So you are ready to make the jump to PLC’s from the Arduino. Congratulations!(maybe) Let’s be sure that you are doing it for the right reason. Both are great tools, but like any tool they are made for a specific job.
Arduino:
PLC(Model C0-00DD2-D):
Here is a “Click” Model C0-00DD2-D ready to run. It has a C0-00AC 24VDC power supply mounted on the left hand side and the USB programming cable attached.
24VDC power connections for the CPU module
Connection latches to add more I/O, analog capability, 115VAC switching, 4-20ma monitoring…...gobs of stuff.
115VAC Ground
115VAC “Hot”
115VAC “Neutral”
DC Ground
+24VDC
C1 is the 24VDC common return for pin X1, X2, X3, and X4
C2 is the common return for X5, X6, X7, and X8.
Current direction does not matter. C1 and C2 could also be connected to +24VDC as a common.
This arrangement sends a constant “HIGH” input to X2 as a test.
Power supply module
CPU module
Hopefully slide 4 makes this diagram a little clearer. When we look at the output pins, Y1-6, be sure to power them through V1, V2, and C0. We didn’t have to do this with an Arduino. When we consider the outputs, they are also optically isolated.
Programming:
If you are transitioning from the Arduino this “C” program should look very familiar. When using an Arduino the CPU executes a one time setup then enters a main loop where it performs each command sequentially as quickly as it can. Once the CPU reaches the end of the “LOOP” routine it starts again and repeats forever.
Programming:
The PLC uses a very different language called “Ladder Logic” to perform similar functions.
This is the same program as the Arduino’s “Blink” except it is written for the “Click” and blinks output pin Y6.
Programming:
Let’s look at simpler program for starters.
Let’s image we have the program above to execute