Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
Really encouraging platform you've developed here, especially as I'm going into final year and need project idea's.
In my current work I have the eDAM-5029 Remote IO device communicating with my Pi through MODBUS TCP Protocol (through sockets).
I'd love to get it up and running with the CODESYS application However I keep getting the CmpIecTask library error when I add
"Modbus Master -> Modbus Slave" devices.
If someone could point me in the right direction in terms of configuring my device in the software it would be greatly appreciated.
this should work, how do you get the CmpIecTask library error,
this should not happen?
Try to create an empty new Project with Raspberry Pi as plc.
Then add Ethernet - then Modbus-Master then Modbus-Slave (under the Modbus Master).
Compile - the this should lead to an error free compile result.
If not let me know.
BR
E.Schwellinger
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
there's an error in the device description of "CODESYS Control for Raspberry Pi".
This is only a problem if you use CODESYS V3.5.4.10.
I attached a corrected version of the device description. Just install this device (Tools -> Device Repository... -> Install...) and then update your device in the device tree or restart CODESYS.
Hi Everyone, having codesys run on he pi is brillant.
Ok, i have the Adam 6050 Modbus TCP slave (12 in, 6 out). I've configured codesys with a modbus tcp master and modbus tcp slave and entered ip address of the slave. However codesys tells me the ModbusTcpSlave is not running. The device appears ok as i can connect to it via service tool. Any tips?
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My mistake, got it working. Here is screendump of working setup. Problem was i used "FC23 Read/Write Multiple Registers" and i dont think the 6050 supports this. From 6050 manual, it says:
Code (Hex)
Name Usage
01 Read Coil Status Read Discrete Output Bit
02 Read Input Status Read Discrete Input Bit
03 Read Holding Registers Read 16-bit register. Used to read integer or floating point process data.
04 Read Input Registers
05 Force Single Coil Write data to force coil ON/OFF
06 Preset Single Register Write data in 16-bit integer format
08 Loopback Diagnosis Diagnostic testing of the communication port
0F Force Multiple Coils Write multiple data to force coil ON/OFF
10 Preset Multiple Registers Write multiple data in 16-bit integer format
so i tried Function code 03 for read inputs and Function code 15 (16#000F) for write outputs. Once did this, all good.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi guys,
Really encouraging platform you've developed here, especially as I'm going into final year and need project idea's.
In my current work I have the eDAM-5029 Remote IO device communicating with my Pi through MODBUS TCP Protocol (through sockets).
I'd love to get it up and running with the CODESYS application However I keep getting the CmpIecTask library error when I add
"Modbus Master -> Modbus Slave" devices.
If someone could point me in the right direction in terms of configuring my device in the software it would be greatly appreciated.
Manual: http://www.audon.co.uk/downloads/EDAM5000_Manual.pdf
-Sean.
Hi,
this should work, how do you get the CmpIecTask library error,
this should not happen?
Try to create an empty new Project with Raspberry Pi as plc.
Then add Ethernet - then Modbus-Master then Modbus-Slave (under the Modbus Master).
Compile - the this should lead to an error free compile result.
If not let me know.
BR
E.Schwellinger
Still getting the error(s)..
Here's a screenshot (attached below)
This guy also had the same problem and managed to get it fixed:
http://www.raspberrypi.org/phpBB3/viewt ... 70#p507270
Cheers,
Sean.
Hi,
there's an error in the device description of "CODESYS Control for Raspberry Pi".
This is only a problem if you use CODESYS V3.5.4.10.
I attached a corrected version of the device description. Just install this device (Tools -> Device Repository... -> Install...) and then update your device in the device tree or restart CODESYS.
Best regards
3S Support
CODESYS Control for Raspberry Pi.devdesc.zip [9.05 KiB]
Hi,
Many thanks for the support.
A member of your technical support team managed to remote in to my system and resolve this issue.
My eDAM IO unit is now up and running as a MODBUS TCP Slave (and only ~9% CPU on the RPi)
Cheers Guys!
Hi Everyone, having codesys run on he pi is brillant.
Ok, i have the Adam 6050 Modbus TCP slave (12 in, 6 out). I've configured codesys with a modbus tcp master and modbus tcp slave and entered ip address of the slave. However codesys tells me the ModbusTcpSlave is not running. The device appears ok as i can connect to it via service tool. Any tips?
Thanks
My mistake, got it working. Here is screendump of working setup. Problem was i used "FC23 Read/Write Multiple Registers" and i dont think the 6050 supports this. From 6050 manual, it says:
Code (Hex)
Name Usage
01 Read Coil Status Read Discrete Output Bit
02 Read Input Status Read Discrete Input Bit
03 Read Holding Registers Read 16-bit register. Used to read integer or floating point process data.
04 Read Input Registers
05 Force Single Coil Write data to force coil ON/OFF
06 Preset Single Register Write data in 16-bit integer format
08 Loopback Diagnosis Diagnostic testing of the communication port
0F Force Multiple Coils Write multiple data to force coil ON/OFF
10 Preset Multiple Registers Write multiple data in 16-bit integer format
so i tried Function code 03 for read inputs and Function code 15 (16#000F) for write outputs. Once did this, all good.