Modbus Master Device Module
Module icon
Overview
Up to 32 values can be imported, scaled, and labeled for use by other ION modules. A map, defined by an associated Modbus Master Map module, determines what data is read from the slave device and how that data is formatted.
The Modbus Master Device module operates in two different modes:
-
In Polling mode (Read Now input not connected) it places a Modbus request in the queue every second if it is not waiting on a previous response.
-
In Read Now mode, upon a Read Now pulse, it places a Modbus request in the queue if it is not waiting on a previous response.
The Modbus Master Device module works in tandem with the Modbus Master Map module. See the “Detailed Operation” section for more information.
Inputs
This input switches the module ON and OFF. When set to off, the outputs are set to 'N/A’. The default setting is on. This input is not required.
When pulsed, this register places a Modbus request in the queue if it is not waiting on a previous response. If left unconnected, the module polls the Modbus devices continuously. This input is not required.
Setup registers
This register maps the connection to a setup register on the Modbus Master Options Module. Choose Serial Connection 1-4 or TCP Connection 1-10 (if available).
This register contains the numeric address of the Modbus slave device from which the module reads data. The valid slave address range is 1–247; default is 1.
This string register defines the slave device type. The string can have a maximum of 20 alphanumeric characters; dot and dash allowed.
This string register contains the Modbus slave device sub-name. This is for uniquely identifying Modbus Master Device module output registers with common 'Device Types'. This string can have a maximum of eight alphanumeric characters; dot and dash allowed.
This register defines the number of consecutive unsuccessful reads required before a communications error is sent. The valid range is 1-255; default is 1.
This register defines how stale data is overwritten in the event of a communications error. The default setting is old value.
Output registers
These registers contain the imported Modbus data for other ION modules to use. The output labels are derived from other registers as shown below:
<label><bit number>@<slave name>[value]
The label is acquired from the Modbus Master Map module’s Device Map register. The bit number applies to Packed Boolean formats only. The slave name is set in the Slave Name setup register.
-
In the Modbus Master Map module, Amps A is mapped to Modbus Master Device module Value1, Watts 3-Ph total is mapped to Modbus Master Device module Value2.
-
If you change the mapping to add Volts A-N, the Modbus Master Map module will require you to change the Modbus map register string so the Modbus registers are listed in order, i.e. Volts A-N first, then Amps A, then Watts 3-Ph total.
Before the change:
-
Modbus Master Device module Value1 = Amps A
-
Modbus Master Device module Value2 = Watts 3-Ph total
After the change:
-
Modbus Master Device module Value1 = Volts A-N
-
Modbus Master Device module Value2 = Amps A
-
Modbus Master Device module Value3 = Watts 3-Ph total
An on state indicates the module is waiting for a response from the slave device.
This Boolean register indicates the status of communication between the Modbus master (the ION device using this module) and the associated Modbus slave. A value of on indicates that a recent communications attempt succeeded; off indicates consecutive communications errors have occurred as specified in the Comms Error Count setup register.
This output generates a pulse whenever the module successfully reads data.
This output generates a pulse whenever the module fails to read data (because of either a communications error or a Modbus exception).
This register contains the Modbus exception code returned by the slave device when invalid requests are made. This value is reset once a valid request is received.
This register contains data indicating the following:
-
Polling mode: When the module is polling the Modbus devices, this register specifies the time between updates.
-
Read Now mode: When the module receives a ReadNow request, this register specifies how much time elapsed between receiving the ReadNow request and updating the value outputs.
All events are recorded in the Event register. Possible events and their associated priority numbers are:
Event priority group | Priority | Description |
---|---|---|
Reset | 5 | A module reset has occurred. |
Setup Change | 10 | Input links, setup registers or labels have changed. |
The Event output register stores the following information for each ION event: time stamp, priority, cause, effect, and any values or conditions associated with the cause and effect.
Responses to special conditions
The following table summarizes how the module behaves under different conditions.
Condition | Response of registers |
---|---|
The Enable input is N/A |
The Value 1...N registers are N/A The Status register is set to N/A The Pending register is set to N/A |
After the module is re-linked or its setup registers are changed |
The Value 1...N, Status, Exception Code and Update Period registers are N/A The Pending register is set to no |
When the device is started or powered-up (either the first time, or after a shutdown) |
The Value 1...N, Status, Exception Code and Update Period registers are N/A The Pending register is set to no |
When there are Comms Error Count consecutive receive time-outs or Modbus exceptions (i.e. Modbus Master Device module sends a request but does not receive a reply or receives a Modbus exception) | Output registers are set to the Comms Error Output value until a successful read occurs |
Detailed module operation
The Modbus Master Device module works in tandem with the Modbus Master Map module; it will not function without it.
In order for the Modbus Master Device module to function properly, the meter’s Protocol setup register in the Communications module must be set to modbus master. This defines the serial port used to access the Modbus slave devices. See the Modbus and ION Technology technical note for more information.
Modbus Master Device module 1 collects Modbus data (Vln a) from Submeter1, while Modbus Master Device module 2 collects Modbus data (Vln a) from Submeter2. These two Device modules then use the decoding information available from the Modbus Master Map module 1 to translate the Modbus information into values other ION modules can use. Notice the Device Type register of all three modules is set to 6200. This “links” the Modbus Master Map module to the two Modbus Master Device modules.