User-Defined Modbus/TCP Function Codes ?

Ken Roach

Lifetime Supporting Member + Moderator
Join Date
Apr 2002
Location
Seattle, WA
Posts
17,480
Is anyone here on the Forum familiar with a PLC that supports User-Defined Function codes on Modbus/TCP ?

I have a device to integrate with my control system that advertises itself to be 'Modbus/IP' compatible. They even used the (TM) mark for Modbus, and proudly advertised that the device could easily be integrated with PLCs.

When I cracked open the protocol reference and "application note" I found to my dismay that they don't support ordinary Modbus function codes except for trivial tasks (reading the auxiliary discrete I/O points). Every other feature of the device has to have a User-Defined Modbus Function Code (0x43 is the default) with their application protocol as the data payload.

I'm currently attacking the application with a ControlLogix and 1756-EWEB module using the Open Sockets feature.

But meanwhile I want to find out if I'm just too narrowly experienced with Modbus implementations. I've never seen a PLC that supported User-Defined Modbus/TCP function codes. I will readily admit that 90% of my experience with Modbus is in the Allen-Bradley, Digi, and Prosoft product lines.

Can anyone cite a specific make and model of logic controller that allows you to enter a User-Defined value for the Modbus/TCP Function code ?
 
I'm with Steve. I have used a large variety of product and have done quite a lot of modbus and never had to use anything but the standard function codes.
 
The Schneider product line (former Modicon and Telemechanique) supports a broad range of Modbus function codes, ones I never ran into until I started working with the line extensively. That being said, no, never seen a user entry function code to configure as a drop down or anything for Modbus.

Some of the message blocks in UnityPro allow arbitrary messaging in the controllers so I suppose that could qualify - on a Quantum, if you use code 15 for the MSTR block you can free code a Modbus message (have to work out the endian issues and all - what joy). I expect the Ethernet component to just pass the message to port 502 so perhaps that qualifies as user defined-capable? I have never seen a server component support something other than standard, so never had need to try this.
 
Thanks for the contributions, guys.

I'm going to have a little heart-to-heart with this vendor about how they're advertising their PLC integration capabilities.

I found yesterday that Rockwell Automation has added Open Socket services to the MicroLogix 1400 controller; Chapter 24 of the new (May 2012) 1766 Reference Manual has all the details.

I'm not sure yet if I can make this interface work using raw sockets but I'm going to give it a shot.
 
It's a new one on me too, and I worked for Schneider (and on Modbus much of the time no less).
 
After a few rounds of correspondence with this vendor, both of us wondering aloud if the other could read English, it turns out they built an improved interface a year ago, using Modbus function codes 03 and 16.

They just hadn't updated the link to the new user manual on the website until a month ago... just after we had downloaded our copy.

I'm much happier with this simpler interface, and in the meanwhile I got a quick introduction t the CIP Generic access to the Open Socket interface on the MicroLogix 1400.

Thanks for your input, guys !
 
I have seen a device that uses special function codes. But only one in the 17 years that I have been doing Automation Communications. The devices was an ultrasonic level meter for measuring fluid levels in volatile environments. Typically these functions codes are used to allow the user to request a block of non contiguous data from the device in a single request. Because this function code is so atypical I doubt you would find any Modbus Master that supports it.

The solution we provided to our end user was using our User Configurable (UCON) driver. I would be interested in getting information from you on this device, not to sell you something. I am curious about it.

There is a precedence for devices that use a Modbus like protocol. Most flow meters use Enron Modbus or some Modbus derivative.
 
Emerson uses a really nice feature on their EP-P series servo drives that allows you to custom map your varaibles to modbus addresses instead of going by a fixed table. This way you can populate all of your relevant data contiguously and perform single block reads and writes. Now I wish everybody did it that way.
 
Modbus/TCP

Hi ken,

I have in my planet some dosing systems with Unitronics plc
that connected to Pc with HMI softwar by Modbus/TCP driver.
There is block in the plc program to support the Modbus.
The type of plc is V230 (Smart).
I hope that it will help.
 

Similar Topics

1) I am poor 2) I have written some useful plc code in the past 3) Anyone here ever try and sell a user defined FB?
Replies
29
Views
6,667
I am working on a project on an s7-1200 with an hmi, but I am looking to remove the HMI and substitute its functionality using the User-Defined...
Replies
2
Views
1,919
Hi all, is there an easy way to reset a user defined shift register to 0? i have a data type containing 8 bools for an array of 10 and would like...
Replies
12
Views
3,191
Hello all, I am currently running a program from an S7-1200 and I am using TIA Portal v17. I have created a user-defined web page to eliminate...
Replies
1
Views
1,553
Hello all, I've been working on a siemens PLC system using an S7-1200 and a KTP400 Basic HMI. Essentially this system takes in some setup...
Replies
3
Views
1,381
Back
Top Bottom