Arduino or PLC for project

Hello there!

I have been thinking of a project for a while.

I wanted to create a testing equipment for basic I/O tests for industrial panels. This is to make sure that the wiring is accordingly to the drawing and that the external equipment connected to the terminals wich usually end up in a PLC.

So in the beginning i was just thinking about digital signals how they could be handled. Normally simulating them with a switch or a relay on the terminals to make sure the Inputs to the PLC changes state or that the output sets the connected terminal high or low.

This was too simple so i thought i could use a Switch/relaybox and the problem was solved? What abut the analog signals? Well i have a few common signals i use 0-10V, ADC 0-10V, DAC 4-20mA, ADC 4-20mA, DAC

This could be solved with a PLC

And also we have the analog temp sensors, these i can simulate with std components depending on what type of sensor will be connected to the terminals of the panel.

So should i use a PLC for the project? To interface with the equipment i wanted to use mostly program selectors and wired switches for testing and an HMI to watch progress and change scaling of the analog I/Os. Sure enough i could use the HMI to store testresults aswell in a database.

But what about Arduino? The size would be smaller, i could have a screen to print on. Sure it would be more fun to write the code instead of using ladder especially when handling analog scaling and calculations. I also could use a ETH module on the arduino where i could access the testresults or even run the interface on a webserver. Usually i would be connected to the PLC anyways to check the I/Os and see if the addresses are OK when tested.

The PLC would be of of the box and if something is missing i could just expand and setup the hardware configuration. It is compatible with 24Vdc standard industrial voltage for most sensors.

But still, it would be more fun to get it running on an Arduino. So how can i get the most out of an Arduino. I want to interface all possible sensortypes and wiring methods? Small shields for ADC, DAC and temperature sensors?

kind regards

Unlike the PLC world none of the Arduino boards (with some exceptions), or add on boards are designed to cope with 24v being connected to inputs or outputs. The first step is to buy or build a circuit board that provides an interface between the low voltage world of the Arduino and the higher voltages found in the workshop.

For inspiration look at the design of the Ruggeduino product.

It depends on the exact job of the testing controller. I think that an Arduino is more flexible WRT test conditions, handling of feedback and logging of the detected errors.

mikb55: Unlike the PLC world none of the Arduino boards (with some exceptions), or add on boards are designed to cope with 24v being connected to inputs or outputs. The first step is to buy or build a circuit board that provides an interface between the low voltage world of the Arduino and the higher voltages found in the workshop.

For inspiration look at the design of the Ruggeduino product.

Yes unlike the PLC the MCU is just an MCU. On a regular PLC the connections to the MCU and the world are already made. I have been searching for sollutions that could handle most of the missions intended. I found something called Click from Mikroelektronika. It connects to mikro BUS. Is this something that could be used with the arduino and how many cards could it handle on the micro BUS? The format of the small expansion cards is really nice.

DrDiettrich: It depends on the exact job of the testing controller. I think that an Arduino is more flexible WRT test conditions, handling of feedback and logging of the detected errors.

Yes i see a good potential in Calculations and databasehandling and running a Webserver interface with the controller that i can access from the computer.

How many levels does it handle variabls?

I have had limited experience with PLC’s but I successfully interfaced an Arduino circuit with a PLC using optocouplers.

A couple of very different controllers are Arduino-compatible, see the Products tab.

I am not sure of the actual question.

you have a PLC installed. you want to commission the device and verify that all external wires are connected properly to their final termination ?

you can make a testing device that can - close a relay - send a 0-5v signal from 0.000 to 5.001 with the proper DAC chips - send a 4-20mA signal - send a 3-15PSI signal.....

it is not hard to take a 50 pair line, then test every wire for shorts.

If I understand the question, you are looking to create a device that would test the installation for verification proposes. before the device is sent out ?

you could make a board that connects to your device, then you can run your device as if it were installed in some actual facility, and verify operation.

if you want to get fancy, you could even put in motors that would spin or servos that would move as directed.

of course, if your question is that of certification, then you would need to datalog all requests and note if they passed. Also something an Arduino based unit could do.

