Modbus communication via Beckhoff module KL6021

P

Thread Starter

pravin

Hello,
We are using Beckhoff modules for the communication between the devices (mass flow controllers) and the siemens PLC. For the serial communication between the PLC and the mass flow controller we intend to use the Beckhoff serial interface module KL6021. The mass flow controller supports only the Modbus RTU protocol. For this purpose we would like to have more information as to how to configure the KL6021 and exchange the information between the mass flow controller and the PLC. The information for exchange may be greater than 6 bytes( the input/output image for the beckhoff and the siemens plcis 1byte control/status and 3 bytes data).
Please tell whether this can be done. And the method we have to implement for the Modbus protocol if needed or it is already implemented in the KL6021.
Thank You.
With best regards
 
M

Mark DeCramer

Hello Pravin,
It sounds like you wish for the Siemens/Beckhoff solution to act as a Modbus master that will poll the mass flow meter, which will act as a Modbus slave. I support the WAGO I/O product, which as you might know has many similarities to the Beckhoff product. I will describe to you how you would solve your problem with the WAGO product, and that should give you expectations for what to look for in a Beckhoff solution.
With WAGO, you often need to order a special version of the serial module when acting as a Modbus master. Here's why. With the standard serial module, you load 3 bytes into the module, and you send them. You load another 3 bytes into the module, and you send them. You continue to do this until your entire Modbus message has been sent. What the Modbus slave sees on the other end of the wire is 3 characters, then a delay, then another 3 characters, then a delay, etc. The problem is that many Modbus slave devices choke on these delays. They require characters within a message to arrive within a fixed time interval, or they ignore the message. The way WAGO solves this is they offer a version of the serial module that has a buffer. You load 3 characters into the buffer, then you load another 3 characters into the buffer, etc, until your entire message is loaded into the module's buffer. You then set a bit in the control byte, and the entire message is sent out on the wire at once. I suspect Beckhoff has a similar solution, but I can't confirm this. This is one solution.
I'm guessing you're using the non-programmable version of the buscoupler. You probably know that programmable versions of these buscouplers exist as well. WAGO has them, as does Beckhoff. If you're using the programmable version, you can offload the task of bundling and sending messages from the Siemens to the programmable buscoupler. WAGO has a function block that makes this a simple task - I suspect so does Beckhoff. This could save you a lot of development and debug time.
 
M
Hi,

I work w/ Beckhoff products in Brasil. You can develop the MODBUS protocol using a BC (a Bus Coupler Controller) and a KL6021.

I already did it to communicate a BC9000 with a MODBUS HMI.

OK.

M.Giorjiani
[email protected]
 
Top