bgtorque

Arduino to Compactlogix communications

8 posts in this topic

I've seen that some people have had success in communicating from an Arduino to a CompactLogix controller via DF1.  I am using an L33ER controller that I don't believe has a DF1 port. Is anyone aware of a method for setting up comms through EtherNet/Ip?  My application is a simple control interface with about 8-off momentary push buttons to send onto the CompactLogix via the Arduino, plus 3-off 1024 encoders that send a setpoint, and also another 8-off DO from the Arduino to switch on lamps when teh buttons are pressed. I wouldn't be doing any control with the Arduino. I could do what I want with a cheap Micro830 for ~£230 but its just too big to fit in my interface plastic moulding.  Currently it's all hardwired and I am looking to get rid of the long lengths of unwieldy cable, hence the push to run everything down an Ethernet cable.

I guess I could look to install a DF1 gateway, like this from Prosoft, but if I have EtherNet it would seem a shame since all other comms are running that way?
http://www.prosoft-technology.com/Products/Rockwell-Automation-In-chassis/Platform/CompactLogix/DF1-Master-Slave-Network-Interface-Module-for-CompactLogix

Share this post


Link to post
Share on other sites

I'm not aware of an EtherNet/IP adapter library for Arduino.    The TCP/IP stack is a huge amount of work for the Arduino all by itself and there are really only some basic libraries that can be used with Ethernet shields.

Since you're using an L33ER controller, which does support raw Ethernet sockets, you could implement something simple without the connections and objects and error checking and tagnames of EtherNet/IP, just using ASCII.

Which Arduino platform and Ethernet shield are you using ?

Another approach you might take is the GridConnect / LanTronix "XPort" device, which implements an EtherNet/IP to Modbus RTU serial slave bridge inside the footprint of an RJ45 jack.

 

http://gridconnect.com/industrial-protocols/ethernet-ip/ethernet-ip-interface.html

 

Modbus/RTU is reasonable straightforward on an Arduino.

Edited by Ken Roach

Share this post


Link to post
Share on other sites

Hello,

I am looking for a solution to the same problem, I have a mitutoyo indicator that reads a measurement and sends it in the form of a serial data output. I have the code and schematics to connect it the arduino and I want to send this data to the compactlogix L33ER PLC. Can you let me know if you found any way of doing this.

 

Thank you

Vivek Pillarisetty 

Share this post


Link to post
Share on other sites
Quote

I have a mitutoyo indicator that reads a measurement and sends it in the form of a serial data output

What kind of device are you using ?

About 12 years ago (long before I arrived) my employer built a machine with sixteen Mitutoyo AT715 linear scales.    These use a simple serial protocol on RS-485, but it lacks a multi-drop address so we contracted with an encoder company to build a custom interface to bridge RS485 to RS485.   For reasons lost to the mists of time, we didn't use Modbus or any other industrial protocol, but rather a variation on the AT715 protocol, connected to Prosoft generic serial modules and an SLC-5/05 controller.

A month ago there was a small disaster at the factory and half of these interfaces were destroyed.    We have the original designs and can get some of these boards built in six weeks for a thousand dollars each.    Or, we could pay an engineer to build the same sort of thing out of Arduino parts.

Or we could do what I did:  order a box of Red Lion DSPLE protocol converters and write a program to go in them.    
 

More expensive for hardware, yes, but far less risk and cost for engineering and troubleshooting.     The month of time I'm saving, and the reduction in risk that the devices won't work, is keeping a factor that employs a couple hundred people open and operating.  

Arduinos are wonderful, but folks who do industrial embedded systems for a living usually don't start with them for their first look through the toolbox.

1 person likes this

Share this post


Link to post
Share on other sites

I did work on the Arduino and was able to get the data converted and transmitted as a serial write command to another raspberry pi as a test case replicating the PLC. Now my plan is to buy the serial to Ethernet/IP converter which costs like $800 - 900 which would do transmission and reception so, I can write the code for the arduino to read the serial data from PLC and send the respective indicator value upon request. I will keep you posted if this works. In the mean while please let me know if you see any flags in my idea.

 

Thank you

Vivek Pillarisetty 

Share this post


Link to post
Share on other sites

The Red Lion DSPLE that Ken talked about sells for around $600 (click here for Newark). If it's capable of doing what you want (and it probably is), it will be a far more economical and reliable solution. The DSPLE connects seamlessly and easily to a CompactLogix PLC and supports a generic raw serial port. They don't have a Mitutoyo driver in the version of Crimson 3 we're using, but may be able to help you with one. Their support is top notch.

 

Share this post


Link to post
Share on other sites

If you already have your data in a Raspberry Pi, an option is to create an AdvancedHMI application to send the data from the Pi to the CompactLogix. AdvancedHMI includes an Ethernet/IP driver for the CLX and the application will run on a Pi via Mono.

See this for details on running AdvancedHMI on the Pi:

https://www.advancedhmi.com/forum/index.php?topic=666

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now