if this is what you are looking for, then yes, you can use an Arduino.

I am working on a project similar to the above, but much smaller project. a replicated load on a remote device. the operator uses a WiFi signal for some pre-set functions.

test 1 is to open and close a relay at specific times. starting at 10 seconds, then 5, then 2, then 1, then 1/2. to verfy the lines test 2 create a feedback signal replicating a remote device from zero to full scale, then 20% over test 3 create a load

the idea is for the remote signal generator device to be installed then the operator calls that point on the DAQ to watch the point. then presses the correct button on the test remote to create the simulated effect of a person flicking a switch on and off, or an end switch opening an closing. or a remote sensor sending feedback and the generated values are what the DAQ gets.

one of the needs is to make sure there is no cross-talk on the lines.

SidewayZ:
Yes unlike the PLC the MCU is just an MCU. On a regular PLC the connections to the MCU and the world are already made.
I have been searching for sollutions that could handle most of the missions intended.
I found something called Click from Mikroelektronika. It connects to mikro BUS.
Is this something that could be used with the arduino and how many cards could it handle on the micro BUS?

For each peripheral, look for a download link for an Arduino library that includes examples and documentation.
Steer clear of things that claim to be ‘Arduino compatible’ but don’t provide a library.

Hi,

I do subscribe the post of dave-in-nj: yours one suggests an interesting project, but it is a bit confusing …
In order to make things clearer:

  1. You intend to automate te testing of some electrical/automation equipment that seems to be unique (or, at least, short series), that has switches, manipulates analog signals (input?, output?, both?) and that incorporates one or more PLCs.
  2. You state that to test the whole you may use a(nother) PLC, but you are thinking on an arduino based approach.

A) I take for granted that if you use the arduino you are aware that you have to build some interface: perhaps relays to connect digital signals and other electronics to adapt incoming analog signals and so on …
B) What is the reason to use an arduino?: to better sequence the test(s)?; small timing/timers requirements/concerns?; price?; is the (arduino based) test equipment conceived to be connected permanently to the tested equipment to diagnose future situations?

Best regards.

if you complete a circuit, by whatever means, a switch, relay, water level, vehicular transport docking, … it is a contact, nothing special, notthin to see… move along… move along…

however, if you have a GE-Modbus3200 with inverting flux capacitor…
then you should see if Instructables , Adafruit or Sparkfun has a library to the GE-Modbus3200 with inverting flux capacitor.

or, you should get a GE-Modbus3200 with inverting flux capacitor to use with the test rig.
if you do not have that part, and there is no library for it, then you would have to figure it out and write the code, and that could take months if not years.

mikb55 is correct in that if you cannot interface to the ‘thing’ then using the actual ‘thing’ may be the easiest way.

my point is that a light is either on or off, and there are dozens of ways to know that.
there are dozens of ways to test a wire for shorting and contininityuityy (there are spell checkers that can spell continuity)

some things are device specific.
some things are generic.

it is up to you in the final analysis, to determine if the parts being used for testing and verification are up to the task.

Hello!

First i want to make my project a bit more understandable and excuse my self for being a messy writer! Sorry for that!

So what i was aiming for to do with this project was to make a testing instrument for industrial panels that could verify that my work was accordingly to the drawing. I want to test the signal interference from the terminals in the panel to the PLC. This is to check if the wires in the terminal is connected to the correct input or output connection on the PLC.

At this stage in the verifying process of the panel its still in the workshop and no external connections has been made. Before its being mounted on a site it needs to go through a series of tests to get approved. There is no program in the PLC just the adresses and registers of the inputs.

The I/O tester depending on what kind of signal it would be testing would be connected to the each of the terminals to simulate type, state or value.

For example if i was to check an input signal like X0 on the PLC wich is a digital input. I would connect the testprobe that would give me a NO or NC contact to the ref voltage and the supposed terminal for the I/O accordingly to the drawing and press test. If the state of the adress in the PLC would change state correctly the test would be a pass. And testing would proceed to the next adress. The testprobe would be moved or changed depending on what kind of I/O the next terminal is. Now the digital part is really simple to verify and could on the inputs even be done with a short wire.

