41
GEI-100696E WorkstationST Modbus® Instruction Guide These instructions do not purport to cover all details or variations in equipment, nor to provide for every possible contingency to be met during installation, operation, and maintenance. The information is supplied for informational purposes only, and GE makes no warranty as to the accuracy of the information included herein. Changes, modifications, and/or improvements to equipment and specifications are made periodically and these changes may or may not be reflected herein. It is understood that GE may make changes, modifications, or improvements to the equipment referenced herein or to the document itself at any time. This document is intended for trained personnel familiar with the GE products referenced herein. Public Information – This document contains non-sensitive information approved for public disclosure. GE may have patents or pending patent applications covering subject matter in this document. The furnishing of this document does not provide any license whatsoever to any of these patents. GE provides the following document and the information included therein as is and without warranty of any kind, expressed or implied, including but not limited to any implied statutory warranty of merchantability or fitness for particular purpose. For further assistance or technical information, contact the nearest GE Sales or Service Office, or an authorized GE Sales Representative. Revised: Jul 2014 Issued: Dec 2007 © 2007 - 2014 General Electric Company. ___________________________________ * Indicates a trademark of General Electric Company and/or its subsidiaries. All other trademarks are the property of their respective owners. We would appreciate your feedback about our documentation. Please send comments or suggestions to [email protected] Public Information

WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

  • Upload
    others

  • View
    64

  • Download
    0

Embed Size (px)

Citation preview

Page 1: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

GEI-100696E

WorkstationST Modbus®Instruction GuideThese instructions do not purport to cover all details or variations in equipment, nor to provide for every possiblecontingency to be met during installation, operation, and maintenance. The information is supplied for informationalpurposes only, and GE makes no warranty as to the accuracy of the information included herein. Changes, modifications,and/or improvements to equipment and specifications are made periodically and these changes may or may not be reflectedherein. It is understood that GE may make changes, modifications, or improvements to the equipment referenced herein or tothe document itself at any time. This document is intended for trained personnel familiar with the GE products referencedherein.

Public Information – This document contains non-sensitive information approved for public disclosure.

GE may have patents or pending patent applications covering subject matter in this document. The furnishing of thisdocument does not provide any license whatsoever to any of these patents.

GE provides the following document and the information included therein as is and without warranty of any kind,expressed or implied, including but not limited to any implied statutory warranty of merchantability or fitness forparticular purpose.

For further assistance or technical information, contact the nearest GE Sales or Service Office, or an authorized GE SalesRepresentative.

Revised: Jul 2014Issued: Dec 2007

© 2007 - 2014 General Electric Company.___________________________________* Indicates a trademark of General Electric Company and/or its subsidiaries.All other trademarks are the property of their respective owners.

We would appreciate your feedback about our documentation.Please send comments or suggestions to [email protected]

Public Information

Page 2: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

Document UpdatesRevision Location Update

E Throughout document New format

Contents1 Overview ....................................................................................................................................................32 Configuration...............................................................................................................................................32.1 Enable Modbus ......................................................................................................................................42.2 Modbus Configuration .............................................................................................................................62.3 Modbus Properties ................................................................................................................................ 112.4 Hardware Interface Properties ................................................................................................................. 142.5 Master Message Properties ..................................................................................................................... 152.6 Slave Properties.................................................................................................................................... 162.7 Data Structure Properties........................................................................................................................ 162.8 Scaling ............................................................................................................................................... 172.9 Spare Values ........................................................................................................................................ 192.10 Importing or Exporting .csv Files ........................................................................................................... 202.11 Error/Warning Messages....................................................................................................................... 21

3 Runtime.................................................................................................................................................... 263.1 WorkstationST Status of Features............................................................................................................. 263.2 WorkstationSTAdditional Status.............................................................................................................. 283.3 Tracing ............................................................................................................................................... 343.4 Ethernet Messages ................................................................................................................................ 353.5 Serial Messages .................................................................................................................................... 363.6 Modbus Protocol Quick Reference ........................................................................................................... 373.7 Slave Exception Response Format............................................................................................................ 373.8 Monitoring Live Values.......................................................................................................................... 38

4 Troubleshooting ......................................................................................................................................... 394.1 Slave Exception Responses..................................................................................................................... 39

5 Glossary of Terms....................................................................................................................................... 41

2 GEI-100696E WorkstationST ModbusPublic Information

Page 3: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

1 OverviewThe ToolboxST* application allows users to configure the Modbus® feature that runs in a workstation configured with theWorkstationST* application (WorkstationST computer). Modbus is an application layer messaging protocol for client/servercommunication between components connected on different types of busses or networks. The WorkstationST applicationsupports both serial and Ethernet communication, and can operate as both a Master and a Slave. It is possible to have serialand Ethernet Masters and Slaves all running at the same time, within the limits of the computer used.

2 ConfigurationWhen the Modbus item in the component Tree View is selected, the properties that display in the Property View apply to allconnections. When the Modbus item is expanded, Master and Slave items display. These are organizational categories with noconfiguration properties. When you insert a hardware interface into either a Master or a Slave, several configurationproperties display in the Property Editor. One or more Slaves may be inserted under each hardware interface. Slavedefinitions consist of four types of data structures:

• 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 theMasters or the Slaves item in the Modbus Tree View. A Slave definition under the Slaves item is the WorkstationST Modbusdata structure sent to the remote Master. A Slave definition under the Masters item reflects a local copy of the remote Slavedata that is mapped to ToolboxST variables. Each Slave under the Masters item also contains configuration properties foreach Modbus message to be sent by the Master, including the rate at which the messages are sent.

Modbus Data Flow

Modbus Slaves are configured in two steps:

• Creating the Modbus data structures, which comprise the memory map (address and datatype) of every message to besent or received by Modbus.

• Attaching each Modbus data point to a ToolboxST variable, which is then used to transfer data to or from thecorresponding Modbus data point.

Instruction Guide GEI-100696E 3Public Information

Page 4: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

Each data structure contains Modbus data points that are created by connecting a ToolboxST variable to a Modbus address inone of the data structures. Each Modbus data point is configured with an address and a data type to be sent or received overModbus. When the WorkstationST computer is operating as a Master, the data structure to be configured is determined by theremote Slave component. This means that the user must know the details of the remote Slave component to configure theWorkstationST computer's Master data structure.

When the WorkstationST computer is operating as a Slave, the data structure to be configured is primarily determined by theWorkstationST application. Any address and datatype can be assigned. However, in this case, you must also communicatewith the remote Master to determine if any special addressing or data types are required. Once the data structures aredetermined, 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 Mastersitem. These messages determine the values to be read from, or written to the Slave, and at what frequency.

2.1 Enable Modbus➢➢ To enable the Modbus feature

1. From either the System Editor Tree View or the Summary View, double click theWorkstationST component. TheWorkstationST Component Editor displays.

Note The EGD Configuration Server must be set to True in one of the configured WorkstationST computers (it does nothave to be the WorkstationST computer with Modbus enabled).

4 GEI-100696E WorkstationST ModbusPublic Information

Page 5: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

2. From the Tree View, select Network Adapter 0.

Instruction Guide GEI-100696E 5Public Information

Page 6: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

2.2 Modbus Configuration

Note Modifying the Modbus configuration results in a minor difference in the configuration, however, removal of allModbus points will result in a major difference forcing an offline load.

➢➢ To configure a Modbus Master

1. From the Modbus tab, right-click theMasters item, then select Insert New HW Interface.

2. From the Tree View, right-click the interface you inserted, and select Insert New Modbus Slave.

6 GEI-100696E WorkstationST ModbusPublic Information

Page 7: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

3. From the Tree View, select the Slave you inserted. From the Summary View, Holding Registers and InputRegisters 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 numbersthey use.

The following table displays how vendors’ Coil/Register Numbers correspond to WorkstationST Table Names and Addresses:

