CoDeSys ST implentation of MODBUS ACCII

biggles

Member
Join Date
May 2014
Location
England
Posts
4
Codesys V2.3.9.49 (Build NoV 17, 2015)
WAGO 750-881 Controller
WAGO 750-652 RS232/485 Serial Interface
Beka BA488C Serial Text Display

PLC_PRG in ST

Good Morning all,
I'm a newby to Codesys and have been tasked to establish communications from 750-652 (Master) to Beka BA488C (Slave) to send ASCII Text under BEKA protocol which is not MODBUS RTU but MODBUS ASCII.

I need to gain an understanding of:

What Libraries do I need to add to the project if at all
How to configure 750-652 as Master
What variables I need to declare in the POU or if having added the library, the required variable are automatically declared.

If anyone has a code example in ST that demonstrates how the above can be achieved I would be most obliged for any assistance.

Thank you.
 
Hello,

A while ago I have been using Modbus TCP on Bosch PLC.
Software is Codesys based so it should be similar

From what i remember I had to add the library to a project to be able to use Modbus. Just select it from available libraries. It was all detailed in the manual so I presume it is similar to WAGO.

I had to use two functions. One to setup a communication and second to exchange data. With TCP it was as simple as giving it a port number and IP address not sure about ASCII however there were fuctions available to cover most popular Modbus types.

Hope it helps a bit.
 
The datasheet says it's Modbus RTU.

If it is actually Modbus ASCII, I'd use a BeijerX2 as a protocol converter tbh. Couple of hundred quid and it's done.
Pp
 
The datasheet says it's Modbus RTU.

If it is actually Modbus ASCII, I'd use a BeijerX2 as a protocol converter tbh. Couple of hundred quid and it's done.
Pp

Hi paraffin power,

Many thanks for responding to this thread. Perhaps I should have taken the time to specify that the application is for Oil & Gas sector and therefore any replacement display has to be ATEX/IECEx certified as well asa ny code I generate being backwards compatible to legacy units out in the field.

Good thought though - but kinda stuck with what we've got on the equipment front.

Thanks again.
 
Hi Chopin,
Many thanks for replying to this thread.

I agree with you that it should be as easy as implementing two functions. one to setup the comms and the other to send the information.

I've finally got a response from WAGO re what library I need to install so will try that and see where it leads me.

Just a bit concerned as to specifying where any buffer or input output registers are supposed to be set up i.e. what address range I can use. Do you happen to know if these are pre-defined and what size they might be?
 
Modbus in all versions is a quite simple protocol, if the device is only a display that shows the sent characters it does not seem difficult to directly create the chain of bytes that emulates the Modbus Ascii protocol.

The only thing more laborious would be to calculate the final byte of the Longitudinal Redundancy Check.
 

Similar Topics

Hello, I am new to Codesys, and am trying to learn about it for a project we're developing. I've got a couple questions, but first a little...
Replies
1
Views
72
Hi everyone, as this is my first experience with Rockwell Software i would like to know what's the best way to make Enumerations?
Replies
10
Views
412
I am trying to get Codesys to work with a couple of Moxa ioLogik E1200 series DIO devices (E1210 and E1211). I am able to write to the E1211 DOs...
Replies
2
Views
113
Hi Guys, I am trying to establish communication over profinet between Siemens S7-1200 PLC as IO device and codesys plc as IO controller. But I am...
Replies
39
Views
2,055
Hello to all, Is it possible to export Codesys symbols to .txt, .csv or .xml in a similar manner like exporting symbol table in STEP 7? For...
Replies
0
Views
102
Back
Top Bottom