Module author: Galen Collins <bashwork@gmail.com>
Section author: Galen Collins <bashwork@gmail.com>
Diagnostic record read/write
Currently not all implemented
This function code is used to read the contents of eight Exception Status outputs in a remote device. The function provides a simple method for accessing this information, because the Exception Output references are known (no output reference is needed in the function).
Decodes data part of the message.
Parameters: | data – The incoming data |
---|
Encodes the message
Run a read exeception status request against the store
Returns: | The populated response |
---|
The normal response contains the status of the eight Exception Status outputs. The outputs are packed into one data byte, with one bit per output. The status of the lowest output reference is contained in the least significant bit of the byte. The contents of the eight Exception Status outputs are device specific.
Decodes a the response
Parameters: | data – The packet data to decode |
---|
Encodes the response
Returns: | The byte encoded message |
---|
This function code is used to get a status word and an event count from the remote device’s communication event counter.
By fetching the current count before and after a series of messages, a client can determine whether the messages were handled normally by the remote device.
The device’s event counter is incremented once for each successful message completion. It is not incremented for exception responses, poll commands, or fetch event counter commands.
The event counter can be reset by means of the Diagnostics function (code 08), with a subfunction of Restart Communications Option (code 00 01) or Clear Counters and Diagnostic Register (code 00 0A).
Decodes data part of the message.
Parameters: | data – The incoming data |
---|
Encodes the message
Run a read exeception status request against the store
Returns: | The populated response |
---|
The normal response contains a two-byte status word, and a two-byte event count. The status word will be all ones (FF FF hex) if a previously-issued program command is still being processed by the remote device (a busy condition exists). Otherwise, the status word will be all zeros.
Decodes a the response
Parameters: | data – The packet data to decode |
---|
Encodes the response
Returns: | The byte encoded message |
---|
This function code is used to read the description of the type, the current status, and other information specific to a remote device.
Decodes data part of the message.
Parameters: | data – The incoming data |
---|
Encodes the message
Run a read exeception status request against the store
Returns: | The populated response |
---|
The format of a normal response is shown in the following example. The data contents are specific to each type of device.
Decodes a the response
Since the identifier is device dependent, we just return the raw value that a user can decode to whatever it should be.
Parameters: | data – The packet data to decode |
---|
Encodes the response
Returns: | The byte encoded message |
---|