Vendor's Coil/RegisterNumbers

Table Name inWorkstationSTconfiguration

Address in WorkstationSTconfiguration

Access

0001 - 9999 Holding Coils 0001 - 9999 Read-Write

10001 - 19999 Input Coils 0001 - 9999 Read-Only

30001 - 39999 Input Registers 0001 - 9999 Read-Only

40001 - 49999 Holding Registers 0001 - 9999 Read-Write

Modbus protocol uses Function Code 3 to read Holding Registers, whose vendor numbers start with a 4, and Function Code 4to read Input Registers, whose vendor numbers start with a 3.

Instruction Guide GEI-100696E 7Public Information

Page 8: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

Note When you connect a Modbus variable, the data type defaults to the data type of the variable that was connected. Somedata types use more than one register. (Refer to the section, Data Types.) If you want the data type to be different than thevariable that was connected, it is recommended that you change the data type before connecting the next variable. This isbecause the program reserves as many registers as needed for that data type and changing the data type later could leave youwith either holes or overlapping registers. For example, variables A and B are LREALs in the system, but you want to sendthem over Modbus as REALs. Variable Awould be put at address 00001 and variable B at address 00005 unless you changedA’s data type to a REAL before connecting B.

8 GEI-100696E WorkstationST ModbusPublic Information

Page 9: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

The Property Editor Message Settings are as follows:

Function Code is the function code used for this message.

Number of Registers is the number of registers or coils read or written for this message.

Period Multiplier is the number multiplied by the Master Message Base Period to configure how frequently this message issent.

Start Address is the start address for this message. Depending on which Function Code was set, this refers to either a coil orregister number.

Note The lowest start number is one.

Instruction Guide GEI-100696E 9Public Information

Page 10: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

➢➢ To configure a Modbus Slave

1. From the Modbus tab, right-click Slaves, then select Insert New HW Interface.

2. From the Property Editor, select the Interface Type (Ethernet or Serial) configured for the master. If you are usingEthernet, select the IPAddress of your computer.

3. From the Tree View, right-click the new interface you inserted, then select Insert New Modbus Slave.

10 GEI-100696E WorkstationST ModbusPublic Information

Page 11: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

4. From the Tree View, select the Slave you inserted. From the Summary View, add variables to the HoldingRegisters and Input Registers tabs. Enter Boolean variables to the Holding Coils and Input Coils tabs.

2.3 Modbus PropertiesView and modify Modbus properties from the ToolboxST Property Editor.

Instruction Guide GEI-100696E 11Public Information

Page 12: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

Modbus Properties

Property Lower/UpperLimits or AllowedValues

Description

Big Endian for DataOn Modbus

True/False If set to True (default), all data in the body of the Modbus message isconverted to Big Endian before being placed on Modbus. It is assumed thatall data in the body of a received message is Big Endian, and if required bythe local computer, is converted to Little Endian before being used locally.

Big Endian For MBAP(Tcp Hdr)

True/False If set to True (default), the fields in the Modbus Application Protocol HeaderMBAP are converted to Big Endian before being placed on Modbus. It isassumed that in received messages, these fields are in Big Endian, and ifrequired by the local computer, are converted to Little Endian before beingused locally.

Swap Words ForDints

True/False All Dint data types are 32 bits. If set to True, the words are swapped beforebeing sent over Modbus, and before being used when read from Modbus.For example,

32 bits Data 0x01234567

Transmits 0x45, 0x67, 0x01 and 0x23

Swap Words ForLReals

True/False All LReal data types are 64 bits. If set to True, the words are swappedbefore being sent over Modbus, and before being used when read fromModbus. For example,

64 bits Data 0x0123456789ABCDEF

Transmits 0x45, 0x67, 0x01, 0x23, 0xCD, 0xEF, 0x89 and 0xAB

Swap Words ForReals

True/False All Real data types are 32 bits. If set to True, the words are swapped beforebeing sent over Modbus, and before being used when read from Modbus.For example,

32 bits Data 0x01234567

Transmits 0x45, 0x67, 0x01 and 0x23

Swap Words ForUDints

True/False All UDint data types are 32 bits. If set to True, the words are swappedbefore being sent over Modbus, and before being used when read fromModbus. For example,

32 bits Data 0x01234567

Transmits 0x45, 0x67, 0x01 and 0x23

Clamp Values True/False If set to True, the value sent on Modbus is clamped between the RawMaxand RawMin values. The EngMax/EngMin and RawMax/RawMin are usedto determine how to scale a value when writing to/reading from Modbus.However, if the actual Engineering value at runtime is greater than EngMax,or less than EngMin, then a value could be sent on Modbus that is greaterthan RawMax or less than RawMin. Some jobs may not find this desirable,however, if the values are being sent to a computer that only supports 12bits of data, these limits must be enforced.

12 GEI-100696E WorkstationST ModbusPublic Information

Page 13: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

Modbus Properties (continued)

Property Lower/UpperLimits or AllowedValues

Description

Command Limit 0 / 25 Limits the number of EGD Command Message Protocol (CMP) commandsthat any given register map writes to a controller in a second. This limit isdesigned to prevent the controller from being overloaded with requests.However, if both the Holding Registers and the Holding Coils each contain10 signals that are on a controller EGD page, and if the Master sendsmessages to all 20 signals every second, it's possible for 20 CMPmessages to be sent to the controller.

Ethernet Port 502 / 503 The Ethernet port that Modbus uses to communicate, if there are anyEthernet Modbus connections. (A Slave listens on this port, a Master tries toconnect to this port.) The Modbus Protocol Specification default is 502, but if502 is already used, it can be changed to 503.

Timeout NAK 4 / 6 When data cannot be obtained from the OPC® Server before theSlaveSendTimeout time, the Slave returns a Slave Exception Response tothe Master. Most jobs want a NAK Code 6 (Slave component Busy) in thissituation, but this value gives you the option to return a NAK Code 4 (SlaveComponent Failure).

Master Message BasePeriod

200 / 2147483647 This number defines how frequently a Modbus Master Message can besent. This number is muliplied by the Period Multiplier on the ModbusMaster Message to indicate, in ms, how often a given message is sent overModbus.

