Workstationst Modbus® Feature Instruction Guide: Gei-100696E
Workstationst Modbus® Feature Instruction Guide: Gei-100696E
Workstationst Modbus® Feature Instruction Guide: Gei-100696E
• Holding Registers
• Holding Coils
• Input Registers
• Input Coils
The Slave data structures represent different data depending on whether the Slave
definition being configured is under the Masters or the Slaves item in the Modbus Tree
View. A Slave definition under the Slaves item is the WorkstationST Modbus data
structure sent to the remote Master. A Slave definition under the Masters item reflects a
local copy of the remote Slave data that is mapped to ToolboxST variables. Each Slave
under the Masters item also contains configuration properties for each Modbus message
to be sent by the Master, including the rate at which the messages are sent.
• Creating the Modbus data structures, which comprise the memory map (address and
datatype) of every message to be sent or received by Modbus.
• Attaching each Modbus data point to a ToolboxST variable, which is then used to
transfer data to or from the corresponding Modbus data point.
Each data structure contains Modbus data points that are created by connecting a
ToolboxST variable to a Modbus address in one of the data structures. Each Modbus data
point is configured with an address and a data type to be sent or received over Modbus.
When the WorkstationST computer is operating as a Master, the data structure to be
configured is determined by the remote Slave component. This means that the user must
know the details of the remote Slave component to configure the WorkstationST
computer's Master data structure.
When the WorkstationST computer is operating as a Slave, the data structure to be
configured is primarily determined by the WorkstationST application. Any address and
datatype can be assigned. However, in this case, you must also communicate with the
remote Master to determine if any special addressing or data types are required. Once the
data structures are determined, the Modbus data points are connected to the ToolboxST
variables.
Once the Slave definitions are configured, the Modbus Master Messages must be
configured for each Slave under the Masters item. These messages determine the values
to be read from, or written to the Slave, and at what frequency.
Note The EGD Configuration Server must be set to True in one of the configured
WorkstationST computers (it does not have to be the WorkstationST computer with
Modbus enabled).
3. From the Tree View, select the Slave you inserted. From the Summary View,
Holding Registers and Input Registers tabs, add variables. From the Holding
Coils and Input Coils tabs, enter Boolean variables.
Note Many vendors refer to Coil/Register Numbers without including the Table Name,
because it is implied by the numbers they use.
Modbus protocol uses Function Code 3 to read Holding Registers, whose vendor numbers
start with a 4, and Function Code 4 to read Input Registers, whose vendor numbers start
with a 3.
4. From the Tree View, select the Slave you inserted. From the Summary View, add
variables to the Holding Registers and Input Registers tabs. Enter Boolean
variables to the Holding Coils and Input Coils tabs.
Big Endian For MBAP True/False If set to True (default), the fields in the Modbus Application Protocol Header
(Tcp Hdr) MBAP are converted to Big Endian before being placed on Modbus. It is
assumed that in received messages, these fields are in Big Endian, and if
required by the local computer, are converted to Little Endian before being
used locally.
Swap Words For True/False All Dint data types are 32 bits. If set to True, the words are swapped before
Dints being sent over Modbus, and before being used when read from Modbus.
For example,
Transmits 0x45, 0x67, 0x01, 0x23, 0xCD, 0xEF, 0x89 and 0xAB
Swap Words For True/False All Real data types are 32 bits. If set to True, the words are swapped before
Reals being sent over Modbus, and before being used when read from Modbus.
For example,
Ethernet Port 502 / 503 The Ethernet port that Modbus uses to communicate, if there are any
Ethernet Modbus connections. (A Slave listens on this port, a Master tries to
connect to this port.) The Modbus Protocol Specification default is 502, but if
502 is already used, it can be changed to 503.
Timeout NAK 4/6 When data cannot be obtained from the OPC® Server before the
SlaveSendTimeout time, the Slave returns a Slave Exception Response to
the Master. Most jobs want a NAK Code 6 (Slave component Busy) in this
situation, but this value gives you the option to return a NAK Code 4 (Slave
Component Failure).
Master Message Base 200 / 2147483647 This number defines how frequently a Modbus Master Message can be
Period sent. This number is muliplied by the Period Multiplier on the Modbus
Master Message to indicate, in ms, how often a given message is sent over
Modbus.
Master Read Timeout 500 / 6000000 The Master Read Timeout is the time duration, in ms, to wait for a response
from a Slave before proceeding to the next message.
OPC Data Rate 100 / 15000 The OPC Data Rate is the rate, in ms, at which the Modbus feature gets
updated values from the OPC Server. It should be twice as fast as you
expect the Master to be asking for values over Modbus.
ReConnect Time 500 / 6000000 The ReConnect Time is the time duration, in ms, before the Master tries to
reconnect to the Slave after a connection error. (Also, if Serial Slave has a
problem communicating over a serial port, it closes the serial port and waits
for this time duration before attempting to re-open the port.)
ReStartCycle Time 500 / 6000000 The ReStartCycle Time is the time duration, in ms, before restarting the
Read/Write or Write/Read cycle after an error. If this time duration is too
short, and the error does not clear itself, too many processing cycles are
used.
Slave Read Timeout 500 / 6000000 The Slave Read Timeout is the length of time, in ms, to wait for a request
from a master before marking this transport as being ready to be shutdown.
(This only applies to Ethernet Slaves.)
The program is still waiting for any new connection from a Master, regardless
of the time set here.
Slave Send Timeout 100 / 6000000 The Slave Send Timeout is the length of time, in ms, to wait for data from
the OPC Server before sending back a Timeout NAK response to the
Master.
Note You can only change Ethernet Settings when the Interface Type is Ethernet, and
Serial Settings when it is Serial.
IP Address Valid IP Address format IP address for Ethernet connection. For a Master, this is the IP
Address of the Slave that you are connecting to. For the Slave,
this is the IP Address at which you'll be listening for a connection
from a Master. If you're a Slave, verify that the WorkstationST
has a Network Adapter defined to support this IP Address.
Interface Settings
Detailed Description Text Allows the user to enter a detailed description of this hardware
interface to help the user keep track of their configuration. It can
be left blank.
Enabled True or False If True, the configuration for this hardware interface will be
downloaded to the WorkstationST computer.
Tree View Description Text Allows the user to enter a shorter description for this hardware
interface to display in the Tree View. If left blank, the IP address
or ComPort will display in the Tree View.
Serial Settings
Baud Rate 300 / 256000 Communication baud rate for serial network
Data Bits 8 Communication data bits for serial network
Parity None / Even / Odd Communication Parity for serial network
This sends a piece of canned data to the Slave, which the Slave then returns.
This code can be used to test the health of a Slave without needing to know the
register map.
Number of 1/65535 The number of Registers (or Coils) to be read or written for this message.
Registers
This is not the number of variables. A 4-byte data type uses two registers, and an
8-byte data type uses four registers.
Period Multiplier 1/2147483647 This number is multiplied by the Master Message Base Period to determine
how frequently, in ms, this message should be sent. (The Master Message
Base Period is an item in the Property Editor when Modbus is selected in the
Tree View)
Start Address 1/65535 The starting address for this message. This refers to either a coil number or
register number, depending on which function code is configured. A variable
must be connected to this address, or you cannot validate the Modbus
configuration and select the Build command.
Detailed Description Text Allows the user to enter a detailed description for this Slave to help
the user keep track of their configuration. It can be left blank.
Enabled True or False If True, the configuration for this Slave will be downloaded to the
WorkstationST computer.
Measurement System Native The measurement system that is used when WorkstationST Modbus
gets data from, or writes data to the OPC DA Server for this Slave.
Eng Max
where Ymod is the value to be sent over Modbus and XEng is the value of
the connected variable.
INT 1
UINT 1
DINT 2
UDINT 2
REAL 2
LREAL 4
Modbus Value = 65535 if Clamp Values = False. (just clamped based on Modbus data
type range, for unsigned 16-bit integer is 0 to 65535.)
Modbus Value = 65000 if Clamp Value = True. (the tighter of the two clamps
(RawMax/RawMin versus the data type range) is applied.)
Second example:
RawMax = 32000
RawMin = -32000
Engineering variable current value is 8.07
Modbus data type is a signed 16-bit integer (in ToolboxST, referred to as INT).
Modbus Value = 32560 if Clamp Values = False. (No clamp was reached.)
Modbus Value = 32000 if Clamp Values = True. (RawMax clamp was reached.)
Note If more registers need to be filled, the data type can be INT (uses one register),
REAL (uses two registers) or LREAL (uses up to four registers).
Note If Booleans are packed into a register, all 16 bits within a register do not have to be
mapped.
Connection Bool8 is undefined (where The variable that was entered into the If not, determine where the variable
the connected variable name is the Connected variable field is not defined should have been defined. If the
name you entered) anywhere in the system. variable comes from another
component, make sure that:
Point Address 00001 must have a For a specific Slave and register space Determine which variable you want at
unique address (where the address is (such as Holding Registers), more than that address. Is the other variable no
the value you entered) one variable has been mapped to the longer needed, or should it be at a
exact same address. different address?
Raw Min must be set to zero for point A non-zero scale factor (Raw Min, Raw Put zero values in the Raw Min, Raw
HoldingReg8-00 when Data Type is a Max, Eng Min or Eng Max) was entered Max, Eng Min, and Eng Max fields for
BOOL (where the point is your Name, for a Boolean point. this Boolean variable (on either the
and the parameter could also be Raw Holding Register or Input Register tab).
Max, Eng Min or Eng Max)
Point Address 00001 is of type UDINT A variable that takes up more than one Do you want the first variable to be that
and requires 2 addresses. The next register was connected to an address, data type when it is sent over Modbus?
address is located at 00002 (where the but not enough space was left in the When you connect a variable to a
addresses and data types are yours) register map for it. Instead, another Modbus page, the data type defaults to
variable was mapped to a following that of the variable that was connected,
address that would cause an overlap of but this may not be desired. If not, you
data. need to move the second variable.
Remember that two registers are
needed for DINT, UDINT, and REAL
variables, but four registers are needed
for LREAL variables.
A Slave under a Modbus Serial HW The Slave ID is set to 0, and the Change the Slave ID to a non-zero
Interface has to have a non-zero Slave Interface Type is a serial link. value.
ID, since 0 is reserved for broadcast
messages in the Modbus Protocol
Specification.
HW I/F COM1, Slave 1, point Coil2 and The same variable is connected to two If this was a spare variable being used
HW I/F COM2, Slave 5, point Coil8 are places in a Slave map under the to fill a hole in a register map, define as
both connected to T1.L27BN. Both pts Masters item. (It can be, but does not many spare variables as needed so
are being written to by values read over have to be on the same Slave, or even they can be unique. Otherwise, split
Modbus, so they will overwrite each under the same Hardware Interface.) your Modbus message into two
other. Either change one connection or That condition alone is okay if in one messages, one that reads the values
one of the Modbus messages that location the variable is being read to be before the hole, and a second that
writes to this variable (where the sent over Modbus, and in the other it’s reads the values after the hole. (Refer
Hardware Interfaces, Slave numbers, being read from Modbus and written to. to the section Spare Values.)
point names and connected variables However, your configuration actually
are yours) has one or more Modbus messages If this is not a spare variable, determine
configured to read from Modbus and which variable you want in each
write to both places where the same instance.
variable is connected. Function Codes
that read values from Modbus and write
them to a variable are FuncCode 1, 2,
3, or 4.
More than one Workstation Modbus More than one Hardware Interface is If you have more than one serial
HW Interface is configured to use the configured to use the same Com Port. interface in the same WorkstationST,
COM1 Com Port (where Com Port is the target computer must have enough
the duplicate in your configuration) hardware to support it. Select the
appropriate Com Port in the
configuration or change one of the
interfaces to Ethernet.
Under Modbus, Masters, there is more There are two or more hardware Determine if one of the hardware
than one HW interface configured to interfaces under the Masters category interfaces should really be a different
use the 172.20.100.151 IP Address. that are using the same IP Address. address, and if so, change it.
Otherwise, all of the slaves need to be
under one entry for this IP Address. Use
cut-and-paste to move the slave
definitions under one hardware
interface and delete the second
hardware interface.
Under Modbus, Slaves, there is more There are two or more Hardware Determine if one of the Hardware
than one HW Interface configured to Interfaces under the Slaves category Interfaces should really be a different
use the 172.20.100.151 IP Address. that are using the same IP Address. address, and if so, change it.
Otherwise, all of the slaves need to be
under one entry for this IP Address. Use
cut-and-paste to move the slave
definitions under one Hardware
Interface and delete the second
Hardware Interface.
Under Modbus, Masters, No messages were defined for a given Determine if you want to read or write
172.20.100.151: Slave 17 does not Masters slave map. values to this slave map, and if so,
have any Messages defined for it. insert a ModbusMasterMessage.
Duplicate Slave IDs are not allowed in The same Slave ID was used for more Change duplicate Slave IDs. To
any Modbus HW Interface than one Slave, underneath any given configure a redundant set of Slaves, the
Configuration. Hardware Interface. backup Slaves should be under their
own Hardware Interface.
An IP Address 3.29.17.201 is Under the Slaves item, an Ethernet From the General tab, verify that all the
configured for a Modbus HW Interface Hardware Interface is defined. Network Adapters in your
that has Slaves on this Workstation, but However, the IP address for it does not WorkstationST computer have been
the Workstation configuration itself does match one of the IP addresses on the configured with the proper IP address.
not have a Network Adapter defined to WorkstationST Network Adapters. This Double-click the error message in the
support this IP Address (where the IP could have happened if the Log View at the bottom of the screen to
Address is yours) WorkstationST Network Adapters go to the Hardware Interface with the
configuration was changed after the IP bad IP address. Select the IP Address
address was selected for your Slaves. field, then select the correct IP address.
An IP Address ASDFG is configured for Under the Masters item, there is an Change the string to the correct IP
a Modbus HW Interface that has Ethernet Hardware Interface whose IP format
Masters, but the format is not a valid IP address doesn’t follow the format nnn.
Address format (where instead of nnn.nnn.nnn, where n is a numerical
ASDFG, it is the string you entered) digit.
ModbusMasterMessage1 is configured There is a hole in the signal map. An Select the Modbus Master Message.
to send a message with Starting example of a hole is a message that Based on what the function code is,
Address 2 that takes up 2 coils or tries to write 4 registers starting at select the appropriate tab in the right
registers. However, there is no Variable register 10, where there is a DINT at hand pane. (1, 5, 15 select Coil; 3, 6, 16
connected to address 2 (where the register 10, no variable at register 12, select Holding Register; 2 select Input;
Message Name, Start Address, Number and an INT at register 13. Note that the 4 select Input Register.) Look at the
Of Registers, and first address that hole can be at the beginning or end of hole (address) indicated in the error
does not line up are yours) the message span. message.
ModbusMasterMessage1 is configured The number of registers needed for the Double-click the error message in the
to send Function Code 6, which by the connected variable is greater than one. Component InfoView to go to the poor
Modbus Protocol Specification only Modbus Master Message. In the
sends 1 register of data (two bytes). Summary View, select the Holding
However, the variable LReal1 Register tab. Either change the data
connected to the Starting Address 10 type for the point on the Modbus page
takes up 4 registers. Consider changing so that it only takes up a single register,
it to a Function Code 16 (where the or change the Function Code to 16 to
Message Name, Connected Variable pass the point over Modbus with its
Name, Starting Address and number of current data type. If you change the
registers needed are yours) Function Code to 16, you must also
change the Number of Registers to
reflect the number of actual registers
used for that data type, as indicated in
the error message.
ModbusMasterMessage1 is configured The Modbus protocol for the response Add another ModbusMasterMessage
to send a message with 2050 coils, but of a Function Code 1 (Read Holding and read some of the values in the first
the Maximum Number of Coils that can Coils) calls for 1 byte to specify the message, and the remaining values
be sent in any single Message is 2040. number of bytes of data to follow. The with the second message.
Please split this into multiple messages. maximum value for a single byte is 255.
Each byte of data can contain values for
8 coils. Therefore, the maximum
number of coils that can be read is 255
x 8 =2040.
ModbusMasterMessage0 is configured The Modbus protocol for the response Add another ModbusMasterMessage
to send a message with 200 registers, of a Function Code 3 (Read Holding and read some of the values in the first
but the Maximum Number of Registers Registers) calls for 1 byte to specify the message, and the remaining values
that can be sent in any single Message number of bytes of data to follow. The with the second message.
is 127. Please split this into multiple maximum value for a single byte is 255.
messages. There are two bytes of data for each
register. Therefore, the maximum
number of registers that can be read is
255 / 2 =127.5, (127 whole registers).
• From the Start menu, select All Programs, GE ControlST, WorkstationST, and
WorkstationST Status Monitor.
or
Note If detail items listed under a Master occur in a Slave, the Slave sends back a Slave
Exception Response, which triggers a WARNING status.
The Error Level column that displays on the WorkstationST additional status window has
three possible values:
• OK – Value is zero
• Warning – Condition occurred at some point
• Error – Condition is still occurring
When Modbus restarts, it goes offline to allow enough time for the COM ports to be
released before the new configuration tries to use them. If another component that Modbus
consumes is downloaded, the lists used to communicate with the OPC Server Modbus are
stopped and restarted. This can cause unhealthy data, which generates a Slave Exception
Response if the Master asks for that data during this timeframe. Stopping and starting the
lists prevents unbound variables (caused by moved variables or changed data types),
which continually return Slave Exception Responses to the Master for this data.
Modbus last zeroed counters Once a steady state condition is reached, it’s recommended that you set the counters to
at 10/9/2007 3:02:13 PM. zero.
Each status line has an Error Level, Current Count, and Total Count for a specific condition.
If the condition is still occurring (non-zero current count), the Error Level displays Error. As
long as the total count is non-zero, the Error Level displays Warning, indicating that at some
point this condition existed. Setting the counters to zero returns the Error Levels to OK.
This makes it easier to identify subsequent problems. A new problem causes the Error
Level to change to either Error (if the condition still is occurring) or Warning (if it occurred),
but has stopped, allowing you to detect transient problems.
The Zero Counters button also zeroes the counters for the number of messages sent and
received.
If a Slave connection does not receive any messages from the Master for a configured
amount of time (refer to the Slave Read Timeout property), it is shut down. The Slave
connection corresponds to the Hardware Interface configured in the ToolboxST application.
More than one Slave ID may be configured to respond over any connection.
More than one Master can talk to the same Slave map at the same time, each Master using
their own Slave connection. This might be done to support a primary/backup redundant
setup. For example, 1.1.1.1 HW Interface has Slaves 1, 2, and 3 defined under it. One
Master connects, which displays as one connection, although the Master can get data from
Slaves 1, 2, and 3. A second Master connects, which displays two connections. This
second Master can also get data from Slaves 1, 2, and 3.
Slave(s) on 3.29.17.149 are Since more than one Master can connect to a given Ethernet Slave Hardware Interface, this
talking to a Master on TCP tells you which Master connection all Status Counters following this line correspond to. If
Remote End Point another Master connects using the same listening port (but still having its own connection)
3.29.17.191:1451 after the Status Counters display for the first connection, this status line is repeated for the
second Master connection, followed by the Status Counters for the second connection.
Slave(s) on 3.29.17.149 have This is the number of messages that have been received and sent since the Counters were
1036 Received, 1036 Sent last set to zero. For Slaves, if the received amount is significantly higher than the sent
Messages Total. amount, the Slave is having problems responding to messages received. Refer to the
additional error counters and the trace log file for information. If the Slave responds with a
Slave Exception Response, it still counts as a message sent.
Slave(s) on 3.29.17.149 have If Masters send too many messages too quickly, this counter allows a field engineer to
0 Messages Received in the report the rate to the person responsible for the Master so that the configuration can be
last Second, 0.4 Average modified.
messages per second over the
last five seconds, 2 messages
per second Highwater Mark.
Slave(s) on 3.29.17.149 have Possibly due to not being physically connected, having mismatched Hardware interface
0 Current, 0 Total Connection configuration parameters, or having the connection closed by another program. When a
Errors. Connection error is received, Modbus closes the connection, waits the ReConnect Time
(configuration parameter), and then attempts to reconnect. Refer to the trace log file for
more information.
Slave(s) on 3.29.17.149 have If an Application Exception occurs, the connection waits the ReStartCycle Time
0 Current, 0 Total Application (configuration parameter) and then restarts the cycle. (The ReStartCycle Time prevents the
Errors. (An Unexpected restart from being caught in an infinite loop.) For a Master, restarting the cycle means
Exception that doesn't appear identifying and sending out the next message. For a Slave, restarting the cycle means
to be related to a connection listening for the next message from a Master.
problem.)
For Masters: The Master has waited a configured amount of time (Master Read Timeout
property) without receiving a response from a Slave before reading the next message.
Slave(s) on 3.29.17.149 have No Slave Exception Response is returned, but the status on the WorkstationST Status
0 Current, 0 Total Invalid Slave Monitor changes to Warning if this occurs. The Master configuration or the Slave ID must
ID Errors, where a Master sent be modified. If the Slave ID is changed, the Build and Download commands must then be
a message for a Slave ID that selected. Use the trace log file to identify the invalid Slave ID.
isn’t configured.
Slave(s) on 3.29.17.149 have Refer to the section, Exception Responses for more information about Slave Exception
0 Current, 0 Total Slave Responses. The count does not differentiate between different error codes.
Exception Responses that
were sent.
Slave 1 on 3.29.17.149 has 0 This is the length of time the Slave waited (configured in the Slave Send Timeout). The
Current, 0 Total Send Slave normally sends back a Slave Component Busy 06 Slave exception response to the
Timeouts, where it didn't get Master. However, if the NAK Code configuration parameter is set to 4, it returns a Slave
data from the OPC Server in Component Failure 04 Slave exception response to the Master.
0.5 seconds so it sent a Slave
Exception Response to the
Master.
Slave 1 on 3.29.17.149 HR has This Master/Slave tried to write values to the rest of the system through the OPC Server
0 Current, 0 Total OPC Server and failed. A Slave then sent a Slave Component Failure 04 Slave Exception Response to
Write Errors. the Master. If the program detects a specific cause of this error (variable is read-only,
unbound, unhealthy, and such), it does not increment this generic counter. Use the trace log
file to identify errors.
Slave 1 on 3.29.17.149 HR has This is a severe error. If the Modbus program cannot connect to the OPC server, it keeps
0 Current, 0 Total OPC Server trying to reconnect. It will not send messages over Modbus until connected. A Slave returns
Connection Errors. a Slave Component Failure 04 Slave Exception Response to the Master if it cannot connect
to the OPC Server. Start the OPC Server, if it is not running. If the OPC Server is running,
use the OPC Server’s trace log file to identify errors.
Slave 1 on 3.29.17.149 HR has The Slave returns an Illegal Data Address 02 Slave Exception Response to the Master. If
0 Current, 0 Total Illegal Data this error occurs, the person responsible for the Master needs to determine why a message
Address Errors. This error is expected at this location. Are there data type mismatches that caused signals to get
occurs when the Master asks shifted in the register map? Should a spare variable be added at this address? (Refer to the
for an address for which no section, Spare Values.) Use the trace log file to identify which variable has the error.
variable was configured.
Slave 1 on 3.29.17.149 HR has The Slave returns an Illegal Data Address 02 Slave Exception Response to the Master.
0 Current, 0 Total UnBound Normally, this occurs briefly when another component is downloaded, causing Modbus to
Variable Errors. stop and restart the lists to the OPC Server. However, if another component deleted a
variable being used by Modbus and was then downloaded, this could continually occur. In
that case, talk with the component owner to see if another variable should be used. If not,
the person responsible for the Master must delete this variable. In either case, modify the
Slave 1 on 3.29.17.149 HR has The Slave returns a Slave Component Failure 04 Slave Exception Response to the Master.
0 Current, 0 Total UnHealthy Normally this is only a momentary occurrence when another component gets downloaded,
Variable Errors. and Modbus stops and restarts the lists to the OPC Server. However, it also occurs if a
component goes offline. Refer to the trace log file to identify which variable has the error.
Slave 1 on 3.29.17.149 HR has The Slave returns a Slave Component Failure 04 Slave Exception Response to the Master.
0 Current, 0 Total Read-Only Refer to the trace log file to identify which variable has the error, then determine if the
Variable Errors. (This error is variable can be changed to Read/Write, or if another variable should be used. Modify your
when it's asked to write to a configuration, then select the Build and Download commands. This error will not resolve
variable that was configured as itself.
read-only.)
Slave 1 on 3.29.17.149 HR has The Slave returns an Illegal Data Value 03 Slave Exception Response to the Master. When
0 Current, 0 Total Data a Master writes to a Slave, the Slave converts the Master value to an engineering value. If
Conversion Errors. the calculated engineering value is outside the range of the engineering value’s data type,
that value is not sent, and a Slave Exception Response is returned to the Master. (Any
other values in the write request will be written.) The OPC Server Write Errors counter also
increases. In this case, make changes to your data types, as required. When a Master
reads from a Slave, the Slave converts the engineering value to a Modbus value. If the
calculated Modbus value is outside the range of the Modbus data type, the value is
clamped by the Modbus data type range. This clamping based on data types occurs even if
the Clamp Value property is not set. The clamped value is returned to the Master. No Slave
Exception Response is returned. In this case, a Slave Exception Response indicates that
an unanticipated conversion problem exists. This could also occur if scrambled data was
received over Modbus. Use the trace log file to identify which variable has the error.
Slave 1 on 3.29.17.149 HR has The Command Limit (configuration property) limits the number of EGD CMP commands
0 Current, 0 Total Times that that any given register map writes to a controller to prevent the controller from being
the Commands Per Second overloaded with requests. (For example, if the Holding Registers and the Holding Coils
Limit was reached. each contain 10 signals that are on a controller EGD page, and the Master sends
messages writing to all 20 signals every second, it's possible for 20 CMP messages to still
get sent to the controller.) The register does not buffer these change requests and send
them at a slower rate, but instead discards any messages that exceed the limit. Even if the
command limit is reached, other non-command values are sent. The Slave returns a Slave
Component Failure 06 Slave Exception Response to the Master.
Slave 1 on 3.29.17.149 HR has If the Clamp Values (configuration property) is set to True, the value sent over Modbus is
0 Current, 0 Total Modbus clamped between the RawMax and RawMin. The EngMax/EngMin and RawMax/RawMin
Values being clamped are used to determine how to scale a value when writing to/reading from Modbus. However,
occurrences. if the actual Engineering value at runtime is greater than EngMax, or less than EngMin, a
value could be sent over Modbus that is greater than RawMax or less than RawMin. Some
jobs may not find this desirable, but if the values are going to a computer that only supports
12 bits of data, these limits must be enforced. Also, if the Modbus value is outside the range
of the Modbus data type when an engineering value is converted to a Modbus value, the
Modbus value is clamped and the counter increases.
Slave 1 on 3.29.17.149 HR has The Modbus program tries to reduce the number of unnecessary EGD commands and
0 Current, 0 Total Times that a minimize the chance of reaching the command limit. This is done by comparing the current
Value has Not Changed so it value of a variable coming from another component, to the value received over Modbus. If
was Not Sent to a Controller the value is the same, it is not sent, but this counter is increased by one. If the value is
different, and the command limit was not reached, a command is sent to that component.
Master talking to COM1 has 0 These could occur if either the Master tries to send, or receives a function code that it
Current, 0 Total UnSupported cannot handle.
Function Code Errors.
Master talking to COM1 has 0 This normally occurs when:
Current, 0 Total Skipped
Periodic Modbus Messages. Modbus connection is down
Message would be skipped
OPC Server connection is down
when previously scheduled
messages haven’t completed Too many messages were scheduled to be sent at the same time. In this case, modify your
before new messages are configuration.
scheduled to be sent.
3.3 Tracing
Modbus writes messages to a trace log file to help identify problems.
� To display the Modbus trace log file: From the WorkstationST Status of
Features window, right-click the Modbus feature and select Advanced, then
View Detail Log to display the contents of the trace log file.
• Error
• Warning
• Info
• Verbose
Note The default value is 3. To view the contents of each message received, change the
value to 4 to include Verbose. However, because this value quickly fills the trace log file,
return the value to 3 as soon as possible.
Response:
Byte1; Slave ID
Byte 1 Slave ID
Byte 2 Originating Function Code with the most significant bit set to 1
Note The value displayed is the value before it is scaled and/or clamped to send over
Modbus.
02 Illegal Data Master asks to Read/Write to Use the trace log file to identify which variable has the error and what the
Address a register where there is not error is.
a variable connected, or the
variable is unbound If there was no variable at that address, the user who configured the
Master must determine why a response is expected at this location. Are
there data type mismatches that caused signals to get shifted in the
register map? Should a spare variable be added at this address? (Refer to
the section, Spare Values.)
04 Slave Any one of the following Look at the trace log file to identify the cause of the Slave Exception.
Component conditions could cause this Based on the cause, take the appropriate action:
Failure exception:
1. Master tries to read or 1. This occurs briefly when another component is downloaded, and
write a signal that is Modbus stopped and restarted the lists to the OPC Server. However, it
unhealthy would also occur if a component went offline.
2. Master tries to write to a 2. Determine if the variable can be changed to Read/Write, or if perhaps
signal that is read-only another variable should be used. Modify the configuration, then select the
Build and Download commands. This error will not resolve itself.
3. Modbus is not connected 3. This is a severe error. If Modbus can not connect to the OPC server, it
to the OPC Server keeps trying to reconnect. Verify that the OPC Server is running. If it is,
use the OPC Server’s trace log file to identify errors.
4. There is an error writing to 4. Modbus tries to catch most causes of OPC Server Write errors (variable
the OPC Server is Read-Only, unbound, or unhealthy, and such), in which case it will not
increase the OPC Server Write Error counter. Use both the Modbus and
OPC Server trace log files to identify errors.
5. There was an Application 5. Use the Modbus trace log to identify errors.
Exception
06 Slave 1. Master asks for data from 1. Verify that the OPC Server is running.
Component the Slave, but the Slave does
Busy not get the data from the
OPC Server before the Slave
Send Timeout times out.
(Configure with NAK Code to
send 4 or 6 in this case.)
2. The command limit has 2. Determine if this is due to the command limit being reached by viewing
been reached. the WorkstationST additional status window. If it is, determine
OPC OLE for Process Control (OLE is Microsoft's Object Linking and Embedding) is
a standard for data exchange in an industrial environment. The OPC foundation provides
specifications for various OPC standards such as OPC DA (Data Access) and OPC AE
(Alarm and Event).
OPC DA Server A core part of the WorkstationST product that conforms to the OPC
Data Access Specification
Scaling The act of converting one value to another value, or the values (for example,
slope and offset) used to perform this conversion. In this program, an engineering value is
converted before it is sent over Modbus, and a value read from Modbus is converted to an
engineering value before being used in the system.
Tracing Messages written by a program to a trace log file to help identify problems. In
the WorkstationST Status Monitor, use the View Detail Log to display the contents of the
trace log file.