Is modbus RTU possible on the ctrlX CORE?
I have found that the S20-RS-UNI supports ModBus RTU but are there any libraries for this?
Solved! Go to Solution.
please find attached some example project.
It reads the actual power production from a Fronius Symo Solar Inverter.
Keep in mind you have to configure in the datalayer tree each single element, like I did in the screenshot, to get it working.
Done with version 1.14
I see that there are many FBs in CXA_ModbusRTU behind the heading CXA_S20. These are all FBs based on the S20.
I assume that I can't use these FBs when working with a Modbus RTU module from beckhoff (EL6751), can I?
If not, is this Modbus RTU library also usable for third party RTU modules?
we didn't test it with a Beckhoff module as we have our own.
Most likely this will not work. You can check if beckhoff provides examples for Codesys V3.
Or just take our module. 🙂
I would like nothing more than to use Bosch but I need a short term solution. And Beckhoff were the only cards I could get my hands on..
Thanks for the tip I will look for examples.
As a colleague of AndroidZz, I am currently testing the set-up with a CtrlX and RS485 card from Beckhoff (EL6021).
The EL6021 is connected to the CtrlX over EtherCat.
Wiring is OK, test with Beckhoff-PLC works well.
Basis for testing on CtrlX is "ModbusRTUtest.zip" as posted by TheCodeCaptain a few posts above.
- CXA_ModbusRTU.CXA_S20.IH_S20ComConfiguration works flawlessly. "bInOperation_ComConfig" immediately becomes TRUE.
- when calling "IH_S20MBRTUMaster" I get an error ACCESS_ERROR with ErrorIdent of CXA_TABLE-16#0C0F0000-16#0C850031.
- where can I find information regarding 16#0C850031
- how do I determine the slot number of the RS485 card?
In the example uiSlot is := 3... my RS485 card is as 3rd module after the EtherCat slave station...?
Like mentioned in posts above and as the name suggest this library is usable for an S20 IO module. Please ask the supplier of your module for a library or example code usable for it.
Error codes and explanations can always be found in our online documentation. In your case see this page.
I try to import the Beckhoff library into CtrlX PLC Engineering, but I get error message "Failed to open managed library. (Reason: Missing string table entry for ID=7428)". See attached.
How can I solve this?
Could you please send me this library so we can have a look to it.
It seems that this is a Twincat2 library. We cannot be sure that these are able to be used in the ctrlX PLC. We tested a library "Tc2_ModbusRTU.compiled-library-ge33" tht is part of the standard installation of Twincat and it could be inserted in our ctrlX PLC library manager. Please check if you can find and use this one.
I tried to export the library in Twincat in 2 ways:
- via export function of the "Library Repositry"
- look up the relevant file in "Explorer" --> see screenshot "Lib-file Twincat.png".
I assume you tested at your side with that same file. Am I correct?
When importing I keep getting the same message "Missing string table..."
Attached 2 pieces library in "Twincat-libs.zip":
- "Tc2_ModbusRTU.compiled-library" taken from export function
- "Tc2_ModbusRTU.compiled-library-ge33" copied from folder 18.104.22.168 of TwinCat
We tested with the second library you mentioned. But I would have to check the version we used. As there is main vacation time in Germany, answers could need some time.
I am a colleague of Novice. I have updated ctrlX WORKS and the PLC app on the CORE both to version 1.16 but still get the same error as Novice, see attachment.
I do notice that:
"Tc2_ModbusRTU.compiled-library" is a COMPILED-LIBRARY file format and
"Tc2_ModbusRTU.compiled-library-ge33" is a COMPILED-LIBRARY -GE33 file format.
GE33 is also not directly recognized by the library repository. Must first set the explorer to 'All files (*.*)' when selecting files. see attachment 2
Therefore the question if the library repository is the right way to import the library?
Maybe worth mentioning that we are using a temporary solution (RTU --> TCP gateway). I will put time in the library, but just not at the moment.