Master Read Timeout 500 / 6000000 The Master Read Timeout is the time duration, in ms, to wait for a responsefrom 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 getsupdated values from the OPC Server. It should be twice as fast as youexpect 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 toreconnect to the Slave after a connection error. (Also, if Serial Slave has aproblem communicating over a serial port, it closes the serial port and waitsfor 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 theRead/Write or Write/Read cycle after an error. If this time duration is tooshort, and the error does not clear itself, too many processing cycles areused.

Slave Read Timeout 500 / 6000000 The Slave Read Timeout is the length of time, in ms, to wait for a requestfrom 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, regardlessof the time set here.

Slave Send Timeout 100 / 6000000 The Slave Send Timeout is the length of time, in ms, to wait for data fromthe OPC Server before sending back a Timeout NAK response to theMaster.

Instruction Guide GEI-100696E 13Public Information

Page 14: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

2.4 Hardware Interface PropertiesWhen the hardware interface is selected in the Tree View, the following properties display in the Property Editor.

Note You can only change Ethernet Settings when the Interface Type is Ethernet, and Serial Settings when it is Serial.

Property Lower/Upper Limits OrAllowed Values

Description

Ethernet Settings

IP Address Valid IPAddress format IP address for Ethernet connection. For a Master, this is the IPAddress of the Slave that you are connecting to. For the Slave,this is the IPAddress at which you'll be listening for a connectionfrom a Master. If you're a Slave, verify that the WorkstationSThas a Network Adapter defined to support this IPAddress.

Interface Settings

Detailed Description Text Allows the user to enter a detailed description of this hardwareinterface to help the user keep track of their configuration. It canbe left blank.

Enabled True or False If True, the configuration for this hardware interface will bedownloaded to the WorkstationSTcomputer.

Interface Type Serial or Ethernet Modbus hardware interface type

Tree View Description Text Allows the user to enter a shorter description for this hardwareinterface to display in the Tree View. If left blank, the IP addressor 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

Port COM1 / COM 16 Communication Port for serial network

Response Delay 0 / 999 Additional delay time, in ms, before the Slave responds to aMaster request. Change this from zero only if the Master cannothandle a quick response.

Stop Bits 1/2 Communication Stop Bits for serial network

14 GEI-100696E WorkstationST ModbusPublic Information

Page 15: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

2.5 Master Message Properties

Property Lower/UpperLimits or AllowedValues

Description

Function Code FuncCode1 / 1 - Read Holding Coils

FuncCode2 / 2 - Read Input Coils

FuncCode3 / 3 - Read Holding Registers

FuncCode4 / 4 - Read Input Registers

FuncCode5 / 5 - Write Single Holding Coil

FuncCode6 / 6 - Write Single Holding Register

FuncCode8 / 8 - Diagnostic, sub Function Code 0, Return Query Data

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 theregister map.

FuncCode15 / 15 - Write Multiple Holding Coils

FuncCode16 / 16 - Write Multiple Holding Registers

Number ofRegisters

1/65535 The number of Registers (or Coils) to be read or written for this message.

This is not the number of variables. A 4-byte data type uses two registers, and an8-byte data type uses four registers.

Period Multiplier 1/2147483647 This number is multiplied by the Master Message Base Period to determinehow frequently, in ms, this message should be sent. (TheMaster MessageBase Period is an item in the Property Editor when Modbus is selected in theTree View)

Start Address 1/65535 The starting address for this message. This refers to either a coil number orregister number, depending on which function code is configured. A variablemust be connected to this address, or you cannot validate the Modbusconfiguration and select the Build command.

Instruction Guide GEI-100696E 15Public Information

Page 16: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

2.6 Slave Properties

Property Lower/Upper LimitsOr Allowed Values

Description

Slave Settings

Detailed Description Text Allows the user to enter a detailed description for this Slave to helpthe 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 theWorkstationSTcomputer.

Measurement System Native The measurement system that is used when WorkstationST Modbusgets data from, or writes data to the OPC DA Server for this Slave.

Slave ID Number The Slave ID on the Modbus network.

Tree View Description Text Allows the user to enter a shorter description for this hardwareinterface to display in the Tree View. If left blank, the Slave addresswill display in the Tree View.

2.7 Data Structure Properties

Property Lower/Upper Limits or Allowed Values

Raw Min The value used to scale the data before it is sent or read from Modbus.

Raw Max

Eng Min

Eng Max

where Ymod is the value to be sent over Modbus and XEng is the value of the connected variable.

2.7.1 Data TypesWhen variables are sent over Modbus, the following data types are allowed. Note the number of registers that each data typeuses on a Modbus page.

Data Type Number of Registers Needed

BOOL 1 (Can pack up to 16 Booleans into one register).

INT 1

UINT 1

DINT 2

UDINT 2

REAL 2

LREAL 4

16 GEI-100696E WorkstationST ModbusPublic Information

Page 17: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

2.8 ScalingThe relationship between Y (the value sent over Modbus) and X (the engineering value) is linear. This equation:

can be converted into the slope intercept form:

y = mx + b

Where m = slope

b = offset

For the engineering value in the system:

For the value that is sent over Modbus:

If all min/max values are zeros, a gain of one (1) and an offset of zero are realized. If the Clamp Values property is set to True,the value sent on Modbus is clamped between the RawMax and RawMin. The EngMax/EngMin and RawMax/RawMin areused to determine how to scale a value when writing to or reading from Modbus. However, if the actual Engineering value atruntime is greater than EngMax, or less than EngMin, a value could be sent that is greater than RawMax or less than RawMin.Therefore, RawMax and RawMin are not true minimums and maximums unless the Clamp Values Boolean is set. They areonly used to determine the scale factors. However, before values are sent over Modbus, they are always clamped, regardlessof the state of the Clamp Values Boolean, based on the range of the Modbus data type. If values are sent to a computer thatonly supports 12 bits of data, verify that your RawMax and RawMin values respect the 12 bits of data limitation, and set theClamp Values Boolean to True.

When a Master writes to a WorkstationST Slave, the Slave converts the Modbus value to an Engineering value. If thecalculated Engineering value is outside the range of the Engineering variable’s data type, that value will not be set, and aSlave Exception Response (Code 3, Illegal Data Value) is returned to the Master. Any other valid values in the write requestare written. In this case, the OPC Server Write Errors counters increase.

When a Master reads from a WorkstationST Slave, the Slave converts the Engineering value to a Modbus value. If thecalculated 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 type occurs even if the Clamp Values property is not set. The clamped value is returned to theMaster. In this case, no Slave Exception response is returned.

Before a WorkstationST Master writes to a Slave, the Master converts the Engineering value to the Modbus value. If thecalculated Modbus value is outside the range of the Modbus data type, the value is clamped by the Modbus data type rangeand the clamped value is written to the Slave. This clamping based on data type occurs even if the Clamp Values property isnot set.

Instruction Guide GEI-100696E 17Public Information

Page 18: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

After a WorkstationST Master reads from a Slave, the Master converts the Modbus value to an Engineering value. If thecalculated Engineering value is outside the range of the Engineering variable’s data type, that value will not be set, and theOPC Server Write Errors counters increase. Any other valid values in the write request are still written.

At runtime, you can determine the number of times a value was clamped by monitoring the corresponding counters in theAdditional status detail window (for example, Slave 1 on 3.29.17.149 HR has 0 Current, 0 Total Modbus Values beingClamped occurrences).

2.8.1 Scaling ExamplesEngMax = 8.0 inches

EngMin = 0 inches

Engineering variable is an IEEE float (in ToolboxST, referred to as REAL).

First example:

RawMax = 65000

RawMin = 0

Engineering variable current value is 8.5.

Modbus data type is an unsigned 16-bit integer (in ToolboxST, referred to as UINT).

Modbus Value = 65535 if Clamp Values = False. (just clamped based on Modbus data type range, for unsigned 16-bit integeris 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.)

18 GEI-100696E WorkstationST ModbusPublic Information

Page 19: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

2.9 Spare ValuesA Master cannot read data that contains an empty register. If registers 1 through 100 are being read by a single read, and thereare no values connected to one or more registers, an Illegal Data Address error occurs.

➢➢ To repair empty registers

1. From theWorkstationST component, OPC DA Server tab, select Client Driven Variables.

Note The recommended variable name is Spare (for example, SpareInt1).

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).

2. Set the External Access to Read/Write.

3. Set the Initial Health to TRUE. If the Initial Health is not set to TRUE, the Master gets Exception Response:Slave Component Failure 04 when a Read/Write is attempted that includes this variable.

4. If required, set the Initial Value.

5. Select theModbus tab to connect this new variable to the empty register.

6. Select the Build and Download commands.

7. Restart the OPC Server.

Note If Booleans are packed into a register, all 16 bits within a register do not have to be mapped.

Instruction Guide GEI-100696E 19Public Information

Page 20: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

2.10 Importing or Exporting .csv Files➢➢ To export or import a .csv file: From the Modbus item, right-click a Slave (such as Slave 1) and select Export to

.csv file or Import from .csv file.

The Export to .csv file option includes:

• Register Type (Example: HoldingReg, Coil, InputReg, Input)• Register Address (Example: 00001)• Signal Name (Example: TVNA)• Writeable or Read Only (Example: W)• Modbus Data Type (Example: UDINT)• Signal Data Type (Example: UDINT)• Scale Modbus Minimum• Scale Modbus Maximum• Scale Engineering Minimum• Scale Engineering Maximum• Signal Units• Signal Description

The Import from .cvs file option includes:

