How does the MODBUS standard define a "Poll Program Complete" message?

  • Thread starter Arne Vermehren, Danfoss A/S
  • Start date
A

Thread Starter

Arne Vermehren, Danfoss A/S

I am writing a MODBUS RTU slave application. I need to use exception code "05 - Acknowledge", because I have long lasting processes in the application.

The ModBus Protocol Ref. Guide defines exception code 5, which seems to fulfill my needs by stating "...The master can next issue a Poll Program Complete message....". But I have not anywhere found a description of such a message.

Does anybody know where and how this messagetype is defined?
 
F

Frank Prendergast

The document you are referencing are the publically available Modbus function codes.

The Exception code 5 and Poll command are part
of the private function codes ( programming codes). This detail is not available to the public unfortunately.
 
A

Arne Vermehren

Hi Frank: Thanks for a rapid reply. However...

Please explain. I have read about exception code 5 in "MODBUS Application Protocol spec v1.1" found on http://www.Modbus.org. Description of the exception code also mentions the Poll Command.

Is this a public or private document? If private
documents exist - who can access them? In other words: If I implement some mechanism according to a "private doc" in my MODBUS Slave- will my users be able to access this functionality via e.g. a third party developed MODBUS master master?

Finally please state very clearly: Is exception code 05 part of the public MODBUS Protocol - or not?

Best regards: Arne Vermehren, [email protected]
 
F

Frank Prendergast

Dear Arne,
Sorry I have not been on the site for a few days.
With regards to your requests:
1. As detailed in the documents in modbus.org, the modbus protocol has public, private and user defined capabilities.
Public functions are detailed and documented so that anyone can use them.
User defined function codes are codes that any user can create and then use themself of publish as their way to communicate to their devices.
Private function codes are private to Schneider Electric and are not available to anyone outside of Schneider Electric or it's partners. These private function codes allow us to program our PLC's.

2. Exception code 5 pertains to private function codes. Mention of this exception codes in the public documentation is meant to just document the exception codes in their entirety.

3. If your particular function( which I am assuming is running on a RS232 or RS485 Master-Slave link) requires a lot of time to process then I would suggest you create your own modbus function code to process this request.
Then communicate the details of this function to your partners.

Hopefully this is clear. If not certainly email me and we can take this offline for discussion.

Best regards,
Frank Prendergast
frank.prendergast(AT)modicon.com
 
L

Lynn August Linse

Frank gave a good answer - but let me answer this from another direction.

I doubt there are ANY third party developed client/master applications that will naturally understand an exception code 5. All OPC or SCADA or DCS systems will treat this as a faulty slave without known cause (ie: most will put the node off-line). Some may even give the wonderfully insightful "comms failure" event - which is the same they give if the slave does NOT respond at all. This is not very helpful in trouble-shooting.

The Modbus Spec is difficult to maintain, as there are many old legacy details of old Gould or Modicon or AEG product no longer actively used. At what point is an old "pre-standard" feature removed or retained or modified to be relevant today? In fact I believe this whole poll/exception 5 is related to the old programming panels in the day where RAM was expensive and the panel ran more as a external extension of the PLC's main program than as a more powerful peer like today's computers do.

We'll have to put this issue in queue to be resolved at The Modbus Organization in the next release of the spec. Either the Poll command has
to be added back to the spec - or the exception 5 is notated as a legacy code.

Best Regards
Lynn August Linse, [email protected]
IA Firmware Specialist, Digi Int'l (www.digi.com)
Board Member, The Modbus Organization (www.modbus.org)
26741 Portola Pkwy, Suite 1E #242
Foothill Ranch CA 92610-1743 USA
Ph/Fx: 949-916-1524 or 949-212-5802
 
Sir,

If i plan to implement exception code 0x5, I will have to define private function code to further handle the poll program complete message request. Is it up to the implementor on how to define the entire working scenario or there is a definite protocol to be followed?

Regards
Harish
Sunlux technologies limited
Bangalore
 
Don't use exception code 05 Acknowledge but
Use exception code 06 ServerDeviceBusy

Issue your request, and do normal response. Slave (server) enters busy state, means all followed request response is exception 06 Server Busy. Ones operation is completed (busy state left) server should respond normal (no exception). Just pool next command again until you get ServerDeviceBusy exception response.

In case of RTU you may also use short message GetEventCounter to obtain event status. EventStatus returns 0xffff if a previously issued program command is still being processed by the remote device (a busy condition exists) or 0x0000 (last command complete).

Sorry, my bad English
 
Top