raphael.girard - 2017-10-04

Hi everyone.

For a school project, I want to make the link between a Raspberry Pi 3 and a Compact Logix L16ER with Ethernet I/P protocol. The Compact Logix has the Ethernet I/P protocol.

For the moment, the Raspberry Pi is controlling and reading multiple I/O such as actuators and thermocouples. I use Python scripts to run a sequence that deploy a thermocouple on an actuator’s rod and measure the temperature of an aluminium block. This is a simple sequence. This sequence is working great and is not a problem.

Now, I want to use the Compact Logix as a remote I/O. Every I/O is presently plugged to my Raspberry Pi would be, in a close future, plugged to the Compact Logix with the appropriated extension module (T/C, 24Vdc output, etc).I thought using Ethernet I/P with CODESYS for Raspberry Pi to make the link between the 2 device would be a great idea.

I am new to CODESYS. I know that CODESYS is able to talk to PLC using Ethernet I/P. With the applications found on the forum, it should not be hard to create tags and make a link. I also know that CODESYS is able to run python script, which is great. But I would like to use the same python scripts used before. Consider that those scripts are not running on CODESYS, but called by me on the Raspberry Pi when needed.

My question is, without removing my previous controlling scripts from the process, is it possible to only modify the variables used in my scripts to reach the tags used by CODESYS runtime? I would expect to have this kind of manipulation in my external python script (the script running «outside» CODESYS):
Variable_Of_External_Python_Script = Variable_Of_CODESYS.Tag_Number_1

Just to be cleared, I need to reach CODESYS tags with a python script running on the Raspberry Pi.

Thanks to anything useful!
Raphael.