• a .csv file that you exported• a .csv file exported from a Mark VI or Mark VIe Modbus Master configuration

20 GEI-100696E WorkstationST ModbusPublic Information

Page 21: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

2.11 Error/Warning MessagesAny errors/warnings in the Modbus configuration display in the WorkstationST Component InfoView when the Buildcommand is selected. Double-click an error/warning to display the location that the error/warning occurs.

Error Message Possible Cause Solution

Connection Bool8 is undefined (wherethe connected variable name is thename you entered)

The variable that was entered into theConnected variable field is not definedanywhere in the system.

If not, determine where the variableshould have been defined. If thevariable comes from anothercomponent, make sure that:

-Variable was defined in thatcomponent

-Variable was mapped to EGD page inthat component

-The component was built on acomputer that is working online with theEGD ConfigServer so that their EGDpage maps are available.

-This component is set up to consumepages from that component

-This computer is working online withEGD ConfigServer to get the latestEGD Map

Point Address 00001 must have aunique address (where the address isthe value you entered)

For a specific Slave and register space(such as Holding Registers), more thanone variable has been mapped to theexact same address.

Determine which variable you want atthat address. Is the other variable nolonger needed, or should it be at adifferent address?

Raw Min must be set to zero for pointHoldingReg8-00 when Data Type is aBOOL (where the point is your Name,and the parameter could also be RawMax, Eng Min or Eng Max)

A non-zero scale factor (Raw Min, RawMax, Eng Min or Eng Max) was enteredfor a Boolean point.

Put zero values in the Raw Min, RawMax, Eng Min, and Eng Max fields forthis Boolean variable (on either theHolding Register or Input Register tab).

Point Address 00001 is of type UDINTand requires 2 addresses. The nextaddress is located at 00002 (where theaddresses and data types are yours)

A variable that takes up more than oneregister was connected to an address,but not enough space was left in theregister map for it. Instead, anothervariable was mapped to a followingaddress that would cause an overlap ofdata.

Do you want the first variable to be thatdata type when it is sent over Modbus?When you connect a variable to aModbus page, the data type defaults tothat of the variable that was connected,but this may not be desired. If not, youneed to move the second variable.Remember that two registers areneeded for DINT, UDINT, and REALvariables, but four registers are neededfor LREAL variables.

A Slave under a Modbus Serial HWInterface has to have a non-zero SlaveID, since 0 is reserved for broadcastmessages in the Modbus ProtocolSpecification.

The Slave ID is set to 0, and theInterface Type is a serial link.

Change the Slave ID to a non-zerovalue.

Instruction Guide GEI-100696E 21Public Information

Page 22: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

Error Message Possible Cause Solution

HW I/F COM1, Slave 1, point Coil2 andHW I/F COM2, Slave 5, point Coil8 areboth connected to T1.L27BN. Both ptsare being written to by values read overModbus, so they will overwrite eachother. Either change one connection orone of the Modbus messages thatwrites to this variable (where theHardware Interfaces, Slave numbers,point names and connected variablesare yours)

The same variable is connected to twoplaces in a Slave map under theMasters item. (It can be, but does nothave to be on the same Slave, or evenunder the same Hardware Interface.)That condition alone is okay if in onelocation the variable is being read to besent over Modbus, and in the other it’sbeing read from Modbus and written to.However, your configuration actuallyhas one or more Modbus messagesconfigured to read from Modbus andwrite to both places where the samevariable is connected. Function Codesthat read values from Modbus and writethem to a variable are FuncCode 1, 2,3, or 4.

If this was a spare variable being usedto fill a hole in a register map, define asmany spare variables as needed sothey can be unique. Otherwise, splityour Modbus message into twomessages, one that reads the valuesbefore the hole, and a second thatreads the values after the hole. (Referto the section Spare Values.)

If this is not a spare variable, determinewhich variable you want in eachinstance.

More than one Workstation ModbusHW Interface is configured to use theCOM1 Com Port (where Com Port isthe duplicate in your configuration)

More than one Hardware Interface isconfigured to use the same Com Port.

If you have more than one serialinterface in the same WorkstationST,the target computer must have enoughhardware to support it. Select theappropriate Com Port in theconfiguration or change one of theinterfaces to Ethernet.

Under Modbus, Masters, there is morethan one HW interface configured touse the 172.20.100.151 IPAddress.

There are two or more hardwareinterfaces under the Masters categorythat are using the same IPAddress.

Determine if one of the hardwareinterfaces should really be a differentaddress, and if so, change it.Otherwise, all of the slaves need to beunder one entry for this IPAddress. Usecut-and-paste to move the slavedefinitions under one hardwareinterface and delete the secondhardware interface.

Under Modbus, Slaves, there is morethan one HW Interface configured touse the 172.20.100.151 IPAddress.

There are two or more HardwareInterfaces under the Slaves categorythat are using the same IPAddress.

Determine if one of the HardwareInterfaces should really be a differentaddress, and if so, change it.Otherwise, all of the slaves need to beunder one entry for this IPAddress. Usecut-and-paste to move the slavedefinitions under one HardwareInterface and delete the secondHardware Interface.

Under Modbus, Masters,172.20.100.151: Slave 17 does nothave any Messages defined for it.

No messages were defined for a givenMasters slave map.

Determine if you want to read or writevalues to this slave map, and if so,insert a ModbusMasterMessage.

Duplicate Slave IDs are not allowed inany Modbus HW InterfaceConfiguration.

The same Slave ID was used for morethan one Slave, underneath any givenHardware Interface.

Change duplicate Slave IDs. Toconfigure a redundant set of Slaves, thebackup Slaves should be under theirown Hardware Interface.

22 GEI-100696E WorkstationST ModbusPublic Information

Page 23: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

Error Message Possible Cause Solution

An IPAddress 3.29.17.201 isconfigured for a Modbus HW Interfacethat has Slaves on this Workstation, butthe Workstation configuration itself doesnot have a Network Adapter defined tosupport this IPAddress (where the IPAddress is yours)

Under the Slaves item, an EthernetHardware Interface is defined.However, the IP address for it does notmatch one of the IP addresses on theWorkstationST Network Adapters. Thiscould have happened if theWorkstationST Network Adaptersconfiguration was changed after the IPaddress was selected for your Slaves.

From the General tab, verify that all theNetwork Adapters in yourWorkstationSTcomputer have beenconfigured with the proper IP address.Double-click the error message in theLog View at the bottom of the screen togo to the Hardware Interface with thebad IP address. Select the IPAddressfield, then select the correct IP address.

An IPAddress ASDFG is configured fora Modbus HW Interface that hasMasters, but the format is not a valid IPAddress format (where instead ofASDFG, it is the string you entered)

Under the Masters item, there is anEthernet Hardware Interface whose IPaddress doesn’t follow the format nnn.nnn.nnn.nnn, where n is a numericaldigit.

Change the string to the correct IPformat

ModbusMasterMessage0 is configuredto send Function Code 5, which by theModbus Protocol Specification onlysends 1 coil of data. However, theNumber Of Registers configured is 12.Consider changing this to a Functioncode 15 (where the Message Name andNumber Of Registers are your values)

Double-click the error message in theLog View at the bottom of the screen togo to the bad Modbus Master Message.In the Summary View, select the Coiltab. Determine if you want to write asingle point, and if so, change thenumber of registers to 1. If you want towrite more than one point, change theFunction Code to 15.

ModbusMasterMessage0 is configuredto send Function Code 6, which by theModbus Protocol Specification onlysends 1 register of data. However, theNumber Of Registers configured is 12.Consider changing this to a FunctionCode 16 (where the Message Nameand Number Of Registers are yourvalues)

Double-click the error message in theLog View at the bottom of the screen togo to the bad Modbus Master Message.In the Summary View, select theHolding Register tab. Determine if youwant to write a single variable, and if so,change the number of registers to 1. Ifyou want to write more than onevariable, change the Function Code to16.

