Contents
GFK-2224Q January 2017 vii
8.3 Modbus Function Codes.......................................................................................................................... 138
Chapter 9 Modbus/TCP Client ................................................................................................................... 139
9.1 The Communications Request ............................................................................................................... 139
Structure of the Communications Request ................................................................................................140
COMMREQ Function Block ...................................................................................................................................140
COMMREQ Command Block................................................................................................................................140
Modbus/TCP Channel Commands ...................................................................................................................140
Status Data ..................................................................................................................................................................141
Operation of the Communications Request ...............................................................................................142
9.2 COMMREQ Function Block and Command Block ............................................................................... 143
The COMMREQ Function Block ..........................................................................................................................143
The COMMREQ Command Block ......................................................................................................................144
9.3 Modbus/TCP Channel Commands ........................................................................................................ 145
Open a Modbus/TCP Client Connection (3000) .........................................................................................145
Close a Modbus/TCP Client Connection (3001) .........................................................................................147
Read Data from a Modbus/TCP Device (3003) ..........................................................................................148
Write Data to a Modbus/TCP Device (3004)................................................................................................154
Mask Write Register Request to a Modbus Server Device (3009) ....................................................158
Read/Write Multiple Registers to/from a Modbus Server Device (3005) .....................................159
9.4 Status Data ............................................................................................................................................... 161
Types of Status Data ...............................................................................................................................................161
9.5 Controlling Communications in the Ladder Program ....................................................................... 162
Essential Elements of the Ladder Program .................................................................................................162
COMMREQ Ladder Logic Example ...................................................................................................................163
Troubleshooting a Ladder Program ................................................................................................................169
Monitoring the Communications Channel ..................................................................................................170
9.6 Differences between Series 90 and PACSystems Modbus/TCP Channels ..................................... 171
Chapter 10 OPC UA Server ........................................................................................................................... 173
10.1 Application Logic to Control the OPC UA Server ................................................................................ 174
OPC UA Server Service Request ........................................................................................................................174
OPC UA Server Subroutine ...................................................................................................................................182
Connect OPC UA Client to OPC UA Server....................................................................................................184
OPC UA Client Authentication Settings .........................................................................................................187
Anonymous Authentication.................................................................................................................................187
Username/Password Authentication .............................................................................................................188
OPC UA Security Settings ......................................................................................................................................190
OPC UA Address Space ..........................................................................................................................................190
Publish Application Variables to OPC UA Address Space ....................................................................191
OPC UA Server Information in Address Space...........................................................................................192
OPC UA Server – Application Information ....................................................................................................194