Message Type 150, $PMEX

Proprietary NMEA message containing the last exception code from MODBUS slaves for exception reporting. This message is for only cmd mbusm excreport.

Message format is:
$PMEX,n,fc,ec*hh<CR><LF>

where:

n = 0 when there is no exception
n = 1 to 4 the MODBUS Slave device ID
fc = 0 when Device Open Error Event occurs or there is no exception
fc = 1 to 43 Function code that generated the exception (Modbus standard)
ec = 0 when there is no exception
ec = 1 to 16 Exception code returned (Modbus standard except 12 ~ 16)

If there is no exception from MODBUS slaves, the message will be $PMEX,0,0,0*hh<CR><LF>

MODBUS Function Codes:

01/0x01 = Read Coils Bit access
02/0x02 = Read Discrete Inputs Bit access
03/0x03 = Read Holding Registers 16 bits access
04/0x04 = Read Input Register 16 bits access
05/0x05 = Write Single Coil Bit access
06/0x06 = Write Single Register 16 bits access
07/0x07 = Read Exception Status Diagnostics
08/0x08 = Diagnostic with Sub code 0 to 18/0x12 or 20/0x14
11/0x0B = Get Com Event Counter Diagnostics
12/0x0C = Get Com Event Log Diagnostics
15/0x0F = Write Multiple Coils Bit access
16/0x10 = Write Multiple Registers 16 bits access
17/0x11 = Report Slave ID Diagnostics
20/0x14 = Read File Record File Record access
21/0x15 = Write File Record File Record access
22/0x16 = Mask Write Register 16 bits access
23/0x17 = Read and Write Multiple Registers 16 bits access
24/0x18 = Read FIFO Queue 16 bits access
43/0x2B = Read Device Identification Diagnostics with Sub code 14/0x0E
43/0x2B = Encapsulated Interface Transport Diagnostics with Sub code 13/0x0D or 14/0x0E

MODBUS Event and Exception Codes:

01/0x01 = Illegal Function Exception A master sends a Modbus function, which is not supported by the slave device.
02/0x02 = Illegal Address Exception A master queries an invalid or non-existing data address.
03/0x03 = Illegal Value Exception A master sends a data value, which is not an allowable value for the slave device.
04/0x04 = Slave Failure Exception An unrecoverable error occurs in the slave device. The length might exceed the allowable data size.
05/0x05 = Acknowledge Exception A long duration of time will be required to process the request. This is to prevent a timeout error.
06/0x06 = Slave Device Busy Exception A long–duration program command is running. The command should be retransmitted later.
07/0x07 = NAK Exception The slave cannot perform the program function received in the query.
08/0x08 = Memory Parity Error Exception A master attempted to read record file, but detected a parity error in the memory.
10/0x0A = Gateway Path Unavailable Exception The gateway is unable to establish a connection with the target device.
11/0x0B = Gateway Target Fail Exception The gateway is unable to receive a response from the target device. Usually means that the device is not present on the network.
12/0x0C = Reply Timeout Event The slave device does not reply in time or does not reply at all. A wrong slave device ID will also cause this error.
13/0x0D = Send Timeout Event The handshake lines are not properly set.
14/0x0E = Device Open Error Event The Modbus Master couldn't open a serial or TCP slave device. The network down or the opened serial port will cause this error.
15/0x0F = TCPIP Connection Closed Event TCP/IP connection was closed by the remote slave device.
16/0x10 = Unknown Poll Error Event This event is for all other errors when polling slave devices.

Last modified 5 years ago Last modified on 14-09-15 10:19:44 AM