ModbusMasterMessage0 is configuredto send a message to read a value fromModbus and write it to Bool1, but thatvariable is defined as Read-Only(where the Message Name andconnected variable name are yours)

Under the Masters category, a Slave isdefined that contains a Read-Onlyvariable. This Modbus Master messageis either a Function Code 1, 2, 3, or 4which causes the Modbus Master toread a value from a Slave, and try tostore the value in this Read-OnlyConnected Variable.

Did you want to read from Modbus? Ifnot, change your function code. If so,determine if you should be writing to adifferent variable, or if this variableshould be changed to Read/Write.

Instruction Guide GEI-100696E 23Public Information

Page 24: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

Error Message Possible Cause Solution

ModbusMasterMessage1 is configuredto send a message with StartingAddress 2 that takes up 2 coils orregisters. However, there is no Variableconnected to address 2 (where theMessage Name, Start Address, NumberOf Registers, and first address thatdoes not line up are yours)

There is a hole in the signal map. Anexample of a hole is a message thattries to write 4 registers starting atregister 10, where there is a DINTatregister 10, no variable at register 12,and an INTat register 13. Note that thehole can be at the beginning or end ofthe message span.

Select the Modbus Master Message.Based on what the function code is,select the appropriate tab in the righthand pane. (1, 5, 15 select Coil; 3, 6, 16select Holding Register; 2 select Input;4 select Input Register.) Look at thehole (address) indicated in the errormessage.

Either move variables around to fill thehole, add a spare variable to fill in thehole (refer to the section, SparesValues), or use two Modbus messages.The first Modbus message includesvariables before the hole and thesecond includes variables after thehole.

If the hole is at the beginning, changethe Start Address in the Message. If thehole is at the end, change the Numberof Registers in the Modbus MasterMessage and verify that it does notextend beyond the end of the lastconnected variable.

If Booleans are packed into a register, all16 bits within a register do not have to bemapped.

ModbusMasterMessage0 is configuredto send a message with StartingAddress 1 that takes up 12 coils orregisters. However, the last variableLReal1 is long enough that it causes themessage to exceed the Number ofRegisters by 1 register (where theMessage Name, Start Address, NumberOf Registers, Connected VariableName, and exceeded number areyours)

The number of registers is not largeenough to incorporate the whole lengthof the last variable in the message.

Select the Modbus Master Message.Add the current number of registers andthe exceeded number, then put theresult into the Number of Registers. Inthe example message, you would add12 + 1 = 13 and change the Number ofRegisters from 12 to 13.

24 GEI-100696E WorkstationST ModbusPublic Information

Page 25: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

Error Message Possible Cause Solution

ModbusMasterMessage1 is configuredto send Function Code 6, which by theModbus Protocol Specification onlysends 1 register of data (two bytes).However, the variable LReal1connected to the Starting Address 10takes up 4 registers. Consider changingit to a Function Code 16 (where theMessage Name, Connected VariableName, Starting Address and number ofregisters needed are yours)

The number of registers needed for theconnected variable is greater than one.

Double-click the error message in theComponent InfoView to go to the poorModbus Master Message. In theSummary View, select the HoldingRegister tab. Either change the datatype for the point on the Modbus pageso that it only takes up a single register,or change the Function Code to 16 topass the point over Modbus with itscurrent data type. If you change theFunction Code to 16, you must alsochange the Number of Registers toreflect the number of actual registersused for that data type, as indicated inthe error message.

ModbusMasterMessage1 is configuredto send a message with 2050 coils, butthe Maximum Number of Coils that canbe sent in any single Message is 2040.Please split this into multiple messages.

The Modbus protocol for the responseof a Function Code 1 (Read HoldingCoils) calls for 1 byte to specify thenumber of bytes of data to follow. Themaximum value for a single byte is 255.Each byte of data can contain values for8 coils. Therefore, the maximumnumber of coils that can be read is 255x 8 =2040.

Add another ModbusMasterMessageand read some of the values in the firstmessage, and the remaining valueswith the second message.

ModbusMasterMessage0 is configuredto send a message with 200 registers,but the Maximum Number of Registersthat can be sent in any single Messageis 127. Please split this into multiplemessages.

The Modbus protocol for the responseof a Function Code 3 (Read HoldingRegisters) calls for 1 byte to specify thenumber of bytes of data to follow. Themaximum value for a single byte is 255.There are two bytes of data for eachregister. Therefore, the maximumnumber of registers that can be read is255 / 2 =127.5, (127 whole registers).

Add another ModbusMasterMessageand read some of the values in the firstmessage, and the remaining valueswith the second message.

Instruction Guide GEI-100696E 25Public Information

Page 26: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

3 RuntimeThere are three ways to monitor the status of a configured Modbus.

• WorkstationST Status of Features window• WorkstationST additional status window• Detail Log

3.1 WorkstationST Status of FeaturesYou can access the WorkstationST Status of Features screen in one of two ways:

• From the Start menu, select All Programs, GE ControlST,WorkstationST, andWorkstationST StatusMonitor.

or

• From ToolboxST, open a WorkstationST component and click the Go On/Offline button. From the ComponentInfoView, select the Status tab of the WorkstationST running the configured Modbus feature.

The logic that drives the Error/Warning/OK status for the Modbus feature is as follows:

Errors

• Any current connection errors over Modbus• No connection with the OPC Server• Any current Checksum Errors• Any current Read Message Errors

□ Endian mismatch□ Unsupported function code or scrambled data in the receive buffer because of serial port parameter mismatches

26 GEI-100696E WorkstationST ModbusPublic Information

Page 27: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

Warnings

• Any current application errors• Any current slave exception responses• Any current invalid Slave ID errors (for example, a Slave receives a message from a Master for a Slave ID that is not

configured.)• A Master with current:

□ Read timeouts□ OPC Server write errors□ Skipped periodic messages□ Unbound variables□ Unhealthy variables□ Exceeded command limit□ Unsupported Function Code□ Trying to write to a read-only variable□ Data conversion error

Note If detail items listed under a Master occur in a Slave, the Slave sends back a Slave Exception Response, which triggersa WARNING status.

Instruction Guide GEI-100696E 27Public Information

Page 28: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

3.2 WorkstationSTAdditional Status➢➢ To view additional status information: From the Component InfoView Features column, right-click the

Modbus item and select View Additional Status Detail.

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

Once a steady state condition has been reached, it is recommended that you set the counters to zero to make it easier toidentify any subsequent conditions that occur.

The following information displays in the WorkstationST additional status window, and can be monitored at runtime.

28 GEI-100696E WorkstationST ModbusPublic Information

Page 29: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

Masters and Slaves Status Counters

Message Description

Modbus initially started at10/9/2007 2:06:24 PM.

The time that the program was last started. If WorkstationST Service is configured to startautomatically when the computer restarts, and the Modbus feature is enabled, that servicestarts the program. Otherwise, the WorkstationST Status Monitor can be used to stop andstart the Modbus feature.

Modbus last restarted at10/9/2007 3:02:13 PM. (Due toa download.)

When you download a new WorkstationSTconfiguration from ToolboxST, the Modbusprogram restarts, and the time of this restart is recorded. If nothing that affects the Modbusconfiguration changes, then Modbus does NOT restart, and an INFO message indicatingthis is added to the trace log file.

When Modbus restarts, it goes offline to allow enough time for the COM ports to bereleased before the new configuration tries to use them. If another component that Modbusconsumes is downloaded, the lists used to communicate with the OPC Server Modbus arestopped and restarted. This can cause unhealthy data, which generates a Slave ExceptionResponse if the Master asks for that data during this timeframe. Stopping and starting thelists 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 countersat 10/9/2007 3:02:13 PM.