The tricky part is the analog signals. This is where i started to think that the easiest way to do it was with a PLC. If i want to test an input 0-10V i would connect it to an output and simulate voltage raise and drop. The decimal value of the PLCs should be the same for in and out if the resolution is the same that is. The same would do for a current circuit 4-20mA input on output and check the decimal values.

For testing Pt100 or other sensors like it i would simulate them with a component and check the decimal value.

So the project got a little bit more than just a switch for testing.

It would be really fun to do it with an Arduino but my electric skills are greater than electronics this is where i asked for some input!

The way i look at the project i could benyfit from using an Arduino rather than a PLC. It seems more flexible. If i wanted to program the PLC to do these tests i would need to interface the PLC with an HMI then i would have to use two compilers and create a user interface.

It seems less work to use one compiler if i need to make changes along the way.

Also another idea in the project was to make a testreport. A database that i could access from my computer and print!

With that i thought about using the database as a wirechecker. Since all the wires in the panel has their unique marker or label i could simulate a continuity test to verify their connection accordingly to the drawing.

Example The wire with label 032 that is connected on one end to relay -K1 connector 11 and the other end to relay -K2 connector 11 in the drawing. I check it oculary first to see if the cable is connected correctly and then i test it with the continuity tester. If the cable is marked correctly with 032 and connected to the correct component and connector in both ends and we have continuity it will be a pass in the database for 032.

Hopefully this made the project a bit clearer!?

Now to make things easier i got an idea that i hope would work. If i used a PLC as a hardware interface could i connect it with RS485 Modbus with an Arduino? The PLC would be in the testinstrument as a barrier for the 24V. I could maybe use the PLC as a slave node and read the inputs and registers and also write to the outputs on their modbus adresses. The Arduino would be a Master running the program collecting and interfacing the data?

Kind regards!

SidewayZ: The tricky part is the analog signals. This is where i started to think that the easiest way to do it was with a PLC. If i want to test an input 0-10V i would connect it to an output and simulate voltage raise and drop. The decimal value of the PLCs should be the same for in and out if the resolution is the same that is. The same would do for a current circuit 4-20mA input on output and check the decimal values.

Do you understand that the 'analog' outputs on an Arduino are actually PWM outputs? That is, it puts out a chopped digital signal as opposed to a true varying analog signal.

You can generate an analog signal with an Arduino but you'll have to add parts.

Applying signals is one thing, but how do you query the related variables (addresses) in the PLC? How do you verify that there is no short between wires?

Disclaimer I have not worked with PLC's in several yeas so I suspect that some of the equipment has changed. With A/B (Allen-Bradley) PLC's what you want to do was simple except for the report,

we used a PanelView for HMI interfaces for the operators, a simple program in a PanelView to display the addresses and status on a screen is dirt simple and a program in the PLC to send the status if the I/O to the PanelView was dirt simple - just some block moves if my memory is correct, but quite simple - the analog in a bit more complex given some scaling.

We used to use a terminal attached to the PLC with the I/O table displayed and a wiring diagram in front of us - or the program would be in the PLC with the I/O commented so the programmer could see what the specific input should be - then we had an electrician trigger the inputs/switches etc one at a time and watch the data table.

The outputs would be forced and the electrician or ET would look at the output, light, motor controller etc to see if the proper output reacted.

Sounds like you are in a shop that makes many similar panels and they are not final wired so what I did 10+ yeas ago might not be relevant to your situation. This worked fine and many of the systems I worked on had many hundred I/O - but our systems were stationary for the most part or had cabling that we checked in the shop with the panel and the machine that was being controlled with a functional test being done in the shop

good luck with your project.

SidewayZ: Hello!

First i want to make my project a bit more understandable and excuse my self for being a messy writer! Sorry for that!

Hi, It is much clearer now. I worked many years ago with equipment similar (it looks like) the one you describe. To give you a better advice: How many digital inputs and outputs have your panel?. How many analog?. You mention PT100 and 4-20 mA: how many of each type?. How much are them related?: should an analog signal trigger something that could be "monitorized back" by the testing equipment? Regards.

