0

I am a newbie to CoDeSys and I need to establish communication between CoDeSys and non-CoDeSys platform.

I came to know that to establish a communication between CoDeSys and non-CoDeSys platform, one can use OPC or shared memory.

Now, considering the cost-issues of OPC, I would like to use shared memory to establish the communication. Keeping in mind that non-CoDeSys platform supports shared memory using external C functions, how can I establish successful communication between themb ?

Any lead on the issue will be appreciated.

Thank you.

HDJEMAI
  • 9,436
  • 46
  • 67
  • 93
A. Gajjar
  • 9
  • 3
  • What's the CoDeSys did you mean? The IDE (PLC Language Editor, ...) on PC or the runtime (as simulator) ? – Mystic Lin May 26 '17 at 12:45
  • Are CoDeSys and non-CoDeSys platform on the same device? If not, what's the interface between two devices? RS-485 or Ethernet? – Mystic Lin May 26 '17 at 12:50
  • What interface? Is it Ethernet, serial? How you connect devices into network? Usually when we talk about connection of different devices we talk about protocols like Modbus, ProfiNet, CAN, I2C, .... What protocols your devices support? And what communication interfaces they have? – Sergey Romanov May 26 '17 at 12:58
  • Hello guys! CoDeSys as soft PLC on the PC and the non-CoDeSys platform is on the same PC. I want to establish communication between these two platforms (CoDeSys and non-CoDeSys) and make them able to exchange data between them. Since, both are on same PC, there is not any hardware interfacing involved. I hope this helps. Looking forward to hearing from you. Thank you! – A. Gajjar May 30 '17 at 07:43
  • You cannot do that. Even if it is the same memory. If you want to "communicate" you have to use communication interface and select a protocol. For example you can use Ethernet as communication interface and use Modbus RTU. Or you can use OPC server and connect both PLCs to came OPC server. – Sergey Romanov Jun 08 '17 at 13:18

1 Answers1

0

You can do that using shared memory. See Shared Memrory example from the Codesys Store. When you create a shared object in codesys runtime, linux creates a file /dev/shm/{shared_obj_name}. You can read this file in other application. In Windows its more complicated but also possible.

uni
  • 29
  • 7