Once a steady state condition is reached, it’s recommended that you set the counters tozero.

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. Aslong as the total count is non-zero, the Error Level displays Warning, indicating that at somepoint 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 ErrorLevel 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 andreceived.

Instruction Guide GEI-100696E 29Public Information

Page 30: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

Message Description

A Slave Manager is listeningon 3.29.17.149, Port 502 withNo Errors. There have been 3successful TCP connectionssince last Zeroed Counters.Currently there are 2 ActiveSlave Connections.

This lets you know that the program is actively listening for any Masters that might connectover Ethernet. The message also shows which IPAddress and Port the Master should usewhen trying to connect, and how many successful connections have occurred since thecounters were last set to zero. You can also see how many Ethernet Slave connections arecurrently running.

If a Master has disconnected and reconnected several times, it is possible that the totalnumber of connections is more than the current number of Slaves. (This number could alsobe zero if the counters were just set to zero.)

If a Slave connection does not receive any messages from the Master for a configuredamount of time (refer to the Slave Read Timeout property), it is shut down. The Slaveconnection corresponds to the Hardware Interface configured in the ToolboxSTapplication.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 usingtheir own Slave connection. This might be done to support a primary/backup redundantsetup. For example, 1.1.1.1 HW Interface has Slaves 1, 2, and 3 defined under it. OneMaster connects, which displays as one connection, although the Master can get data fromSlaves 1, 2, and 3. A second Master connects, which displays two connections. Thissecond Master can also get data from Slaves 1, 2, and 3.

Slave(s) on 3.29.17.149 aretalking to a Master on TCPRemote End Point3.29.17.191:1451

Since more than one Master can connect to a given Ethernet Slave Hardware Interface, thistells you which Master connection all Status Counters following this line correspond to. Ifanother Master connects using the same listening port (but still having its own connection)after the Status Counters display for the first connection, this status line is repeated for thesecond Master connection, followed by the Status Counters for the second connection.

Slave(s) on 3.29.17.149 have1036 Received, 1036 SentMessages Total.

This is the number of messages that have been received and sent since the Counters werelast set to zero. For Slaves, if the received amount is significantly higher than the sentamount, the Slave is having problems responding to messages received. Refer to theadditional error counters and the trace log file for information. If the Slave responds with aSlave Exception Response, it still counts as a message sent.

Slave(s) on 3.29.17.149 have0 Messages Received in thelast Second, 0.4 Averagemessages per second over thelast five seconds, 2 messagesper second Highwater Mark.

If Masters send too many messages too quickly, this counter allows a field engineer toreport the rate to the person responsible for the Master so that the configuration can bemodified.

Slave(s) on 3.29.17.149 have0 Current, 0 Total ConnectionErrors.

Possibly due to not being physically connected, having mismatched Hardware interfaceconfiguration parameters, or having the connection closed by another program. When aConnection error is received, Modbus closes the connection, waits the ReConnect Time(configuration parameter), and then attempts to reconnect. Refer to the trace log file formore information.