[/quote]

vffgaston: Hi, It is much clearer now. I worked many years ago with equipment similar (it looks like) the one you describe. To give you a better advice: How many digital inputs and outputs have your panel?. How many analog?. You mention PT100 and 4-20 mA: how many of each type?. How much are them related?: should an analog signal trigger something that could be "monitorized back" by the testing equipment? Regards.

The panels are unique so what im looking for is a flexible way to handle new panels. The plan is to make it so flexible that i can use it when ever. Also when its prepared it could even be used on the field when troubleshooting an error. Lets say i have to check a level sensor 4-20mA that malfunctions and i need to know why the value has gone wrong.

I can disconnect the sensor from the panel. Connect it to de testinstrument and set the scaling and see if the level is ok. If it is i can connect the testinstrument to the panels terminal for the sensor i disconnected and run a current to simulate the sensor. This way i can figure out if the sensor has gone bad or the input. If none then it should be a cable fault.

About related the test for the analogs could be a standard test with thresholds in sequence that i need to set. If it performs correctly it should be a pass.

saildude: Sounds like you are in a shop that makes many similar panels and they are not final wired so what I did 10+ yeas ago might not be relevant to your situation. This worked fine and many of the systems I worked on had many hundred I/O - but our systems were stationary for the most part or had cabling that we checked in the shop with the panel and the machine that was being controlled with a functional test being done in the shop

good luck with your project.

Yes all the panels are constructed and final wired at site. Of course wired and I/O checked with the sensors or what ever connected. Programming and function testing wich is the most fun part, to bring something to life!

I recognize your methods from many others! How they validate their products. There are some requirements that has to be met. But some tests are a bit fuzzy and not always the law. But some customers damand it so.

I/O testing is a walk in the park. Validating a safetycircuit on a machine could be a nightmare and you will have nightmares after. Especially if you choose a safetyPLC that you can program.

dougp: Do you understand that the 'analog' outputs on an Arduino are actually PWM outputs? That is, it puts out a chopped digital signal as opposed to a true varying analog signal.

You can generate an analog signal with an Arduino but you'll have to add parts.

I have checked out some possibilities to change the signal yes! Had to let that go since my electronics skills are bad and my temper is worse!

What you propose is 100% pie-in-the-sky fantasy. That opinion is based on nearly forty years of experience with the design, fabrication, testing, installation and commissioning of custom control panels.

You can spend tens of thousands of dollars or more for the hardware and then you’ll find the effort to write and verify the operation of each custom test program will exceed the value received from any automated testing.

With some reasearch, you will discover you’re looking at wrong problem. There is far more benefit in automating the design process with modern CAD tools which can auto-generate wiring lists that greatly aid the test phase of the panel build. Manual, point to point wiring verification along with process loop simulators and proper meter testing is the way it has and will continue to be done. Custom panels are exactly that, custom.

It is only when you make the same product over and over again does any type of automated testing make sense. Write once, test many works. Write once, use once is not viable.

I could imagine a test program on the panel PLC, which can generate the test signals on not otherwise used pins or external equipment, with an adapter feeding the test signals back into the panel inputs, and a test program that checks the signals. If instead every test signal must be applied manually, and the effect is also determined by a human, then I can see no advantage from adding an Arduino.

Hello!

Ok so i dont see the point in making a new program for every panel either and that is not the point. That would be very time consuming!

The program would only handle the settings possibilities of the individual tests.

The labour would still be manual and should always be if you are not taking care of a large production series with the same function.

The instrument would just hold the possibilities of all the necessary tests to validate. Only minor changes will be done like change the scale of the analog signals to match the value of the later external connected device to make the test more true. Other than that the instrument will create a pass list database that you will be able to print afterwards. The protocoll tells you that all the I/O are a pass.

So lets call it an I/O Multitester with step logging.

I think Siemens has a feature called PRONETA. This is a software for checking I/O. Im not sure on what level it runs but i think is on the softer side.