Powering arduino using PLC(programmable logic controller)

Does anyone know how to use a PLC to make the Arduino board execute the sketch? I need to be able to press a button that's attached to the PLC and it will send this command from the PLC to the Arduino board to make it run the sketch. Any help would be much appreciated.

Hi, First, are you POWERING the Arduino separately??

If so, you need the sketch to check an Arduino digital input. You need to connect a PLC OUTPUT to that (And you have to know what types of PLC outputs you have (There are many possible). A "TTL Digital Output" could be connected directly. A "Contact closure" output would be good. What do you have??

Yes I was planning on powering the Arduino separately, unless you have a better suggestion. Our PLC is the Omron 20C1DR-D-V2. Heres the link to the specifications for the PLC ZEN V2 Programmable Relay/Specifications | OMRON Industrial Automation

I assume that I would connect it to the digital outputs on the PLC? Could you explain what a TTL digital output is? I'll have to research what that "contact closure" is.


Looks like from the last 2 diagrams of that spec that you should be able to connect the COM to the Arduino Gnd and then use the outputs to pull a pin low.
Set up the Arduino pin with
pinMode (pinX, INPUT_PULLUP);
and then look for a low input:
if (digitalRead(pinX) == LOW){
// PLC output is active, do something
You can confirm with a battery and LED and 330 or 390 or 1K resistor.
Connect battery- to COM. Connect PL output to LED cathode, LED anode to resistor, other side of resistor to battery+.
(like a 3xAA battery pack, or 9V battery)
When the PLC is active, the LED cathode should connect to COM/battery- and turn on the LED.

Great! thank you very much, really appreciate it! if this approach doesn't work ill be back!

Eventually you can read the button directly, independently from the PLC.