Slave(s) on 3.29.17.149 have0 Current, 0 Total ApplicationErrors. (An UnexpectedException that doesn't appearto be related to a connectionproblem.)

If an Application Exception occurs, the connection waits the ReStartCycle Time(configuration parameter) and then restarts the cycle. (The ReStartCycle Time prevents therestart from being caught in an infinite loop.) For a Master, restarting the cycle meansidentifying and sending out the next message. For a Slave, restarting the cycle meanslistening for the next message from a Master.

30 GEI-100696E WorkstationST ModbusPublic Information

Page 31: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

Message Description

Slave(s) on COM1 have 0Current, 3 Total ChecksumErrors.

When a Checksum error occurs, the Slave ignores the rest of the message, and waits toread the next message. No Slave Exception Response is returned. This only applies toSerial Hardware Interfaces.

Slave(s) on 3.29.17.149 have0 Current, 0 Total ReadTimeouts, where it waited 5minutes for a request.

For Slaves: The Slave has waited a configured amount of time (Slave Read Timeoutproperty) without receiving a request from a Master before marking this transport as readyto be shut down. This only applies to Ethernet Slaves; Serial Slaves do not have a timeout.

The program waits for any NEW connection from a Master, regardless of the time set here.

For Masters: The Master has waited a configured amount of time (Master Read Timeoutproperty) without receiving a response from a Slave before reading the next message.

Slave(s) on 3.29.17.149 have0 Current, 0 Total Invalid SlaveID Errors, where a Master senta message for a Slave ID thatisn’t configured.

No Slave Exception Response is returned, but the status on the WorkstationST StatusMonitor changes to Warning if this occurs. The Master configuration or the Slave ID mustbe modified. If the Slave ID is changed, the Build and Download commands must then beselected. Use the trace log file to identify the invalid Slave ID.

Slave(s) on 3.29.17.149 have0 Current, 0 Total SlaveException Responses thatwere sent.

Refer to the section, Exception Responses for more information about Slave ExceptionResponses. The count does not differentiate between different error codes.

Slave 1 on 3.29.17.149 has 0Current, 0 Total SendTimeouts, where it didn't getdata from the OPC Server in0.5 seconds so it sent a SlaveException Response to theMaster.

This is the length of time the Slave waited (configured in the Slave Send Timeout). TheSlave normally sends back a Slave Component Busy 06 Slave exception response to theMaster. However, if the NAK Code configuration parameter is set to 4, it returns a SlaveComponent Failure 04 Slave exception response to the Master.

Slave 1 on 3.29.17.149 HR has0 Current, 0 Total OPC ServerWrite Errors.

This Master/Slave tried to write values to the rest of the system through the OPC Serverand failed. A Slave then sent a Slave Component Failure 04 Slave Exception Response tothe 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 logfile to identify errors.

Slave 1 on 3.29.17.149 HR has0 Current, 0 Total OPC ServerConnection Errors.

This is a severe error. If the Modbus program cannot connect to the OPC server, it keepstrying to reconnect. It will not send messages over Modbus until connected. A Slave returnsa Slave Component Failure 04 Slave Exception Response to the Master if it cannot connectto 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 has0 Current, 0 Total Illegal DataAddress Errors. This erroroccurs when the Master asksfor an address for which novariable was configured.

The Slave returns an Illegal Data Address 02 Slave Exception Response to the Master. Ifthis error occurs, the person responsible for the Master needs to determine why a messageis expected at this location. Are there data type mismatches that caused signals to getshifted in the register map? Should a spare variable be added at this address? (Refer to thesection, Spare Values.) Use the trace log file to identify which variable has the error.

Instruction Guide GEI-100696E 31Public Information

Page 32: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

Message Description

Slave 1 on 3.29.17.149 HR has0 Current, 0 Total UnBoundVariable Errors.

The Slave returns an Illegal Data Address 02 Slave Exception Response to the Master.Normally, this occurs briefly when another component is downloaded, causing Modbus tostop and restart the lists to the OPC Server. However, if another component deleted avariable being used by Modbus and was then downloaded, this could continually occur. Inthat 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 theconfiguration, then select the Build and Download commands. Refer to the trace log file toidentify which variable has the error.

Slave 1 on 3.29.17.149 HR has0 Current, 0 Total UnHealthyVariable Errors.

The Slave returns a Slave Component Failure 04 Slave Exception Response to the Master.Normally this is only a momentary occurrence when another component gets downloaded,and Modbus stops and restarts the lists to the OPC Server. However, it also occurs if acomponent goes offline. Refer to the trace log file to identify which variable has the error.

Slave 1 on 3.29.17.149 HR has0 Current, 0 Total Read-OnlyVariable Errors. (This error iswhen it's asked to write to avariable that was configured asread-only.)

The Slave returns a Slave Component Failure 04 Slave Exception Response to the Master.Refer to the trace log file to identify which variable has the error, then determine if thevariable can be changed to Read/Write, or if another variable should be used. Modify yourconfiguration, then select the Build and Download commands. This error will not resolveitself.

Slave 1 on 3.29.17.149 HR has0 Current, 0 Total DataConversion Errors.

The Slave returns an Illegal Data Value 03 Slave Exception Response to the Master. Whena Master writes to a Slave, the Slave converts the Master value to an engineering value. Ifthe 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. (Anyother values in the write request will be written.) The OPC Server Write Errors counter alsoincreases. In this case, make changes to your data types, as required. When a Masterreads from a Slave, the Slave converts the engineering value to a Modbus value. If thecalculated Modbus value is outside the range of the Modbus data type, the value isclamped by the Modbus data type range. This clamping based on data types occurs even ifthe Clamp Value property is not set. The clamped value is returned to the Master. No SlaveException Response is returned. In this case, a Slave Exception Response indicates thatan unanticipated conversion problem exists. This could also occur if scrambled data wasreceived over Modbus. Use the trace log file to identify which variable has the error.

Slave 1 on 3.29.17.149 HR has0 Current, 0 Total Times thatthe Commands Per SecondLimit was reached.

The Command Limit (configuration property) limits the number of EGD CMP commandsthat any given register map writes to a controller to prevent the controller from beingoverloaded with requests. (For example, if the Holding Registers and the Holding Coilseach contain 10 signals that are on a controller EGD page, and the Master sendsmessages writing to all 20 signals every second, it's possible for 20 CMP messages to stillget sent to the controller.) The register does not buffer these change requests and sendthem at a slower rate, but instead discards any messages that exceed the limit. Even if thecommand limit is reached, other non-command values are sent. The Slave returns a SlaveComponent Failure 06 Slave Exception Response to the Master.

32 GEI-100696E WorkstationST ModbusPublic Information

Page 33: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

Message Description

Slave 1 on 3.29.17.149 HR has0 Current, 0 Total ModbusValues being clampedoccurrences.

If the Clamp Values (configuration property) is set to True, the value sent over Modbus isclamped between the RawMax and RawMin. The EngMax/EngMin and RawMax/RawMinare used to determine how to scale a value when writing to/reading from Modbus. However,if the actual Engineering value at runtime is greater than EngMax, or less than EngMin, avalue could be sent over Modbus that is greater than RawMax or less than RawMin. Somejobs may not find this desirable, but if the values are going to a computer that only supports12 bits of data, these limits must be enforced. Also, if the Modbus value is outside the rangeof the Modbus data type when an engineering value is converted to a Modbus value, theModbus value is clamped and the counter increases.

Slave 1 on 3.29.17.149 HR has0 Current, 0 Total Times that aValue has Not Changed so itwas Not Sent to a Controller

The Modbus program tries to reduce the number of unnecessary EGD commands andminimize the chance of reaching the command limit. This is done by comparing the currentvalue of a variable coming from another component, to the value received over Modbus. Ifthe value is the same, it is not sent, but this counter is increased by one. If the value isdifferent, and the command limit was not reached, a command is sent to that component.

Masters Messages

Master talking to COM1 has 0Current, 0 Total UnSupportedFunction Code Errors.

These could occur if either the Master tries to send, or receives a function code that itcannot handle.

Master talking to COM1 has 0Current, 0 Total SkippedPeriodic Modbus Messages.Message would be skippedwhen previously scheduledmessages haven’t completedbefore new messages arescheduled to be sent.

This normally occurs when:

Modbus connection is down

OPC Server connection is down

Too many messages were scheduled to be sent at the same time. In this case, modify yourconfiguration.

Instruction Guide GEI-100696E 33Public Information

Page 34: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

3.3 TracingModbus writes messages to a trace log file to help identify problems.

➢➢ To display the Modbus trace log file: From theWorkstationST Status of Features window, right-click theModbus feature and select Advanced, then View Detail Log to display the contents of the trace log file.

There are four message levels in the trace log file:

• Error• Warning• Info• Verbose

➢➢ To change the message level

1. FromWindows® Explorer, select C:, Program Files, GE Energy, andWorkstationST Features.

2. From theWorkstationST Features folder, use Notepad to open the GeCssModbus.exe.config file.

3. Change the ApplicationDefaultSwitch value. (The program automatically detects that the file has changed and startsusing the new level.) The values are:

1 - Errors

2 - Warnings and Errors

3 - Info, Warnings, and Errors

4 - Verbose, Info, Warnings, and Errors

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.

An example of an Error is when a Modbus Slave Exception Response is generated or received. An example of a Warningwould be a Master not receiving a response from a Slave before the Master Read Timeout. An example of an Info message issuccessfully opening a serial port.

34 GEI-100696E WorkstationST ModbusPublic Information

Page 35: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

3.4 Ethernet MessagesChange the message tracing level in the trace log file to Verbose to display raw data about message content. Byte or wordswapping has not yet occurred, if required. However, when a message displays, for example, beginning to read 6 bytes to getthe message body, byte swapping has already taken place. This determines that 6 bytes were expected for the message body.

Example:

2007-10-18 15:03:38.081 VERBOSE ModbusSlaveTcpTransport10/18/2007 5:34:32 AM.BeginRead: Slave at IPAddress172.20.100.151 beginning to read 6 bytes to get the message header.

2007-10-18 15:03:38.097 VERBOSE ModbusSlaveTcpTransport10/18/2007 5:34:32 AM.ReadCompleted: Slave at IPAddress 172.20.100.151 received Message Header 0, 0, 0, 0, 0, 6

The Message Header contents are as follows:

• The first two bytes are Transaction Identifier: 0, 0,

(The Slave returns what the Master sent it. The Master can use this to match the response with the correct request.)

• The second two bytes are the Protocol Identifier: 0, 0,

(These should always be value 0 for Modbus protocol.)

• The last two bytes are the message length: 0, 6

(There are 6 bytes for the message body that follow this header.)

Example:

2007-10-18 15:03:38.097 VERBOSE ModbusSlaveTcpTransport10/18/2007 5:34:32 AM.ReadCompleted: Slave at IPAddress 172.20.100.151 beginning to read 6 bytes to get the message body.

2007-10-18 15:03:38.097 VERBOSE ModbusSlaveTcpTransport10/18/2007 5:34:32 AM.ReadCompleted: Slave at IPAddress 172.20.100.151 Received Message Body 1, 3, 0, 9, 0, 5

The Message Body contents are as follows:

• The first byte is the Slave ID: 1,• The second byte is the Function Code: 3,

(Everything after this point in the message could be different for specific Function Codes. Refer to theModbus ProtocolQuick Reference table for details.)

• The next two bytes are the starting Address: 0, 9

(The address sent over Modbus is zero-based, even though the registers are one-based. This message starts reading at HoldingRegister 10.)

• The last two bytes are the number of registers to read: 0, 5

Instruction Guide GEI-100696E 35Public Information

Page 36: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

3.5 Serial MessagesSerial messages start by reading a 7-byte header. The program then displays, for example, beginning to read 8 bytes to get themessage body. This means that the entire message is 8 bytes. When reading serial trace messages, focus on the one that reads,Received Message Body followed by data, not Received Message Header followed by data.

Example:

2007-10-18 14:57:31.977 VERBOSE ModbusSlaveSerialTransport10/16/2007 11:53:19 AM. ReadCompleted: Slave onSerial Port COM1 beginning to read 8 bytes to get the message body.

2007-10-18 14:57:32.007 VERBOSE ModbusSlaveSerialTransport10/16/2007 11:53:19 AM.ReadCompleted: Slave on SerialPort COM1 Received Message Body 255, 4, 0, 0, 0, 13, 36, 17

The Message Body contents are as follows:

• The first byte is the Slave ID: 255• The second byte is the Function Code 4

The following is specific to Function Code 4

• The next two bytes are the starting Address: 0, 0,

Since the address sent over Modbus is zero-based, and the registers are one-based, this message starts reading at InputRegister 1.

• The next two bytes are the number of registers to read: 0, 13• The last two bytes are the CRC checksum: 36, 17

36 GEI-100696E WorkstationST ModbusPublic Information

Page 37: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

3.6 Modbus Protocol Quick Reference

Function Codes 1, 2, 3, and 4 Function Codes 5 and 6 Function Codes 15 and 16

Request:

Byte1; Slave Id

Byte 2; Function Code

Bytes 3 and 4; Starting Address

Bytes 5 and 6; Number of Registers

Request and Response followsame format:

Byte1; Slave Id

Byte 2; Function Code

Bytes 3 and 4; Address

Bytes 5 and 6; Value to be written

Request:

Byte1; Slave Id

Byte 2; function code

Bytes 3 and 4; starting address

Bytes 5 and 6; number of registers to bewritten

Response:

Byte1; Slave ID

Byte 2; Function Code

Bytes 3 and 4; Starting Address

Bytes 5 and 6; Number of Registers

Response:

Byte1; Slave ID

Byte 2; Function Code

Byte 3; Number of bytes of Data

Bytes 4 +; Data

Byte 7; number of bytes of data

Bytes 8+; Data

Response:

Byte1; Slave ID

Byte 2; Function Code

Byte 3 and 4; Starting Address

Bytes 5 and 6; number of registers to bewritten

3.7 Slave Exception Response Format

Byte 1 Slave ID

Byte 2 Originating Function Code with the most significant bit set to 1

Byte 3 Exception Code

Instruction Guide GEI-100696E 37Public Information

Page 38: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

3.8 Monitoring Live Values➢➢ To monitor live values: From theModbus tab select a Slave (such as Slave 1) and click the Go On/Offline button

to monitor live values on a Modbus page.

Note The value displayed is the value before it is scaled and/or clamped to send over Modbus.

38 GEI-100696E WorkstationST ModbusPublic Information

Page 39: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

4 TroubleshootingSymptom Problem Solution

The Master tries to talkto a Slave overEthernet and gets noanswer even thoughthe slave is runningand healthy

Could be an issue with Big Endian for MBAP (tcpHdr) being in the wrong state. To check, changeTracing to include Verbose, (Refer to the section,Tracing) and check messages to see how long theprogram thinks the message body length shouldbe. If the value is extremely high, it is probably anEndian issue.

Change the state (False to True or True toFalse) of the Big Endian for MBAP (tcp Hdr)property, then select the Build and Downloadcommands.

Data values for 2 and4 word variables arenot as expected

May need to swap words for 4 or 8- byte datatypes.

Try changing the state (False to True or Trueto False) of the Swap Words for xxx property(where xxx is the data type of the variablewith the problem), then select the Build andDownload commands.

4.1 Slave Exception Responses

SlaveExceptionCodes

When it occurs Solution

01 IllegalFunction

Master asks Slave toperform a function it does notsupport

1. If the Master is asking for a non-supported function code, the Masterconfiguration must be modified.

2. Verify that all communication properties match between the Master andSlave, since a scrambled message could be interpreted as anunsupported function code.

02 Illegal DataAddress

Master asks to Read/Write toa register where there is nota variable connected, or thevariable is unbound

Use the trace log file to identify which variable has the error and what theerror is.

If there was no variable at that address, the user who configured theMaster must determine why a response is expected at this location. Arethere data type mismatches that caused signals to get shifted in theregister map? Should a spare variable be added at this address? (Refer tothe section, Spare Values.)

If the variable was unbound, was it just a momentary occurrence whenanother component was being downloaded, so Modbus stopped/startedthe lists to the OPC Server? In this case, no action is needed. However, ifModbus was using a variable from another component, and the othercomponent deleted the variable and then was downloaded, this errorcontinually occurs. In that case, ask the component owner if anothervariable should be used. If not, the person responsible for the Master mustdelete this variable. (In either case, modify your configuration, then selectthe Build and Download commands.)

Instruction Guide GEI-100696E 39Public Information

Page 40: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

SlaveExceptionCodes

When it occurs Solution

03 Illegal DataValue

An exception occurs eitherwhen trying to convert anEngineering value to aModbus value, or vice versa.This conversion incorporatesapplying scale factors,clamps, and converting thedata type, if required.

When a Master writes to a Slave, the Slave converts the Master value toan engineering value. If the calculated engineering value is outside therange of the engineering value’s data type, that value is not sent, and aSlave Exception Response is returned to the Master. (Any other values inthe write request will be written.) You will also see the OPC Server WriteErrors counter increase. In this case, make changes to your data types, asrequired. When a Master reads from a Slave, the Slave converts theengineering value to a Modbus value. If the calculated Modbus value isoutside the range of the Modbus data type, the value is clamped by theModbus data type range. This clamping based on data types occurs evenif the Clamp Value property is not set. The clamped value is returned tothe Master. No Slave Exception Response is returned. In this case, aSlave Exception Response indicates that an unanticipated conversionproblem exists. This could also occur if scrambled data was received overModbus. Use the trace log file to identify which variable has the error.

04 SlaveComponentFailure

Any one of the followingconditions could cause thisexception:

Look at the trace log file to identify the cause of the Slave Exception.Based on the cause, take the appropriate action:

1. Master tries to read orwrite a signal that isunhealthy

1. This occurs briefly when another component is downloaded, andModbus stopped and restarted the lists to the OPC Server. However, itwould also occur if a component went offline.

2. Master tries to write to asignal that is read-only

2. Determine if the variable can be changed to Read/Write, or if perhapsanother variable should be used. Modify the configuration, then select theBuild and Download commands. This error will not resolve itself.

3. Modbus is not connectedto the OPC Server

3. This is a severe error. If Modbus can not connect to the OPC server, itkeeps 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 tothe OPC Server

4. Modbus tries to catch most causes of OPC Server Write errors (variableis Read-Only, unbound, or unhealthy, and such), in which case it will notincrease the OPC Server Write Error counter. Use both the Modbus andOPC Server trace log files to identify errors.

5. There was an ApplicationException

5. Use the Modbus trace log to identify errors.

06 SlaveComponentBusy

1. Master asks for data fromthe Slave, but the Slave doesnot get the data from theOPC Server before the SlaveSend Timeout times out.(Configure with NAK Code tosend 4 or 6 in this case.)

1. Verify that the OPC Server is running.

2. The command limit hasbeen reached.

2. Determine if this is due to the command limit being reached by viewingthe WorkstationSTadditional status window. If it is, determine

If the command limit can be raised without jeopardizing the controllers,and

If the rate at which the Master sends commands can be reduced

40 GEI-100696E WorkstationST ModbusPublic Information

Page 41: WorkstationST Modbus® Instruction Guide - GE.com · 2021. 5. 10. · 10 GEI-100696E WorkstationST Modbus Public Information. 4. From the Tree View, select the Slave you inserted

5 Glossary of TermsCoil A type of data structure (a 1-bit Modbus value)

Data Structure A method of storing data in a computer so that it can be used efficiently

Feature An element of the WorkstationST runtime system, which can be optionally enabled through ToolboxST. Examplesinclude OPC DA Server, Recorder, OPC AE Server and Alarm System.

OPC OLE for Process Control (OLE is Microsoft's Object Linking and Embedding) is a standard for data exchange in anindustrial environment. The OPC foundation provides specifications for various OPC standards such as OPC DA (DataAccess) and OPC AE (Alarm and Event).

OPC DA Server A core part of the WorkstationST product that conforms to the OPC Data Access Specification

Register A type of data structure (a 16-bit Modbus value)

Scaling The act of converting one value to another value, or the values (for example, slope and offset) used to perform thisconversion. In this program, an engineering value is converted before it is sent over Modbus, and a value read from Modbusis converted to an engineering value before being used in the system.

Slave Exception Responses Modbus protocol used by a slave to communicate to a Master when there is a problem.

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.

Public Information