Device Interface Guide
FactoryLink 6.6.0 / September / 1998
000A*DOC-DIS*000*660
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
FactoryLink 6.6.0
•
•
•
•
©Copyright 1984 - 1998 United States Data Corporation. All rights reserved.
Portions ©Copyright 1996 AEG Schneider Automation, SA. All rights reserved.
- NOTICE The information contained herein is confidential information of United States Data Corporation, a Delaware corporation,
and is protected by United States copyright and trade secret law and international treaties. This document may refer to
United States Data Corporation as “USDATA.”
Information in this document is subject to change without notice and does not represent a commitment on the part of United
States Data Corporation (“USDATA”). Although the software programs described in this document (the “Software
Programs”) are intended to operate substantially in accordance with the descriptions herein, USDATA does not represent
or warrant that (a) the Software Programs will operate in any way other than in accordance with the most current operating
instructions available from USDATA, (b) the functions performed by the Software Programs will meet the user's
requirements or will operate in the combinations that may be selected for use by the user or any third person, (c) the
operation of the Software Programs will be error free in all circumstances, (d) any defect in a Software Program that is not
material with respect to the functionality thereof as set forth herein will be corrected, (e) the operation of a Software
Program will not be interrupted for short periods of time by reason of a defect therein or by reason of fault on the part of
USDATA, or (f) the Software Programs will achieve the results desired by the user or any third person.
U.S. GOVERNMENT RESTRICTED RIGHTS. The Software is provided with RESTRICTED RIGHTS. Use, duplication, or
disclosure by the government of the United States is subject to restrictions as set forth in subparagraph (c)(1)(ii) of The
Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 or in subparagraphs (c)(1) and (2) of the
Commercial Computer Software—Restricted Rights clause at 48 CFR 52.227-19, as applicable. Contractor/Manufacturer
is United States Data Corporation, 2435 North Central Expressway, Suite 100, Richardson, TX 75080-2722. To the extent
Customer transfers Software to any federal, state or local government agency, Customer shall take all acts necessary to
protect the rights of USDATA in Software, including without limitation all acts described in the regulations referenced above.
The Software Programs are furnished under a software license or other software agreement and may be used or copied
only in accordance with the terms of the applicable agreement. It is against the law to copy the software on any medium
except as specifically allowed in the applicable agreement. No part of this manual may be reproduced or transmitted in any
form or by any means, electronic or mechanical, including photocopying and recording, for any purpose without the
express written permission of USDATA.
Trademarks. USDATA and FactoryLink are registered trademarks of United States Data Corporation.
Open Software Bus is a registered trademark licensed to United States Data Corporation.
Modicon, Modbus, and Modbus Plus are registered trademarks of AEG Schneider Automation, Inc.
All other brand or product names are trademarks or registered trademarks of their respective holders.
•
•
•
•
Table of Contents
Device Interface Guide
Part I
External Device Interface
External Device Interface at a Glance . . . . . . . . . . . . . . . . . . . . . . . . 29
1
External Device Interface Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Communications Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Communicating with Multiple Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Communicating with Multiple Protocol Modules . . . . . . . . . . . . . . . . . . . . .
Device Topologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Serial Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DigiBoard Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Ethernet Board Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Combination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Components of a Communication Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Retrieving and Transferring Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Triggered Read Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Unsolicited Read Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Write Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Tag Naming Considerations for EDI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Triggering Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
How Shared Memory Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
How to Avoid Filling Up Shared Memory . . . . . . . . . . . . . . . . . . . . . . .
Configuration Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Triggered Read Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Unsolicited Read Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Write Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Triggering Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Optimization Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Cable Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
34
36
37
41
41
42
42
43
45
49
49
50
51
53
54
55
58
59
59
60
60
61
62
64
FactoryLink 6.6.0 / Device Interface Guide / 3
•
•
Device Interface Guide
•
•
2
Tag Definition Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3
Setting Operating System Parameters . . . . . . . . . . . . . . . . . . . . . . . 67
Windows NT Ethernet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OS/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OS/2 Ethernet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Defining Serial Communication Ports as Device Files . . . . . . . . . . . . . .
Linking Device Files to EDI Physical Port Numbers . . . . . . . . . . . . . . .
Increasing the Number of Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
UNIX Ethernet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Defining Ethernet Communication Adapters . . . . . . . . . . . . . . . . . . . . .
Linking Special Device Files to Select Ethernet Adapter . . . . . . . . . . . .
Digital UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
Setting Up Serial Communications . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Electrical Interface Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RS-232 Mechanical Interface Standard Reference . . . . . . . . . . . . . . . . . . . . .
Cable Description and Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Worksheet for Cable Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
68
69
69
70
70
70
71
72
72
72
73
76
77
79
80
Configuring Communication Paths . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Identifying Protocol Types and Defining Logical Ports . . . . . . . . . . . . . . . . . 84
Completing the Logical Station Worksheet . . . . . . . . . . . . . . . . . . . . . . . 85
Creating the Logical Port Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Sample External Device Definition Table Entries . . . . . . . . . . . . . . . . . 90
Creating Logical Station Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Modicon Modbus Plus Logical Station Table . . . . . . . . . . . . . . . . . . . . . 96
Sample Logical Station Table Entries . . . . . . . . . . . . . . . . . . . . . . . . . 101
Table Entries for Sample Worksheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
6
Reading Data from a Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Triggered Read Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Unsolicited Read Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Defining the Table Type and Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Triggered Read Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4 / FactoryLink 6.6.0 / Device Interface Guide
106
107
108
109
Device Interface Guide
Unsolicited Read Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Combination Read Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Specifying What to Read and Where to Store It . . . . . . . . . . . . . . . . . . . . . . 114
Read Holding or Input Register, Store in Analog Element . . . . . . . . . . 118
Read Holding or Input Register, Store in Digital Element . . . . . . . . . . 120
Read Holding Register, Store in Floating-Point or Long Analog Element 122
Read Holding Register, Store in Message Element . . . . . . . . . . . . . . . . 124
Read Coil or Input Status Register, Store in Digital Element . . . . . . . 126
Read Memory Register, Store in Analog Element . . . . . . . . . . . . . . . . . 128
Read Statistics Word, Store in Analog Element . . . . . . . . . . . . . . . . . . 130
Read Global Data Word, Store in Analog Element . . . . . . . . . . . . . . . . 132
Sample Read Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Sample Triggered Read Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Sample Unsolicited Read Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
7
Writing Data to a Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Block Write Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Exception Write Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Defining the Table Type and Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Block Write Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Exception Write Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Combination Write Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Specifying What to Write and Where to Write It . . . . . . . . . . . . . . . . . . . . . 149
Write Analog Element Value to Holding Register . . . . . . . . . . . . . . . . . 153
Write Digital Element Value to Holding Register . . . . . . . . . . . . . . . . . 155
Set Bits in Holding Register Using Mask Write . . . . . . . . . . . . . . . . . . 157
Write Floating-Point or Long Analog Element Value to Holding Register 159
Write Message Element Value to Holding Register . . . . . . . . . . . . . . . . 161
Write Digital Element Value to Coil Register . . . . . . . . . . . . . . . . . . . . 163
Write Analog Element Value to Memory Register . . . . . . . . . . . . . . . . . 165
Write Analog Element Value to Global Data Word . . . . . . . . . . . . . . . . 167
Sample Write Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Sample Triggered Block Write Request . . . . . . . . . . . . . . . . . . . . . . . . . 169
Sample Exception Write Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Sample Combination Write Request . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
FactoryLink 6.6.0 / Device Interface Guide / 5
•
•
Device Interface Guide
•
•
8
Application Design Tips and Techniques . . . . . . . . . . . . . . . . . . . . 179
Grouping of Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Processing Differences in Read and Write Operations . . . . . . . . . . . . . . . .
Processing of Read Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Processing of Write Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Read and Write Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Specifying Priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Overtriggering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Efficient Triggering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Timed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Cascaded . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Self-Triggered . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9
Testing and Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
EDI Flowcharts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Basic Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Common Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Testing Your Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Verifying Proper Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
194
195
196
197
198
Messages and Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Message Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EDI Run-Time Manager Line Format . . . . . . . . . . . . . . . . . . . . . . . . .
Tag Message Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EDI Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Startup Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
180
182
182
184
185
187
188
188
188
189
191
202
202
203
204
205
210
Allen-Bradley . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Configuring the Logical Station Control Panel . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Information Panel . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Information Panel . . . . . . . . . . . . . . . . . . . . .
Allen-Bradley Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Conversion of Data Types for Read Operations . . . . . . . . . . . . . . . . . . . . . .
6 / FactoryLink 6.6.0 / Device Interface Guide
212
216
218
226
229
230
Device Interface Guide
Digital Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Analog Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Floating-Point Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Longana Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Message Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Conversion of Elements for Write Operations . . . . . . . . . . . . . . . . . . . . . . .
Digital Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Analog Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Floating-Point Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Longana Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Message Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Allen-Bradley Address Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PLC-2 Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PLC-3 Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Examples (Symbolic File Addressing) . . . . . . . . . . . . . . . . . . . . . . . . .
PLC-5 Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PLC 5-250 Native Mode Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Allen-Bradley Switch Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1770-KF2 Series B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1771-KA2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1771-KE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1771-KG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1785-KA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Run-Time Application Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Single-Digit Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Double-Digit Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
230
230
231
232
233
234
234
234
235
236
237
238
238
239
243
244
246
249
249
249
249
250
250
251
251
252
General Electric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Configuring the Logical Station Control Panel . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Information Panel . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Information Panel . . . . . . . . . . . . . . . . . . . . . .
Run-Time Application Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ER:xxxx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Single-Digit Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Double-Digit Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
256
259
262
269
273
273
274
275
FactoryLink 6.6.0 / Device Interface Guide / 7
•
•
Device Interface Guide
•
•
13
General Purpose Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Application Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Capabilities, Limitations, and Trade-Offs . . . . . . . . . . . . . . . . . . . . . . . . . .
Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Trade-Offs and Compromises in Design . . . . . . . . . . . . . . . . . . . . . . . .
Accessing the Configuration Panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Control Panel . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Information Panel . . . . . . . . . . . . . . . . . . .
GPI Command/Response Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Command Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Response Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Command/Response Control Panel . . . . . . . . . . . . . . . . . .
Configuring the Command/Response Information Panel . . . . . . . . . . . . . .
Flexibility and Design of the GPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Formatting an Outgoing Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Format and Sources of Information in the Outgoing Message . . . . . . .
Sample Information Panel for a Command Table . . . . . . . . . . . . . . . .
Debugging Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Status/Debug Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RAW VALUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
STAT_TAG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Summary of Basic Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
GPI Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Principles of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Defining the Outgoing Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Formatting the Incoming Response . . . . . . . . . . . . . . . . . . . . . . . . . . .
Associating an Outgoing Message with an Incoming Response . . . . . .
Specifying Methods to Detect an End-of-Response . . . . . . . . . . . . . . . .
Non-Printable or “Don’t Care” Characters . . . . . . . . . . . . . . . . . . . . . .
Initiating a Transmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Putting the Protocol Module in Unsolicited Mode . . . . . . . . . . . . . . . .
Reporting Message Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Converting a Field’s Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Process Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Associating a Digital Element to a Bit . . . . . . . . . . . . . . . . . . . . . . . . .
Determining the Sources of Field Values . . . . . . . . . . . . . . . . . . . . . . .
8 / FactoryLink 6.6.0 / Device Interface Guide
278
279
279
279
279
280
281
285
287
288
288
289
293
301
302
302
304
306
306
306
306
307
309
309
309
312
313
315
316
317
317
318
319
320
320
321
Device Interface Guide
Modifying a Previously Defined Field . . . . . . . . . . . . . . . . . . . . . . . . .
GPI Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuration Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Command/Response Information Panel Entries . . . . . . . . . . . . . . . . .
Defining the Outgoing Message to the GPI . . . . . . . . . . . . . . . . . . . . . .
Defining Response Termination and Status Elements . . . . . . . . . . . . .
Defining the Incoming Response to the GPI . . . . . . . . . . . . . . . . . . . . .
Using Process Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Process Functions Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Conversion Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Response Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Command Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Network Response Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Network Command Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Run-Time Application Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
GPI Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
Modicon Modbus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
Configuring the Logical Station Control Panel . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Information Panel . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Information Panel . . . . . . . . . . . . . . . . . . . . . .
Run-Time Application Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Run-Time Manager Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
In Message Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
322
323
323
324
334
336
337
338
338
341
344
344
346
348
350
352
352
360
362
364
371
376
376
378
Modicon Modbus Plus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
Configuring the Logical Station Control Panel . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Information Panel . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Information Panel . . . . . . . . . . . . . . . . . . . . . .
Modbus Plus Cable Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Run-Time Application Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Run-Time Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
382
384
387
394
401
402
403
FactoryLink 6.6.0 / Device Interface Guide / 9
•
•
Device Interface Guide
•
•
16
OMRON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
Configuring the Logical Station Control Panel . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Information Panel . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Information Panel . . . . . . . . . . . . . . . . . . . . . .
Technical Notes: Monitor Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OMRON Data Types and PLC Data Areas . . . . . . . . . . . . . . . . . . . . . . . . . .
Run-Time Application Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OMRON Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17
Siemens CP525 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
Configuring the Logical Station Control Panel . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Information Panel . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Information Panel . . . . . . . . . . . . . . . . . . . . . .
Siemens CP525 Switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Siemens CP525 Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Run-Time Application Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
18
408
411
414
421
425
426
427
428
436
439
441
448
452
453
456
Siemens H1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
Siemens H1 Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Types of Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Defining a TSAP Pair . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TSAP IDs and ASCII Equivalents . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Accessing the Siemens H1 Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Control Panel . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Information Panel . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Information Panel . . . . . . . . . . . . . . . . . . . . . .
Logical Station Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Activate/Deactivate Station Command . . . . . . . . . . . . . . . . . . . . . . . .
Set Remote Parameters Command . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Set Logical Station Variables Command . . . . . . . . . . . . . . . . . . . . . . .
Cable Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Thick Net Bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Thin Net Bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10 / FactoryLink 6.6.0 / Device Interface Guide
459
459
461
462
463
464
468
473
481
492
492
493
500
505
505
506
Device Interface Guide
Siemens H1 Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Siemens H1 Adapter Display Utility (H1MPDISP) . . . . . . . . . . . . . . . . . . .
Run-Time Application Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Run-Time Logical Station Command Error Codes . . . . . . . . . . . . . . . .
19
Square D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
Configuring the Logical Station Control Panel . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Information Panel . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Information Panel . . . . . . . . . . . . . . . . . . . . .
Cable Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Run-Time Application Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SQRD8023 Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SQRDRCOM and SQRDSCOM Messages . . . . . . . . . . . . . . . . . . . . . .
SQRDRCOM, SQRDSCOM and SQRDENET Messages . . . . . . . . . . .
20
507
511
512
514
518
522
525
533
536
537
537
538
539
Texas Instruments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543
Texas Instruments Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DIP Switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Baud Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DIP Switches for TIWAY NIM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Accessing the Texas Instruments Tables . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Unilink Setup Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Control Panel . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Information Panel . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Information Panel . . . . . . . . . . . . . . . . . . . . . .
Loop Indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring Tables for Loop Indexing . . . . . . . . . . . . . . . . . . . . . . . . .
Additional Parameters for TI Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . .
DCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LRDS, LRRC, LRST, and LSDB . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Computations for 5TI Sequencer Ladder Logic Code . . . . . . . . . . . . . . . . . .
Diagram A: Bit Layout for 16-bit Sequencer Word . . . . . . . . . . . . . . . .
Diagram B: Binary Weight Tables for Bits 10-15 . . . . . . . . . . . . . . . . .
544
544
546
547
548
549
550
554
557
560
567
574
574
584
584
585
587
587
588
FactoryLink 6.6.0 / Device Interface Guide / 11
•
•
Device Interface Guide
•
•
Diagram C: Sample Computations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588
Run-Time Application Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589
Decoding ER: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589
Case 1: EDI Task or Protocol Module Errors . . . . . . . . . . . . . . . . . . . . 589
Case 2: TIWAY Serial Unilink Network or Point-to-Point TI PLC Errors 592
Texas Instruments Message Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . 600
Part II
KTDTL and NetDTL
KTDTL and NetDTL at a Glance . . . . . . . . . . . . . . . . . . . . . . . . . . . 611
21
KTDTL and NetDTL Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613
Offlink Addressing Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616
KTDTL Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619
NetDTL Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622
22
Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625
Configuring the System Configuration Table . . . . . . . . . . . . . . . . . . . . . . . . 626
Optimizing Task Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631
23
Configuring Communication Paths . . . . . . . . . . . . . . . . . . . . . . . . . 633
Logical Station Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating Logical Station Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Logical Station Table Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Path and Address Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Logical Station Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24
635
637
655
658
664
Reading and Writing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669
Reading Data from a Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Writing Data to a Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuration Tips and Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Verifying Proper Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Choosing Operation Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Choosing Effective Triggering Schemes . . . . . . . . . . . . . . . . . . . . . . . .
Configuring Read and Write Tables . . . . . . . . . . . . . . . . . . . . . . . . . . .
12 / FactoryLink 6.6.0 / Device Interface Guide
670
673
676
676
678
680
680
Device Interface Guide
Configuring Triggered Read, Block Write, or Exception Write . . . . . . . . . .
Filling Out the Read/Write Control Panel . . . . . . . . . . . . . . . . . . . . . .
Filling Out the Read/Write Information Panel . . . . . . . . . . . . . . . . . .
Configuring an Unsolicited Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Unsolicited Read Operation Concepts . . . . . . . . . . . . . . . . . . . . . . . . .
Filling Out the Unsolicited Read Control Panel . . . . . . . . . . . . . . . . . .
Filling Out the Unsolicited Read Information Panel . . . . . . . . . . . . . .
Sample Read and Write Table Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Triggered Read Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Unsolicited Read Request . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Block Write Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Exception Write Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Techniques for Improving Communication Performance . . . . . . . . . . . . . . .
Specifying Priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Overtriggering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Efficient Triggering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25
683
683
692
694
694
701
702
704
704
706
707
710
712
712
713
713
Allen-Bradley Data Types and Addresses . . . . . . . . . . . . . . . . . . . 719
Supported Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Address Specification Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PLC-2 Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PLC-3, PLC-5, and PLC-5/250 Format . . . . . . . . . . . . . . . . . . . . . . . .
PLC-3 File Type Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
File Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Subelements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PLC-5 File Type Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
File Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Subelements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PLC-5/250 File Type Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
File Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Subelements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SLC 500 File Type Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
File Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Subelements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
720
723
723
724
725
725
726
727
727
728
734
734
735
741
741
742
FactoryLink 6.6.0 / Device Interface Guide / 13
•
•
Device Interface Guide
•
•
26
Messages and Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 745
Status Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Allen-Bradley Return Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
746
746
746
747
747
748
749
750
Part III
Telemecanique
27
Telemecanique PLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 755
PLC Interface Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Principles of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuration Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
External Device Definition Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
28
755
755
757
759
Telemecanique Configuration Tables . . . . . . . . . . . . . . . . . . . . . . . 763
Configuring the External Device Definition Table . . . . . . . . . . . . . . . . . . . . 764
Telemecanique Logical Station Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765
Telemecanique Read/Write Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772
29
System Configuration Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781
30
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785
Connecting to XWAY Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring Telemecanique Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Slaves and the TW7 Data Fields . . . . . . . . . . . . . . . . . . . .
First and Last Slave Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TW7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Network Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FactoryLink and TSX/PMX PLC Data Objects . . . . . . . . . . . . . . . . . . . . . .
Data Type Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Conversion Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14 / FactoryLink 6.6.0 / Device Interface Guide
785
786
787
787
790
791
794
794
795
Telemecanique PLC Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796
Unsolicited Data Configuration Example . . . . . . . . . . . . . . . . . . . . . . . . . . 804
Telemecanique Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 815
FactoryLink 6.6.0 / Device Interface Guide / 15
Table of Contents
31
•
•
•
•
16 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Part I
External Device
Interface
17
•
•
•
Table of Contents
•
External Device Interface in the Device Interface External Device Interface in this book
Guide
External Device
Interface
Part I
External Device Interface
External Device Interface Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Communications Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Communicating with Multiple Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Communicating with Multiple Protocol Modules . . . . . . . . . . . . . . . . . . . . .
Device Topologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Serial Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DigiBoard Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Ethernet Board Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Combination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Components of a Communication Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Retrieving and Transferring Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Triggered Read Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Unsolicited Read Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Write Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Tag Naming Considerations for EDI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Triggering Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
How Shared Memory Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
How to Avoid Filling Up Shared Memory . . . . . . . . . . . . . . . . . . . . . . .
Configuration Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Triggered Read Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Unsolicited Read Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Write Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Triggering Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Optimization Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Cable Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
34
36
37
41
41
42
42
43
45
49
49
50
51
53
54
55
58
59
59
60
60
61
62
64
FactoryLink 6.6.0 / Device Interface Guide / 19
•
•
External Device Interface
•
•
2
Tag Definition Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3
Setting Operating System Parameters . . . . . . . . . . . . . . . . . . . . . . . 67
Windows NT Ethernet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OS/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OS/2 Ethernet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Defining Serial Communication Ports as Device Files . . . . . . . . . . . . . .
Linking Device Files to EDI Physical Port Numbers . . . . . . . . . . . . . . .
Increasing the Number of Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
UNIX Ethernet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Defining Ethernet Communication Adapters . . . . . . . . . . . . . . . . . . . . .
Linking Special Device Files to Select Ethernet Adapter . . . . . . . . . . . .
Digital UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
Setting Up Serial Communications . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Electrical Interface Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RS-232 Mechanical Interface Standard Reference . . . . . . . . . . . . . . . . . . . . .
Cable Description and Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Worksheet for Cable Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
68
69
69
70
70
70
71
72
72
72
73
76
77
79
80
Configuring Communication Paths . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Identifying Protocol Types and Defining Logical Ports . . . . . . . . . . . . . . . . . 84
Completing the Logical Station Worksheet . . . . . . . . . . . . . . . . . . . . . . . 85
Creating the Logical Port Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Sample External Device Definition Table Entries . . . . . . . . . . . . . . . . . 90
Creating Logical Station Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Modicon Modbus Plus Logical Station Table . . . . . . . . . . . . . . . . . . . . . 96
Sample Logical Station Table Entries . . . . . . . . . . . . . . . . . . . . . . . . . 101
Table Entries for Sample Worksheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
20 / FactoryLink 6.6.0 / Device Interface Guide
Device Interface Guide
6
Reading Data from a Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Triggered Read Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Unsolicited Read Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Defining the Table Type and Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Triggered Read Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Unsolicited Read Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Combination Read Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Specifying What to Read and Where to Store It . . . . . . . . . . . . . . . . . . . . . .
Read Holding or Input Register, Store in Analog Element . . . . . . . . . .
Read Holding or Input Register, Store in Digital Element . . . . . . . . . .
Read Holding Register, Store in Floating-Point or
Long Analog Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Read Holding Register, Store in Message Element . . . . . . . . . . . . . . . .
Read Coil or Input Status Register, Store in Digital Element . . . . . . .
Read Memory Register, Store in Analog Element . . . . . . . . . . . . . . . . .
Read Statistics Word, Store in Analog Element . . . . . . . . . . . . . . . . . .
Read Global Data Word, Store in Analog Element . . . . . . . . . . . . . . . .
Sample Read Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Triggered Read Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Unsolicited Read Request . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
106
107
108
109
112
113
114
118
120
122
124
126
128
130
132
134
134
137
Writing Data to a Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Block Write Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exception Write Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Defining the Table Type and Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Block Write Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exception Write Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Combination Write Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Specifying What to Write and Where to Write It . . . . . . . . . . . . . . . . . . . . .
Write Analog Element Value to Holding Register . . . . . . . . . . . . . . . . .
Write Digital Element Value to Holding Register . . . . . . . . . . . . . . . . .
Set Bits in Holding Register Using Mask Write . . . . . . . . . . . . . . . . . .
Write Floating-Point or Long Analog Element Value
to Holding Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Write Message Element Value to Holding Register . . . . . . . . . . . . . . . .
Write Digital Element Value to Coil Register . . . . . . . . . . . . . . . . . . . .
140
141
142
143
146
148
149
153
155
157
159
161
163
FactoryLink 6.6.0 / Device Interface Guide / 21
•
•
External Device Interface
•
•
Write Analog Element Value to Memory Register . . . . . . . . . . . . . . . . .
Write Analog Element Value to Global Data Word . . . . . . . . . . . . . . . .
Sample Write Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Triggered Block Write Request . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Exception Write Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Combination Write Request . . . . . . . . . . . . . . . . . . . . . . . . . . .
8
Application Design Tips and Techniques . . . . . . . . . . . . . . . . . . . . 179
Grouping of Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Processing Differences in Read and Write Operations . . . . . . . . . . . . . . . .
Processing of Read Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Processing of Write Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Read and Write Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Specifying Priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Overtriggering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Efficient Triggering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Timed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Cascaded . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Self-Triggered . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9
180
182
182
184
185
187
188
188
188
189
191
Testing and Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
EDI Flowcharts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Basic Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Common Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Testing Your Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Verifying Proper Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
165
167
169
169
172
175
194
195
196
197
198
Messages and Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Message Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EDI Run-Time Manager Line Format . . . . . . . . . . . . . . . . . . . . . . . . .
Tag Message Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EDI Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Startup Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
22 / FactoryLink 6.6.0 / Device Interface Guide
202
202
203
204
205
210
Device Interface Guide
11
Allen-Bradley . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Configuring the Logical Station Control Panel . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Information Panel . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Information Panel . . . . . . . . . . . . . . . . . . . . . .
Allen-Bradley Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Conversion of Data Types for Read Operations . . . . . . . . . . . . . . . . . . . . . .
Digital Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Analog Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Floating-Point Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Longana Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Message Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Conversion of Elements for Write Operations . . . . . . . . . . . . . . . . . . . . . . .
Digital Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Analog Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Floating-Point Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Longana Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Message Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Allen-Bradley Address Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PLC-2 Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PLC-3 Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Examples (Symbolic File Addressing) . . . . . . . . . . . . . . . . . . . . . . . . .
PLC-5 Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PLC 5-250 Native Mode Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Allen-Bradley Switch Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1770-KF2 Series B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1771-KA2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1771-KE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1771-KG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1785-KA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Run-Time Application Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Single-Digit Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Double-Digit Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
212
216
218
226
229
230
230
230
231
232
233
234
234
234
235
236
237
238
238
239
243
244
246
249
249
249
249
250
250
251
251
252
FactoryLink 6.6.0 / Device Interface Guide / 23
•
•
External Device Interface
•
•
12
General Electric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Configuring the Logical Station Control Panel . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Information Panel . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Information Panel . . . . . . . . . . . . . . . . . . . . . .
Run-Time Application Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ER:xxxx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Single-Digit Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Double-Digit Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
256
259
262
269
273
273
274
275
General Purpose Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Application Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Capabilities, Limitations, and Trade-Offs . . . . . . . . . . . . . . . . . . . . . . . . . .
Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Trade-Offs and Compromises in Design . . . . . . . . . . . . . . . . . . . . . . . .
Accessing the Configuration Panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Control Panel . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Information Panel . . . . . . . . . . . . . . . . . . .
GPI Command/Response Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Command Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Response Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Command/Response Control Panel . . . . . . . . . . . . . . . . . .
Configuring the Command/Response Information Panel . . . . . . . . . . . . . .
Flexibility and Design of the GPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Formatting an Outgoing Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Format and Sources of Information in the Outgoing Message . . . . . . .
Sample Information Panel for a Command Table . . . . . . . . . . . . . . . .
Debugging Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Status/Debug Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RAW VALUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
STAT_TAG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Summary of Basic Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
GPI Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Principles of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Defining the Outgoing Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24 / FactoryLink 6.6.0 / Device Interface Guide
278
279
279
279
279
280
281
285
287
288
288
289
293
301
302
302
304
306
306
306
306
307
309
309
309
Device Interface Guide
Formatting the Incoming Response . . . . . . . . . . . . . . . . . . . . . . . . . . .
Associating an Outgoing Message with an Incoming Response . . . . . .
Specifying Methods to Detect an End-of-Response . . . . . . . . . . . . . . . .
Non-Printable or “Don’t Care” Characters . . . . . . . . . . . . . . . . . . . . . .
Initiating a Transmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Putting the Protocol Module in Unsolicited Mode . . . . . . . . . . . . . . . .
Reporting Message Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Converting a Field’s Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Process Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Associating a Digital Element to a Bit . . . . . . . . . . . . . . . . . . . . . . . . .
Determining the Sources of Field Values . . . . . . . . . . . . . . . . . . . . . . .
Modifying a Previously Defined Field . . . . . . . . . . . . . . . . . . . . . . . . .
GPI Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuration Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Command/Response Information Panel Entries . . . . . . . . . . . . . . . . .
Defining the Outgoing Message to the GPI . . . . . . . . . . . . . . . . . . . . . .
Defining Response Termination and Status Elements . . . . . . . . . . . . .
Defining the Incoming Response to the GPI . . . . . . . . . . . . . . . . . . . . .
Using Process Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Process Functions Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Conversion Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Response Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Command Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Network Response Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Network Command Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Run-Time Application Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
GPI Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
312
313
315
316
317
317
318
319
320
320
321
322
323
323
324
334
336
337
338
338
341
344
344
346
348
350
352
352
Modicon Modbus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
Configuring the Logical Station Control Panel . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Information Panel . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Information Panel . . . . . . . . . . . . . . . . . . . . . .
Run-Time Application Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Run-Time Manager Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
In Message Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
360
362
364
371
376
376
378
FactoryLink 6.6.0 / Device Interface Guide / 25
•
•
External Device Interface
•
•
15
Modicon Modbus Plus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
Configuring the Logical Station Control Panel . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Information Panel . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Information Panel . . . . . . . . . . . . . . . . . . . . . .
Modbus Plus Cable Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Run-Time Application Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Run-Time Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16
OMRON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
Configuring the Logical Station Control Panel . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Information Panel . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Information Panel . . . . . . . . . . . . . . . . . . . . . .
Technical Notes: Monitor Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OMRON Data Types and PLC Data Areas . . . . . . . . . . . . . . . . . . . . . . . . . .
Run-Time Application Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OMRON Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17
382
384
387
394
401
402
403
408
411
414
421
425
426
427
428
Siemens CP525 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
Configuring the Logical Station Control Panel . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Information Panel . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Information Panel . . . . . . . . . . . . . . . . . . . . . .
Siemens CP525 Switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Siemens CP525 Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Run-Time Application Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
26 / FactoryLink 6.6.0 / Device Interface Guide
436
439
441
448
452
453
456
Device Interface Guide
18
Siemens H1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
Siemens H1 Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Types of Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Defining a TSAP Pair . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TSAP IDs and ASCII Equivalents . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Accessing the Siemens H1 Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Control Panel . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Information Panel . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Information Panel . . . . . . . . . . . . . . . . . . . . . .
Logical Station Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Activate/Deactivate Station Command . . . . . . . . . . . . . . . . . . . . . . . .
Set Remote Parameters Command . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Set Logical Station Variables Command . . . . . . . . . . . . . . . . . . . . . . .
Cable Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Thick Net Bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Thin Net Bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Siemens H1 Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Siemens H1 Adapter Display Utility (H1MPDISP) . . . . . . . . . . . . . . . . . . .
Run-Time Application Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Run-Time Logical Station Command Error Codes . . . . . . . . . . . . . . . .
19
459
459
461
462
463
464
468
473
481
492
492
493
500
505
505
506
507
511
512
514
Square D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
Configuring the Logical Station Control Panel . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Information Panel . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Information Panel . . . . . . . . . . . . . . . . . . . . . .
Cable Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Run-Time Application Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SQRD8023 Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SQRDRCOM and SQRDSCOM Messages . . . . . . . . . . . . . . . . . . . . . .
SQRDRCOM, SQRDSCOM and SQRDENET Messages . . . . . . . . . . .
518
522
525
533
536
537
537
538
539
FactoryLink 6.6.0 / Device Interface Guide / 27
•
•
External Device Interface
•
•
20
Texas Instruments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541
Texas Instruments Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DIP Switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Baud Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DIP Switches for TIWAY NIM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Accessing the Texas Instruments Tables . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Unilink Setup Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Control Panel . . . . . . . . . . . . . . . . . . . . . .
Configuring the Logical Station Information Panel . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Read/Write Information Panel . . . . . . . . . . . . . . . . . . . . . .
Loop Indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring Tables for Loop Indexing . . . . . . . . . . . . . . . . . . . . . . . . .
Additional Parameters for TI Data Types . . . . . . . . . . . . . . . . . . . . . . . . . .
DCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LRDS, LRRC, LRST, and LSDB . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Computations for 5TI Sequencer Ladder Logic Code . . . . . . . . . . . . . . . . . .
Diagram A: Bit Layout for 16-bit Sequencer Word . . . . . . . . . . . . . . . .
Diagram B: Binary Weight Tables for Bits 10-15 . . . . . . . . . . . . . . . . .
Diagram C: Sample Computations . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Run-Time Application Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Decoding ER: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Case 1: EDI Task or Protocol Module Errors . . . . . . . . . . . . . . . . . . . .
Case 2: TIWAY Serial Unilink Network or Point-to-Point
TI PLC Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Texas Instruments Message Strings . . . . . . . . . . . . . . . . . . . . . . . . . . .
28 / FactoryLink 6.6.0 / Device Interface Guide
542
542
544
545
546
547
548
552
555
558
565
572
572
582
582
583
585
585
586
586
587
587
587
590
598
•
•
•
•
External Device
Interface at a Glance
Configuring EDI
For details on performing the following steps...
Go to...
1. Read about the concepts you will need to
understand to configure device communications
with FactoryLink using the External Device
Interface (EDI) task.
Chapter 1, “External
Device Interface
Overview”
2. Install the FactoryLink ECS software and the
device protocol module software if they are not
already installed.
FactoryLink 6.6.0
Installation Guide
3. Verify your computer system is correctly set up.
Windows NT and Windows 95—No setup is
required.
Windows NT Ethernet—(Siemens H1 and
Square D only.) Add the DLC Protocol to the
network.
OS/2—Use IBM’s OS/2 Selective Install utility
provided with OS/2, and verify the device protocol
parameter in the CONFIG.SYS file is correctly
set.
OS/2 Ethernet—(Siemens H1 and Square D
only.) Install IBM’s Multi-Protocol Transport
Services (MPTS) option.
UNIX—Define the serial communication ports as
device files and link these files to EDI physical
port numbers. Also, if more than eight ports will
be used, you need to set up Digital UNIX
accordingly.
UNIX Ethernet—(Siemens H1 and Square D
only.) Define the Ethernet communications device
files and link these files to EDI physical port
numbers.
Chapter 3, “Setting
Operating System
Parameters”
Device Interface Guide / 29
•
•
•
•
Configuring EDI
For details on performing the following steps...
Go to...
4. DigiBoard Users—Ensure the DigiBoard
software and hardware is correctly set up.
DigiBoard
manufacturer’s manual
5. Verify the EDI task is listed in the System
Configuration Information panel in the
Configuration Manager Main Menu and, if
necessary, enter information about the task.
Also verify the row for the EDI task does not
contain an S in the Flags field. (The S flag creates
a window for displaying system messages.)
Should an improper shut down of FactoryLink
occur and the S flag is present, the protocol
module will terminate abnormally and resources
will be orphaned. As a result, subsequent restarts
of EDI will be unsuccessful.
If an S flag is associated with the EDI task in the
System Configuration Information panel, you
need to remove it.
FactoryLink
Fundamentals
6. Determine the topology of your configuration.
“Device Topologies” on
page 41
7. If your topology includes devices communicating
with FactoryLink via more than one port, you
might want to fill out the logical station worksheet.
This will help you define and document a
numbering scheme for the ports and devices in
your configuration.
“Completing the Logical
Station Worksheet” on
page 85
8. Set up the devices and network cables in your
configuration for communications with
FactoryLink. Be sure the device switches and
communication parameters are correctly set and
any device-specific preconfiguration steps are
completed.
Chapter 4, “Setting Up
Serial Communications,”
and the device
manufacturer’s
documentation
30 / FactoryLink 6.6.0 / Device Interface Guide
Configuring EDI
For details on performing the following steps...
Go to...
Chapter 4, “Setting Up
Serial Communications,”
and the manufacturer’s
installation
documentation
10. Define the communication path to this device in
the External Device Definition table and the
device protocol-specific Logical Station table.
In the External Device Definition table, assign a
logical port number to the physical port through
which communications with this device will occur
and configure information about this port relevant
to EDI.
In the Logical Station table, specify this logical
port number and provide device-specific
communication protocol and other information the
device interface software needs to exchange data
with the device. This creates a database tag to
hold error messages for the port and assigns a
logical station number to represent the device.
Chapter 5, “Configuring
Communication Paths”
11. Test the communication path by defining a
triggered read request and an exception write
request that can be manually triggered and
monitored through the Real-time Monitor,
RTMON.
“Verifying Proper
Communications” on
page 198
12. Check the Run-Time Manager or any configured
error tags (specified in the Logical Station table)
for messages indicating problems with the
connection. If errors are reported, troubleshoot
the connection.
“Common Errors” on
page 196 and Chapter
10, “Messages and
Codes”
FactoryLink 6.6.0 / Device Interface Guide / 31
External Device
Interface
9. Connect one device to your FactoryLink station.
The correct cable needed for FactoryLink might
differ from the one presently connected to the
device. Verify the connection using the provided
cable pin-out diagrams.
•
•
•
•
Configuring EDI
For details on performing the following steps...
Go to...
13. Once communications are successful on this
single communication path, define any other
logical ports through which device
communications will occur and define a
communication path for each additional device in
your configuration.
Steps 10 through 12
14. Configure the read and write operations the
application will execute across these
communication paths.
“Configuration
Considerations” on page
59, Chapter 6, “Reading
Data from a Device,” and
Chapter 7, “Writing Data
to a Device”
32 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 1
External Device
Interface Overview
By sending messages to remote devices via the EDI task, you can use FactoryLink
to automate tasks associated with processes, such as when valves are opened or
closed, when machines are turned on or off, or when data such as temperature or
pressure is collected.
Each remote device uses a specific communication protocol. The protocol used by a
device varies from one device type to another; therefore, FactoryLink must be able
to translate a particular device’s protocol to ensure an accurate exchange of data
with the device. A set of protocol-specific modules is supplied with FactoryLink to
address these protocol translation needs. Each protocol module translates
messages sent from FactoryLink into a format understood by the supported device
type and translates messages sent from the device to a format understood by
FactoryLink.
This chapter introduces the concepts you need to understand to configure
communications between FactoryLink and a remote device.
FactoryLink 6.6.0 / Device Interface Guide / 33
External Device
Interface
The External Device Interface (EDI) task allows you to configure FactoryLink to
communicate with remote devices. Remote devices, such as programmable
controllers and remote terminal units, are used in virtually every type of industry
to monitor and control processes, such as the production of goods at a factory, the
movement of liquid or gas down a pipeline, or the periodic collection of data.
1
•
EXTERNAL DEVICE INTERFACE OVERVIEW
•
Communications Methodology
•
•
C OMMUNICATIONS M ETHODOLOGY
FactoryLink can retrieve (or read) data from a remote device and send (or write)
data to a device. Following are two sequential lists and illustrations of events
explaining FactoryLink’s process for retrieving and sending device data.
Figure 1-0 Retrieving Data from a Remote Device
Open
Closed
0
÷
1
í
û
ô
ø
ù
î
EDI sends a message requesting data from a
remote device.
ô
A protocol module translates the message to a
format the device understands.
í
The protocol module sends the translated
message to the device.
÷
The device processes the message.
û
The device returns a message to the protocol
module containing the requested data.
ø
The protocol module translates the response to a
format FactoryLink understands.
ù
The protocol module sends the device’s
translated response message to EDI.
î
EDI stores the received data as elements in
FactoryLink’s real-time database.
34 / FactoryLink 6.6.0 / Device Interface Guide
1 0 1 0 1 0
EXTERNAL DEVICE INTERFACE OVERVIEW
Communications Methodology
Figure 1-0 Sending Data to a Remote Device
1
A
MTR
í
ô
1 0 1 0 1 0
EDI sends a message containing data that
can be interpreted as instructions, such as to
open or close a valve or to start a motor.
ô
A protocol module translates this message
into a format the device understands.
í
The protocol module sends the translated
message to the device.
÷
The device performs the instruction contained in
the message.
FactoryLink 6.6.0 / Device Interface Guide / 35
External Device
Interface
SOL
÷
•
EXTERNAL DEVICE INTERFACE OVERVIEW
•
Communicating with Multiple Devices
•
•
C OMMUNICATING
WITH
M ULTIPLE D EVICES
FactoryLink communicates with multiple devices of the same or different
communication protocols concurrently.
Through one communications port, FactoryLink communicates with multiple
devices that share the same communications protocol.
Figure 1-0 One Port, One Protocol, Multiple Devices
FactoryLink
Computer
Port
Using an additional port, FactoryLink can communicate with devices that share
another communications protocol.
Figure 1-0 Multiple Ports, Multiple Protocols
FactoryLink
Computer Port
Port
Each communications port supports one type of protocol. This means only one
protocol module can be used per port. The number of supported devices per port
depends on your hardware configuration. See “Device Topologies” on page 41 for
descriptions of various types of hardware configurations.
36 / FactoryLink 6.6.0 / Device Interface Guide
EXTERNAL DEVICE INTERFACE OVERVIEW
Communicating with Multiple Protocol Modules
C OMMUNICATING
WITH
M ULTIPLE P ROTOCOL M ODULES
1
EDI is the interface to FactoryLink and the protocol module is the interface to the
device.
External Device
Interface
Figure 1-0 Interface Topology
A FactoryLink application requires only one EDI task running to communicate
with multiple devices. EDI, however, can provide a common interface to the
real-time database for one or more instances of the same protocol module or one or
more unique modules that support devices of varying manufacturers and types.
Use more than one protocol module when you need to communicate with different
types of devices through separate ports, as shown in Figure 1-0 and Figure 1-0.
FactoryLink 6.6.0 / Device Interface Guide / 37
•
EXTERNAL DEVICE INTERFACE OVERVIEW
•
Communicating with Multiple Protocol Modules
•
•
Figure 1-0 illustrates EDI communicating through one port with a protocol
module for a group of devices that controls and monitors a particular process, and
at the same time communicating through a different port with another protocol
module that controls and monitors a different process.
Figure 1-0 Communicating with Different Protocols
Port
FactoryLink
Computer
Port
EDI and one protocol module can communicate with devices that share the same
protocol. Figure 1-0 illustrates FactoryLink communicating with three devices out
of one port.
Figure 1-0 Communication Through One Protocol Module
Note
These examples are for network or multi-drop communications.
38 / FactoryLink 6.6.0 / Device Interface Guide
EXTERNAL DEVICE INTERFACE OVERVIEW
Communicating with Multiple Protocol Modules
Figure 1-0 Communication Through Multiple Instances of One Protocol Module
FactoryLink 6.6.0 / Device Interface Guide / 39
1
External Device
Interface
EDI and multiple instances of one protocol module can communicate with devices
that share the same communication protocol. Figure 1-0 illustrates FactoryLink
communicating with devices via three different ports. When you use instances of a
protocol module, the distribution of system resources allows better throughput,
thus speeding up communications. This type of configuration is typical in
point-to-point communications, discussed in “Device Topologies” on page 41.
•
EXTERNAL DEVICE INTERFACE OVERVIEW
•
Communicating with Multiple Protocol Modules
•
•
EDI and multiple unique protocol modules can communicate with devices that
support the different communication protocols. Figure 1-0 illustrates FactoryLink
communicating with the devices via three different ports.
Figure 1-0 Communication Through Multiple Unique Protocol Modules
Note
Regardless of the number of protocol modules in use and whether
they are alike or different, FactoryLink can only communicate
with as many devices as your hardware configuration will support.
40 / FactoryLink 6.6.0 / Device Interface Guide
EXTERNAL DEVICE INTERFACE OVERVIEW
Device Topologies
D EVICE TOPOLOGIES
1
Serial Port
For a serial system unit communications (COM) port connection, FactoryLink can
communicate with devices in two ways: directly (one point to one point) as shown
in Figure 1-0, or through a network interface module as shown in Figure 1-0. An
interface module can be an RS232-to-RS422 external converter or a device that
bridges an RS232 communications link to a proprietary network.
Figure 1-0 Point-To-Point Connection
FactoryLink
COM
Computer
Port
COM
Port
Figure 1-0 Interface Module Connection
FactoryLink
Computer
COM
Port
RS232
RS422 or
proprietary
network
FactoryLink 6.6.0 / Device Interface Guide / 41
External Device
Interface
The diagrams in this section illustrate some possible ways FactoryLink
communicates with devices. For information about communications with devices
using specific protocol modules, refer to the table on page 44.
•
EXTERNAL DEVICE INTERFACE OVERVIEW
•
Device Topologies
•
•
DigiBoard Port
FactoryLink can communicate through a DigiBoard intelligent or nonintelligent
serial communications board located in an Industry Standard Architecture (ISA)
slot in the computer’s chassis. A DigiBoard provides additional asynchronous
serial ports through which FactoryLink can communicate with devices. The PC/Xe
and PC/Xem models are supported on OS/2 and Windows NT; only the PC/Xe
model is supported on Windows 95.
Figure 1-0 DigiBoard Connection
FactoryLink
Computer
DigiBoard
Ethernet Board Port
FactoryLink can communicate with devices across an Ethernet network through
an Ethernet adapter board.
Figure 1-0 Ethernet Connection
FactoryLink
Computer
Ethernet
Board
Port
42 / FactoryLink 6.6.0 / Device Interface Guide
EXTERNAL DEVICE INTERFACE OVERVIEW
Device Topologies
Combination
Figure 1-0 illustrates simultaneous communications with four devices: three are
linked via a network through an RS232-to-RS422 converter and one device is
connected directly to a COM port.
Figure 1-0 Point-To-Point and Network Module Connection
FactoryLinkCOM
Computer Port
RS232
RS422
COM
Port
FactoryLink 6.6.0 / Device Interface Guide / 43
1
External Device
Interface
Topologies can be combined. The way in which you successfully combine topologies
depends on a combination of limitations in hardware, system resources, and
FactoryLink.
•
EXTERNAL DEVICE INTERFACE OVERVIEW
•
Device Topologies
•
•
The following table lists the ECS device interface protocol module base set and the
ports supported by each.
Table 1-1 Supported Ports
Ports
Protocol Module
Serial
DigiBoard
Allen-Bradley
✔
✔
General Electric Fanuc
✔
✔
General Purpose Interface
✔
✔
Modicon Modbus™
✔
✔
Modicon Modbus Plus™
✔
OMRON™ Host Link Protocol
✔
✔
Siemens CP525®
✔
✔
✔
Siemens Sinec H1
Square D
✔
✔
Texas Instruments™
TIWAY/Point-to-Point
✔
✔
44 / FactoryLink 6.6.0 / Device Interface Guide
Ethernet
✔
EXTERNAL DEVICE INTERFACE OVERVIEW
Components of a Communication Path
C OMPONENTS
OF A
C OMMUNICATION P ATH
1
The communication path to each device is identified to FactoryLink by its
components.
Figure 1-0 Two Components of a COM Port Connection
FactoryLink
COM
Computer
Port
Port
Device
For a DigiBoard port connection, the two components of a communication path are
the device and the board port to which it is connected.
Figure 1-0 Two Components of a DigiBoard Port Connection
FactoryLink
Computer
Device
DigiBoard
Port
Port
For an Ethernet board port connection, the two components are the device and the
board port to which it is connected.
Figure 1-0 Two Components of an Ethernet Port Connection
FactoryLink
Computer
Ethernet
Board
Port
Device
Port
FactoryLink 6.6.0 / Device Interface Guide / 45
External Device
Interface
For a COM port connection, the two components are the device and the COM port
to which it is connected.
•
EXTERNAL DEVICE INTERFACE OVERVIEW
•
Components of a Communication Path
•
•
Each component and its attributes must be uniquely identified. Every device that
communicates with FactoryLink must be assigned a unique logical number.
Likewise, every COM or board port on the computer through which a device
communicates must be assigned a unique logical number.
For purposes of this discussion, devices are referred to interchangeably as
“stations.” When you begin configuring the communication path, the number you
assign to each device is called a “logical station number.” The number you assign
to each port is called a “logical port number.”
Some examples of possible numbering schemes are illustrated in the following
diagrams.
Figure 1-0 Point-To-Point Connection
Logical Port 0
Logical
Station 0
Logical
Station 1
FactoryLink
COM
Computer
Port
COM
Port
Logical Port 1
Figure 1-0 Interface Module Connection with RS-232 to RS-422 Converter
Logical Port 1
FactoryLink
Computer
COM
Port
46 / FactoryLink 6.6.0 / Device Interface Guide
Logical
Station 1
Logical
Station 2
Logical
Station 3
EXTERNAL DEVICE INTERFACE OVERVIEW
Components of a Communication Path
Figure 1-0 DigiBoard Connection
1
Logical
Station 1
External Device
Interface
Logical
Station 2
Logical
Station 3
Logical
Station 4
FactoryLink
Computer
DigiBoard
Logical Port 4
Logical Port 3
Logical Port 2
Logical Port 1
Figure 1-0 Ethernet Connection
Logical
Station 1
Logical
Station 2
Logical
Station 3
FactoryLink
Computer
Ethernet
Board
Port
Logical Port 1
Figure 1-0 Point-To-Point and Interface Module Connection
Logical
Station 1
Logical
Station 2
Logical Port 1
Logical
Station 3
FactoryLinkCOM
Computer Port
COM
Port
Logical Port 2
Logical
Station 4
FactoryLink 6.6.0 / Device Interface Guide / 47
•
EXTERNAL DEVICE INTERFACE OVERVIEW
•
Components of a Communication Path
•
•
These arbitrary logical numbers can match physical or configurable numbers, but
this correspondence is not required. Thus, a logical station number assigned to
represent a device can differ from the configured address for the device. For
example, a device with a network address of 10 can be logical station 1. In the
same way, a number assigned to represent a port need not correspond to the
actual physical port number. COM2, for example, can be logical port 1.
The number you assign to a device (the logical station number) is tied to the
number you assign to represent the port through which communications with the
device occurs (the logical port number). No logical station number assigned to a
device can match the station number of another device for a given protocol type.
The logical port number you assign to represent a port can match a logical station
number assigned to a device (you can have logical port 1 and logical station 1), but
device numbers for a given protocol type must be unique (you cannot assign
logical station number 1 to two different devices).
Figure 1-0 Logical Port Numbers Tied to Logical Device Numbers
First Device, Logical Port 1
is Logical Station 1
Logical Port 1
Second Device, Logical Port 1
is Logical Station 2
Third Device, Logical Port 1
is Logical Station 3
FactoryLinkCOM
Computer Port
First Device, Logical
Port 2 is Logical
Station 4
COM
Port
Logical Port 2
48 / FactoryLink 6.6.0 / Device Interface Guide
EXTERNAL DEVICE INTERFACE OVERVIEW
Retrieving and Transferring Data
R ETRIEVING
AND
TRANSFERRING D ATA
1
Each protocol module in the FactoryLink 6.6.0 device interface base set supports
triggered read operations and write operations. Selected protocol modules support
unsolicited read operations. Refer to Table 1-1 on page 52 for protocol-specific read
and write information.
Triggered Read Operations
In a triggered read operation, data is retrieved from a device and transferred to
the real-time database. First, FactoryLink requests data from specific locations
(registers or addresses) in a device. Next, the data is read, then stored in
FactoryLink as database elements.
Figure 1-0 Triggered Read Operation
FactoryLink requests
data from a device.
ô The device returns the
requested data to
FactoryLink.
í FactoryLink stores the data as
elements in the real-time database.
FactoryLink 6.6.0 / Device Interface Guide / 49
External Device
Interface
EDI uses read and write operations to retrieve and transfer data between
FactoryLink and devices for which a communication path has been established.
You configure requests for read and write operations in one device
protocol-specific configuration table designed for defining both types of operations.
•
EXTERNAL DEVICE INTERFACE OVERVIEW
•
Retrieving and Transferring Data
•
•
EDI triggered read operations occur based on either timed intervals or events. In
both types of operations, a change in the value of a trigger element prompts
FactoryLink to read data in specific locations in a device.
• Timed-Interval Read—A read request based on a timed interval instructs
FactoryLink to collect data at defined intervals, such as several times a minute
or at a given time each day.
• Event-Driven Read—A read request based on an event instructs FactoryLink to
collect data only when a defined event occurs, such as when an operator selects
a new graphic window or when an alarm condition occurs.
Unsolicited Read Operations
FactoryLink does not initiate the reading of data in an unsolicited read operation.
Instead, it accepts certain types of data from specified locations in a device, then
stores the data in the real-time database. FactoryLink recognizes the device data
because its starting address and length match an identical address and expected
data length configured in FactoryLink.
Figure 1-0 Unsolicited Read Operation
The device sends data
to FactoryLink.
ô FactoryLink ensures the
incoming data matches
configuration parameters.
í FactoryLink stores the
data in the realtime
database.
50 / FactoryLink 6.6.0 / Device Interface Guide
EXTERNAL DEVICE INTERFACE OVERVIEW
Retrieving and Transferring Data
Write Operations
Figure 1-0 Write Operation
FactoryLink reads
database elements
and sends their
values to a device.
ô The device stores the values.
Two types of EDI write operations can occur: block and exception.
• Block Write—In a block write request, a change in the value of a trigger element
prompts FactoryLink to write one or more database element values to specific
device locations.
• Exception Write—In an exception write request, a change in the value of an
element prompts FactoryLink to write that value to a specific device location.
The difference in these two operations is the way each is triggered. Both
operations write data from FactoryLink to the device when a trigger is activated.
For a block write, the trigger is an element defined specifically for prompting a
write operation. For an exception write, the trigger is the change in status of the
element to be written.
FactoryLink 6.6.0 / Device Interface Guide / 51
1
External Device
Interface
In a write operation, data is retrieved from the real-time database and transferred
to a device. FactoryLink reads the values of real-time database elements, then
writes them to specific locations in a device.
•
EXTERNAL DEVICE INTERFACE OVERVIEW
•
Retrieving and Transferring Data
•
•
The following table lists the read and write operations available for each
protocol-specific module in the base set.
Table 1-1 Supported Read and Write Operations
Read
Operations
Protocol Module
Write
Operations
Triggered
Unsolicited
Allen-Bradley
✔
✔
General Electric Fanuc
✔
General Purpose Interface
✔
Modicon Modbus™
✔
Modicon Modbus Plus™
✔
OMRON™ Host Link Protocol
✔
Siemens CP525®
✔
✔
✔
Siemens Sinec H1
✔
✔
✔
Square D
✔
✔
✔
Texas Instruments™
TIWAY/Point-to-Point
✔
52 / FactoryLink 6.6.0 / Device Interface Guide
✔
✔
✔
✔
✔
✔
✔
✔
✔
EXTERNAL DEVICE INTERFACE OVERVIEW
Tag Naming Considerations for EDI
TAG N AMING C ONSIDERATIONS
FOR
EDI
1
See FactoryLink ECS Fundamentals for more information about working with
FactoryLink tags.
FactoryLink 6.6.0 / Device Interface Guide / 53
External Device
Interface
Tag names for elements in EDI are essentially the same as in any other
FactoryLink task. The one difference is EDI does not recognize brackets ([ ]) in tag
names as FactoryLink array specifiers. Brackets can be used, however. An array
is a FactoryLink tag name assigned to a group of elements.
•
EXTERNAL DEVICE INTERFACE OVERVIEW
•
Triggering Considerations
•
•
TRIGGERING C ONSIDERATIONS
The way in which read and write operations are triggered can determine the
success or failure of an application. The success of the application can depend on
triggering rates because of the way these operations are processed.
Read and write operations use a limited area of the computer’s system memory
shared by a protocol module and the EDI module. If your configuration includes
more than one protocol module, a separate area of shared memory is associated
with each module.
Figure 1-0 and subsequent diagrams in this section depict shared memory as a
mailbox. Mail can go into and be retrieved from a mailbox. In the same way,
outgoing messages from EDI and incoming responses from a device are filtered
through shared memory.
Figure 1-0 Shared Memory with Each Protocol Module
54 / FactoryLink 6.6.0 / Device Interface Guide
EXTERNAL DEVICE INTERFACE OVERVIEW
Triggering Considerations
The concept of shared memory is significant for two reasons:
• Since a shared memory area is associated with each protocol module or instance
• Because the capacity of a shared memory area is limited (like a mailbox), when
the memory fills up, nothing more can be added to it. A shared memory area
fills up when the protocol module does not process data as fast as EDI requests
it, or when the protocol module sends requested data to EDI faster than EDI
can process it.
This discussion focuses on how the filling up of shared memory affects triggering
rates in your application. When you understand how shared memory works, you
can apply this knowledge and use work-around triggering schemes (these are
described later on) that result in an efficiently operating application.
How Shared Memory Works
Figure 1-0 shows how EDI and a protocol module use shared memory when
sending commands to and receiving responses from a device. Steps 1 through 5
are defined further on the following pages.
Figure 1-0 Function of Shared Memory in Read and Write Operations
í
ô
EDI puts command into shared memory
ô Protocol module gets command, sends to
÷
device, and command is cleared from memory
í Device returns acknowledgment and data
÷ Protocol module puts data into shared memory
û EDI gets data, writes it to FactoryLink, and
response is cleared from memory
û
FactoryLink 6.6.0 / Device Interface Guide / 55
1
External Device
Interface
of a protocol module, you can run multiple protocol modules simultaneously
with a certain amount of independence. “Communicating with Multiple
Devices” on page 36 provides details about how this works.
•
EXTERNAL DEVICE INTERFACE OVERVIEW
•
Triggering Considerations
•
•
1 EDI puts a data transfer command into shared memory. This command could
contain a request to read data in the device and write it to FactoryLink or to write
data stored in FactoryLink to the device. As EDI puts data into shared memory, it
begins to fill up.
Figure 1-0 EDI Puts Command into Shared Memory
2 The protocol module, which constantly monitors shared memory for
communications from EDI, gets the command from shared memory and sends it to
the device. The command and any associated data, once the protocol module
retrieves it, is cleared from shared memory.
Figure 1-0 Protocol Module Gets Command and Sends to Device
3 If the operation is successful, the device returns:
• The requested data to the protocol module (if the command is for a read
operation)
• An acknowledgment the command was received and processed (if the command
is for a write operation)
If the operation is not successful, the device returns an error message. If the
device does not respond, the protocol module will indicate a time-out error.
56 / FactoryLink 6.6.0 / Device Interface Guide
EXTERNAL DEVICE INTERFACE OVERVIEW
Triggering Considerations
Figure 1-0 Device Returns Requested Data or Acknowledgment
1
External Device
Interface
4 The protocol module matches the incoming data to the command and puts the
requested data, acknowledgment, or error message into shared memory.
Figure 1-0 Protocol Module Puts Data into Shared Memory
5 When EDI finds a response to the data transfer command in shared memory, it
retrieves the data, writes it to the real-time database, then clears the device’s
response from memory.
Figure 1-0 EDI Gets Data, Writes It to FactoryLink, Clears Data and Command
FactoryLink 6.6.0 / Device Interface Guide / 57
•
EXTERNAL DEVICE INTERFACE OVERVIEW
•
Triggering Considerations
•
•
How to Avoid Filling Up Shared Memory
When numerous commands for read or write operations are being sent to a device
within the same time frame (as can happen when an application is configured to
trigger data too frequently), shared memory fills up. Likewise, when a device
sends blocks of data requested by EDI back to FactoryLink in intervals too close
together, shared memory fills up.
Figure 1-0 Process of Retrieving and Returning Data
If shared memory fills up with messages to
or from a device, no room is left in shared
memory for other messages that might
need to use the shared memory area.
To avoid filling up shared memory (overtriggering), define read and write
operations using two specific methods. One involves daisy chaining the operations
by assigning identical tag names for two types of digital elements (a trigger and a
state element) in the protocol-specific configuration table for the operation. The
other method is similar, but identical elements are defined across tables to create
a “self-triggering” effect. See “Efficient Triggering” on page 188 for more
information.
58 / FactoryLink 6.6.0 / Device Interface Guide
EXTERNAL DEVICE INTERFACE OVERVIEW
Configuration Considerations
C ONFIGURATION C ONSIDERATIONS
1
Triggered Read Operations
A triggered read operation is the best choice for reading data that changes
frequently and at regular intervals. Use the following types of triggered read
operations under the described circumstances.
Interval
If an application does not require all data to be collected at the
same time, you can increase FactoryLink’s efficiency by
configuring several read tables, each reading at a different
interval and only as often as necessary. For example, configure a
table with timed reads that occur every five seconds for elements
with values that change frequently, and every thirty seconds for
elements with values that change less frequently.
Event
If events occur infrequently, you can reduce the number of
requests sent between FactoryLink and the device and increase
overall efficiency by configuring several read tables, each
triggered by a different event. For example, If a graphic screen
contains a large number of variables that are only useful on that
screen (that is, they are not alarm points and are not being
trended), you could configure a separate read table containing
only these variables. FactoryLink will only read the elements on
that screen when the operator triggers this read table by
selecting the graphic screen for viewing. Using this technique can
reduce traffic between FactoryLink and the device when an
application has a large number of graphic screens.
As another example of an event-driven read operation, you could
configure FactoryLink to trigger a particular read table only if an
alarm condition occurs. The element that detects the alarm
condition can trigger EDI to collect additional information from
the device about the status of related processes.
FactoryLink 6.6.0 / Device Interface Guide / 59
External Device
Interface
Following are guidelines and examples to help you determine which types of read
and write operations work best for specific situations and how to configure these
operations to optimize FactoryLink’s performance.
•
EXTERNAL DEVICE INTERFACE OVERVIEW
•
Configuration Considerations
•
•
Unsolicited Read Operations
An unsolicited read operation, if supported by the protocol module, is the best
choice for reading values that change infrequently and at unspecified intervals.
For example, you might design an application to notify FactoryLink whenever an
unexpected event occurs, such as an electrical unit power surge of a specified
magnitude. When defining unsolicited read operations, consider the frequency in
which unsolicited read operations are expected to execute. Unsolicited reads
occurring too frequently and at irregular intervals can cause excessive traffic
leading to a jam on the communication link.
Refer to Table 1-1 on page 52 to determine whether unsolicited read operations
are supported by the protocol module you are using.
Write Operations
Use the following types of write operations under the described circumstances.
Block
If an application writes values of real-time database elements
that change frequently to the device, use a block write operation
because FactoryLink sends the minimum number of write
commands necessary to write the specified data. A block write is
most efficient when your application writes a group of elements
at one time to the device (for example, when the application
requires a new recipe).
Exception
If an application writes values of real-time database elements
that change infrequently to the device or if the application only
needs to change one value at a time (for example, a new
user-entered setpoint), use an exception write operation. For each
exception write, EDI sends one packet of data per tag. See the
discussion of data organization in “Optimization Guidelines” on
page 62 for more information about data packets.
60 / FactoryLink 6.6.0 / Device Interface Guide
EXTERNAL DEVICE INTERFACE OVERVIEW
Configuration Considerations
Triggering Guidelines
With the discussion of read and write configuration considerations beginning on
page 59 in mind, consider the following triggering guidelines:
read or written depends on several factors, including how often the data
changes and whether the changes occur regularly, the timing of the events in
the application, and the types of reads and write operations the device supports.
• Only Trigger When on Specific Screens—Trigger data needed more often at
faster rates while slowing down other requests.
• Daisy Chain Tables—Link or daisy chain tables together in several loops by
defining elements in such a way that the completion of one task triggers the
beginning of another. The discussion of cascaded tables in “Efficient Triggering”
on page 188 provides additional details.
• Combine Unsolicited Read Operations—If each item in a list of data is being
read from a device as an unsolicited read operation, consider merging the data
into a block read request. You can then trigger the block read operation with an
unsolicited forced write of a digital element to the device. If each item on the list
is configured as an unsolicited read, a separate data packet is sent for each
item. If each list item is combined and put into a block read, however, fewer
data packets are required and the transmission time is quicker.
Note
Refer to Table 1-1 on page 52 to determine whether the protocol
module you are using supports unsolicited read operations.
FactoryLink 6.6.0 / Device Interface Guide / 61
External Device
Interface
• Only Trigger When Data is Needed—How often you choose to trigger data to be
1
•
EXTERNAL DEVICE INTERFACE OVERVIEW
•
Configuration Considerations
•
•
Optimization Guidelines
Consider the following guidelines for configuring read and write operations to
make the most efficient use of EDI’s capabilities.
Tip
Chapter 8, “Application Design Tips and Techniques,” provides
more information about some of these guidelines plus other
information not covered here.
• Program the Device for Efficiency—Careful planning in the programming of the
devices in your configuration can enhance the performance of your application
and optimize transmission speed. Refer to the device manufacturer’s
documentation for device programming guidelines.
• Logically Group Table Entries—FactoryLink creates messages to send to a
device based on entries in a read or write table. Table entries are grouped
according to the following criteria: logical station number, FactoryLink data
type, device data type, and address. The messages FactoryLink creates are
based on the results of the grouped table entries. For maximum efficiency,
therefore, you should attempt to group read and write table entries the same
way in which FactoryLink internally groups them.
Another benefit of organizing table entries as FactoryLink does is it makes
debugging your application easier. If an error occurs in table processing, you
can readily identify the source of the error.
• Keep Addresses Contiguous—Whenever possible, keep addresses contiguous to
reduce the number of messages FactoryLink must generate to process a table.
For a discussion and examples of how FactoryLink groups data being read from
or written to contiguous addresses into messages, see “Grouping of Data” on
page 180.
• Recognize Processing Differences in Read and Write Operations—FactoryLink
processes data being read differently than it processes data being written. In a
read table, when you specify selected addresses of like data type to be read that
are close in proximity and configure tag names for like elements in which to
store the data read from these addresses, FactoryLink actually reads the entire
range of addresses (even ones you do not specifically define). Only the data
FactoryLink is configured to store is saved. In a write table, on the other hand,
when you specify tag names for elements to be written to selected addresses,
only the specified data is written.
62 / FactoryLink 6.6.0 / Device Interface Guide
EXTERNAL DEVICE INTERFACE OVERVIEW
Configuration Considerations
For a discussion and examples of the differences in read and write table
processing, see “Processing Differences in Read and Write Operations” on page
182.
1
• Define Multiple Operations in a Single Table—Because the EDI task can process
• Keep Disabled Messages Together—Put entries that might need to be disabled
periodically in their own table, separate from entries that will not be disabled.
• Prioritize read and write operations—The priority of read and write operations
can affect the speed and performance of an application. EDI places each read
and write table you define into a user-specified priority queue. You can assign a
high priority to the most critical data to be read or written. EDI gives
preference to high priority read and write tables if it receives more than one
table at a time. For more information about how you can use priority queues to
improve an application’s performance, see “Specifying Priority” on page 187.
FactoryLink 6.6.0 / Device Interface Guide / 63
External Device
Interface
multiple messages destined for a single device simultaneously, you can define
several read or write operations (within reason and based on the architecture of
the application) in a single table for maximum throughput. Each additional
table you define results in more messages the task must generate. The more
messages generated, the longer the read or write operation takes to complete.
•
EXTERNAL DEVICE INTERFACE OVERVIEW
•
The Cable Connection
•
•
T HE C ABLE C ONNECTION
Remember, the signals in the cable supplied with the device might differ from
those required by FactoryLink. While the device might communicate with your
computer without a problem using the supplied cable, once FactoryLink
communications are attempted, the communications can fail.
The reason for this failure is in most instances (unless a leased-line modem is
being used), handshaking signals need to be “tied back.” This can be effectively
done using a modem eliminator, also called a null modem cable, which contains
handshaking tie-backs.
See Chapter 4, “Setting Up Serial Communications,” for more information about
cable connections as well as serial communications reference material.
64 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 2
Tag Definition Dialog
2
Once you establish a communication path to a device (described in Chapter 5,
“Configuring Communication Paths”) and define a table name and any needed
trigger elements (described in Chapter 6, “Reading Data from a Device,” and
Chapter 7, “Writing Data to a Device”), you can use the Tag Definition dialog to
define the addresses and data to be read or written.
The dialog for Modicon Modbus Plus is shown below:
Refer to the Application Editor guide and to this manual’s protocol-specific
description of the Read/Write Information panel for Tag Definition dialog field
descriptions.
FactoryLink 6.6.0 / Device Interface Guide / 65
External Device
Interface
Read and write operations for each device protocol module except the General
Purpose Interface (GPI) can be configured using the Tag Definition dialog in the
Application Editor.
•
TAG DEFINITION DIALOG
•
•
•
In all EDI drivers there is a 255 character limit on the length of message tags. If
any message tags are defined larger than 255, the excess data is truncated.
66 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 3
Setting Operating
System Parameters
• “Windows NT Ethernet” on page 68
• “OS/2 Ethernet” on page 69
• “UNIX” on page 70
• “UNIX Ethernet” on page 72
FactoryLink 6.6.0 / Device Interface Guide / 67
External Device
Interface
This chapter contains information for setting up the operating system
environment for FactoryLink communications. Refer to the appropriate section:
3
•
SETTING OPERATING SYSTEM PARAMETERS
•
Windows NT Ethernet
•
•
W INDOWS NT E THERNET
Setting up a Windows NT Ethernet environment for FactoryLink EDI
communications involves adding the DLC Protocol to the network.
Perform the following steps to add the DLC Protocol:
1 Choose the Control Panel icon from the Windows NT menu.
2 Choose the Network icon from the Control Panel.
3 Click on Add Software in the Network Software and Adapter Cards box in the
Network Settings window.
4 Choose DLC Protocol from the list of options in the Add Network Software window
and click on Continue.
5 Enter the full path name in the Windows NT Setup window identifying the
location of the DLC Protocol files. Windows NT loads the software and then
redisplays the Network Settings window.
6 Click on OK in the Network Settings window. When configuration is complete, the
Network Settings Change window is displayed. Click on Restart Now.
7 Open the Network Settings window again (steps 1 and 2 above) after Windows NT
reboots.
8 Check to see whether DLC Protocol is displayed in the Installed Network
Software list in the Network Settings window to verify software installation.
Click on Bindings...to view related software connections in the Network Settings
window. A line similar to the following one should be displayed in the list of
installed software:
DLC Protocol -> 3Com Etherlink II Adapter Device -> [1]
Etherlink II Adapter
68 / FactoryLink 6.6.0 / Device Interface Guide
SETTING OPERATING SYSTEM PARAMETERS
OS/2
OS/2
3
Perform the following steps to set up an IBM OS/2 environment for serial
communications with FactoryLink:
to be used. Refer to the IBM OS/2 installation guide for details.
2 Verify the correct setting of the device protocol parameter in the CONFIG.SYS file
located in the root directory of the OS/2 boot drive. CONFIG.SYS should contain a
line defining the COM.SYS device protocol. (OS/2 does not require this device to
support a serial mouse.)
If CONFIG.SYS does not contain the following line, add it:
DEVICE=C:\OS2\COM.SYS
OS/2 E THERNET
This section applies only to those protocol-specific modules that support Ethernet.
Refer to the table on page 44 for a complete list of these devices.
FactoryLink for OS/2 applications that communicate over Ethernet require IBM’s
Multi-Protocol Transport Services (MPTS) option. This option was formerly called
Network Transport Services/2 (NTS/2) or LAN Adapter and Protocol Support
(LAPS). The MPTS option is provided by IBM as part of the WarpConnect media.
Install and configure the MPTS software, then verify its operation.
Perform the following steps to set up the OS/2 Ethernet environment:
1 Insert the diskette containing MPTS into a floppy drive and enter the following
command at the system prompt:
driveletter:\LAPS
where driveletter is the letter representing the floppy drive.
For example:
A:\LAPS
2 Configure the MPTS software and verify its operation. The adapter must use the
IBM IEEE 802.2 protocol. Do not attempt to execute the protocol module until this
step is complete. Refer to the section describing attended LAPS configuration
IBM’s MPTS configuration guide for details.
FactoryLink 6.6.0 / Device Interface Guide / 69
External Device
Interface
1 Use IBM’s Selective Install utility provided with OS/2 to configure the serial ports
•
SETTING OPERATING SYSTEM PARAMETERS
•
UNIX
•
•
UNIX
Setting up a UNIX operating system to communicate with FactoryLink and the
EDI task involves defining serial communication ports as device files and linking
these files to EDI physical port numbers. Also, if the devices in your configuration
will communicate through more than eight ports, you might need to set specific
parameters to accommodate this increase.
Defining Serial Communication Ports as Device Files
In UNIX, define all devices as files using standard UNIX file name syntax. Create
the appropriate device file using the UNIX mknod command to define a serial
communication port in UNIX. Refer to the documentation for the appropriate
version of the UNIX operating system for information about the mknod command
and the associated parameters.
Most UNIX systems store device files in the /dev directory with the name ttynn,
where nn is an alphanumeric string of any of the following characters: A through
Z, a through z, or 0 through 9. Put all serial communication ports the FactoryLink
EDI task uses in the /dev directory.
Linking Device Files to EDI Physical Port Numbers
Link the appropriate device file of the port to one of the physical port numbers
used by the EDI task for the FactoryLink EDI task to open a serial
communication port. Enter the following command to link a device file to an EDI
physical port number. At the system prompt, type:
ln ttynn portx
where
nn
x
is an alphanumeric string of any of the following characters: A
through Z, a through z, 0 through 9
is an EDI physical port number from 0 to n
Using this command creates an alternate file name for the device file ttynn. The
EDI task references the new file, portx, to open the serial communication port
during read and write operations.
Repeat this command for each serial communication port to be used by the
FactoryLink EDI task.
70 / FactoryLink 6.6.0 / Device Interface Guide
SETTING OPERATING SYSTEM PARAMETERS
UNIX
Refer to the reference manual for the appropriate version of the UNIX operating
system for more information about the ln command.
3
Increasing the Number of Ports
FactoryLink 6.6.0 / Device Interface Guide / 71
External Device
Interface
If specific parameter changes are needed for resource allocations to increase the
number of ports beyond eight, the operating system administrator should make
these adjustments to ensure system integrity.
•
SETTING OPERATING SYSTEM PARAMETERS
•
UNIX Ethernet
•
•
UNIX E THERNET
This section, which applies only to protocol-specific modules that support
Ethernet (refer to the table on page 44), provides information about defining
Ethernet communication adapters and linking special device files for accessing
the Ethernet adapter.
Refer to the user documentation for the UNIX operating system for more details
about UNIX commands and files.
Defining Ethernet Communication Adapters
In UNIX, specify all devices as files using standard UNIX file name syntax.
Create the appropriate device file using the UNIX system administrator module
or the mknod command to define an Ethernet communications device.
Most UNIX systems store device files in the /dev directory. The name of these files
can vary from one system to another. For example, device file names in HP-RISC
default to lan0; file names in IBM AIX default to ent0.
Linking Special Device Files to Select Ethernet Adapter
Create a special device file that links the Ethernet special device file to the
FactoryLink EDI task. This file enables EDI to access Ethernet communication
adapters. To create the file on all UNIX platforms except Digital UNIX, perform
the following steps. For Digital UNIX, refer to “Determining Available Ethernet
Card Numbers on Digital UNIX” on page 73.
1 Log in as root onto the UNIX system where FactoryLink is installed.
2 Change directory to /dev as show below:
cd /dev
3 Create the EDI special device file by entering the following command:
ln filename ethx
where
filename
x
is the UNIX Ethernet special device file name. For example, lan0
(for HP-RISC) or ent0 (for IBM AIX).
is the adapter number in the Logical Station Control panel.
72 / FactoryLink 6.6.0 / Device Interface Guide
SETTING OPERATING SYSTEM PARAMETERS
UNIX Ethernet
4 Modify the read/write protection on the file by entering the following command:
3
chmod 777 ethx
Digital UNIX
The following information applies only to Digital UNIX.
Installation Notes
Once you have installed the protocol module option, perform the following steps:
1. Change the current directory to $flink/edi/device_name where device_name is
the protocol module acronym entered in the External Device Definition panel.
2. Log in as su (super user)
3. Execute the following commands:
chown root protocol_moduleenet.exe
chmod 4755 protocol_moduleenet.exe
Determining Available Ethernet Card Numbers on Digital UNIX
If your system has only one Ethernet card, enter 0 in the Physical Port column of
the External Device Definition panel. If your system has more than one card, the
cards are numbered sequentially beginning at 0. To determine the available
physical port numbers, enter the following command:
/usr/sbin/netstat -i
The resulting output of this command resembles the output in the following
example. Determine the number of Ethernet cards available in your system by the
lnx value where x is the number to enter in the Physical Port field:
Name Mtu
Network Address Ipkts
ln0
1500 DLI
ln0
1500 <Link>
none
Ierrs Opkts
Oerrs Coll
2313463 23
882952 0
10776
2313463 23
882952 0
10776
FactoryLink 6.6.0 / Device Interface Guide / 73
External Device
Interface
This series of commands creates an alternate file name for the Ethernet special
device file. To open the Ethernet adapter during read and write operations, the
EDI task references the new file name, ethx.
•
SETTING OPERATING SYSTEM PARAMETERS
•
UNIX Ethernet
•
•
74 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 4
Setting Up Serial
Communications
• “Electrical Interface Signals” on page 76 contains a table describing general
information about the electrical modem interface control signals the device
interface hardware and software configuration uses to establish and maintain
communication.
• “RS-232 Mechanical Interface Standard Reference” on page 77 describes
RS-232 standard signal names and their corresponding pin settings for 25-pin
and 9-pin connectors.
• “Cable Description and Diagrams” on page 79 includes diagrams of two common
types of cabling scenarios used in device communications with FactoryLink.
Additional cable information, when available, is provided in the
protocol-specific reference chapters.
• “Worksheet for Cable Connections” on page 80 provides a worksheet and sample
pin-out diagrams designed to help you connect a device to a host computer’s
COM port.
FactoryLink 6.6.0 / Device Interface Guide / 75
External Device
Interface
This chapter contains reference information to help you set up serial system unit
COM port communications between FactoryLink and your devices.
4
•
SETTING UP SERIAL COMMUNICATIONS
•
Electrical Interface Signals
•
•
E LECTRICAL I NTERFACE S IGNALS
The following table describes general information about the electrical modem
interface control signals the device interface hardware and software configuration
uses to establish and maintain communication.
Table 4-1 Modem Control Signals
Signal
Description
RTS
Request to send. When the data terminal equipment (DTE) has
something to transmit, it sends an RTS to the data
communications equipment (DCE). For FactoryLink
communications with devices other than modems, RTS and CTS
must be tied together.
CTS
Clear to send. CTS is a response to an RTS. After the DTE sends
the RTS to the DCE, the DCE returns a CTS to the DTE,
indicating the DTE device can begin transmitting. Before
FactoryLink can receive data from a device, the device must first
transmit a CTS signal to FactoryLink.
CD
Carrier detect (CD) is also referred to as DCD or received line
signal detect (RLSD). When the DCE receives a signal from a
remote modem, it sends a CD signal to notify the DTE. This CD
signal indicating the DCE has received a signal from a remote
modem is required by FactoryLink. Before data can be received
or transmitted, the DCE must first set the CD signal high in the
DTE.
DSR
Data set ready. When the DCE is powered on, it sends this signal
to the DTE to indicate it is ready to transmit.
DTR
Data terminal ready. When the DTE is powered on, it sends this
signal to the DCE. If the port is open, this signal remains set
high.
Data terminal equipment is a generic term used to describe terminals, computers,
and printers. In this discussion, DTE refers to the FactoryLink computer. Data
communications equipment provides all the functions needed to establish,
maintain, and terminate a connection. In this discussion, DCE refers to the
external device.
76 / FactoryLink 6.6.0 / Device Interface Guide
SETTING UP SERIAL COMMUNICATIONS
RS-232 Mechanical Interface Standard Reference
RS-232 M ECHANICAL I NTERFACE STANDARD R EFERENCE
Table 4-1 DB-25 Pin Reference for RS-232 Standard
DB-25
Description
Signal Name
2
Transmitted data
TxD
3
Received data
RxD
4
Request to send
RTS
5
Clear to send
CTS
6
Data set ready
DSR
7
Signal ground
SG
8
Carrier detect
CD
20
Data terminal ready
DTR
Figure 4-1 Location of 25-Pin Signals
2
3
4
5
6
7
8
20
TxD (Transmitted data)
RxD (Received data)
RTS (Request to send)
CTS (Clear to send)
DSR (Data set ready)
SG (Signal ground)
CD (Carrier detect) or RLSD (Receive line signal detector)
DTR (Data terminal ready)
2
1
14
15
16
6
5
4
3
17
18
7
19
8
20
10
9
21
22
23
11
24
12
13
25
FactoryLink 6.6.0 / Device Interface Guide / 77
4
External Device
Interface
The following tables and pin reference diagrams describe the RS-232 mechanical
interface standard. Use this information to determine the correct connections for
the device. See “Electrical Interface Signals” on page 76 for descriptions of the
referenced signal names.
•
SETTING UP SERIAL COMMUNICATIONS
•
RS-232 Mechanical Interface Standard Reference
•
•
Table 4-1 DB-9 Pin Reference for RS-232 Standard
DB-9
Description
Signal Name
3
Transmitted data
TxD
2
Received data
RxD
7
Request to send
RTS
8
Clear to send
CTS
6
Data set ready
DSR
5
Signal ground
SG
1
Carrier detect
DCD
4
Data terminal ready
DTR
Figure 4-1 Location of 9-Pin Signals
1
2
3
4
5
6
7
8
9
RLSD (Receive line signal detector) or CD (Carrier detect)
RxD (Received data)
TxD (Transmitted data)
DTR (Data terminal ready)
SG (Signal ground)
DSR (Data set ready)
RTS (Request to send)
CTS (Clear to send)
Ring indicator
2
1
6
78 / FactoryLink 6.6.0 / Device Interface Guide
7
5
4
3
8
9
SETTING UP SERIAL COMMUNICATIONS
Cable Description and Diagrams
C ABLE D ESCRIPTION
AND
D IAGRAMS
4
Figure 4-1 illustrates an RS-232 cable connection. Because handshaking signals
are tied back, this cable does not rely on the device for proper signal manipulation.
Figure 4-1 RS-232 Cable to Device
FactoryLink Port
Device
Shield
TxD
TxD
RxD
RxD
SG
SG
RTS
RTS
CTS
DSR
CTS
DSR
CD
CD
DTR
DTR
Device-Dependent
Signals
Figure 4-1 illustrates an RS-422 cable connection between the FactoryLink
computer’s serial port and a device. The RS-422 is an electrical rather than a
mechanical interface standard and requires no pin settings.
Figure 4-1 RS-422 Cable to Device
FactoryLink Port
Device
Shield
TxD +
+ RxD
TxD -
- RxD
RxD +
+ TxD
RxD -
- TxD
COM
COM
FactoryLink 6.6.0 / Device Interface Guide / 79
External Device
Interface
The FactoryLink connector’s TxD signal must be connected to the device
connector’s RxD signal. Likewise, RxD must be connected to TxD. The RTS signal
must be tied back to the CTS signal on both the FactoryLink and the device
connectors. DSR, CD, and DTR must also be tied back on both connectors.
•
SETTING UP SERIAL COMMUNICATIONS
•
Worksheet for Cable Connections
•
•
W ORKSHEET
FOR
C ABLE C ONNECTIONS
Use the following worksheet when establishing cable connections for the devices.
Complete a worksheet for each device in the configuration.
Table 4-1 Worksheet for Pin Connections
FactoryLink Port_____
Device Port_____
Pin
Signal
Signal
Pin
___
TxD
RxD
___
___
RxD
TxD
___
___
RTS
RTS
___
___
CTS
CTS
___
___
SG
SG
___
___
DSR
DSR
___
___
DCD
DCD
___
___
DTR
DTR
___
80 / FactoryLink 6.6.0 / Device Interface Guide
SETTING UP SERIAL COMMUNICATIONS
Worksheet for Cable Connections
To complete the worksheet, perform the following steps:
4
Note
1 Note the number of pins on the cable connectors for the FactoryLink station port
and the device port. Record this information in the blanks next to FactoryLink Port
and Device Port at the top of the worksheet. For example, write 25-pin next to
FactoryLink Port and 9-pin next to Device Port.
2 Record the pin numbers corresponding to the cable on the FactoryLink side of the
configuration in the blanks next to the appropriate signals on the worksheet. For
example, write 2 in the first row of the first Pin column to indicate the
FactoryLink TXD is 2.
3 Enter the pin numbers corresponding to the cable on the device side of the
configuration in the blanks next to the appropriate signals. For example, write 2
in first row of the second Pin column to indicate the device RxD is 2.
4 Create the cable from the resulting configuration.
FactoryLink 6.6.0 / Device Interface Guide / 81
External Device
Interface
Some examples of worksheet entries are provided for your
reference. Pin numbers can vary, however, and the ones shown in
these examples will not necessarily match the numbers in your
FactoryLink and device hardware configuration.
•
SETTING UP SERIAL COMMUNICATIONS
•
Worksheet for Cable Connections
•
•
82 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 5
Configuring
Communication Paths
This chapter describes how to establish these communication paths by configuring
two tables: External Device Definition and Logical Station.
• On the External Device Definition table, you identify your device to the
FactoryLink system and define each logical port in your configuration. For a
description of the steps involved in filling out the External Device Definition
table, see “Identifying Protocol Types and Defining Logical Ports” on page 84.
• On the protocol-specific Logical Station table, you define the paths to be used
for communications between the devices and FactoryLink. For a description of
the steps involved in filling out the Logical Station table, see “Creating Logical
Station Definitions” on page 92.
FactoryLink 6.6.0 / Device Interface Guide / 83
External Device
Interface
Once each device is connected properly and communicating with the computer
running FactoryLink, you are ready to establish the paths (or routes) over which
FactoryLink will communicate with the devices.
5
•
CONFIGURING COMMUNICATION PATHS
•
Identifying Protocol Types and Defining Logical Ports
•
•
I DENTIFYING P ROTOCOL TYPES
AND
D EFINING L OGICAL P ORTS
You configure FactoryLink to recognize the protocol module and each logical port
through which communications will occur by completing the External Device
Definition panel, accessed from the Configuration Manager Main Menu. For
FactoryLink to recognize the protocol module, you specify a protocol-specific
identifier. For FactoryLink to recognize each physical port that is part of the
system configuration, you create a logical definition for each port.
To identify the protocol and define the logical ports, perform the following steps:
1 If your FactoryLink application will communicate with devices via several
different ports, complete the Logical Station Worksheet. Refer to “Completing the
Logical Station Worksheet” on page 85 for details.
Note
This worksheet can be used with any protocol module in the
FactoryLink 6.6.0 base set. It can be especially helpful, however, in
documenting numbering schemes for hardware configurations that
not only include multiple ports but that also use one or more
network interface modules to route communications to devices
across a proprietary network. Allen-Bradley and Square D are
examples of protocol modules that provide this type of support. A
sample worksheet is provided on page 86 in which the
Allen-Bradley protocol module is used as an example.
2 Create the logical port definitions for each physical port. Refer to “Creating the
Logical Port Definitions” on page 87 for details.
84 / FactoryLink 6.6.0 / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Identifying Protocol Types and Defining Logical Ports
Completing the Logical Station Worksheet
Table 5-0 Logical Station Worksheet
Logical
Port
Port
Type of
Communication
Device Configured
for Communication
Logical
Station
FactoryLink 6.6.0 / Device Interface Guide / 85
5
External Device
Interface
The following worksheet is designed to help you plan, organize, and document the
numbering scheme for the devices and ports that need to be configured for
FactoryLink communications. You will use the completed worksheet when
configuring the External Device Definition and Logical Station tables. A sample
worksheet is provided on page 86.
•
CONFIGURING COMMUNICATION PATHS
•
Identifying Protocol Types and Defining Logical Ports
•
•
In the sample worksheet below, five devices are configured to communicate out of
four different ports: two COM ports and two DigiBoard ports.
Table 5-0 Sample Completed Logical Station Worksheet
Logical
Port
Port
Type of
Communication
0
COM1
System unit serial PLC-2
0
1
COM2
System unit serial PLC-3
1
PLC-3
2
1
Device Configured
for Communication
Logical
Station
2
COM5
DigiBoard port 1
PLC-5
3
3
COM6
DigiBoard port 2
PLC-5
4
For the corresponding External Device Definition and Logical Station table
entries, see “Table Entries for Sample Worksheet” on page 103.
86 / FactoryLink 6.6.0 / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Identifying Protocol Types and Defining Logical Ports
Creating the Logical Port Definitions
The following steps describe the procedure for creating a logical port definition for
each port that is part of the system configuration.
Domain Selection box.
2 Choose External Device Definition from the Main Menu. The External Device
Definition panel is displayed.
3 Using the field descriptions provided below, complete a row in the panel for each
port to which a device in the configuration is connected. Sample entries are
provided in “Sample External Device Definition Table Entries” on page 90.
Logical Port
Enter a unique number to logically represent each port to which a
device is connected.
Valid Entry: 0 - 999
Physical Port
For each logical port number, enter a number referencing the
physical port to which the device is connected.
Serial Ports—For each logical port, enter the number matching
the physical port to which the device is connected. Be sure to
enter an appropriate number for your hardware configuration. If
the system unit does not contain an expansion card, not all valid
port number entries can be used.
FactoryLink 6.6.0 / Device Interface Guide / 87
External Device
Interface
1 Ensure the current domain selection is SHARED in the Configuration Manager
5
•
CONFIGURING COMMUNICATION PATHS
•
Identifying Protocol Types and Defining Logical Ports
•
•
DigiBoard Ports—For the first logical port number, enter a
physical port number that does not conflict with the configured
physical COM ports existing in your computer system prior to
DigiBoard installation. For example, if the operating system is
configured for four ports, COM1 through COM4, a good choice for
this physical port number is 5.
For the second and subsequent logical port numbers, enter a
different number for each port. For example, increment each
physical port number by one.
DigiBoard communication port numbers are offset by the total
number of configured COM ports prior to DigiBoard installation.
Using the previous example of four configured ports, COM1
through COM4, installation of an eight-port DigiBoard would
provide eight more ports, COM5 through COM12.
If more than one DigiBoard is used, assign each board the
sequential number following the number representing the last
port on the previous board. For example, if the ports on the first
board are configured as physical ports 5 through 12, the ports on
a second eight-port board would be 13 through 20.
Entry Definition
1 - 32 Windows and OS/2
0 - 31 UNIX
Device Name
For each logical port, enter the protocol-specific acronym that
identifies the protocol module communicating through the port.
Entry Definition
AB Allen-Bradley
GENE General Electric
ASYN General Purpose Interface
MODP Modbus Plus
MBUS Modicon Modbus
OMRN OMRON Host Link
SIEM Siemens CP525
H1MP Siemens H1
SQRD Square D
TI Texas Instruments TIWAY
88 / FactoryLink 6.6.0 / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Identifying Protocol Types and Defining Logical Ports
Function
Valid Entry: Ctrl+K
Comment
Optionally, enter descriptive information about this logical port.
Valid Entry: alphanumeric string of up to 14 characters
4 When each logical port has been defined, click on Enter to validate the information.
Next, click on Exit to return to the Main Menu.
5 Create logical station definitions for each logical port. These define the paths to be
used for communications between each device and FactoryLink. For details, see
“Creating Logical Station Definitions” on page 92.
FactoryLink 6.6.0 / Device Interface Guide / 89
5
External Device
Interface
For each logical port, identify the type of communications. For the
protocol modules in the FactoryLink 6.6.0 base set, specify
SYSCOM for serial communications (including DigiBoard) or
ETHERNET for Ethernet communications if supported for the
protocol module (see page 44).
•
CONFIGURING COMMUNICATION PATHS
•
Identifying Protocol Types and Defining Logical Ports
•
•
Sample External Device Definition Table Entries
A completed panel for two COM ports might resemble the sample panel below.
Figure 5-0 Sample Panel for Two COM Ports
Logical Port 0
FactoryLink
COM
Computer
Port
COM
Port
Logical Port 1
This sample panel configures two
instances of the Allen-Bradley
protocol module communicating via
two system unit COM ports in a
Windows operating environment.
Logical port 0 identifies COM1 and
Logical port 1 identifies COM2.
90 / FactoryLink 6.6.0 / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Identifying Protocol Types and Defining Logical Ports
A completed panel for two DigiBoards might resemble the sample panel below.
5
Figure 5-0 Sample Panel for Two DigiBoards
External Device
Interface
First
DigiBoard
Second
DigiBoard
FactoryLink
Computer
Logical Port 4
Logical Port 3
Logical Port 2
Logical Port 1
Logical Port 8
Logical Port 7
Logical Port 6
Logical Port 5
This sample panel configures two
DigiBoards with devices connected to four
ports on each board. Logical port 1
identifies the first port on the first board.
Logical ports 2, 3, and 4 identify the
second, third, and fourth ports on the first
board. Logical port 5 identifies the first port
on the second board. Logical ports 6, 7,
and 8 identify the second, third, and fourth
ports on the second board. One instance of
the Allen-Bradley protocol is configured for
each port, meaning eight instances of
Allen-Bradley are configured.
FactoryLink 6.6.0 / Device Interface Guide / 91
•
CONFIGURING COMMUNICATION PATHS
•
Creating Logical Station Definitions
•
•
C REATING L OGICAL S TATION D EFINITIONS
To create logical station definitions, you associate the logical ports defined in the
External Device Definition table with the actual physical stations (the devices) to
communicate with FactoryLink. This association defines and initializes the routes
over which data will travel between the devices and the interface software.
The logical station definitions identify sources and destinations for the read and
write requests you will configure later in read and write tables, and can include
FactoryLink real-time database elements to which system messages from the EDI
task and the device protocol module will be written.
The Logical Station table, where you create these definitions, consists of two
panels, Logical Station Control and Logical Station Information. These panels are
part of the cascading group of protocol-specific panels displayed from the Main
Menu when you choose the option for the protocol module you are configuring.
The following steps describe how to create logical station definitions for each
logical port that communicates with a device.
Note
To show the correspondence between the External Device
Definition table and the Logical Station table and how the entries
you make in these tables create the logical station definitions, the
Modicon Modbus Plus protocol module is used as an example.
1 Ensure the current domain selection is SHARED in the Configuration Manager
Domain Selection box.
2 Choose the option for the protocol module you are configuring from the Main
Menu. A cascaded view of all the configuration panels for that module is
displayed.
3 Display the Logical Station Control panel by clicking on its title bar in the display
of all panels.
On the Logical Station Control panel, you define pertinent information about each
communication path to a device so FactoryLink can establish communications
with all the devices. This information varies from one protocol module to another.
92 / FactoryLink 6.6.0 / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Creating Logical Station Definitions
In general, however, a definition for a communication path can include (but is not
limited to) the following information:
5
• The logical port number, to create the association with the External Device
Definition table
(such as baud rate and parity) that match protocols defined in the device
• The amount of time the protocol module communicating through the port will
wait to receive a device response to a read or write request before timing out
• A particular communication mode, internal data path specified on a proprietary
network card, or other needed protocol-specific parameter for the port
• Message elements to which values can be written to indicate communications
errors associated with the port
4 Refer to your completed logical station worksheet to help you identify logical ports
and associate them with logical stations. See “Completing the Logical Station
Worksheet” on page 85 for details.
5 Table 5-0 lists references to instructions for creating the logical station definitions
for each protocol-specific module in the base set. To create the definitions for the
protocol module your devices will communicate with, go to the specified page in
the appropriate reference.
Note
Before going to the section describing the Logical Station panel
entries for the protocol module you are configuring, you may want
to first review the procedure for creating logical station definitions
for Modbus Plus in “Modicon Modbus Plus Logical Station Table”
on page 96. The information in the sections describing the panel
entries for the other protocol modules is presented in a reference
format and will not necessarily show the associations and results
of the entries as the information in this section does.
FactoryLink 6.6.0 / Device Interface Guide / 93
External Device
Interface
• For the port represented by the logical port number, communication protocols
•
CONFIGURING COMMUNICATION PATHS
•
Creating Logical Station Definitions
•
•
Table 5-0 Logical Station Definition Reference
Protocol Module
Go To
Allen-Bradley
“Configuring the Logical Station Control Panel”
on page 212
General ElectricFanuc
“Configuring the Logical Station Control Panel”
on page 256
General Purpose Interface
“Configuring the Logical Station Control Panel”
on page 281
Modicon Modbus™
“Configuring the Logical Station Control Panel”
on page 360
Modicon Modbus Plus™
“Modicon Modbus Plus Logical Station Table” on
page 96
OMRON™ Host Link Protocol “Configuring the Logical Station Control Panel”
on page 408
Siemens CP525®
“Configuring the Logical Station Control Panel”
on page 436
Siemens Sinec H1
“Configuring the Logical Station Control Panel”
on page 464
Square D
“Configuring the Logical Station Control Panel”
on page 518
Texas Instruments™
TIWAY/Point-to-Point
Before completing the Logical Station table, you
must complete the Unilink Setup table. For
details, see “Configuring the Unilink Setup
Table” on page 550. Once the Unilink Setup
table is completed, refer to “Configuring the
Logical Station Control Panel” on page 554.
6 When the Logical Station Control panel is complete, click on Enter to validate the
data.
7 The Tag Definition dialog is displayed for each specified tag name that is not
defined elsewhere in FactoryLink. For each tag name, choose the type of data to
be stored in the element for Type and accept the default of SHARED for Domain.
Refer to the tag’s field description for the valid data types.
94 / FactoryLink 6.6.0 / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Creating Logical Station Definitions
8 Select the row for the logical port you are configuring. Click on Next to display the
Logical Station Information panel. The logical port number is displayed in the
Logical Port field on the lower left side of the panel.
9 Complete a row in the panel for each device to communicate through this logical
port.
10 Click on Enter to validate the data.
11 The Tag Definition dialog is displayed for each specified tag name that is not
defined elsewhere in FactoryLink. For each tag name, choose the type of data to
be stored in the element for Type and accept the default of SHARED for Domain.
Refer to the tag’s field description for the valid data types.
12 To configure another logical port, click on Prev to return to the Logical Station
Control panel and repeat the steps beginning with step 5.
13 When you are ready to define the read and write operations expected to occur
between this logical port and the associated Modbus Plus devices configured as
logical stations, refer to the appropriate chapter: Chapter 6, “Reading Data from a
Device,” or Chapter 7, “Writing Data to a Device.”
FactoryLink 6.6.0 / Device Interface Guide / 95
External Device
Interface
On the Logical Station Information panel, you define logical station numbers
which identify the address and device type for each device in the configuration
and long analog elements to which error codes for particular devices (logical
stations) will be written. For some protocol modules, the Logical Station
Information panel requires other entries, such as limits or additional
device-specific addressing information.
5
•
CONFIGURING COMMUNICATION PATHS
•
Creating Logical Station Definitions
•
•
Modicon Modbus Plus Logical Station Table
The following steps describe the procedure for completing the Modicon Modbus
Plus Logical Station table.
1 Using the following field descriptions, complete a row in the Logical Station
Control panel for each logical port defined in the External Device Definition table
you want to include in the communication path. Sample entries are provided in
“Sample Logical Station Table Entries” on page 101.
Logical Port
Enter a number, defined in the External Device Definition table
Logical Port field, to represent a particular communication path to
a Modbus Plus device.
Valid Entry: previously defined logical port number
The External Device Definition panel
logical port definition identifies the
port to EDI as a designated Modbus
Plus port.
The Logical Station Control panel
logical port definition links with the
EDI port definition to further define
communication parameters.
Adapter Number
Enter either 0 or 1 to logically represent the SA85 host adapter.
The default is 0.
In a Windows or an OS/2 environment, the Adapter Number entry
must match the /n parameter of the line for the SA85 device
assignment (MBHOST.SYS for Windows and MPHOST.SYS for
OS/2) in the CONFIG.SYS file.
Valid Entry: 0, 1
96 / FactoryLink 6.6.0 / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Creating Logical Station Definitions
LPORT Status
Message Tag
Optionally, enter a tag name for a message element to which a
text string will be written to indicate a communications error
associated with this logical port.
Data Master Paths
Enter a number from 1 to 8 to represent the number of
communications channels to be used for command/response
transactions between the SA85 card and the Modbus Plus device
this logical port represents. Be sure the number of master paths
you define does not conflict with paths defined for other software
(such as the device programming software) using the card.
Data master paths provide avenues for getting data back and
forth between FactoryLink and Modicon devices. Each additional
path you define increases the throughput of messages to and from
a device. When multiple channels are open to a single device, the
transactions required for a read or write operation can occur
simultaneously over several paths rather than one at a time as
they would over only one path.
Valid Entry: numeric value from 1 - 8 (default = 3)
DS1, DS2,... DS8
Define each data slave (DS) path to this logical port over which
unsolicited data can be transmitted from a device to FactoryLink.
For instance, to define six data slave paths, specify YES in six
DSn fields. Be sure the number of slave paths you define does not
conflict with paths defined for other software using the card. For
more information about data slave paths, refer to the Modicon
Modbus Plus Network Programming Guide.
Valid Entry: yes, no (default = no)
2 When the Logical Station Control panel is complete, click on Enter to validate the
data.
3 The Tag Definition dialog is displayed for each specified tag name that is not
defined elsewhere in FactoryLink. For each tag name, choose MESSAGE for Type
and accept the default of SHARED for Domain.
FactoryLink 6.6.0 / Device Interface Guide / 97
External Device
Interface
Valid Entry: standard element tag name
Valid Data Type: message
5
•
CONFIGURING COMMUNICATION PATHS
•
Creating Logical Station Definitions
•
•
4 Select the row for the logical port you are configuring. Click on Next to display the
Logical Station Information panel.
The logical port number is displayed in the Logical Port field on the lower left side
of the panel.
On the Logical Station Information panel, you define the following information:
• Long analog elements to which error codes for particular devices (logical
stations) will be written
• For each logical port, logical station numbers that identify the device address,
network router address, and the device type for each device in the configuration
• The number of consecutive times FactoryLink will send a read or write
command to a logical station after an unsuccessful transmission attempt, the
amount of time FactoryLink will wait before retrying a transmission attempt,
and tag names for elements reporting the success or failure of these attempts
98 / FactoryLink 6.6.0 / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Creating Logical Station Definitions
5 Using the following field descriptions, complete a row in the panel for each device
5
to communicate through this logical port.
LSTA Status
Analog Tag
For information about displaying the codes stored in an LSTA
Status Analog Tag element for an operator using this application,
see the Application Editor.
Valid Entry: standard element tag name
Valid Data Type: analog
Logical Station
(Decimal)
Enter a number to identify the logical station to which the
information in this row pertains. A logical station represents the
combination of a logical port with a physical station. Assign a
unique number to each device communicating through this
logical port. This number must be unique among all Modicon
devices across all ports.
You will later enter this logical station number in a read or write
table to represent the device defined in this row. In a read or
write table, this number will identify the device to or from which
data is to be sent or received.
Valid Entry: unique numeric value from 0 - 999 (default = 0)
PLC Type
Define the type of Modbus Plus device to which communications
are to be directed: 984 or 984BITWRITE for devices that support
the mask write function (A120, A130, A141, A145, 685E, 785E,
AT4, and VM4).
Valid Entry: Ctrl+K (default = 984)
Physical Station
Enter the physical address of the Modbus Plus device. This
address must match the configured address of the equipment.
Valid Entry: numeric value from 0 - 64 (default = 0)
Router1... Router4
Define the Modbus Plus network address of each router or bridge
to a logical station. Up to four routers can be defined for each
physical station.
Valid Entry: numeric value from 0 - 64 (default = 0)
FactoryLink 6.6.0 / Device Interface Guide / 99
External Device
Interface
Optionally, enter a tag name for an analog element to receive
communication error codes associated with this device (logical
station).
•
CONFIGURING COMMUNICATION PATHS
•
Creating Logical Station Definitions
•
•
Response Timeout
0.01 sec
Enter a number between 1 and 300 that defines the length of
time, in hundredths of a second, the protocol module will wait to
receive a device response to a read or write command before
timing out. The timeout occurs after each retry of the
transmission attempt (as specified in the Number of Retries field).
If you specify 300 for Response Timeout 0.01 sec and 3 for Number
of Retries, for example, a three-second timeout occurs after each
retry. If the device does not respond after the third retry,
transmission attempts cease for that command. If all three
retries are exhausted, the total duration of the transmission
attempt is nine seconds.
Valid Entry: numeric value from 1 - 300 (default = 1)
Number of Retries
Define the maximum number of consecutive times a read or write
command will be sent to a logical station after an unsuccessful
first transmission attempt.
Valid Entry: numeric value from 0 - 10 (default = 3)
LSTA Failure
Digital Tag
Optionally, define a tag name for a digital element to receive the
status of communication attempts for this logical station. If the
value of this element is 0 (OFF), the communication attempt to
this logical station was successful. If the value of this element is 1
(ON), the communication attempt to this logical station failed.
You can also specify this tag name in the Alarm Supervisor for an
alarm element to indicate a communications failure.
Valid Entry: standard element tag name
Valid Data Type: digital
LSTA Failure
Message Tag
Optionally, define a tag name for a message element to receive
text describing the status of communication attempts for this
logical station. This tag works in conjunction with the LSTA
Failure Digital Tag field to display a meaningful error message for
the operator on the Alarm Supervisor screen.
Valid Entry: standard element tag name
Valid Data Type: message
Comment
Optionally, enter reference information about this logical station.
Valid Entry: alphanumeric string of up to 30 characters
6 Click on Enter to validate the data.
100 / FactoryLink 6.6.0 / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Creating Logical Station Definitions
7 The Tag Definition dialog is displayed for each specified tag name that is not
defined elsewhere in FactoryLink. For each tag name, choose the type of data to
be stored in the element for Type and accept the default of SHARED for Domain.
Refer to the tag’s field description for the valid data types.
Control panel and repeat these steps beginning with step 1 on page 96.
9 When you are ready to define the read and write operations expected to occur
between this logical port and the associated Modbus Plus devices configured as
logical stations, refer to the appropriate chapter: Chapter 6, “Reading Data from a
Device,” or Chapter 7, “Writing Data to a Device.”
Sample Logical Station Table Entries
When all Logical Station Control panel information has been specified, the panel
should resemble the following example:
Figure 5-0 Sample Logical Station Control Panel
Continued
Continued
In this example, logical port 0 of the SA85 card configured as 0 in the
CONFIG.SYS file has six allocated data master paths over which
command/response transactions for read and write operations can travel. Four
data slave paths are available for transmission of unsolicited data from any device
FactoryLink 6.6.0 / Device Interface Guide / 101
External Device
Interface
8 To configure another logical port, click on Prev to return to the Logical Station
5
•
CONFIGURING COMMUNICATION PATHS
•
Creating Logical Station Definitions
•
•
communicating with FactoryLink through this logical port (in this instance,
logical station 0 defined on the Logical Station Information panel). Additionally,
the EDI task will store communications error messages associated with this
logical port in a message element, MODP_LPORT0_MSG.
When all Logical Station Information panel information has been specified, the
panel should resemble the following example:
Figure 5-0 Sample Logical Station Information Panel
Continued
Continued
Continued
Continued
In this example, the analog element MODP_STATION0_STATUS is configured to
hold port errors for logical station 0, which communicates with a Modicon 984
device at address 10.30.31. After an initial unsuccessful attempt to transmit an
instruction for a read or write operation, FactoryLink makes up to three more
one-second attempts (three total seconds) then ceases trying to send the data to
the device. All attempts to transmit instructions to the device are documented in a
pair of elements, MODP_LS0_FAIL_DIG and MODP_LS0_FAIL_MSG, that work
together to provide a meaningful operator message for display purposes.
102 / FactoryLink 6.6.0 / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Table Entries for Sample Worksheet
TABLE E NTRIES
FOR
S AMPLE WORKSHEET
5
Figure 5-0 Table Entries Corresponding to Sample Logical Station Worksheet
First, you assign a logical
port number to each
physical port in the External
Device Definition table.
Then, you further define these
logical ports in the Logical
Station Control panel.
Next, you associate the logical ports with the physical
devices (logical stations) that will communicate
through the ports by completing a Logical Station
Information panel for each logical port.
FactoryLink 6.6.0 / Device Interface Guide / 103
External Device
Interface
The External Device Definition and Logical Station table entries corresponding to
the sample configuration recorded on the logical station worksheet on page 86 are
shown in Figure 5-0.
•
CONFIGURING COMMUNICATION PATHS
•
Table Entries for Sample Worksheet
•
•
104 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 6 17
Reading Data from a
Device
This chapter describes how to define a request to read locations in a device and
store the information read in FactoryLink database elements. See Chapter 7,
“Writing Data to a Device,” for procedures describing how to define a request to
write the values of FactoryLink database elements to locations in a device.
To define a read request, you configure the Read/Write table which consists of two
panels: Read/Write Control and Read/Write Information. Like the Logical Station
panels, the Read/Write panels are part of the cascading protocol-specific panels
displayed when you choose the option for the protocol module you are configuring
from the Configuration Manager Main Menu.
Note
The Modicon Modbus Plus protocol module is used as an example
throughout this chapter to describe basic read operation concepts.
For protocol-specific information, please refer to the appropriate
reference chapter.
When filling out a read request, you specify in which elements the device data
read during the operation will be stored. For each element, you specify:
• The tag name assigned to the FactoryLink database elements storing the data
• The logical station from which the data will be read
• The register address in that logical station containing the data to be read
Depending on the protocol module used, you can configure two types of read
requests, triggered and unsolicited, or a combination of these. Refer to Table 1-1
on page 52 for supported read functions.
FactoryLink 6.6.0 / Device Interface Guide / 105
External Device
Interface
After setting up the communication paths in the External Device Definition and
Logical Station configuration tables, the next step is to define information about
the data to be read from and written to the devices.
6
•
READING DATA FROM A DEVICE
•
Triggered Read Request
•
•
TRIGGERED R EAD R EQUEST
In a triggered read request, a digital element you configure in the Read/Write
Control panel as a trigger to initiate a block read operation causes FactoryLink to
read the values at device addresses you specify in the associated Read/Write
Information panel each time the value of the trigger element is forced to 1 (ON).
FactoryLink reads the values read then stores them in real-time database
elements for which you specify tag names in the Read/Write Information panel.
Figure 6-1 How a Triggered Read Operation Works
When the block
read trigger is
forced on,...
The table name
indicates which
request is being
defined.
...the task reads each
defined address...
...then stores the value read
in the element specified to
receive the value.
106 / FactoryLink 6.6.0 / Device Interface Guide
READING DATA FROM A DEVICE
Unsolicited Read Request
U NSOLICITED R EAD R EQUEST
6
When FactoryLink receives data from the device that matches this criteria, the
data is stored in real-time database elements for which you specify tag names in
the Read/Write Information panel.
Figure 6-1 How an Unsolicited Read Operation Works
When you enter YES
in the Unsolicited
Read field,...
...the EDI task is prepared to
recognize the data structure of the
value at each defined address
according to its data type.
When FactoryLink receives a value
that matches the criteria, it stores
the value in the specified element.
FactoryLink 6.6.0 / Device Interface Guide / 107
External Device
Interface
In an unsolicited read request, you configure FactoryLink to recognize and accept
data of a particular structure. In the Read/Write Control panel, you indicate this
is an unsolicited read. In the Read/Write Information panel, you specify the
addresses from which data is expected and the type of data expected.
•
READING DATA FROM A DEVICE
•
Defining the Table Type and Triggers
•
•
D EFINING
THE
TABLE TYPE
AND
TRIGGERS
To begin configuring a read table, you fill out the Read/Write Control panel. Here,
you give the table a name, identify the table type, and define one or more trigger
elements if the table is for a triggered read operation. The following steps describe
how to fill out the Read/Write Control panel.
1 Ensure the current domain selected is SHARED in the Configuration Manager
Domain Selection box.
2 If the Logical Station Information panel is currently displayed, click on Next and
go to step 5. If another protocol-specific panel is currently displayed, go to step 4.
3 Choose the protocol module name from the Main Menu. A cascaded view of all the
protocol-specific configuration panels is displayed.
To make Read/
Write Control the
active panel, click
on its title bar.
4 Click on the title bar of the Read/Write Control panel.
108 / FactoryLink 6.6.0 / Device Interface Guide
READING DATA FROM A DEVICE
Defining the Table Type and Triggers
6
External Device
Interface
5 For each read request you want transmitted over a device communication path,
add a panel entry. The information you provide depends on the type of request you
are defining.
Refer to the appropriate section for the type of read request you are defining:
• “Triggered Read Request” below
• “Unsolicited Read Request” on page 112
• “Combination Read Request” on page 113
Triggered Read Request
To fill out a control panel for a triggered read request, perform the following steps.
1 Using the following field descriptions, add a panel entry for each triggered read
request you want to define. Leave all other fields blank. Sample entries are
provided in “Sample Triggered Read Request” on page 134.
Table Name
Give this read request a name. Define one request (table) per line
and do not include spaces in the name. You can define as many
requests in this panel as available memory allows. Try to make
the table name reflective of the operation it represents.
When the Block Read Trigger element defined for this table is
forced to 1, or on, the element prompts FactoryLink to process
this read table and any other read table with a Table Name entry
associated with the same trigger.
Valid Entry: alphanumeric string of up to 16 characters
FactoryLink 6.6.0 / Device Interface Guide / 109
•
READING DATA FROM A DEVICE
•
Defining the Table Type and Triggers
•
•
Unsolicited Read
For EDI to interpret this operation as a triggered block read,
accept the default of NO.
Valid Entry: no
Exception Write
To indicate this is not an exception write, accept the default of
NO.
Valid Entry: no
Block Read Priority
Enter a number to indicate the priority of this table, relative to
other read operations. The highest priority is 1. This number
influences the order in which the EDI task handles the queuing of
block read requests. If EDI receives two requests at the same
time, it processes the request with the highest priority first.
Valid Entry: 1 - 4 (default=1)
Block Read Trigger
Enter a tag name for a digital element to initiate a block read of
the register addresses specified in the associated Read/Write
Information panel. When this element’s value is forced to 1 (ON),
FactoryLink reads the addresses.
A Block Read Trigger is required to prompt FactoryLink to process
this table for a triggered read operation.
The element you use for the Block Read Trigger can also be defined
in another FactoryLink task. For example, you could define a
digital element in the Event or Interval Timer, Math and Logic,
or Application Editor, and assign the same tag name to a Block
Read Trigger element. When the element’s value changes to 1 (as
the result of a math operation or a defined event taking place, for
example), it prompts an EDI task read operation.
For efficient performance in larger applications, you can define a
Block Read Trigger element as a Block Read State element, causing
a daisy-chain effect within one table or across several tables.
When you give identical names to a Block Read State and a Block
Read Trigger element, the completion of one read operation
triggers the start of another. For a description and examples of
how to create a daisy-chain read operation, see Chapter 8,
“Application Design Tips and Techniques.”
For additional information about triggers, see Chapter 1,
“External Device Interface Overview,” and the discussion of using
tags as triggers in the FactoryLink Fundamentals manual.
Valid Entry: standard element tag name
Valid Data Type: digital
110 / FactoryLink 6.6.0 / Device Interface Guide
READING DATA FROM A DEVICE
Defining the Table Type and Triggers
Block Read
Disable
Optionally, enter a tag name for a digital element to disable a
block read of the elements specified in this table. When this tag’s
value is forced to 1 (ON), the read operation is not executed, even
when the block read trigger is set.
Valid Entry: standard element tag name
Valid Data Type: digital
Note: If you are defining a Block Read Complete or Block Read State element to be
used for more than one logical port, create a separate table for each port.
Block Read
Complete
Optionally, enter a tag name for a digital element the EDI task
forces to 1 (ON), when it starts up, and each time it receives and
processes a read request from a device protocol module. After the
elements defined in the associated Read/Write Information panel
have been updated in the FactoryLink database, EDI forces the
element to 1 again.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Read State
Optionally, enter a tag name for a digital element the EDI task
forces to 1 (ON), when it starts up, and each time it receives and
processes a read request from a device protocol module. During
EDI's transmission of the request, it sets the element to 0 (OFF).
After the elements defined in the associated Read/Write
Information panel have been updated in the FactoryLink
database, EDI forces the element back to 1.
Valid Entry: standard element tag name
Valid Data Type: digital
2 When you have finished filling out the information on this panel, click on Enter.
3 The Tag Definition dialog is displayed for each specified tag name that is not
defined elsewhere in FactoryLink. For each tag name, choose DIGITAL for Type
and accept the default of SHARED for Domain.
4 Define the data to be read and the target addresses in the Read/Write Information
panel. Refer to “Specifying What to Read and Where to Store It” on page 114.
FactoryLink 6.6.0 / Device Interface Guide / 111
External Device
Interface
This element can be used to disable a block read operation that is
either part of a cascaded loop or is self-triggered. The triggering
cycle will cease upon disabling, however. To re-enable a cascaded
loop or a self-triggered read table, the Block Read Trigger element
must be toggled or forced to 1. Refer to Chapter 8, “Application
Design Tips and Techniques,” for further details.
6
•
READING DATA FROM A DEVICE
•
Defining the Table Type and Triggers
•
•
Unsolicited Read Request
To fill out a control panel for an unsolicited read request, perform the following
steps.
1 Using the following field descriptions, add a panel entry for each unsolicited read
request you want to define. Leave all other fields blank. Sample entries are
provided in “Sample Unsolicited Read Request” on page 137.
Table Name
Give this read request a name. Define one request (table) per line
and do not include spaces in the name. You can define as many
requests in this panel as available memory allows. Try to make
the table name reflective of the operation it represents.
Valid Entry: alphanumeric string of up to 16 characters
Unsolicited Read
Enter YES. EDI will interpret this operation as an unsolicited
read and emulate the device’s addressing structure based on
entries you make in the Read/Write Information panel.
The data is written to the element specified in the Read/Write
Information panel. The change-status indicator is set only if the
element’s value has changed since the most recent write to the
element. If the current value of the element is equal to the value
being written, the change-status indicator is unaffected. If,
however, the value being written to the element is a new value, it
will overwrite the existing value and the element’s change-status
indicator will be set to 1 (ON).
Valid Entry: yes
Exception Write
Accept the default of NO, which indicates this is not an exception
write.
Valid Entry: no
Block Read
Priority
Accept the default of 1. This field is ignored for unsolicited read
operations.
Valid Entry: 1
2 When you have finished filling out the information on this panel, click on Enter.
3 Define the data to be read and the target addresses in the Read/Write Information
panel. Refer to “Specifying What to Read and Where to Store It” on page 114 for
details.
112 / FactoryLink 6.6.0 / Device Interface Guide
READING DATA FROM A DEVICE
Defining the Table Type and Triggers
Combination Read Request
In some cases, you may want to configure a read operation to execute in two ways:
by a trigger and by unsolicited processing.
To configure a combination read request, perform the following steps.
1 Fill out a control panel with the information described in “Triggered Read
Request” on page 109, but enter YES in the Unsolicited Read field instead of NO.
2 When you have finished filling out the information on this panel, click on Enter.
3 Define the data to be read and the target addresses in the Read/Write Information
panel. Refer to “Specifying What to Read and Where to Store It” on page 114 for
details.
FactoryLink 6.6.0 / Device Interface Guide / 113
External Device
Interface
For example, you could configure a combination triggered block read and
unsolicited read table if you want to read a register and write its value to an
element upon start up and thereafter, only update that element when the register
value changes.
6
•
READING DATA FROM A DEVICE
•
Specifying What to Read and Where to Store It
•
•
S PECIFYING W HAT
TO
R EAD
AND
W HERE
TO
S TORE I T
Once the Read/Write Control panel is complete, fill out the Read/Write
Information panel. Here, you indicate what data is transferred from the device to
FactoryLink during the operation, and where the data is stored in the
FactoryLink database.
Each address that will be read from a memory location in a device is represented
by a separate tag name for an element in the FactoryLink database. For a read
request, you add an entry in the Read/Write Information panel for each element to
which data will be written when the operation is executed.
The following steps describe how to fill out the Read/Write Information panel.
1 On the Read/Write Control panel, select the row for the read request you are
defining. Click on Next to display the Read/Write Information panel.
114 / FactoryLink 6.6.0 / Device Interface Guide
READING DATA FROM A DEVICE
Specifying What to Read and Where to Store It
6
External Device
Interface
Table Name from
the Read/Write
Control panel
The table name is displayed in the Table Name field on the lower left side of the
panel.
2 The information you provide in this panel depends on the type of register to be
accessed and the type of data to be read. Refer to the data type reference table on
page 116 to determine where to go for instructions on filling out this panel for your
particular application.
Each section listed in the table provides sample panel entries for a specific type of
read request. Additional sample entries are provided in “Sample Read Requests”
on page 134.
3 When you have finished defining all the register addresses to be read and all the
FactoryLink database tags to which the data is to be written, click on Enter to
validate the data.
4 The Tag Definition dialog is displayed for each specified tag name that is not
defined elsewhere in FactoryLink. For each tag name, choose the type of data to
be stored in the element for Type and accept the default of SHARED for Domain.
Refer to the tag’s field description for the valid data types.
5 To configure another read request, click on Prev to return to the Read/Write
Control panel and refer to step 5 on page 109.
6 When all read requests are complete, either click on Exit to return to the Main
Menu or click on Prev to return to the Read/Write Control panel and define the
write requests required for your application. Refer to Chapter 7, “Writing Data to
a Device,” for details.
FactoryLink 6.6.0 / Device Interface Guide / 115
•
READING DATA FROM A DEVICE
•
Specifying What to Read and Where to Store It
•
•
Table 6-1 Register and FactoryLink Data Type Configuration Reference
Register
Type
Holding
FactoryLink
Data Type
Where to Go for
Configuration Instructions
Analog
“Read Holding or Input Register, Store in
Analog Element” on page 118
Digital
“Read Holding or Input Register, Store in
Digital Element” on page 120
Float
“Read Holding Register, Store in
Floating-Point or Long Analog Element”
on page 122
Longana
“Read Holding Register, Store in
Floating-Point or Long Analog Element”
on page 122
Message
“Read Holding Register, Store in
Message Element” on page 124
Analog
“Read Holding or Input Register, Store in
Analog Element” on page 118
Digital
“Read Holding or Input Register, Store in
Digital Element” on page 120
Input Status
Digital
“Read Coil or Input Status Register,
Store in Digital Element” on page 126
Coil
Digital
“Read Coil or Input Status Register,
Store in Digital Element” on page 126
Memory
Analog
“Read Memory Register, Store in Analog
Element” on page 128
Statistics
Analog
“Read Statistics Word, Store in Analog
Element” on page 130
Global Data
Analog
“Read Statistics Word, Store in Analog
Element” on page 130
Input
Note: For the maximum number of contiguous registers that can be
included in a single block read message for each supported register type,
see Table 6-1 on page 117.
116 / FactoryLink 6.6.0 / Device Interface Guide
READING DATA FROM A DEVICE
Specifying What to Read and Where to Store It
A read table should not contain more than the maximum number of contiguous
registers allowed for a single message accessing a type of register. The maximum
number allowed varies from one register type to the next.
The following table lists the maximum number of contiguous registers included in
a single block read message for each supported register type.
Table 6-1 Maximum Contiguous Registers in a Single Message
Type of Register
Maximum Number For Block Read
Coil
2000
Holding
125
Global
32 global data words
Input Status
2000
Input
125
Statistics Word
54 words
Memory
100
FactoryLink 6.6.0 / Device Interface Guide / 117
External Device
Interface
If more than the maximum number of contiguous register addresses are defined,
multiple messages are generated for the operation. For example, if a block read
table for a holding register in a 984 device contains entries that access contiguous
addresses from 100 to 127, two messages are generated. The first message reads
the first 125 addresses (addresses 100 to 124). The second message reads
addresses 125 through 127.
6
•
READING DATA FROM A DEVICE
•
Specifying What to Read and Where to Store It
•
•
Read Holding or Input Register, Store in Analog Element
To fill out an information panel for a request to read a holding register or an input
register and store the data in an analog element, perform the following steps.
1 Using the following field descriptions, add a panel entry for each element in which
data read from the device will be stored when the operation executes.
Tag Name
Specify a tag name for an analog element in which FactoryLink
will store the data read from the device.
Valid Entry: standard element tag name
Valid Data Type: analog
Logical Station
Enter the number representing the device from which the data is
to be read. This number was originally defined in the Logical
Station Information panel for the logical port through which
communications with this device occurs.
Valid Entry: previously defined logical station number
118 / FactoryLink 6.6.0 / Device Interface Guide
READING DATA FROM A DEVICE
Specifying What to Read and Where to Store It
6
The Logical Station number
defined on the Read/Write
Information panel must match...
External Device
Interface
...the Logical Station number
defined on the Logical Station
Information panel...
...for this device’s Logical
Port number.
Reg. Address
Enter the register address in the device’s memory where the
value to be stored in this element is located.
Do not include the register address prefix (4 for holding and 3 for
input) or leading zeros. The prefix indicates the register type,
which is specified in the Data Type field. For example, for holding
register address 400001, just enter 1; for input register address
345902, enter 45902.
Valid Entry: 1 - 65535
Bit Offset/
MSG Length
Data Type
Accept the default of 1.
Valid Entry: 1
Specify the type of register to be read as HREG for holding register
or IREG for input register.
Valid Entry: HREG, IREG
2 Go back to step 3 on page 115.
FactoryLink 6.6.0 / Device Interface Guide / 119
•
READING DATA FROM A DEVICE
•
Specifying What to Read and Where to Store It
•
•
Read Holding or Input Register, Store in Digital Element
To fill out an information panel for a request to read a holding register or an input
register and store the data in a digital element, perform the following steps.
1 Using the following field descriptions, add a panel entry for each element in which
data read from the device will be stored when the operation executes.
Tag Name
Specify a tag name for a digital element in which FactoryLink
will store the data read from the device.
Valid Entry: standard element tag name
Valid Data Type: digital
Logical Station
Enter the number representing the device from which the data is
to be read. This number was originally defined in the Logical
Station Information panel for the logical port through which
communications with this device occurs.
Valid Entry: previously defined logical station number
120 / FactoryLink 6.6.0 / Device Interface Guide
READING DATA FROM A DEVICE
Specifying What to Read and Where to Store It
6
The Logical Station number
defined on the Read/Write
Information panel must match...
External Device
Interface
...the Logical Station number
defined on the Logical Station
Information panel...
...for this device’s Logical
Port number.
Reg. Address
Enter the register address in the device’s memory where the
value to be stored in this element is located.
Do not include the register address prefix (4 for holding and 3 for
input) or leading zeros. The prefix indicates the register type,
which is specified in the Data Type field. For example, for holding
register address 400001, just enter 1; for input register address
345902, enter 45902.
Valid Entry: 1 - 65535
Bit Offset/
MSG Length
Specify the bit offset within a register word that contains the
value to be read. Bit 1 is the most significant bit (MSB) and bit 16
is the least significant bit (LSB).
MSB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
LSB
16
Valid Entry: 1 - 16
Data Type
Specify the type of register to be read as HREG for holding register
or IREG for input register.
Valid Entry: HREG, IREG
2 Go back to step 3 on page 115.
FactoryLink 6.6.0 / Device Interface Guide / 121
•
READING DATA FROM A DEVICE
•
Specifying What to Read and Where to Store It
•
•
Read Holding Register, Store in Floating-Point or Long Analog Element
To fill out an information panel for a request to read a holding register and store
the data in a floating-point or long analog element, perform the following steps.
1 Using the following field descriptions, add a panel entry for each element in which
data read from the device will be stored when the operation executes.
Tag Name
Specify a tag name for a floating-point or long analog element in
which FactoryLink will store the data read from the device.
Valid Entry: standard element tag name
Valid Data Type: float, longana
Logical Station
Enter the number representing the device from which the data is
to be read. This number was originally defined in the Logical
Station Information panel for the logical port through which
communications with this device occurs.
Valid Entry: previously defined logical station number
122 / FactoryLink 6.6.0 / Device Interface Guide
READING DATA FROM A DEVICE
Specifying What to Read and Where to Store It
6
The Logical Station number
defined on the Read/Write
Information panel must match...
External Device
Interface
...the Logical Station number
defined on the Logical Station
Information panel...
...for this device’s Logical
Port number.
Reg. Address
Enter the register address in the device’s memory where the
value to be stored in this element is located.
Floating-point or long analog tag types are addressed in pairs.
The first register in the pair contains the high order word; the
second register contains the low order word. Enter the address for
only the starting register in a register pair. The companion
register is implied.
Try to maintain consistency when using register addresses for
floating-point and long analog tag types. Adopt either an odd or
even starting register sequence and maintain that sequence. For
example, 1, 3, 5, 7, 9,... or 2, 4, 6, 8, 10,....
Do not include the register address prefix (4) or leading zeros.
The prefix indicates the register type, which is specified in the
Data Type field. For example, for holding register address 400001,
just enter 1.
Valid Entry: 1 - 65535
Bit Offset/
MSG Length
Data Type
Accept the default of 1.
Valid Entry: 1
Specify HREG as the type of register to be read.
Valid Entry: HREG
2 Go back to step 3 on page 115.
FactoryLink 6.6.0 / Device Interface Guide / 123
•
READING DATA FROM A DEVICE
•
Specifying What to Read and Where to Store It
•
•
Read Holding Register, Store in Message Element
To fill out an information panel for a request to read a holding register and store
the data in a message element, perform the following steps.
1 Using the following field descriptions, add a panel entry for each element in which
data read from the device will be stored when the operation executes.
Tag Name
Specify a tag name for a message element in which FactoryLink
will store the data read from the device.
Valid Entry: standard element tag name
Valid Data Type: message
Logical Station
Enter the number representing the device from which the data is
to be read. This number was originally defined in the Logical
Station Information panel for the logical port through which
communications with this device occurs.
Valid Entry: previously defined logical station number
124 / FactoryLink 6.6.0 / Device Interface Guide
READING DATA FROM A DEVICE
Specifying What to Read and Where to Store It
6
The Logical Station number
defined on the Read/Write
Information panel must match...
External Device
Interface
...the Logical Station number
defined on the Logical Station
Information panel...
...for this device’s Logical
Port number.
Reg. Address
Enter the register address in the device’s memory where the
value to be stored in this element is located.
Enter the first address in the group of registers containing the
message characters. The number of registers to be read is defined in
the Bit Offset/MSG Length field of this panel.
Do not include the register address prefix (4) or leading zeros.
The prefix indicates the register type, which is specified in the
Data Type field. For example, for holding register address 400001,
just enter 1.
Valid Entry: 1 - 65535
Bit Offset/
MSG Length
Specify the number of bytes in the device’s memory containing
the message. These bytes, starting from the location specified in
the previous field, Reg. Address, are read and the values are
stored in the Tag Name message element as raw binary data.
FactoryLink does not perform verification on these bytes to
ensure the data is printable ASCII.
Valid Entry: 1 - 80
Data Type
Specify HREG as the type of register to be read.
Valid Entry: HREG
2 Go back to step 3 on page 115.
FactoryLink 6.6.0 / Device Interface Guide / 125
•
READING DATA FROM A DEVICE
•
Specifying What to Read and Where to Store It
•
•
Read Coil or Input Status Register, Store in Digital Element
To fill out an information panel for a request to read a coil or input status register
and store the data in a digital element, perform the following steps.
1 Using the following field descriptions, add a panel entry for each element in which
data read from the device will be stored when the operation executes.
Tag Name
Specify a tag name for a digital element in which FactoryLink
will store the data read from the device.
Valid Entry: standard element tag name
Valid Data Type: digital
Logical Station
Enter the number representing the device from which the data is
to be read. This number was originally defined in the Logical
Station Information panel for the logical port through which
communications with this device occurs.
Valid Entry: previously defined logical station number
126 / FactoryLink 6.6.0 / Device Interface Guide
READING DATA FROM A DEVICE
Specifying What to Read and Where to Store It
6
The Logical Station number
defined on the Read/Write
Information panel must match...
External Device
Interface
...the Logical Station number
defined on the Logical Station
Information panel...
...for this device’s Logical
Port number.
Reg. Address
Enter the register address in the device’s memory where the
value to be stored in this element is located.
Do not include the register address prefix (0 for coil and 3 for
input status) or leading zeros. The prefix indicates the register
type, which is specified in the Data Type field. For example, for
coil address 023451, enter 23451; for input status register
address 300001, just enter 1.
Valid Entry: 1 - 65535
Bit Offset/
MSG Length
Data Type
Accept the default of 1.
Valid Entry: 1
Specify the type of register to be read as COIL for coil register or
INP for input status register.
Valid Entry: COIL, INP
2 Go back to step 3 on page 115.
FactoryLink 6.6.0 / Device Interface Guide / 127
•
READING DATA FROM A DEVICE
•
Specifying What to Read and Where to Store It
•
•
Read Memory Register, Store in Analog Element
To fill out an information panel for a request to read a memory register and store
the data in an analog element, perform the following steps.
1 Using the following field descriptions, add a panel entry for each element in which
data read from the device will be stored when the operation executes.
Tag Name
Specify a tag name for an analog element in which FactoryLink
will store the data read from the device.
Valid Entry: standard element tag name
Valid Data Type: analog
Logical Station
Enter the number representing the device from which the data is
to be read. This number was originally defined in the Logical
Station Information panel for the logical port through which
communications with this device occurs.
Valid Entry: previously defined logical station number
128 / FactoryLink 6.6.0 / Device Interface Guide
READING DATA FROM A DEVICE
Specifying What to Read and Where to Store It
6
The Logical Station number
defined on the Read/Write
Information panel must match...
External Device
Interface
...the Logical Station number
defined on the Logical Station
Information panel...
...for this device’s Logical
Port number.
Reg. Address
Enter the register address in the device’s memory where the
value to be stored in this element is located.
Do not include the register address prefix (6) or leading zeros.
The prefix indicates the register type, which is specified in the
Data Type field. For example, for memory address 600001, just
enter 1.
Valid Entry: 1 - 65535
Bit Offset/
MSG Length
Data Type
Accept the default of 1.
Valid Entry: 1
Specify the type of register to be read as XMEMnn where nn is a
numeric value from 1 to 10.
Valid Entry: XMEM1 - XMEM10
2 Go back to step 3 on page 115.
FactoryLink 6.6.0 / Device Interface Guide / 129
•
READING DATA FROM A DEVICE
•
Specifying What to Read and Where to Store It
•
•
Read Statistics Word, Store in Analog Element
To fill out an information panel for a request to read the high or low bytes of a
network statistics word and store the data in an analog element, perform the
following steps.
Note
Reference the high and low bytes of a statistics word in one block read
table to ensure the information retrieved for a single word is
synchronized. To access the high and low bytes of a single word,
enter the same register address twice for two separate analog tags.
Specify STATHI in the Data Type field for the first tag and STATLO
for the second tag. To create a single word value, use FactoryLink
Math & Logic to “OR” the words together.
1 Using the following field descriptions, add a panel entry for each element in which
data read from the device will be stored when the operation executes.
Tag Name
Specify a tag name for an analog element in which FactoryLink
will store the data read from the device.
Valid Entry: standard element tag name
Valid Data Type: analog
130 / FactoryLink 6.6.0 / Device Interface Guide
READING DATA FROM A DEVICE
Specifying What to Read and Where to Store It
Logical Station
Enter the number representing the device from which the data is
to be read. This number was originally defined in the Logical
Station Information panel for the logical port through which
communications with this device occurs.
The Logical Station number
defined on the Read/Write
Information panel must match...
...the Logical Station number
defined on the Logical Station
Information panel...
...for this device’s Logical
Port number.
Reg. Address
Enter the register address in the device’s memory where the
value to be stored in this element is located.
Valid Entry: 1 - 65535
Bit Offset/
MSG Length
Data Type
Accept the default of 1.
Valid Entry: 1
Specify STATHI to access a high byte of a statistics word and
STATLO to access a low byte. Refer to the IBM Host Devices
User’s Guide for Modbus Plus network based statistics word
assignments.
Valid Entry: STATHI, STATLO
2 Go back to step 3 on page 115.
FactoryLink 6.6.0 / Device Interface Guide / 131
External Device
Interface
Valid Entry: previously defined logical station number
6
•
READING DATA FROM A DEVICE
•
Specifying What to Read and Where to Store It
•
•
Read Global Data Word, Store in Analog Element
To fill out an information panel for a request to read a global data word and store
the data in an analog element, perform the following steps.
1 Using the following field descriptions, add a panel entry for each element in which
data read from the device will be stored when the operation executes.
Tag Name
Specify a tag name for an analog element in which FactoryLink
will store the data read from the device.
Valid Entry: standard element tag name
Valid Data Type: analog
Logical Station
Enter the number representing the device from which the data is
to be read. This number was originally defined in the Logical
Station Information panel for the logical port through which
communications with this device occurs.
Valid Entry: previously defined logical station number
132 / FactoryLink 6.6.0 / Device Interface Guide
READING DATA FROM A DEVICE
Specifying What to Read and Where to Store It
6
The Logical Station number
defined on the Read/Write
Information panel must match...
External Device
Interface
...the Logical Station number
defined on the Logical Station
Information panel...
...for this device’s Logical
Port number.
Reg. Address
Enter the register address in the device’s memory where the
value to be stored in this element is located.
The first global data word received is always assumed to be word 1,
the second is word 2, and so on. If you specify a register address
larger than the total number of global data words that will actually be
received, an error is generated.
Valid Entry: 1 - 32
Bit Offset/
MSG Length
Data Type
Accept the default of 1.
Valid Entry: 1
Specify GLBL to access a global data word.
Valid Entry: GLBL
2 Go back to step 3 on page 115.
FactoryLink 6.6.0 / Device Interface Guide / 133
•
READING DATA FROM A DEVICE
•
Sample Read Requests
•
•
S AMPLE R EAD R EQUESTS
This section provides descriptions of some possible Read/Write Control and
Read/Write Information panel entries for a read request. The panel entries
provided in the following pages illustrate the way in which FactoryLink processes
read requests.
Sample Triggered Read Request
This section provides descriptions of some possible Read/Write Control and
Read/Write Information panel entries for a triggered read request.
Figure 6-1 Sample Read/Write Control Panel for Triggered Read
Continued
Continued
READ is
discussed in
this example.
In this example, the READ table is configured as follows:
• When the value of the digital Block Read Trigger element
MODP_READ_TRIGGER is 1, FactoryLink reads the configured register
address and writes its value to the element configured for this table (in the
Read/Write Information panel). The block read priority, which is set
automatically if you do not enter a value, is set to the default of 1, the highest
priority.
134 / FactoryLink 6.6.0 / Device Interface Guide
READING DATA FROM A DEVICE
Sample Read Requests
• When the value of the digital element MODP_READ_DISABLE is 1,
FactoryLink disregards the trigger element, MODP_READ_TRIGGER, and
does not process the READ table.
6
• Once FactoryLink reads the data and writes it to the database element defined
Figure 6-1 Sample Read/Write Information Panel for Triggered Read
In this example, when the READ table is triggered by MODP_READ_TRIGGER,
FactoryLink reads holding registers 200 through 230 in the device configured as
logical station 0, then writes the values read into a message element,
HOLD_MSG1.
FactoryLink 6.6.0 / Device Interface Guide / 135
External Device
Interface
to receive it (HOLD_MSG1 in the Read/Write Information panel), FactoryLink
forces a value of 1 to the digital Block Read State element,
MODP_READ_STATE, and to the Block Read Complete element,
MODP_READ_COMPLETE. During the read operation, MODP_READ_STATE
is set to 0.
•
READING DATA FROM A DEVICE
•
Sample Read Requests
•
•
Figure 6-1 How This Triggered Block Read Request Works
When the value of
MODP_READ_TRIGGER is
1, FactoryLink processes the
table, READ.
FactoryLink reads thirty
holding registers beginning
with address 200...
...then stores the values
read in HOLD_MSG1.
136 / FactoryLink 6.6.0 / Device Interface Guide
READING DATA FROM A DEVICE
Sample Read Requests
Sample Unsolicited Read Request
This section provides descriptions of some possible Read/Write Control and
Read/Write Information panel entries for an unsolicited read request.
Continued
Continued
UNSOL_READ is
discussed in
this example.
In this example, the UNSOL_READ table is configured to accept unsolicited data
of the data type specified on the corresponding Read/Write Information panel from
the specified addresses associated with these entries. The only required user
entries for an unsolicited read request on the Read/Write Control panel are Table
Name and Unsolicited Read. The entries shown in Figure 6-1 for Exception Write,
Block Read Priority, and Block Write Priority are system defaults.
FactoryLink 6.6.0 / Device Interface Guide / 137
External Device
Interface
Figure 6-1 Sample Read/Write Control Panel for Unsolicited Read
6
•
READING DATA FROM A DEVICE
•
Sample Read Requests
•
•
Figure 6-1 Sample Read/Write Information Panel for Unsolicited Read
In this example, FactoryLink reads the incoming data upon its arrival then stores
it in a message element, HOLD_MSG1.
Figure 6-1 How This Unsolicited Read Request Works
When FactoryLink receives
data from holding registers
200 through 230 in the
device configured as
logical station 0, it
processes the table,
UNSOL_READ.
FactoryLink reads the data
then stores it in the message
element, HOLD_MSG1.
138 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 7
Writing Data to a
Device
To define a write request, you configure the Read/Write table which consists of two
panels: Read/Write Control and Read/Write Information. Like the Logical Station
panels, the Read/Write panels are part of the cascading protocol-specific panels
displayed when you choose the option for the protocol module you are configuring
from the Configuration Manager Main Menu.
Note
The Modicon Modbus Plus protocol module is used as an example
throughout this chapter to describe basic write operation concepts.
For protocol-specific information, please refer to the appropriate
reference chapter.
When filling out a write request, you specify the following basic information:
• The tag name assigned to the FactoryLink database element containing the
data to be written
• The logical station to which the data will be written
• The register address in that logical station to which the data will be written
FactoryLink can write data to a device in two ways: as a block write when
prompted by a digital trigger element, or as an exception write when prompted by
the data changing.
FactoryLink 6.6.0 / Device Interface Guide / 139
External Device
Interface
This chapter describes how to define a request to write the values of FactoryLink
database elements to specified locations in a device. See Chapter 6, “Reading Data
from a Device,” for procedures describing how to define a request to read specified
locations in a device and store the values read in FactoryLink database elements.
7
•
WRITING DATA TO A DEVICE
•
Block Write Request
•
•
B LOCK WRITE R EQUEST
In a block write request, a digital element you configure in the Read/Write Control
panel as a trigger to initiate a block write operation causes the EDI task to write
element values specified in the Read/Write Information panel to their associated
device addresses each time the value of the element is forced to 1 (ON).
Figure 7-0 How a Block Write Operation Works
Continued
Continued
When the block write
trigger is forced on,...
...the task writes the value of
each defined element...
...to the defined address.
The table name indicates which
request is being defined.
140 / FactoryLink 6.6.0 / Device Interface Guide
WRITING DATA TO A DEVICE
Exception Write Request
E XCEPTION WRITE R EQUEST
7
Figure 7-0 How an Exception Write Operation Works
Continued
When the Exception Write field is YES,
the EDI task writes the values of the
elements associated with this table
only when they change.
Continued
A disable trigger disables an exception write
table. Once a table is re-enabled, you can use
a block write trigger to update any values in
the device that changed while the table was
disabled. Neither are required unless you plan
to periodically disable the table, but both are
required if you do plan to disable the table.
When the value of each defined
element changes, the EDI task
writes it...
...to the defined device address.
FactoryLink 6.6.0 / Device Interface Guide / 141
External Device
Interface
In an exception write request, when any of the values of the elements defined in
the Read/Write Information panel change, the EDI task writes those values to the
defined device addresses. Optionally, you can define a digital element to disable
and re-enable an exception write table and a trigger element to update the
equipment once the table is re-enabled. Each defined exception write results in a
separate write command.
•
WRITING DATA TO A DEVICE
•
Defining the Table Type and Triggers
•
•
D EFINING
THE
TABLE TYPE
AND
TRIGGERS
To begin configuring a write table, you fill out the Read/Write Control panel. Here,
you give the table a name, identify the table type, and define any needed trigger
elements. The following steps describe how to fill out the Read/Write Control
panel.
1 Ensure the current domain selection is SHARED in the Configuration Manager
Domain Selection box.
2 If the Logical Station Information panel is currently displayed, click on Next and
go to step 5. If another panel is currently displayed, go to step 4.
3 Choose the protocol module name from the Main Menu. A cascaded view of all the
protocol-specific configuration panels is displayed.
To make Read/
Write Control the
active panel, click
on its title bar.
4 Click on the title bar of the Read/Write Control panel.
142 / FactoryLink 6.6.0 / Device Interface Guide
WRITING DATA TO A DEVICE
Defining the Table Type and Triggers
7
External Device
Interface
5 For each write request you want transmitted over a device communication path,
add a panel entry. The information you provide depends on the type of request you
are defining.
Refer to the appropriate section for the type of write request you are defining:
• “Block write request” on page 143
• “Exception write request” on page 146
• “Combination write request” page 148
Block Write Request
To fill out a control panel for a block write request, perform the following steps.
1 Using the following field descriptions, add a panel entry for each block write
request you want to define. Leave all other fields blank. Sample entries are
provided in “Sample Triggered Block Write Request” on page 169.
Table Name
Give this write request a name. Define one request (table) per
line and do not include spaces in the name. You can define as
many requests in this panel as available memory allows. Try to
make the table name reflective of the operation it represents.
When the Block Write Trigger element defined for this table is
forced to 1, or on, the element prompts FactoryLink to process
this write table and any other write table with a Table Name entry
associated with the same trigger.
Valid Entry: alphanumeric string of up to 16 characters
FactoryLink 6.6.0 / Device Interface Guide / 143
•
WRITING DATA TO A DEVICE
•
Defining the Table Type and Triggers
•
•
Unsolicited Read
To indicate this is not an unsolicited read, accept the default of
NO.
Valid Entry: no
Exception Write
Specify how the EDI task will write the values of elements
containing information to be transmitted to a device. You define
these elements the task will read from the FactoryLink database
and then write to the device in the Read/Write Information panel.
To indicate this is not an exception write, accept the default of
NO.
Valid Entry: no
Block Write Priority
Enter a number to indicate the priority of this table, relative to
other write operations. The highest priority is 1. This number
influences the order in which the EDI task handles the queuing of
all write requests, block and exception. If EDI receives two
requests at the same time, it processes the request with the
highest priority first.
Valid Entry: 1 - 4 (default = 1)
Block Write Trigger
Enter a tag name for a digital element to initiate a block write of
the element values specified in the associated Read/Write
Information panel to the register addresses defined to receive the
values. When this element’s value is forced to 1 (ON),
FactoryLink writes the values.
A Block Write Trigger is required to prompt FactoryLink to process
this table for a write operation.
The element you use for the Block Write Trigger can also be defined
in another FactoryLink task. For example, you could define a
digital element in the Event or Interval Timer, Math and Logic,
or Application Editor, and assign the same tag name to a Block
Write Trigger element. When the element’s value changes to 1 (as
the result of a math operation or a defined event taking place, for
example), it prompts an EDI task write operation.
For efficient performance in larger applications, you can define a
Block Write Trigger element as a Block Write State element, causing
a daisy-chain effect within one table or across several tables.
When you give identical names to a Block Write State and a Block
Write Trigger element, the completion of one write operation
triggers the start of another. For a description and examples of
how to create a daisy-chain write operation, see Chapter 8,
“Application Design Tips and Techniques.”
144 / FactoryLink 6.6.0 / Device Interface Guide
WRITING DATA TO A DEVICE
Defining the Table Type and Triggers
For additional information about triggers, see Chapter 1,
“External Device Interface Overview,” and the discussion of using
tags as triggers in the FactoryLink Fundamentals manual.
Block Write
Disable
Optionally, enter a tag name for a digital element to disable a
block write to the device addresses specified in this table. When
this tag’s value is forced to 1, the write operation is not executed,
even when the block write trigger is set.
This element can be used to disable a block write operation that is
either part of a cascaded loop or is self-triggered. The triggering
cycle will cease upon disabling, however. To re-enable a cascaded
loop or a self-triggered write table, the Block Write Trigger element
must be toggled or forced to 1. Refer to Chapter 8, “Application
Design Tips and Techniques,” for further details.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write
Complete
Optionally, enter a tag name for a digital element the EDI task
forces to 1 (ON), when it starts up, and each time it receives and
processes a write request from a protocol module. After the data
has been written to the device, EDI forces the element to 1 again.
If you are defining a Block Write Complete element to be used for
more than one logical port, create a separate table for each port.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write State
Optionally, enter a tag name for a digital element the EDI task
forces to 1 (ON), when it starts up, and each time it receives and
processes a write request from a protocol module. During EDI's
transmission of the request, it sets the element to 0 (OFF). After
the data has been written to the device, EDI force-writes the
element back to 1.
If you are defining a Block Write State element to be used for more
than one logical port, create a separate table for each port.
Valid Entry: standard element tag name
Valid Data Type: digital
2 When you have finished filling out the information on this panel, click on Enter.
FactoryLink 6.6.0 / Device Interface Guide / 145
External Device
Interface
Valid Entry: standard element tag name
Valid Data Type: digital
7
•
WRITING DATA TO A DEVICE
•
Defining the Table Type and Triggers
•
•
3 The Tag Definition dialog is displayed for each specified tag name that is not
defined elsewhere in FactoryLink. For each tag name, choose DIGITAL for Type
and accept the default of SHARED for Domain.
4 Define the data to be written and the target addresses in the Read/Write
Information panel. Refer to “Specifying What to Write and Where to Write It” on
page 149 for details.
Exception Write Request
In an exception write, an internal change-status indicator within the element
containing the data to be written prompts the write operation. If an element is
configured for an exception write and EDI recognizes this indicator has been set
since the last scan of the real-time database (indicating the value of the element
has changed), EDI writes this element’s value to the device.
To fill out a control panel for an exception write request, perform the following
steps.
1 Using the following field descriptions, add a panel entry for each exception write
request you want to define. Leave all other fields blank. Sample entries are
provided in “Sample Exception Write Request” on page 172.
Table Name
Give this write request a name. Define one request (table) per
line and do not include spaces in the name. You can define as
many requests in this panel as available memory allows. Try to
make the table name reflective of the operation it represents.
When the values of the elements you define in the associated
Read/Write Information panel change, FactoryLink processes this
exception write table and any other exception write table with a
Table Name entry associated with the same elements.
Unsolicited Read
To indicate this is not an unsolicited read, accept the default of
NO.
Valid Entry: no
Exception Write
For the task to write element values only when those values
change, enter YES.
Valid Entry: yes
146 / FactoryLink 6.6.0 / Device Interface Guide
WRITING DATA TO A DEVICE
Defining the Table Type and Triggers
Block Write Priority
Accept the default of 1. This field is ignored for exception write
operations.
7
Valid Entry: 1
If you plan to periodically disable this table, both a Block Write
Trigger and a Block Write Disable element are required. Refer to the
following field descriptions. If you do not plan to disable this table,
do not define either of these elements.
Block Write Trigger
Enter a tag name for a digital element to trigger the table once it
has been disabled then subsequently re-enabled by a Block Write
Disable element.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write
Disable
Enter a tag name for a digital element to temporarily disable this
table. When the value of this element is 1, it disables an exception
write of the defined elements to the device addresses specified in
the Read/Write Information panel. When the tag’s value is set to
0 again, the table is re-enabled.
Once a table has been re-enabled, a Block Write Trigger element
can be used to write any values that changed while the table was
disabled.
Valid Entry: standard element tag name
Valid Data Type: digital
2 When you have finished filling out the information on this panel, click on Enter.
3 The Tag Definition dialog is displayed for each specified tag name that is not
defined elsewhere in FactoryLink. For each tag name, choose DIGITAL for Type
and accept the default of SHARED for Domain.
4 Define the data to be written and the target addresses in the Read/Write
Information panel. Refer to “Specifying What to Write and Where to Write It” on
page 149 for details.
FactoryLink 6.6.0 / Device Interface Guide / 147
External Device
Interface
Note
•
WRITING DATA TO A DEVICE
•
Defining the Table Type and Triggers
•
•
Combination Write Request
In some cases, you may want to configure a write operation to execute in two
ways: by a digital trigger element and by exception processing.
For example, you could configure a combination block write and exception write
table if you want to write the current value of an element to a register address in
the device upon start up and thereafter, only write the element’s value to the
device when it changes.
Sample table entries are provided in “Sample Combination Write Request” on
page 175.
To configure a combination write request, perform the following steps.
1 Fill out a control panel with the information described in“Block Write Request” on
page 143, but enter YES in the Exception Write field instead of NO.
2 When you have finished filling out the information on this panel, click on Enter.
3 Define the data to be written and the target addresses in the Read/Write
Information panel. Refer to “Specifying What to Write and Where to Write It” on
page 149 for details.
148 / FactoryLink 6.6.0 / Device Interface Guide
WRITING DATA TO A DEVICE
Specifying What to Write and Where to Write It
S PECIFYING W HAT
TO
WRITE
AND
W HERE
TO
WRITE I T
The data to be written is represented by one or more elements in the FactoryLink
database. For a write request, you add an entry in the Read/Write Information
panel for each element to be written when the operation is executed.
The following steps describe how to fill out the Read/Write Information panel.
1 On the Read/Write Control panel, select the row for the write request you are
defining. Click on Next to display the Read/Write Information panel.
FactoryLink 6.6.0 / Device Interface Guide / 149
7
External Device
Interface
Once the Read/Write Control panel is complete, fill out the Read/Write
Information panel. Here, you indicate the data to be written to the device during
the operation, and to which register addresses it will be written.
•
WRITING DATA TO A DEVICE
•
Specifying What to Write and Where to Write It
•
•
Table Name from
the Read/Write
Control panel
The table name is displayed in the Table Name field on the lower left side of the
panel.
2 The information you provide in this panel depends on the type of register to be
accessed and the type of data to be written. Refer to the data type reference table
on page 151 to determine where to go for instructions on filling out this panel for
your particular application.
Each section listed in the table provides sample panel entries for a specific type of
write request. Additional sample entries are provided in “Sample Write Requests”
on page 169.
3 When you have finished defining all the FactoryLink database tags and the
register addresses to which their contents are to be written, click on Enter to
validate the data.
4 The Tag Definition dialog is displayed for each specified tag name that is not
defined elsewhere in FactoryLink. For each tag name, choose the type of data to
be stored in the element for Type and accept the default of SHARED for Domain.
Refer to the tag’s field description for the valid data types.
5 To configure another write request, click on Prev to return to the Read/Write
Control panel and go back to step 5 on page 143.
6 When all write requests are complete, click on Exit to return to the Main Menu.
150 / FactoryLink 6.6.0 / Device Interface Guide
WRITING DATA TO A DEVICE
Specifying What to Write and Where to Write It
Table 7-1 Register and FactoryLink Data Type Configuration Reference
7
Register
Type
Where to Go
for Configuration Instructions
Analog
“Write Analog Element Value to Holding
Register” on page 153
Digital
“Write Digital Element Value to Holding
Register” on page 155
To set or clear bits, “Set Bits in Holding
Register Using Mask Write” on page 157
Floating-point “Write Floating-Point or Long Analog Element
Value to Holding Register” on page 159
Longana
“Write Floating-Point or Long Analog Element
Value to Holding Register” on page 159
Message
“Write Message Element Value to Holding
Register” on page 161
Coil
Digital
“Write Digital Element Value to Coil Register”
on page 163
Memory
Analog
“Write Analog Element Value to Memory
Register” on page 165
Global
Analog
“Write Analog Element Value to Global Data
Word” on page 167
Note: For the maximum number of contiguous registers that can be included in
a single block write message for each supported register type, see Table 7-1 on
page 152.
A write table should not contain more than the maximum number of contiguous
registers allowed for a single message accessing a type of register. The maximum
number allowed varies from one register type to the next. If more than the
maximum number of contiguous register addresses are defined, multiple
messages are generated for the operation.
FactoryLink 6.6.0 / Device Interface Guide / 151
External Device
Interface
Holding
FactoryLink
Data Type
•
WRITING DATA TO A DEVICE
•
Specifying What to Write and Where to Write It
•
•
The following table lists the maximum number of contiguous registers included in
a single block write message for each supported register type.
Table 7-1 Maximum Contiguous Registers in a Single Message
Type of
Register
Maximum Number
For Block Write
Coil
800
Holding
100
1 exception write for
mask operation
Global
32 global data words
Statistics
Word
1 exception write for
clear statistics
operation; see
“Configuring the
Read/Write
Information Panel”
on page 394
Memory
100
152 / FactoryLink 6.6.0 / Device Interface Guide
WRITING DATA TO A DEVICE
Specifying What to Write and Where to Write It
Write Analog Element Value to Holding Register
To fill out an information panel for a request to write the value of an analog
element to a holding register, perform the following steps.
written and define the register addresses to receive each element value when the
operation executes.
Tag Name
Specify a tag name for an analog element containing a value to be
written to the device.
Valid Entry: standard element tag name
Valid Data Type: analog
Logical Station
Enter the number representing the device to which the element’s
value will be written. This number was originally defined in the
Logical Station Information panel for the logical port through
which communications with this device occurs.
Valid Entry: previously defined logical station number
FactoryLink 6.6.0 / Device Interface Guide / 153
External Device
Interface
1 Using the following field descriptions, add a panel entry for each element to be
7
•
WRITING DATA TO A DEVICE
•
Specifying What to Write and Where to Write It
•
•
The Logical Station number
defined on the Read/Write
Information panel must match...
...the Logical Station number
defined on the Logical Station
Information panel...
...for this device’s Logical
Port number.
Reg. Address
Enter the register address in the device’s memory to which the
element value will be written.
Do not include the register address prefix (4) or leading zeros.
The prefix indicates the register type, which is specified in the
Data Type field. For example, for holding register address 400001,
just enter 1.
Valid Entry: 1 - 65535
Bit Offset/
MSG Length
Data Type
Accept the default of 1.
Valid Entry: 1
Specify HREG as the type of register to which the element value
will be written.
Valid Entry: HREG
2 Go back to step 3 on page 150.
154 / FactoryLink 6.6.0 / Device Interface Guide
WRITING DATA TO A DEVICE
Specifying What to Write and Where to Write It
Write Digital Element Value to Holding Register
To fill out an information panel for a request to write the value of a digital element
to a holding register, perform the following steps.
written and define the register addresses to receive each element value when the
operation executes.
When a digital tag is written to a holding register, two messages are sent to the
device. The first message reads the entire holding register; the second message
writes the new value to the specified bit.
Tag Name
Specify a tag name for a digital element containing a value to be
written to the device.
Valid Entry: standard element tag name
Valid Data Type: digital
Logical Station
Enter the number representing the device to which the element’s
value will be written. This number was originally defined in the
Logical Station Information panel for the logical port through
which communications with this device occurs.
Valid Entry: previously defined logical station number
FactoryLink 6.6.0 / Device Interface Guide / 155
External Device
Interface
1 Using the following field descriptions, add a panel entry for each element to be
7
•
WRITING DATA TO A DEVICE
•
Specifying What to Write and Where to Write It
•
•
The Logical Station number
defined on the Read/Write
Information panel must match...
...the Logical Station number
defined on the Logical Station
Information panel...
...for this device’s Logical
Port number.
Reg. Address
Enter the register address in the device’s memory to which the
element value will be written.
Do not include the register address prefix (4) or leading zeros.
The prefix indicates the register type, which is specified in the
Data Type field. For example, for holding register address 400001,
just enter 1.
Valid Entry: 1 - 65535
Bit Offset/
MSG Length
Specify the bit offset within a register word to which the element
value will be written. Bit 1 is the most significant bit (MSB) and
bit 16 the least significant bit (LSB).
MSB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
LSB
16
Valid Entry: 1 - 16
Data Type
Specify HREG as the type of register to which the element value
will be written.
Valid Entry: HREG
2 Go back to step 3 on page 150.
156 / FactoryLink 6.6.0 / Device Interface Guide
WRITING DATA TO A DEVICE
Specifying What to Write and Where to Write It
Set Bits in Holding Register Using Mask Write
To fill out an information panel for a request to send a mask write to a holding
register, perform the following steps.
1 Using the following field descriptions, add a panel entry for each for each bit to be
set or cleared when the value of any bit defined in the table changes. Each bit is
referenced by a separate tag name on the Read/Write Information panel.
Tag Name
Specify a tag name for a digital element containing a value to be
written to the device.
When a digital tag is written to a holding register, two messages
are sent to the device. The first message reads the entire holding
register; the second one writes the new value to the specified bit.
Valid Entry: standard element tag name
Valid Data Type: digital
Logical Station
Enter the number representing the device to which the element
value will be written. This number was originally defined in the
Logical Station Information panel for the logical port through
which communications with this device occurs.
Valid Entry: previously defined logical station number
FactoryLink 6.6.0 / Device Interface Guide / 157
7
External Device
Interface
In devices that support this operation, a mask write sets or clears bits within a
holding register. A mask write is sent to the device as an exception write
operation; therefore, it generates a single write message. The following Modicon
model types support mask write operations: A120, A130, A141, A145, 685E, 785E,
AT4, and VM4.
•
WRITING DATA TO A DEVICE
•
Specifying What to Write and Where to Write It
•
•
The Logical Station number
defined on the Read/Write
Information panel must match...
...the Logical Station number
defined on the Logical Station
Information panel...
...for this device’s Logical
Port number.
Reg. Address
Enter the register address of the word containing the bit to be set
or cleared.
Do not include the register address prefix (4) or leading zeros.
The prefix indicates the register type, which is specified in the
Data Type field. For example, for holding register address 400001,
just enter 1.
Valid Entry: 1 - 65535
Bit Offset/
MSG Length
Specify the bit within the register word that will change as a
result of the mask write. Bit 1 is the most significant bit (MSB)
and 16 the least significant bit (LSB).
MSB
1
2
3
4
5
6
7
8
9
10
11
12
Valid Entry: 1 - 16
Data Type
Specify MASK to indicate the type of operation.
Valid Entry: MASK
2 Go back to step 3 on page 150.
158 / FactoryLink 6.6.0 / Device Interface Guide
13
14
15
LSB
16
WRITING DATA TO A DEVICE
Specifying What to Write and Where to Write It
Write Floating-Point or Long Analog Element Value to Holding Register
To fill out an information panel for a request to write the value of a floating-point
or long analog element to a holding register, perform the following steps.
written and define the register addresses to receive each element value when the
operation executes.
Tag Name
Specify a tag name for a floating-point or a long analog element
containing a value to be written to the device.
Valid Entry: standard element tag name
Valid Data Type: float, longana
Logical Station
Enter the number representing the device to which the element’s
value will be written. This number was originally defined in the
Logical Station Information panel for the logical port through
which communications with this device occurs.
Valid Entry: previously defined logical station number
FactoryLink 6.6.0 / Device Interface Guide / 159
External Device
Interface
1 Using the following field descriptions, add a panel entry for each element to be
7
•
WRITING DATA TO A DEVICE
•
Specifying What to Write and Where to Write It
•
•
The Logical Station number
defined on the Read/Write
Information panel must match...
...the Logical Station number
defined on the Logical Station
Information panel...
...for this device’s Logical
Port number.
Reg. Address
Enter the register address in the device’s memory to which the
element value will be written.
Floating-point or long analog tag types are addressed in pairs.
The first register in the pair contains the high order word; the
second register contains the low order word. Enter the address for
only the starting register in a register pair. The companion
register is implied.
Try to maintain consistency when using register addresses for
floating-point and long analog tag types. Adopt either an odd or
even starting register sequence and maintain that sequence. For
example, 1, 3, 5, 7, 9,... or 2, 4, 6, 8, 10,....
Do not include the register address prefix (4) or leading zeros.
The prefix indicates the register type, which is specified in the
Data Type field. For example, for holding register address 400001,
just enter 1.
Valid Entry: 1 - 65535
Bit Offset/
MSG Length
Data Type
Accept the default of 1.
Valid Entry: 1
Specify HREG as the type of register to which the element value
will be written.
Valid Entry: HREG
2 Go back to step 3 on page 150.
160 / FactoryLink 6.6.0 / Device Interface Guide
WRITING DATA TO A DEVICE
Specifying What to Write and Where to Write It
Write Message Element Value to Holding Register
To fill out an information panel for a request to write the value of a message
element to a holding register, perform the following steps.
written and define the register addresses to receive each element value when the
operation executes.
Tag Name
Specify a tag name for a message element containing a value to
be written to the device.
Valid Entry: standard element tag name
Valid Data Type: message
Logical Station
Enter the number representing the device to which the element’s
value will be written.This number was originally defined in the
Logical Station Information panel for the logical port through
which communications with this device occurs.
Valid Entry: previously defined logical station number
FactoryLink 6.6.0 / Device Interface Guide / 161
External Device
Interface
1 Using the following field descriptions, add a panel entry for each element to be
7
•
WRITING DATA TO A DEVICE
•
Specifying What to Write and Where to Write It
•
•
The Logical Station number
defined on the Read/Write
Information panel must match...
...the Logical Station number
defined on the Logical Station
Information panel...
...for this device’s Logical
Port number.
Reg. Address
Enter the register address in the device’s memory to which the
element value will be written.
Enter the first address in the group of registers to which the value
will be written. The number of registers to which the data is to be
written is defined in the Bit Offset/MSG Length field of this panel.
Do not include the register address prefix (4) or leading zeros.
The prefix indicates the register type, which is specified in the
Data Type field. For example, for holding register address 400001,
just enter 1.
Valid Entry: 1 - 65535
Bit Offset/
MSG Length
Specify the number of bytes in the device’s memory to which the
element value will be written.
Valid Entry: 1 - 80
Data Type
Specify HREG as the type of register to which the element value
will be written.
Valid Entry: HREG
2 Go back to step 3 on page 150.
162 / FactoryLink 6.6.0 / Device Interface Guide
WRITING DATA TO A DEVICE
Specifying What to Write and Where to Write It
Write Digital Element Value to Coil Register
To fill out an information panel for a request to write the value of a digital element
to a coil register, perform the following steps.
written and define the register addresses to receive each element value when the
operation executes.
Tag Name
Specify a tag name for a digital element containing a value to be
written to the device.
Valid Entry: standard element tag name
Valid Data Type: digital
Logical Station
Enter the number representing the device to which the element’s
value will be written.This number was originally defined in the
Logical Station Information panel for the logical port through
which communications with this device occurs.
Valid Entry: previously defined logical station number
FactoryLink 6.6.0 / Device Interface Guide / 163
External Device
Interface
1 Using the following field descriptions, add a panel entry for each element to be
7
•
WRITING DATA TO A DEVICE
•
Specifying What to Write and Where to Write It
•
•
The Logical Station number
defined on the Read/Write
Information panel must match...
...the Logical Station number
defined on the Logical Station
Information panel...
...for this device’s Logical
Port number.
Reg. Address
Enter the register address in the device’s memory to which the
element value will be written.
Do not include the register address prefix (0) or leading zeros.
The prefix indicates the register type, which is specified in the
Data Type field. For example, for coil address 023451, enter 23451.
Valid Entry: 1 - 65535
Bit Offset/
MSG Length
Data Type
Accept the default of 1.
Valid Entry: 1
Specify COIL as the type of register to which the element value
will be written.
Valid Entry: COIL
2 Go back to step 3 on page 150.
164 / FactoryLink 6.6.0 / Device Interface Guide
WRITING DATA TO A DEVICE
Specifying What to Write and Where to Write It
Write Analog Element Value to Memory Register
To fill out an information panel for a request to write the value of an analog
element to a memory register, perform the following steps.
written and define the register addresses to receive each element value when the
operation executes.
Tag Name
Specify a tag name for an analog element containing a value to be
written to the device.
Valid Entry: standard element tag name
Valid Data Type: analog
Logical Station
Enter the number representing the device to which the data in
this element will be written.This number was originally defined
in the Logical Station Information panel for the logical port
through which communications with this device occurs.
Valid Entry: previously defined logical station number
FactoryLink 6.6.0 / Device Interface Guide / 165
External Device
Interface
1 Using the following field descriptions, add a panel entry for each element to be
7
•
WRITING DATA TO A DEVICE
•
Specifying What to Write and Where to Write It
•
•
The Logical Station number
defined on the Read/Write
Information panel must match...
...the Logical Station number
defined on the Logical Station
Information panel...
...for this device’s Logical
Port number.
Reg. Address
Enter the register address in the device’s memory to which the
element value will be written.
Do not include the register address prefix, 6, or leading zeros. The
prefix indicates the register type, which is specified in the Data
Type field. For example, for memory address 600001, just enter 1.
Valid Entry: 1 - 65535
Bit Offset/
MSG Length
Data Type
Accept the default of 1.
Valid Entry: 1
Specify the type of register to which the element value will be
written as XMEMnn where nn is a numeric value from 1 to 10.
Valid Entry: XMEM1 - XMEM10
2 Go back to step 3 on page 150.
166 / FactoryLink 6.6.0 / Device Interface Guide
WRITING DATA TO A DEVICE
Specifying What to Write and Where to Write It
Write Analog Element Value to Global Data Word
To fill out an information panel for a request to write the value of an analog
element to a global data word, perform the following steps.
Although global data is considered contiguous in block write
tables, you can define register addresses that do not appear
contiguous on the information panel. For example, if you specify
register address 1, 5, 7, 20, and 25 for a write operation, a message
is generated for registers 1 through 25. A value of 0 is stored for
those registers within the range that do not appear in the
read/write information table.
1 Using the following field descriptions, add a panel entry for each element to be
written and define the register addresses to receive each element value when the
operation executes.
Tag Name
Specify a tag name for an analog element containing a value to be
written to the device.
Valid Entry: standard element tag name
Valid Data Type: analog
FactoryLink 6.6.0 / Device Interface Guide / 167
External Device
Interface
Note
7
•
WRITING DATA TO A DEVICE
•
Specifying What to Write and Where to Write It
•
•
Logical Station
Enter the number representing the device to which the data in
this element will be written.This number was originally defined
in the Logical Station Information panel for the logical port
through which communications with this device occurs.
Valid Entry: previously defined logical station number
The Logical Station number
defined on the Read/Write
Information panel must match...
...the Logical Station number
defined on the Logical Station
Information panel...
...for this device’s Logical
Port number.
Reg. Address
Enter the register address in the device’s memory to which the
element value will be written.
The first global data word received is always assumed to be word 1,
the second is word 2, and so on. If you specify a register address
larger than the total number of global data words that will actually be
received, an error is generated.
Valid Entry: 1 - 32
Bit Offset/
MSG Length
Data Type
Accept the default of 1.
Valid Entry: 1
Specify GLBL to access a global data word.
Valid Entry: GLBL
2 Go back to step 3 on page 150.
168 / FactoryLink 6.6.0 / Device Interface Guide
WRITING DATA TO A DEVICE
Sample Write Requests
S AMPLE WRITE R EQUESTS
7
The panel entries provided in the following pages illustrate the way in which
FactoryLink processes write requests.
This section provides descriptions of some possible Read/Write Control and
Read/Write Information panel entries for a triggered block write request.
Figure 7-0 Read/Write Control Panel for Triggered Block Write
Continued
Continued
WRITE is
discussed in
this example.
In this example, the WRITE table is configured as follows:
• When the value of the digital Block Write Trigger element
MODP_WRITE_TRIGGER is 1, FactoryLink reads the element configured for
this table (in the Read/Write Information panel) and writes its value to the
configured register address. The block write priority, which is set automatically
if you do not enter a value, is set to the default of 1, the highest priority.
• When the value of the digital element MODP_WRITE_DISABLE is 1,
FactoryLink disregards the trigger element, MODP_WRITE_TRIGGER, and
does not process the WRITE table.
FactoryLink 6.6.0 / Device Interface Guide / 169
External Device
Interface
Sample Triggered Block Write Request
•
WRITING DATA TO A DEVICE
•
Sample Write Requests
•
•
• Once FactoryLink writes the element values, it forces a value of 1 to the digital
Block Write State element, MODP_WRITE_STATE, and to the Block Write
Complete element, MODP_WRITE_COMPLETE. During the read operation,
MODP_WRITE_STATE is set to 0.
Figure 7-0 Read/Write Information Panel for Triggered Block Write
In this example, when the WRITE block write table is triggered by
MODP_WRITE_TRIGGER, FactoryLink writes the value of a message element,
HOLD_MSG1, to holding registers 200 through 230 in the device configured as
logical station 0.
170 / FactoryLink 6.6.0 / Device Interface Guide
WRITING DATA TO A DEVICE
Sample Write Requests
Figure 7-0 How This Triggered Block Write Request Works
7
Continued
External Device
Interface
Continued
When the value of
MODP_WRITE_TRIGGER
is 1, FactoryLink processes
the table, WRITE.
FactoryLink writes the
value of HOLD_MSG1...
...into 30 holding
registers beginning with
address 200.
FactoryLink 6.6.0 / Device Interface Guide / 171
•
WRITING DATA TO A DEVICE
•
Sample Write Requests
•
•
Sample Exception Write Request
This section provides descriptions of some possible Read/Write Control and
Read/Write Information panel entries for an exception write request.
Figure 7-0 Read/Write Control Panel for Exception Write
Continued
Continued
EXCEPTION is
discussed in
this example.
In this example, the EXCEPTION table is configured to read the element
configured for this table (in the Read/Write Information panel) and write its value
to the configured register address. FactoryLink, however, will only perform this
operation when the element’s value changes.
The table is disabled when the Block Write Disable element,
MODP_EXCEPTION_DISABLE, is 1 and the Block Write Trigger element,
MODP_EXCEPTION_TRIGGER is 0. The table is re-enabled when
MODP_EXCEPTION_DISABLE is 0.
172 / FactoryLink 6.6.0 / Device Interface Guide
WRITING DATA TO A DEVICE
Sample Write Requests
Figure 7-0 Read/Write Information Panel for Exception Write
7
External Device
Interface
In this example, whenever the value of the digital element HOLD_DIG1 changes,
FactoryLink processes the EXCEPTION table. This table writes the value of
HOLD_DIG1 to holding register 140 in the device configured as logical station 0.
If the table is disabled then re-enabled and MODP_EXCEPTION_TRIGGER is set
to 1, holding register 140 is updated with the value of HOLD_DIG1 if the value
has changed since the table was disabled.
FactoryLink 6.6.0 / Device Interface Guide / 173
•
WRITING DATA TO A DEVICE
•
Sample Write Requests
•
•
Figure 7-0 How This Exception Write Request Works
Continued
When the value of
MODP_EXCEPTION
_DISABLE is 1,
FactoryLink does not
process the table,
EXCEPTION.
Continued
Because this is an
exception write table,
when the value of
HOLD_DIG1
changes...
...FactoryLink writes
its value into holding
register address 140.
174 / FactoryLink 6.6.0 / Device Interface Guide
When the value of
MODP_EXCEPTION_
TRIGGER is 1 and the
table has been
disabled, FactoryLink
writes the value of
HOLD_DIG1 if it has
changed since the
table was disabled.
WRITING DATA TO A DEVICE
Sample Write Requests
Sample Combination Write Request
This section provides descriptions of some possible Read/Write Control and
Read/Write Information panel entries for a combination write request.
Continued
Continued
EXCEPTION is
discussed in
this example.
In this example, the EXCEPTION table is configured as follows:
• When FactoryLink starts up, MODP_EXCEPTION_TRIGGER will trigger
FactoryLink to read the element configured for this table (in the Read/Write
Information panel) and write its value to the configured register address. (The
Block Write Disable element, MODP_EXCEPTION_DISABLE, is not used in this
table; therefore, its value remains 0.)
• After startup, FactoryLink only writes the element’s value to the device when it
changes.
FactoryLink 6.6.0 / Device Interface Guide / 175
External Device
Interface
Figure 7-0 Read/Write Control Panel for Combination Write
7
•
WRITING DATA TO A DEVICE
•
Sample Write Requests
•
•
Figure 7-0 Read/Write Information Panel for Combination Write
In this example, when FactoryLink starts up and whenever the value of the
analog element HOLD_ANA1 changes, FactoryLink processes the EXCEPTION
table. This table writes the value of HOLD_ANA1 to holding register address 200
in the device configured as logical station 0.
176 / FactoryLink 6.6.0 / Device Interface Guide
WRITING DATA TO A DEVICE
Sample Write Requests
Figure 7-0 How This Combination Write Request Works
Continued
Continued
Because this is an
exception write
table...
... whenever the value
of HOLD_ANA1
changes...
...FactoryLink writes
its value into holding
register address 200.
FactoryLink 6.6.0 / Device Interface Guide / 177
7
External Device
Interface
Because a block write trigger is
defined, when FactoryLink starts
up and forces
MODP_EXCEPTION_TRIGGER
to 1, it writes the value of
HOLD_ANA1 to the device.
•
WRITING DATA TO A DEVICE
•
Sample Write Requests
•
•
178 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 8
Application Design
Tips and Techniques
8
This chapter describes application tips and techniques that can improve the
throughput and efficiency of data communications between the EDI task and the
devices in your configuration. These techniques involve the order in which you
specify read and write table entries, specification of the priority in which the task
processes read and write operations, and methods of triggering the tables and tags
defined in the Read/Write Control panel.
External Device
Interface
Note
Many of the configuration panels used in the examples throughout
this section are for the Modicon Modbus Plus protocol module;
others are for a fictitious protocol module called Widget. The
concepts discussed, however, apply to all the protocol modules in
the FactoryLink 6.6.0 base set.
FactoryLink 6.6.0 / Device Interface Guide / 179
•
APPLICATION DESIGN TIPS AND TECHNIQUES
•
Grouping of Data
•
•
G ROUPING
OF
D ATA
Carefully consider the way in which you group data in a read or write table
because it can determine the number of messages or packets of data FactoryLink
needs to generate to complete the operation. The fewer messages FactoryLink
must generate to process a table, the faster the table is processed.
When grouping table entries, keep the following types of information together:
• Logical Stations—Keep data being read from or written to a particular logical
station together; that is, for best results, do not define more than one logical
station in a table.
• Data Types—Keep like data types (FactoryLink and protocol-specific) together.
Any break in data type results in the generation of an additional packet.
• Contiguous Addresses—Keep data being read from or written to contiguous or
near contiguous addresses together.
For example, if the following conditions are met, FactoryLink can process a table
in one message:
1. The table only contains data of an amount not exceeding the maximum size the
device can handle for one transmission.
2. The data is stored in elements of the same FactoryLink data type.
3. The data is of the same protocol-specific data type.
4. The data is read from or written to contiguous addresses.
The figures on page 181 illustrate tables in which all or some of these conditions
are met.
Tip
Naturally, all conditions cannot be met for each table you define. If
your goal is to minimize the number of messages generated,
however, you should attempt to group read and write table entries
the same way in which FactoryLink internally groups and
processes them.
180 / FactoryLink 6.6.0 / Device Interface Guide
APPLICATION DESIGN TIPS AND TECHNIQUES
Grouping of Data
All four conditions are met in the following read table:
8
Figure 8-0 Read Operation Completed in One Message
In the read table illustrated in Figure 8-0, only conditions 1, 2, and 4 are met. To
process this table, FactoryLink must generate two messages.
Figure 8-0 Read Operation Completed in Two Messages
FactoryLink would
need to generate two
messages to
process this table:
one to read the
specified holding
registers and
another to read the
memory registers.
FactoryLink 6.6.0 / Device Interface Guide / 181
External Device
Interface
FactoryLink would
only need to
generate one
message to process
this table because
conditions 1 through
4 are met.
•
APPLICATION DESIGN TIPS AND TECHNIQUES
•
Processing Differences in Read and Write Operations
•
•
P ROCESSING D IFFERENCES
IN
R EAD
AND
WRITE O PERATIONS
FactoryLink processes data being read differently than it processes data being
written. The difference is in how FactoryLink handles the range of addresses
specified for a single transmission.
Processing of Read Operations
Addresses defined in a read table that contain the same data type are read based
on the specified range. FactoryLink reads the data at all addresses in the range
(provided the range is within the limit for a single transmission) but only stores
the data it needs.
For example, the table illustrated in Figure 8-0 reads all addresses in the range
201 to 208 but only stores values read from addresses 201 and 208.
Figure 8-0 Table That Reads an Address Range but Stores Selected Values
FactoryLink generates one message to process this table. All data at addresses
ranging from 201 to 208 are read, but only the values at addresses 201 and 208
are stored in database elements.
182 / FactoryLink 6.6.0 / Device Interface Guide
APPLICATION DESIGN TIPS AND TECHNIQUES
Processing Differences in Read and Write Operations
Figure 8-0 Both Tables Read the Same Addresses
FactoryLink 6.6.0 / Device Interface Guide / 183
8
External Device
Interface
Note the differences in the tables shown in Figure 8-0Figure 8-0Figure 8-0Figure
8-0 and in Figure 8-0 (see Figure 8-0). The data FactoryLink reads is identical.
Each table results in FactoryLink reading addresses 201 through 208. The
difference in the two tables is the data FactoryLink stores in database elements.
The first table stores eight of the values read. The second table stores only two
values.
•
APPLICATION DESIGN TIPS AND TECHNIQUES
•
Processing Differences in Read and Write Operations
•
•
Processing of Write Operations
In a write table, addresses to which FactoryLink data is to be written are not
accessed based on range unless the addresses are contiguous.
If the same entries made in the read table shown in Figure 8-0 are made in a write
table, each row generates a separate message resulting in two messages being
sent to the device (see the first panel in Figure 8-0). To send a message to write to
addresses 201 through 208, you would need to define each address separately (see
the second panel in Figure 8-0). Only contiguous groups of data (up to the
maximum allowed by the device) are put in one message for a write operation.
Figure 8-0 Table That Sends Four Messages to Four Addresses
FactoryLink
generates two
messages to
process this table.
FactoryLink
generates one
message to process
this table.
184 / FactoryLink 6.6.0 / Device Interface Guide
APPLICATION DESIGN TIPS AND TECHNIQUES
Processing Differences in Read and Write Operations
Read and Write Examples
Figure 8-0 Messages Generated for Read and Write Table
Continued
Continued
ô
í
ô
í
÷
û
FactoryLink 6.6.0 / Device Interface Guide / 185
8
External Device
Interface
This section contains examples illustrating various ways in which FactoryLink
groups table entries into messages. The number of messages generated and the
dividing line between each message is indicated in the illustrations.
•
APPLICATION DESIGN TIPS AND TECHNIQUES
•
Processing Differences in Read and Write Operations
•
•
Figure 8-0 Messages Generated for Exception Write and Unsolicited Read Table
Continued
Continued
ô
í
÷
ô
í
186 / FactoryLink 6.6.0 / Device Interface Guide
APPLICATION DESIGN TIPS AND TECHNIQUES
Specifying Priority
S PECIFYING P RIORITY
8
The queues are polled for tables according to the rank of the priority. The priority
1 queue is polled the most frequently and the priority 4 queue is polled the least
frequently. Every table is eventually processed but the ones in the priority 4 queue
are not processed as often as the tables in the priority 1 queue.
All tables are placed by default in the priority 1 queue, which is appropriate in
most cases. When an application contains a large number of tables, however, or
when an exception write table contains tag names for rapidly changing elements,
the priority 1 queue can fill up.
To more evenly distribute tables across the four priority queues (thus reducing the
priority 1 queue’s burden of handling all the pending I/O requests), you could
assign priority 1 or 2 to tables containing more important data and priority 3 or 4
to tables containing less important data.
Using this logic, you would, for instance, assign a high priority to an exception
write table for an operation that acknowledges a loud annoying alarm, and a low
priority to a block write table that downloads a batch recipe once a day.
FactoryLink 6.6.0 / Device Interface Guide / 187
External Device
Interface
The Read/Write Control panel contains two columns for specifying the priority of
block reads and block or exception writes: Block Read Priority and Block Write Priority.
The priority of an operation can range from 1 to 4. These values correspond to four
first-in/first-out (FIFO) priority queues which are set up in order of importance.
Priority queue 1 has the highest priority.
•
APPLICATION DESIGN TIPS AND TECHNIQUES
•
Overtriggering
•
•
O VERTRIGGERING
Overtriggering occurs when tables are being placed in shared memory faster than
the EDI task or protocol module can pull the tables out and process them. When
shared memory is full, an additional request to place a table in it results in the
generation of an error message reporting an overtriggered state.
E FFICIENT TRIGGERING
To design your application for optimum performance and avoid overtriggering,
consider the following triggering techniques.
Timed
The easiest and most basic way to trigger a block read or write operation is with a
timed element. To define a timed trigger element, you enter a tag name for a Block
Read Trigger or Block Write Trigger element in the Read/Write Control panel that
matches the tag name of an interval timer element (defined in the Interval Timer
Information panel). If you define this element to change once per second, the table
is placed in its shared memory once every second.
Using timed elements as triggers is acceptable in most cases. An overtriggering
situation can occur, however, if the trigger rate causes tables to be placed into
shared memory faster than EDI or the protocol module can process them.
188 / FactoryLink 6.6.0 / Device Interface Guide
APPLICATION DESIGN TIPS AND TECHNIQUES
Efficient Triggering
Note
The next two triggering methods, cascaded and self-triggered, can
solve potential overtriggering situations in many cases. These
methods, however, might not be appropriate for every read or write
table you define. For instance, the timed method works best for
tables that do not need to be updated at the highest possible rate.
Cascaded
The cascading of tables is an alternative to using timed triggers. It uses the Block
Read State and Block Write State elements, which are reset to 1 after EDI processes
the table.
In the Read/Write Control panel, if either the complete or state element is defined
as the trigger element for the table in the row below the current table, that table
is not triggered and placed into shared memory until the preceding table is
processed. If the table defined in the final row of the Read/Write Control panel
contains a tag name for a complete or state element that matches the tag name of
the trigger element for the table defined in the first row, the completion of the
final table triggers the first table. This endless loop results in the sequential
processing of tables at an optimal rate.
Figure 8-0 illustrates a series of read tables created using the cascading
technique. This type of table setup is also referred to as a “daisy chain” of tables.
FactoryLink 6.6.0 / Device Interface Guide / 189
8
External Device
Interface
A situation in which triggers overlap can occur as well. To illustrate, suppose a
5-second, a 15-second, and a 30-second timed element are used to trigger various
tables. Each table is placed in its designated queue every 30 seconds when the
various triggers line up. The use of prime numbers quickly solves this problem,
but a more effective method follows.
•
APPLICATION DESIGN TIPS AND TECHNIQUES
•
Efficient Triggering
•
•
Figure 8-0 Cascaded Read Tables
Continued
READ1
READ2
READ3
READ4
READ5
When the READ1 table
has been processed, its
state tag, r1_state, is
forced back to 1.
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
1
1
1
1
1
r5_state
r1_state
r2_state
r3_state
r4_state
Continued
r1_state
r2_state
r3_state
r4_state
r5_state
Since r1_state is defined as
the read trigger for the
READ2 table, READ2 is the
next table triggered.
A table is placed into shared memory only after the previous table has been
processed. If you use the Block Read State or Block Write State element to perform
the cascade, the successful processing of a table prior to the next table in the loop
being triggered is not guaranteed; but overtriggering is prevented. Regardless of
communications, the loop continues to process.
If a table is to be placed into shared memory that has become full, the value of the
state element for that table does not change. Consequently, the next table is not
triggered until room is available in shared memory for the current table.
If you use the Block Read Complete or Block Write Complete element to perform the
cascade, the next table in the loop is placed into shared memory after the previous
table is successfully communicated. In this case, successful processing of the
transaction is guaranteed. (A time-out error occurring somewhere in the loop
slows the performance of the cascade.)
A parallel between timed and cascaded triggering further illustrates this method’s
effectiveness. When the same timed trigger element is used to trigger each of
several tables defined in the Read/Write Control panel, the tables are processed
sequentially (starting with the beginning row of the panel) on each occurrence of
the trigger. Essentially, this scenario represents a timer-initiated cascade. If each
instance of the timed element is replaced by an element that, when combined with
other elements, creates the cascaded triggering effect, the fastest rate at which
the tables can be placed into queues is naturally set by the tables themselves.
190 / FactoryLink 6.6.0 / Device Interface Guide
APPLICATION DESIGN TIPS AND TECHNIQUES
Efficient Triggering
For example, experimentation determines that when one 3.2-second timed digital
element is used as the same trigger element for a number of tables, the
application can trigger the tables without the overtrigger message appearing.
The use of self-triggered tables can increase the throughput and efficiency of read
and write operations.
In a self-triggered table, instead of a state or complete element serving as a
trigger for the next table in a cascaded loop, a state or complete element serves as
a Block Read Trigger or Block Write Trigger element for the table in which it is
defined. In other words, one tag name is defined for both the trigger element and
the complete or state element in a single table:
Figure 8-0 Self-Triggered Read Table
Continued
R_AGAIN
NO
NO
1
selftrig
Continued
selftrig
When FactoryLink starts up, the complete or state element is automatically set
to 1. If you have defined this same element as the trigger element, the table is also
placed in its priority queue at startup. When the complete or state element is set
again as a result of the operation, the cycle starts over and the table is placed in
its priority queue again (because the complete or state element is also the trigger).
FactoryLink 6.6.0 / Device Interface Guide / 191
External Device
Interface
Self-Triggered
8
•
APPLICATION DESIGN TIPS AND TECHNIQUES
•
Efficient Triggering
•
•
Overtriggering does not occur with a self-triggered table because a table destined
for a device is placed into shared memory only after the previous table has been
processed.
Note
The continuation of a cascaded loop or self-triggered table ceases if
the Block Read Disable or Block Write Disable element is set to 1. To
restart after the disable element is set to 0 again, the Block Read
Trigger or Block Write Trigger element must be reset to 1.
Figure 8-0 illustrates the methodology of a self-triggered read table that uses the
state element to self trigger.
Figure 8-0 Self-Triggered Read Table
At FactoryLink startup, selftrig (as a
state element) is set to 1.
ô
Continued
As a trigger element, selftrig also places the
R_AGAIN table into queue 1 at startup.
í During processing of the R_AGAIN table,
selftrig (as a state element) is set to 0.
÷
R_AGAIN
NO
NO
1
Continued
selftrig
If the table completes successfully (the data
is read then stored in the elements defined in
the Read/Write Information panel), selftrig
(as a state element) is set to 1.
û When the state element, selftrig, is set to 1, the
table is placed into its queue again because selftrig
is also the trigger element. If selftrig (as a state
element) remains 0 because the table does not
complete successfully, selftrig (as a trigger
element) never gets set for queuing the table again.
192 / FactoryLink 6.6.0 / Device Interface Guide
í÷
selftrig
ôû
•
•
•
•
Chapter 9
Testing and
Troubleshooting
• For a series of flowcharts to assist you in identifying and solving problems with
EDI, see “EDI Flowcharts” on page 194.
• For information about configuring and testing a simple triggered read table, see
“Verifying Proper Communications” on page 198.
FactoryLink 6.6.0 / Device Interface Guide / 193
External Device
Interface
This chapter contains information to help you prevent, identify, and correct
problems with EDI and the device task. The sections included are listed below.
9
•
TESTING AND TROUBLESHOOTING
•
EDI Flowcharts
•
•
EDI F LOWCHARTS
Use the following flowcharts to identify and solve problems with your FactoryLink
application configured for the EDI task.
Begin here to
troubleshoot EDI.
Has this
configuration
ever worked?
No
Run the FLNEW utility.
Then, configure a read
table and a write table for
one logical station, each
table containing one
value to be read or
written.
No
See the flowchart,
"Basic Troubleshooting."
With only EDI and RTMON running,
manually trigger the write operation.
Verify the device received the value
by manually triggering the read of the
same register (or verify using device
programming tools).
Yes
Has anything
about the
configuration
changed?
See the flowchart,
No
"Basic Troubleshooting."
Was this
operation
successful?
Yes
Yes
Operating
System
Did the hardware,
operating system, or
the application
change?
FactoryLink
Application
Hardware
Verify the FactoryLink
version, existing
hardware, or thirdparty software are
compatible.
Is the interface card,
device, or device
emulator compatible
with the device
interface product?
Verify the correct
configuration of the
cable.
Note the message
generated in the
Run-Time Manager.
See the flowchart,
"Common Errors."
194 / FactoryLink 6.6.0 / Device Interface Guide
See the flowchart,
"Testing Your
Application."
TESTING AND TROUBLESHOOTING
EDI Flowcharts
Basic Troubleshooting
9
Begin here for basic
troubleshooting.
RunUKEY -Lto verify all
necessary license options
(protection bits) are
present
. Check the listing
for COM and for the
protocol-specific interface
product you are using.
No
The baud rate, parity
and stop bits should
match. Refer to the
device
manufacturer’s
documentation.
No
For testing purposes
set this value up to
eliminate timing
considerations as a
problem.
Yes
Is the logical
station timeout
setting too low?
Yes
Are all entries
filled out in the
SHARED
domain?
No
Verify no entries were
made in the user domain by
looking at tables and
database files generated by
the Configuration Manager.
No
Use the correct cable. Do not
use a cable from another
software package unless it
matches the cable specified in
Chapter 4. Also see the section,
"The Cable Connection," in No
Chapter 1.
No
See Chapter 1 for a discussion
of logical stations and logical
ports. To help you configure
multiple ports and stations, a
logical station worksheet is
provided in Chapter 5.
No
Refer to Chapter 5. Be sure
the hardware is responding at
the operating system level.
Note that only external 232/
422 converters are
supported.
No
For appropriate memory
settings for the system
hardware, refer to Chapter 5.
See the flowchart,
"Common Errors."
Yes
Does the cable
configuration
match the
applicable diagram
in Chapter 4?
Yes
Do all entries for
logical station
and logical port
match?
If this flow chart does not
address your problem, note
any signs of communication
(such as transmit and receiv
lights on the device, or line
analyzer output) and
document your test
application, if applicable.
Then, contact Customer
Support for further assistan
Yes
Does the hardware
specified in the
Function field of the
External Device
Definition table
match the
computer’s
hardware?
Yes
Is the memory
setting correct in
the External
Device Definition
table?
FactoryLink 6.6.0 / Device Interface Guide / 195
External Device
Interface
Do the
communication
parameters
match those of
the device?
•
TESTING AND TROUBLESHOOTING
•
EDI Flowcharts
•
•
Common Errors
Begin here to research
error messages.
Block rdn block wr
n
excpt wrn unsoln
LPORTn LSTAn err 0002 or 0003
tablen pkt:n
Can’t resolve IPC
n
for LPORT
Send ofoperation
delayed LPORT
n
Can’t open
EDI_DEV.CT
Yes
Yes
No reads, no writes
>>> nothing to do
Out of RAM
allocating....
This informational message indicates the
number of read and write operations
configured in your application.
Yes
This message indicates a timeout or an
inability to communicate with the device.
Verify the cable connection, the status of the
device, and the communication parameters.
This message indicates the memory allocation EDI
needs to send and receive commands has not taken
place. Clear the shared memory using the appropriate
operating system utility (for example, IPCRM).
Yes
The EDI-specific DCT files have not been
generated. Force the regeneration of these
files using the EDISTART utility with the
-V and -R arguments. Note any errors.
Yes
This informational message indicates the
trigger rate of the tables is too high and is
causing queued responses. Use one of the
triggering methods described in Chapter 8, or
identify hardware issues that might limit
communication throughput.
Yes
A limit in the total number of tables or data points
may have been reached. Note the total number
of read and write tables of each type, data
points, ports, and any other useful information for
troubleshooting the problem. Then, contact
Customer Support.
Verify the External Device
Definition panel is filled out
correctly with valid data.
Yes
See Chapter 10.
196 / FactoryLink 6.6.0 / Device Interface Guide
If the error message you received do
not appear here or in Chapter 10,
contact Customer Support. Have the
following information available: the e
error message, what you were doing
when it occurred, which tables you w
working with, and any pertinent
configuration or cable set up informa
TESTING AND TROUBLESHOOTING
EDI Flowcharts
Testing Your Application
9
Begin here to test
your application.
External Device
Interface
Test the communication path by
following the procedure
described in "Verifying Proper
Communications" in this chapter.
Was the test
successful?
Check the
cable
connection.
No
Yes
Since the simple read and write operation from one point to one
device works, the error is probably in the larger application. Gradually
add parts of the larger application to the test application. For instance,
add a logical station for another device and try to read and write to it.
Change the larger application to
reflect each successful addition
to the test application.
Does the problem
still exist?
Testing is
complete.
No
Yes
Run CTGEN to regenerate the External Device Definition
table and the protocol-specific tables, then run EDISTART
with the -V and -R arguments to verify all files are current.
Note any messages displayed while these two
utilities are running. After correcting anything
specified as an error, test run the application.
Use a -D argument with the shared
Run-Time Manager, FLRUN.
Does the problem
still exist?
No
Testing is
complete.
Yes
See the flowchart,
Common errors.
Note any signs of communicat
such as transmit and receive
lights on the device, or line
analyzer output.
FactoryLink 6.6.0 / Device Interface Guide / 197
•
TESTING AND TROUBLESHOOTING
•
Verifying Proper Communications
•
•
VERIFYING P ROPER C OMMUNICATIONS
To ensure the device can properly communicate with FactoryLink, perform the
following steps:
1 Configure two tables: a triggered read table and an exception write table. These
should look similar to the ones shown below.
In the read table, define:
• A trigger element (in the sample panel, TEST_RTRIG) you will manually force
to 1, or on, using the FactoryLink Real-Time Monitor, RTMON.
• An element (in the sample panel, VALUE1) to hold the value read from a known
address in one of the devices in your configuration (in the sample panel, address
140 in the device configured as logical station 1). You will watch the activity of
this element in RTMON to verify it is being updated.
In the write table, define an element (in the sample panel, VALUE2) to hold a
value that will be written to the same address configured in the read table. You
will change this element’s value in RTMON to prompt the processing of this table.
198 / FactoryLink 6.6.0 / Device Interface Guide
TESTING AND TROUBLESHOOTING
Verifying Proper Communications
The next steps in the procedure involve the use of the FactoryLink Real-Time
Monitor. For detailed instructions on using RTMON, refer to the FactoryLink ECS
Fundamentals manual.
(TEST_RTRIG, VALUE1, and VALUE2 in the sample panels). To create a watch
list, use the Watch option on the RTMON Options menu.
3 Prompt the processing of the triggered read table by forcing a 1 to the read trigger
using the Tag Input option on the RTMON Options menu. You can watch the value
of the trigger change in the watch list.
When you force the read trigger to 1,...
...its value in the
watch list changes
from OFF to ON.
When the read table
is triggered, the
value of VALUE1 is
updated. If the value
read differs from the
element’s current
value, you will see it
change in the watch
list.
When the triggered read table is processed, the element defined to hold the value
read (VALUE1 in the sample panel) is updated with the current value of the
specified register address.
FactoryLink 6.6.0 / Device Interface Guide / 199
External Device
Interface
2 In RTMON, create a watch list containing the elements defined in the two tables
9
•
TESTING AND TROUBLESHOOTING
•
Verifying Proper Communications
•
•
4 Use RTMON to prompt FactoryLink to process the exception write table. Change
the value of the element to be written (VALUE2 in the sample panel) using the
same option you used to trigger the read table, Tag Input. When you change the
element’s value in this way, the exception write table is processed and the value is
written to the specified register address.
200 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 10
Messages and Codes
10
This chapter explains the formats for system messages, as well as a descriptive
list of the potential messages FactoryLink can generate for EDI and display at
startup and while an application is running. For descriptions of protocol module
messages, refer to the protocol-specific reference chapter.
FactoryLink 6.6.0 / Device Interface Guide / 201
External Device
Interface
During normal operations and upon detecting an error condition, FactoryLink
generates and displays messages for the EDI task, the device protocol module, and
the devices in your application configured for FactoryLink communications. These
messages are briefly displayed on the Run-Time Manager screen. For FactoryLink
to store system messages, you define database tags to which the messages are
written when they occur. These database tags are configured in the Logical
Station Control and Information panels. To view the stored messages, you
configure these tags as graphic objects using the Application Editor.
•
MESSAGES AND CODES
•
Message Formats
•
•
M ESSAGE F ORMATS
This section contains a description of the Run-Time Manager line format for EDI
and protocol module messages, the tag message format in which messages are
displayed, and how the line format translates to the tag format.
EDI Run-Time Manager Line Format
Messages reporting normal operations and error conditions in read and write
operations are displayed on the EDI line of the Run-Time Manager screen. These
messages can contain the following information:
LPORT:xxx LSTA:xx ER:xxxx TBL:xxx PKT:xxx
where
LPORT:xxx
is the logical port number assigned to the physical port
experiencing the error.
LSTA:xx
is the logical station number assigned to the physical station
experiencing the error.
ER:xxxx
is an error code in decimal format. Refer to the protocol-specific
reference chapter for details on the error code generated.
TBL:xxx
is the number of the read or write table experiencing the error.
PKT:xxx
is the number of the message packet experiencing the error.
For example, this message
LPORT:000 LSTA:02 ER:02 TBL:03 PKT:02
means an error code 2 occurred for port 0, logical station 2, involving the third
table in the Read/Write Control panel for the second message packet generated.
For descriptions of the FactoryLink EDI messages containing this information,
see “Messages” on page 204.
202 / FactoryLink 6.6.0 / Device Interface Guide
MESSAGES AND CODES
Message Formats
Tag Message Format
To view the contents of a message tag on an application screen, you define the tag
as a graphic object using the Application Editor. For details on how to do this,
refer to the Application Editor.
In a message tag, the LPORT field of an EDI Run-Time Manager message is stored
in the following format:
Lsta n: MessageText, nnnn
where
n:
MessageText
nnnn
is the number assigned to the logical port causing the message.
is a description of the condition causing the error.
is the code number assigned to the message generated. For
information about the protocol-specific codes, refer to the protocol
module reference chapter.
For example:
Lsta 2: Read Response Error, 0x03
FactoryLink 6.6.0 / Device Interface Guide / 203
10
External Device
Interface
To capture these Run-Time Manager messages for viewing on an application
screen, you can log them to message tags. A message tag is defined in the Logical
Station Control panel. (This tag is not available for the OMRON protocol module.)
•
MESSAGES AND CODES
•
Messages
•
•
M ESSAGES
FactoryLink can generate and display various types of messages during the start
up of an application or while the application is running. This section describes
each type of message.
• EDI Messages—System messages generated by the EDI task at run time are
displayed on the Run-Time Manager screen. These messages appear opposite
the Shared Task description for EDI in the message area under Last Message.
• Startup Messages—During the start up of a FactoryLink application, messages
generated by the device protocol module are displayed on the system monitor as
the conditions prompting each message occur.
• Run-Time Application Messages—While the FactoryLink application is running,
messages generated by the device protocol module are displayed on an
application screen. For information about these messages, see the section,
“Run-Time Application Messages,” in the protocol-specific reference chapter.
In the message descriptions, the directory where your FactoryLink application
resides is referred to as FLAPP.
The information in italic text in the message descriptions will vary depending
upon certain factors. In the message you will see in your application, what is
shown in italics will be replaced by information specific to your application (for
example, port or table number).
Some of the messages described in this chapter can also be found in Chapter 9,
“Testing and Troubleshooting,” in a flowchart that describes how to respond to
some common error messages generated and displayed by the EDI task.
For further assistance, contact Customer Support.
204 / FactoryLink 6.6.0 / Device Interface Guide
MESSAGES AND CODES
Messages
EDI Messages
The following messages report operations and error conditions specific to EDI.
Cause:
A protocol module was experiencing an error at the time the EDI
task was shutting down.
Action:
None. This is only an information message.
Bad block ’DCT’ file. LPORT logical port table table
Cause:
The block .DCT file generated by the EDI task for the specified
logical port and Read/Write table is corrupt.
Action:
Delete the files from FLAPP\DCT and restart FactoryLink.
Bad ’DCT’ file filename
Cause:
Internal error. The specified .DCT file is corrupt.
Action:
Delete the files from FLAPP\DCT and restart FactoryLink.
Bad read on file filename
Cause:
A read operation on the named file failed.
Action:
Verify the External Device Definition tables are correct and
contact your system administrator.
Bad return code from operation err:hexcode
Cause:
A program error occurred.
Action:
Refer to the description for the hexadecimal number that is
displayed after err: in the protocol-specific reference chapter for
information about correcting the error.
Block rd n block wr n excpt wr n unsol n
Cause:
The EDI task is displaying the total number of communication
transactions configured for each type of operation defined in the
.DCT files.
Action:
None. This is only an information message.
FactoryLink 6.6.0 / Device Interface Guide / 205
External Device
Interface
Abnormal shutdown of EDI drivers
10
•
MESSAGES AND CODES
•
Messages
•
•
Can’t open EDI_DEV.CT
Cause:
The file may be corrupt or absent, or the External Device
Definition table may not have any entries.
Action:
Ensure the External Device Definition table has been configured
and the entries are correct.
Can’t open file filename
Cause:
This may be a log file that has been opened by another process,
or has not been created.
Action:
Verify the External Device Definition tables are correct and
contact your system administrator.
Can’t resolve IPC for LPORT logical port
Cause:
The EDI task was unable to allocate shared memory for the
specified logical port. A spawn of the protocol module was
attempted but failed.
Action:
In the External Device Definition table, define the appropriate
logical port to be used for read and write operations. If this does
not solve the problem, contact Customer Support.
Can’t spawn system unit task for LPORT logical port
Cause:
The Function field of the External Device Definition table
contains an invalid entry.
Action:
In the Function field on the External Device Definition table,
enter the appropriate communication type. For example, enter
SYSCOM for serial communications.
EDI task: Can’t obtain task number
Cause:
The wrong option bit was detected.
Action:
Verify the system has the correct task protection bit configured
(UKey-L).
Error opening device definition file
Cause:
One of the necessary device definition files for the EDI task
either does not exist or is corrupt.
Action:
Verify the External Device Definition table entries are correct.
206 / FactoryLink 6.6.0 / Device Interface Guide
MESSAGES AND CODES
Messages
Error opening port definition file
One of the necessary port definition files for the EDI task either
does not exist or is corrupt.
Action:
Verify the External Device Definition table entries are correct.
Error reading device definition
Cause:
A necessary device definition file for the EDI task is corrupt.
Action:
Verify the External Device Definition table entries are correct.
Error reading port definition
Cause:
A necessary port definition file for the EDI task is corrupt.
Action:
Verify the External Device Definition table entries are correct.
External Device Interface startup
Cause:
The EDI task is starting up normally.
Action:
None. This is only an information message.
Invalid operation to uninitialized LPORT logical port
Cause:
The EDI task could not perform a read or a write operation
because the specified logical port has not been defined.
Action:
Define the logical port number specified.
LPORT logical port LSTA logical station err hexcode table table pkt:packet
Cause:
An error occurred during a read or write operation to the
specified logical station.
Action:
The error code specified after err is associated with the port,
station, table, and packet indicated. Refer to the description for
the hexadecimal number that is displayed after err in the
protocol-specific reference chapter for information about
correcting the error.
LPORT logical port connecting
Cause:
This logical port is connecting to an external device.
Action:
None. This is only an information message.
FactoryLink 6.6.0 / Device Interface Guide / 207
10
External Device
Interface
Cause:
•
MESSAGES AND CODES
•
Messages
•
•
LPORT logical port connected
Cause:
This logical port has successfully connected to a device.
Action:
None. This is only an information message.
LPORT logical port disconnected
Cause:
This logical port has successfully disconnected from a device.
Action:
None. This is only an information message.
LPORT logical port disconnecting
Cause:
This logical port is disconnecting from a device.
Action:
None. This is only an information message.
No reads, no writes >>> nothing to do
Cause:
The EDI task does not recognize any read or write operations
because the configuration tables contain incorrect entries.
Action:
Verify the entries in the External Device Definition table and
device-specific configuration tables and correct as needed.
Cause:
The EDI task does not recognize any read or write operations
because the .DCT files were not properly built.
Action:
Check the FLAPP\DCT directory to verify the .DCT files were
built. If necessary, execute EDISTART -R -V to regenerate the
files.
Cause:
The EDI task does not recognize any read or write operations
because the task is unable to read the FLAPP\DCT directory.
Action:
Verify the FLAPP\DCT directory has read and write privileges.
Grant these privileges if necessary.
Cause:
The EDI task does not recognize any read or write operations
because none have been defined.
Action:
Create a read or write table.
208 / FactoryLink 6.6.0 / Device Interface Guide
MESSAGES AND CODES
Messages
Normal shutdown
The EDI task is shutting down in response to a normal
FactoryLink termination request.
Action:
None. This is only an information message.
Out of RAM EDI task function
Cause:
The EDI task cannot perform the specified function because the
system has run out of memory.
Action:
Increase the amount of virtual memory.
Processing DCT filename
Cause:
The EDI task is reading the preconfigured .CT file and
packetizing information from the specified internal .DCT file.
Action:
None. This is only an information message.
Send of operation failed LPORT logical port err:hexcode
Cause:
The EDI task was unable to perform a read or a write operation
on the specified logical port because the port was not properly
defined.
Action:
Define the logical port number specified. If this does not solve
the problem, refer to the description for the hexadecimal number
that is displayed after err: in the protocol-specific reference
chapter for information about correcting the error.
Termination flag acknowledgment
Cause:
The EDI task is shutting down normally.
Action:
None. This is only an information message.
WARNING: n of TBL: n DEV: n refused
Cause:
The EDI task was unable to allocate shared memory to process
the specified read or write operation.
Action:
None. This is only an information message.
FactoryLink 6.6.0 / Device Interface Guide / 209
10
External Device
Interface
Cause:
•
MESSAGES AND CODES
•
Messages
•
•
Startup Messages
During FactoryLink application startup, the device protocol module can generate
messages and display them on the console. These messages display as shown, not
in error code or message format.
FactoryLink Ver: n EDI Ver: n.nn protocol module EDI Module Ver: n.nn
Cause:
The protocol module has started up successfully.
Action:
None. This is only an information message.
protocol module: Protection bit failure
Cause:
The option key is missing the protocol-specific option bit.
Action:
Install the option bit.
protocol module: Software Protection bit failure; bits (x) and number (y) required
Cause:
One or both of the option bits (where x and y are decimal values)
required to run this protocol module are missing.
Action:
Install the required option bits in the master key.
210 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 11
Allen-Bradley
11
• PLC-2
• PLC-3
External Device
Interface
This chapter contains information needed to set up and configure bidirectional
communications between the FactoryLink real-time database and the following
devices, either directly or through the Allen-Bradley Data Highway protocol:
• PLC-4
• PLC-5
• PLC-250
• PLC-1774
FactoryLink 6.6.0 / Device Interface Guide / 211
Allen-Bradley
When you choose Allen-Bradley from the Configuration Manager Main Menu, the
Allen-Bradley configuration panels are displayed.
•
ALLEN-BRADLEY
•
Configuring the Logical Station Control Panel
•
•
C ONFIGURING
THE
L OGICAL S TATION C ONTROL P ANEL
Note
Before completing the protocol-specific Allen-Bradley
configuration panels, you must complete the External Device
Definition panel. See “Identifying Protocol Types and Defining
Logical Ports” on page 84 for details.
To bring the Logical Station Control panel to the foreground, click on its title bar
in the display of all configuration panels.
Complete a row for each logical port specified in the External Device Definition
panel you want to define as a communication path for read and write operations.
Logical Port
Enter a number, defined in the External Device Definition panel
Logical Port column, to represent a particular communication path
to a device.
Valid Entry: previously defined logical port number
212 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY
Configuring the Logical Station Control Panel
Baud Rate
Enter the speed at which the protocol module communicates with
the devices linked to FactoryLink via this logical port. This entry
must match the baud rate configuration of the devices. Refer to
the device manufacturers documentation for details.
9600, 19200 (default=9600)
Parity
Enter the parity error correction during transmission via this
logical port. This entry must match the configuration of the
devices communicating via this port. Refer to the device
manufacturers documentation for details.
Valid Entry: none, even, odd (default=none)
Data Bits
External Device
Interface
Valid Entry: 110, 150, 300, 600, 1200, 2400, 3600, 4800, 7200,
11
Enter the number of data bits used during transmission via this
logical port. This entry must match the configuration of the
devices communicating via this port. Refer to the device
manufacturers documentation for details.
Valid Entry: 7, 8 (default=8)
Enter the number of bits sent after a character to create a pause
before the start of the next character. This entry must match the
configuration of the devices communicating via this port. Refer to
the device manufacturers documentation for details.
Valid Entry: 1, 2 (default=1)
Response Timeout
0.1 sec
Enter the length of time, in tenths of seconds, the protocol module
will wait to receive a response to a read or write command before
timing out. You must enter a value greater than 0 for the protocol
module to timeout.
Valid Entry: 0-9999 (default=55)
Data Highway I/F
Address (Octal)
Enter the address of the asynchronous communications module
on the Data Highway. Most current modules accept or require 0.
Some older Allen-Bradley Data Highway interface modules may
require their Data Highway address.
Valid Entry: 0 - 377 (unless specifically required by the Data
Highway interface, enter 0.)
Duplex
Enter the type of Allen-Bradley protocol support.
Valid Entry: full (default)
LRC Error
Detection
Enter the type of longitudinal range error checking used by the
Allen-Bradley asynchronous communications interface.
FactoryLink 6.6.0 / Device Interface Guide / 213
Allen-Bradley
Stop Bits
•
ALLEN-BRADLEY
•
Configuring the Logical Station Control Panel
•
•
Ensure that the communication device matches the setting you
choose. If you specify no setting, the LRC error detection defaults
to CRC.
Valid Entry: B, C, BCC, CRC (default=CRC)
Retry Request
(For use with BCC longitudinal error checking only.) Enter the
maximum number of times the protocol module will retry a read
or write command to a device communicating through this logical
port if the command response is invalid or is not received.
Valid Entry: 0 - 32767 (default=3)
LINK Timeout
0.001 Sec
Enter the length of time in milliseconds to wait for link-level
response (ACK/NAK) from the asynchronous interface.
Valid Entry: 0 - 65536 (default=150)
ENQ Retry Count
Enter the number of times for the EDI task to re-send ENQs after
a timeout before aborting a request.
Valid Entry: 0 - 32767 (default=10)
NAK Retry Count
Enter the number of times for the EDI task to retransmit a send
request after receipt of a negative acknowledgment (NAK) before
aborting the request.
Valid Entry: 0 - 32767 (default=3)
Status Msg Tag
Enter a tag name for a message element to which a text string
will be written to indicate a communications error associated
with this logical port.
For information about displaying the text stored in a Status Msg
Tag element for an operator using this application, see the
Application Editor.
Valid Entry: standard element tag name
Valid Data Type: message
When the panel is complete, click on Enter to validate the information. Define the
data type (message) for any tag names displayed in the Tag Definition dialog.
Table 11-0 provides sample entries for the Allen-Bradley Logical Station Control
panel. In this example, logical port 0 is configured for a baud rate of 9600, 8 data
bits, 1 stop bit, no parity, and a 5.5-second response timeout. The Data Highway
I/F address is 0, using FULL duplex. LRC Error detection is CRC, the retry
request is 3 with a link timeout of 150 seconds. The ENQ Retry count is 10 and
the NAK Retry Count is 3. The EDI task will store communications error
214 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY
Configuring the Logical Station Control Panel
messages associated with this logical port in a message element,
AB_LPORT0_MSG
11
Table 11-0 Sample Logical Station Control Panel Entries
Entry
0
Baud Rate
9600
Parity
NONE
Data Bits
8
Stop Bits
1
Response Timeout 0.1 sec
55
Data Highway I/F address (OCTAL)
0
Duplex
FULL
LRC Error Detection
CRC
Retry Request
3
Link Timeout 0.001 sec
150
ENQ Retry Count
10
NAK Retry Count
3
Status Msg Tag
AB_LPORT0_MSG
Allen-Bradley
Logical Port
External Device
Interface
Field
FactoryLink 6.6.0 / Device Interface Guide / 215
•
ALLEN-BRADLEY
•
Configuring the Logical Station Information Panel
•
•
C ONFIGURING
THE
L OGICAL S TATION I NFORMATION P ANEL
From the Logical Station Control panel, select the row for the logical port you are
configuring and click on Next to bring the Logical Station Information panel to the
foreground.
Complete a row for each device to communicate through this logical port.
Error/Status Tag
Name
(Optional) Enter a tag name for an analog element in which to
store communications error codes associated with this device
(logical station).
For information about displaying the codes stored in an
Error/Status Tag Name element for an operator using this
application, see the Application Editor.
Valid Entry: standard element tag name
Valid Data Type: analog
Logical Station
(Decimal)
Enter a number to identify the logical station to which the
information in this row pertains. A logical station represents the
combination of a logical port with a physical station. Assign a
unique number to each device communicating through this
logical port.
216 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY
Configuring the Logical Station Information Panel
You will later enter this logical station number in a read or write
table to represent the device defined in this row. In a read or
write table, this number will identify the device to or from which
data is to be sent or received.
Device Type
Enter the type of Allen-Bradley device to which communications
are to be directed.
Valid Entry: PLC (valid for 1774-PLC and PLC-4), PLC-2
(also valid for 1774-PLC and PLC-4), PLC-3,
PLC-5, PLC-250
Station Address
(Octal)
Enter the physical Data Highway address of the Allen-Bradley
device.
External Device
Interface
Valid Entry: 0 - 999
11
For some Data Highway types, some addresses may be invalid.
For further information about valid addresses for a specific Data
Highway type, refer to the Allen-Bradley documentation.
Valid Entry: 0 - 377 (octal)
(Optional) Enter reference information about this logical station.
Valid Entry: alphanumeric string of up to 21 characters
When the panel is complete, click on Enter to validate the information. Define the
data type (analog) for any tag names displayed in the Tag Definition dialog.
Table 11-0 provides sample entries for the Allen-Bradley Logical Station
Information panel. In this example, logical station 0 is a PLC-5 on logical port 0,
with a data highway address of 1. The analog element defined in the Error/Status
Tag Name field, AB_STATION0_STATUS, is configured to hold port errors for
logical station 0.
Table 11-0 Sample Logical Station Information Panel Entries
Field
Entry
Error/Status Tag Name
AB_STATION0_STATUS
Logical Station (Decimal)
0
Device Type
PLC-5
Station Address (OCTAL)
1
Comment
FactoryLink 6.6.0 / Device Interface Guide / 217
Allen-Bradley
Comment
•
ALLEN-BRADLEY
•
Configuring the Read/Write Control Panel
•
•
C ONFIGURING
THE
R EAD /WRITE C ONTROL P ANEL
To bring the Read/Write Control panel to the foreground, click on its title bar in
the display of all configuration panels or click on Next from the Logical Station
Information panel.
Complete a row for each read or write table.
Tip
Refer to Chapter 8, “Application Design Tips and Techniques,” for
information about triggering schemes using elements defined in
this panel.
Table Name
Give this read or write request a name. Define one request (table)
per line and do not include spaces in the name. You can define as
many tables in this panel as available memory allows. Try to
make the table name reflective of the operation it represents.
218 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY
Configuring the Read/Write Control Panel
Valid Entry: alphanumeric string of up to 16 characters
Unsolicited Read
For EDI to interpret this operation as a triggered block read or as
a write operation, accept the default of NO.
If this is an unsolicited read operation, enter YES or FORCE. EDI
will interpret this operation as an unsolicited read and emulate
the device’s addressing structure based on entries you make in
the Read/Write Information panel. The incoming data will be
stored in the real-time database as specified in this field.
If you enter FORCE, the data is stored in the specified element
and the change-status indicator is automatically set to 1,
regardless of whether the current value matches the new value.
Valid Entry: yes, no, force (default=no)
Exception Write
For EDI to interpret this operation as a triggered block write or
as a read operation, accept the default of NO.
For EDI to interpret this operation as an exception write and
write element values to the device only when those values
change, enter YES.
In an exception write, an internal change-status indicator within
the element containing the data to be written prompts the write
operation. If an element is configured for an exception write and
FactoryLink 6.6.0 / Device Interface Guide / 219
Allen-Bradley
If you enter YES, the incoming data will be stored in the element
represented by the tag name specified in the Read/Write
Information panel. If the current value of the element is equal to
the new value, the change-status indicator is unaffected. If a
different value is being stored the element, however, it will
overwrite the current value and the element’s change-status
indicator will be set to 1 (ON).
11
External Device
Interface
If this is a triggered read or a block write table, when the trigger
element (Block Read Trigger for a read operation or Block Write
Trigger for a write operation) is forced to 1 (ON), the element
prompts FactoryLink to process this table and any other table in
which the same trigger is defined.
•
ALLEN-BRADLEY
•
Configuring the Read/Write Control Panel
•
•
EDI recognizes this indicator has been set since the last scan of
the real-time database (indicating the value of the element has
changed), EDI writes this element’s value to the device.
Valid Entry: yes, no (default=no)
Tip
Do not specify elements expected to change at frequent and
unpredictable intervals in an exception write table. Any element
specified will be written to the device in its own packet (message)
each time it changes. Defining elements that change value
frequently as exception writes can slow down communications or
result in an error message.
Block Read
Priority
If this is a block read operation, enter a number to indicate the
priority of this table, relative to other read operations. The
highest priority is 1. This number influences the order in which
the EDI task handles the queuing of block read requests. If EDI
receives two requests at the same time, it processes the request
with the highest priority first. The default is 1.
If this is an unsolicited read or a write operation, accept the
default of 1. This field defaults to 1 regardless of whether the
operation being defined is a block read.
Valid Entry: 1 - 4 (default=1)
Note
The Block Read Trigger, Block Read Disable, Block Read Complete, and
Block Read State elements apply only to triggered read operations.
Do not define these elements for unsolicited read operations or for
write operations.
Block Read
Trigger
If this is an unsolicited read or a write operation, ignore this field.
If this is a triggered read operation, this field is required. Enter a
tag name for a digital element to initiate a block read of the
addresses specified in the Read/Write Information panel. When
this element’s value is forced to 1 (ON), the addresses are read.
Valid Entry: standard element tag name
Valid Data Type: digital
220 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY
Configuring the Read/Write Control Panel
Block Read
Disable
If this is an unsolicited read or a write operation, ignore this field.
To re-enable a block read table that has been disabled, set this
element back to 0 (OFF).
Valid Entry: standard element tag name
Valid Data Type: digital
11
External Device
Interface
If this is a triggered read operation, this field is optional. If you
need a digital element to disable a block read of the elements
specified in this table, enter a tag name. When this tag’s value is
forced to 1 (ON), the read operation is not executed, even when
the block read trigger is set to 1.
Tip
Block Read
Complete
If this is an unsolicited read or a write operation, ignore this field.
If this is a triggered read operation, this field is optional. If you
need a digital element to indicate when this operation is
complete, enter a tag name. This element is forced to 1 (ON) at
startup. After the elements defined in the Read/Write
Information panel have been updated in the FactoryLink
database, the complete element is forced to 1 again.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
FactoryLink 6.6.0 / Device Interface Guide / 221
Allen-Bradley
This element can be used to disable a block read operation that is
either part of a cascaded loop or is self-triggered. The triggering
cycle will cease upon disabling, however. To re-enable a cascaded
loop or a self-triggered read table, the Block Read Trigger element
must be toggled or forced to 1. Refer to Chapter 8, “Application
Design Tips and Techniques,” for further details.
•
ALLEN-BRADLEY
•
Configuring the Read/Write Control Panel
•
•
Block Read State
If this is an unsolicited read or a write operation, ignore this field.
If this is a triggered read operation, this field is optional. If you
need a digital element to indicate the state of this operation (in
progress or complete), enter a tag name. This element is forced to
1 (ON) at startup. While the table is being processed, the element
is set to 0 (OFF). After the elements defined in the Read/Write
Information panel have been updated in the FactoryLink
database, the state element is forced back to 1.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write
Priority
If this is a block or exception write operation, enter a number to
indicate the priority of this table, relative to other write
operations. The highest priority is 1. This number influences the
order in which the EDI task handles the queuing of write
requests. If EDI receives two requests at the same time, it
processes the request with the highest priority first. The default
is 1.
If this is a read operation, accept the default of 1. This field
defaults to 1 regardless of whether the operation being defined is
a block or exception write.
Valid Entry: 1 - 4 (default=1)
Note
The Block Write Trigger, Block Write Disable, Block Write Complete, and
Block Write State elements apply only to write operations. Do not
define these elements for read operations.
Block Write Trigger
If this is a read operation or an exception write operation you do
not plan to periodically disable, ignore this field.
If this is a block write table or an exception write table you plan
to periodically disable, this field is required. Enter a tag name for
a digital element to initiate a block write of the element values
specified in the Read/Write Information panel to the addresses
defined to receive the values. When this element’s value is forced
to 1 (ON), FactoryLink writes the values.
Valid Entry: standard element tag name
Valid Data Type: digital
222 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY
Configuring the Read/Write Control Panel
Block Write
Disable
If this is a read operation or an exception write operation you do
not plan to periodically disable, ignore this field.
To re-enable a block write table that has been disabled, set this
element back to 0 (OFF).
Valid Entry: standard element tag name
Valid Data Type: digital
11
External Device
Interface
If this is a block write table or an exception write table you plan
to periodically disable, this field is optional. Enter a tag name for
a digital element to disable a block write to the addresses
specified in this table. When this tag’s value is forced to 1 (ON),
the write operation is not executed, even when the block write
trigger is set to 1.
Tip
Block Write
Complete
If this is a read or exception write operation, ignore this field.
If this is a block write table, this field is optional. If you need a
digital element to indicate when this operation is complete, enter
a tag name. This element is forced to 1 (ON) at startup. After the
data defined in this table’s Read/Write Information panel has
been written to the device, the complete element is forced to 1
again.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write State
If this is a read or exception write operation, ignore this field.
If this is a block write operation, this field is optional. If you need
a digital element to indicate the state of this operation (in
progress or complete), enter a tag name. This element is forced to
1 (ON) at startup. While the table is being processed, the element
FactoryLink 6.6.0 / Device Interface Guide / 223
Allen-Bradley
This element can be used to disable a block write operation that is
either part of a cascaded loop or is self-triggered. The triggering
cycle will cease upon disabling, however. To re-enable a cascaded
loop or a self-triggered write table, the Block Write Trigger element
must be toggled or forced to 1. Refer to Chapter 8, “Application
Design Tips and Techniques,” for further details.
•
ALLEN-BRADLEY
•
Configuring the Read/Write Control Panel
•
•
is set to 0 (OFF). After the data defined in this table’s Read/Write
Information panel has been written to the device, the state
element is forced back to 1.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
When the panel is complete, click on Enter to validate the information. Define the
data type (digital) for any tag names displayed in the Tag Definition dialog.
Table 11-0 provides sample entries for the Allen-Bradley Read/Write Control
panel. In this example, the READ table is configured as follows:
• When the value of the digital Block Read Trigger element AB_READ_TRIGGER
is 1, FactoryLink reads the configured register address and writes its value to
the element configured for this table (in the Read/Write Information panel). The
block read priority, which is set automatically if you do not enter a value, is set
to the default of 1, the highest priority.
• When the value of the digital element AB_READ_DISABLE is 1, FactoryLink
disregards the trigger element, AB_READ_TRIGGER, and does not process the
READ_MSG table.
• Once FactoryLink reads the data and writes it to the database element defined
to receive it (MBRDR1 in the Read/Write Information panel), FactoryLink
forces a value of 1 to the digital Block Read State element, AB_READ_STATE,
and to the Block Read Complete element, AB_READ_COMPLETE. During the
read operation, AB_READ_STATE is set to 0.
Table 11-0 Sample Read/Write Control Panel Entries
Field
Entry
Table Name
READ
Unsolicited Read
YES
Exception Write
YES
Block Read Priority
1
Block Read Trigger
AB_READ_TRIGGER
Block Read Disable
AB_READ_DISABLE
224 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY
Configuring the Read/Write Control Panel
Table 11-0 Sample Read/Write Control Panel Entries (Continued)
11
Field
Entry
AB_READ_COMPLETE
Block Read State
AB_READ_STATE
Block Write Priority
The write priority for this table is
set to 1 by default.
Block Write Trigger
Since this is a read table, the
elements specific to write
requests are not defined.
External Device
Interface
Block Read Complete
Block Write Disable
Block Write Complete
Block Write State
Allen-Bradley
FactoryLink 6.6.0 / Device Interface Guide / 225
•
ALLEN-BRADLEY
•
Configuring the Read/Write Information Panel
•
•
C ONFIGURING
THE
R EAD /WRITE I NFORMATION P ANEL
From the Read/Write Control panel, select the row for the table you are
configuring and click on Next to bring the Read/Write Information panel to the
foreground.
For a Read Table—Add a panel entry for each FactoryLink database element in
which data read from the device will be stored when the operation executes.
For a Write Table—Add a panel entry for each element to be written when the
operation executes.
Tip
Alternatively, the elements you define in the Read/Write
Information panel can be configured in the Tag Definition dialog in
the Application Editor. Refer to the Application Editor for details.
226 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY
Configuring the Read/Write Information Panel
Tag Name
For a read table, specify a tag name for an element in which
FactoryLink will store the data read from the device.
11
For a write table, specify a tag name for an element containing a
value to be written to the device.
Logical Station
Enter the number representing the device from which the data is
to be read or to which the element’s value will be written. This
number was originally defined in the Logical Station Information
panel for the logical port through which communications with
this device occurs.
External Device
Interface
Valid Entry: standard element tag name
Valid Data Type: digital, analog, longana, float, message
Valid Entry: previously defined logical station number
Address
For a read table, enter the address in the device’s memory where
the value to be stored in this element is located.
For a write table, enter the address in the device’s memory to
which the element value will be written.
Data Type
Specify the type of data being read from or written to the device
for each element defined in the Tag Name field.
If you enter the data type BIN, the EDI task automatically selects
an Allen-Bradley data type compatible with the FactoryLink data
type of the Tag Name element. For example, if you enter BIN as
the data type for an analog element, the task interprets BIN as
INT2 and reads or writes to the element as if the data type had
been entered as INT2.
Valid Entry: “Allen-Bradley Data Types” on page 229
When the panel is complete, click on Enter to validate the information. Define the
data type (digital, analog, long analog, floating-point, or message) for any tag
names displayed in the Tag Definition dialog.
Table 11-0 provides sample entries for the Allen-Bradley Read/Write Information
panel. In this example, the protocol module reads data from address 310/00 in the
PLC configured as logical station 0. The data is stored in a digital element,
MBRDR1. The protocol module transfers this untranslated binary value (BIN) to
the real-time database without conversion.
FactoryLink 6.6.0 / Device Interface Guide / 227
Allen-Bradley
Valid Entry: “Allen-Bradley Address Entries” on page 238
•
ALLEN-BRADLEY
•
Configuring the Read/Write Information Panel
•
•
Table 11-0 Sample Read/Write Information Panel Entries
Field
Entry
Tag Name
MBRDR1
Logical Station
0
Address
310/00
Data Type
BIN
228 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY
Allen-Bradley Data Types
A LLEN -B RADLEY D ATA TYPES
11
The following table describes the formats of the PLC data types that the
Allen-Bradley protocol module supports:
Data Type
Description
Signed, 2-byte binary integer
INT2
Untranslated binary value
INT4
Signed, 4-byte binary integer
BCD3
Unsigned, 2-byte word representing 3 BCD digits Binary Coded
Decimal value
BCD4
Unsigned, 2-byte word representing 4 BCD digits Binary Coded
Decimal value
UBCD
Unsigned, 2-byte word representing 4 BCD digits most
significant nibble ignored for reads, zero on writes
FLT4
Signed, 4-byte floating-point number
FLT8
Signed, 8-byte floating-point number
ASC
Two ASCII characters stored in one word: first character in least
significant byte; second character in most significant byte
FactoryLink 6.6.0 / Device Interface Guide / 229
Allen-Bradley
BIN
External Device
Interface
Table 11-0 PLC Data Types
•
ALLEN-BRADLEY
•
Conversion of Data Types for Read Operations
•
•
C ONVERSION
OF
D ATA TYPES
FOR
R EAD O PERATIONS
This section describes how the Allen-Bradley protocol module converts data types
to real-time database elements for read operations. Refer to “Allen-Bradley Data
Types” on page 229 for a list of data types.
Digital Elements
The Allen-Bradley protocol module supports only the following digital conversion:
BIN to Digital
The value (1 or 0) of the bit at the specified address is transferred to the digital
element without conversion. If no bit number is specified, the value of bit 0 at the
specified address is transferred to the digital element.
Analog Elements
The Allen-Bradley protocol module supports only the following analog
conversions:
BIN to Analog
The value of the word at the specified address is transferred to the analog element
without conversion.
INT2 to Analog
The value of the word at the specified address is transferred to the analog element
without conversion.
INT4 to Analog
The value of the 4-byte integer at the specified address is converted to a 2-byte
integer value and is transferred to the analog element.
BCD3 to Analog
The 3-digit BCD value at the specified address is converted to a 2-byte integer
value and is transferred to the analog element.
230 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY
Conversion of Data Types for Read Operations
BCD4 to Analog
The 4-digit BCD value at the specified address is converted to a 2-byte integer
value and is transferred to the analog element.
The 3-digit BCD value at the specified address is converted to a 2-byte integer
value and is transferred to the analog element.
FLT4 to Analog
The 4-byte floating-point value at the specified address is converted to a 2-byte
integer value and is transferred to the analog element.
External Device
Interface
UBCD to Analog
11
FLT8 to Analog
The 8-byte floating-point value at the specified address is converted to a 2-byte
integer value and is transferred to the analog element.
The Allen-Bradley protocol module supports only the following floating-point
conversions:
BIN to Floating Point
The 8-byte floating-point value at the specified address is transferred to the
floating-point element without conversion.
INT2 to Floating Point
The value of the 2-byte integer at the specified address is converted to an 8-byte
floating-point value and is transferred to the floating-point element.
INT4 to Floating Point
The value of the 4-byte integer at the specified address is converted to an 8-byte
floating-point value and is transferred to the floating-point element.
BCD3 to Floating Point
The value of the 3-digit BCD word at the specified address is converted to an
8-byte floating-point value and is transferred to the floating-point element.
FactoryLink 6.6.0 / Device Interface Guide / 231
Allen-Bradley
Floating-Point Elements
•
ALLEN-BRADLEY
•
Conversion of Data Types for Read Operations
•
•
BCD4 to Floating Point
The value of the 4-digit BCD word at the specified address is converted to an
8-byte floating-point value and is transferred to the floating-point element.
UBCD to Floating Point
The value of the 3-digit BCD word at the specified address is converted to an
8-byte floating-point value and is transferred to the floating-point element.
FLT4 to Floating Point
The 4-byte floating-point value at the specified address is converted to an 8-byte
floating-point value and is transferred to the floating-point element.
FLT8 to Floating Point
The 8-byte floating-point value at the specified address is transferred to the
floating-point element without conversion.
Longana Elements
The Allen-Bradley protocol module supports only the following longana
conversions:
BIN to Longana
The value of the 4-byte integer at the specified address is transferred to the
longana element without conversion.
INT2 to Longana
The value of the word at the specified address is transferred to the longana
element without conversion.
INT4 to longana
The value of the 4-byte integer at the specified address is transferred to the
longana element without conversion.
BCD3 to Longana
The 3-digit BCD value at the specified address is converted to a 4-byte integer
value and is transferred to the longana element.
232 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY
Conversion of Data Types for Read Operations
BCD4 to Longana
The 4-digit BCD value at the specified address is converted to a 4-byte integer
value and is transferred to the longana element.
The 3-digit BCD value at the specified address is converted to a 4-byte integer
value and is transferred to the longana element.
FLT4 to Longana
The 4-byte floating-point value at the specified address is converted to a 4-byte
integer value and is transferred to the longana element.
External Device
Interface
UBCD to Longana
11
FLT8 to Longana
The 8-byte floating-point value at the specified address is converted to a 4-byte
integer value and is transferred to the longana element.
The Allen-Bradley protocol module supports only the following message
conversions:
BIN to Message
The values of the words specified in the address are transferred to the message
element without conversion.
ASC to Message
The values of the words specified in the address are copied to the message element
with low-order and high-order bytes inverted.
FactoryLink 6.6.0 / Device Interface Guide / 233
Allen-Bradley
Message Elements
•
ALLEN-BRADLEY
•
Conversion of Elements for Write Operations
•
•
C ONVERSION
OF
E LEMENTS
FOR
WRITE O PERATIONS
This section describes how real-time database elements map to the data types
listed on page 229 for the Allen-Bradley protocol module for write operations:
Digital Elements
The Allen-Bradley protocol module supports only the following digital conversion:
Digital to BIN
The value (1 or 0) of the digital element is transferred to the bit at the specified
address without conversion. If no bit number is specified, the value of the digital
element is transferred to bit 0 at the specified address.
Analog Elements
The Allen-Bradley protocol module supports only the following analog
conversions:
Analog to BIN
The value of the analog element is transferred to the specified address without
conversion.
Analog to INT2
The value of the analog element is transferred to the specified address without
conversion.
Analog to INT4
The value of the analog element is converted to a 4-byte integer value and is
transferred to the specified address.
Analog to BCD3
The analog value is converted to a 3-digit BCD value and is transferred to the
specified address.
Analog to BCD4
The analog value is converted to a 4-digit BCD value and is transferred to the
specified address.
234 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY
Conversion of Elements for Write Operations
Analog to UBCD
The analog value is converted to a 3-digit BCD value and is transferred to the
specified address.
The analog value is converted to a 4-byte floating-point value and is transferred to
the specified address.
Analog to FLT8
The analog value is converted to an 8-byte floating-point value and is transferred
to the specified address.
External Device
Interface
Analog to FLT4
11
Floating-Point Elements
The Allen-Bradley protocol module supports only the following floating-point
conversions:
The value of the floating-point element is transferred to the four-word address
without conversion.
Floating Point to INT2
The value of the floating-point element is converted to a 2-byte integer and is
transferred to the specified address.
Floating Point to INT4
The value of the floating-point element is converted to a 4-byte integer and is
transferred to the specified address.
Floating Point to BCD3
The value of the floating-point element is converted to a 3-digit BCD word and is
transferred to the specified address.
Floating Point to BCD4
The value of the floating-point element is converted to a 4-digit BCD word and is
transferred to the specified address.
FactoryLink 6.6.0 / Device Interface Guide / 235
Allen-Bradley
Floating Point to BIN
•
ALLEN-BRADLEY
•
Conversion of Elements for Write Operations
•
•
Floating Point to UBCD
The value of the floating-point element is converted to a 3-digit BCD word and is
transferred to the specified address.
Floating Point to FLT4
The value of the floating-point element is converted to a 4-byte floating-point
value and is transferred to the specified address.
Floating Point to FLT8
The value of the floating-point element is transferred to the specified address
without conversion.
Longana Elements
The Allen-Bradley protocol module supports only the following longana
conversions:
Longana to BIN
The value of the longana element is transferred to the specified address without
conversion.
Longana to INT2
The value of the longana element is converted to a 2-byte integer value and is
transferred to the specified address.
Longana to INT4
The value of the longana element is transferred to the specified address without
conversion.
Longana to BCD3
The longana value is converted to a 3-digit BCD value and is transferred to the
specified address.
Longana to BCD4
The longana value is converted to a 4-digit BCD value and is transferred to the
specified address.
236 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY
Conversion of Elements for Write Operations
Longana to UBCD
The longana value is converted to a 3-digit BCD value and is transferred to the
specified address.
The longana value is converted to a 4-byte floating-point value and is transferred
to the specified address.
Longana to FLT8
The longana value is converted to an 8-byte floating-point value and is transferred
to the specified address.
External Device
Interface
Longana to FLT4
11
Message Elements
The Allen-Bradley protocol module supports only the following message
conversions:
The values of the message elements are written to the words specified in the
address without conversion.
Message to ASC
The values of the message elements are written to the words specified in the
address with the low-order and high-order bytes inverted.
FactoryLink 6.6.0 / Device Interface Guide / 237
Allen-Bradley
Message to BIN
•
ALLEN-BRADLEY
•
Allen-Bradley Address Entries
•
•
A LLEN -B RADLEY A DDRESS E NTRIES
This section contains information about the Allen-Bradley addresses that
FactoryLink supports.
PLC-2 Addresses
For the Allen-Bradley PLC-2, FactoryLink supports the following address
formats:
word
word/bit
word, length
where
word
(Required) Word address of the data table in octal
Valid Entry: 0 - 7777 (octal) (The actual high address depends
on the specific PLC that is addressed.)
bit
(Optional) Bit address of the specified word in octal
Valid Entry: 0 - 17 (octal) (0 least significant bit; 17 most
significant bit)
length
(Optional) Number of words in a message string in decimal
Examples:
17
23/17
7/7
0,100
Word 15 decimal
Bit 17 of word 23 (word 19 decimal)
Bit 7 of word 7 (word 15 decimal)
First 100 decimal words
Note
If you configure PLC-3 and PLC-5 for PLC-2 compatibility, these
addresses are also valid for PLC-3 and PLC-5.
238 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY
Allen-Bradley Address Entries
PLC-3 Addresses
The Allen-Bradley PLC-3 uses four types of address formats:
11
• Logical word addressing
External Device
Interface
• Logical file addressing
• Symbolic word addressing
• Symbolic file addressing
Formats for each of these types are discussed below.
Logical Word Addressing
Logical word addressing uses two address formats:
[W]filetype[filenumber:][element][.subelement][/bit]
[W]filetype[filenumber:][element][.subelement][,length]
where
filetype
(Optional) Logical word addressing—default if no other
addressing type is specified
(Required) One of the letters specifying a PLC-3 file type shown
in Table 11-0.
Table 11-0 PLC-3 File Types for Logical Word Addressing
Type
Description
Section #
Words/Element
O
Output image
1
1
I
Input image
2
1
T
Timer
3
3
C
Counter
4
3
N
Integer
5
1
F
Floating-point
6
2
D
BCD
7
1
B
Binary
8
1
FactoryLink 6.6.0 / Device Interface Guide / 239
Allen-Bradley
W
•
ALLEN-BRADLEY
•
Allen-Bradley Address Entries
•
•
Table 11-0 PLC-3 File Types for Logical Word Addressing (Continued)
Type
Description
Section #
Words/Element
A
ASCII
9
1
H
High-order integer
10
2
P
Pointer
11
2
S
Status
13
1
filenumber
(Optional) File number in decimal
Valid Entry: 0 - 999 (default=0)
element
subelement
bit
length
(Optional) Element number in specified file in decimal, except for
types I and O, which are octal
(Optional) Subelement in decimal
(Optional) Bit address in octal
(Optional) Number of words in decimal
Examples (Logical Word Addressing)
WI12:10/0
Least significant bit of word 8 (decimal) of input file 12 (decimal)
I13/17
Bit 17 of word 11 (decimal) of input file 0
O0,10
First 10 (decimal) words of output file 0
010:10,10
WT10:8.1/17
Words 8 - 17 (decimal) inclusive of output file 10
Bit 17 of second word in timer 8 (the ninth timer structure timer
file number 10)
Logical File Addressing
When you use logical file addressing, all numbers are in decimal, regardless of file
type. Bit 16 refers to the least significant bit of the next word in the PLC’s
memory.
Logical file addressing uses two address formats:
F filetype[filenumber:][element][.subelement][/bit]
F filetype[filenumber:][element][.subelement][,length]
240 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY
Allen-Bradley Address Entries
where
F
filetype
11
(Required) Logical file addressing
Valid Entry: 999 (default=0)
Table 11-0 PLC File Types for Logical File Addressing
Type
Description
Section #
Words/Element
Output image
1
1
I
Input image
2
1
T
Timer
3
3
C
Counter
4
3
N
Integer
5
1
F
Floating-point
6
2
D
BCD
7
1
B
Binary
8
1
A
ASCII
9
1
H
High-order integer
10
2
P
Pointer
11
2
S
Status
13
1
filenumber
element
subelement
bit
length
(Optional) File number in decimal
(Optional) Element number in specified file in decimal
(Optional) Subelement in decimal
(Optional) Bit number
(Optional) Number of words in decimal
FactoryLink 6.6.0 / Device Interface Guide / 241
Allen-Bradley
O
External Device
Interface
(Required) One of the letters specifying a PLC-3 file type shown
in Table 11-0
•
ALLEN-BRADLEY
•
Allen-Bradley Address Entries
•
•
Examples (Logical File Addressing)
FO/255
Bit 15 of word 15 of output file 0 (Word 15 is the 16th word in the
file.)
FI5:/256
Bit 0 of word 16 of input file 5 (Word 16 is the 17th word in the
file.)
FI10/256
Bit 0 of word 26 of input file 0 (Word 26 is the 27th word in the
file.)
FI5:10/256
Bit 0 of word 26 of input file 5 (Word 26 is the 27th word in the
file.)
FF3:2
Floating-point value 2, floating-point file 3 (Floating-point value
number 2 is the 5th and 6th words in this file.)
Symbolic Word Addressing
Symbolic word addressing uses three formats:
@AAAAAAAA
@AAAAAAAA/bit
@AAAAAAAA,length
where
@
AAAAAAAA
bit
length
(Required) The symbolic addressing flag character
(Required) 1- to 8-character symbolic name defined in the PLC
(use only uppercase characters)
(Optional) Bit number in octal
(Optional) Number of words in message string in decimal
Examples (Symbolic Word Addressing)
@SYMBOL
Symbol
@SYMBOL/17
Most significant bit of the word at SYMBOL
@SYMBOL,20
20 words starting at SYMBOL
242 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY
Allen-Bradley Address Entries
Symbolic File Addressing
Symbolic file addressing uses three address formats.
@AAAAAAAA:word/bit
@AAAAAAAA:word,length
where
@
AAAAAAAA
word
bit
length
(Required) The symbolic addressing flag character
1- to 8-character symbolic name defined in the PLC (use only
uppercase characters)
(Required) Word number (offset) from symbol in decimal
(specify a word, even if it is 0)
(Optional) Bit number in decimal
(Optional) Number of words in message string in decimal
First word of PLC ASCII symbol file
@SYMBOL:10/16
Least significant bit of word at SYMBOL + 11
@SYMBOL:10,20
20 words starting at SYMBOL + 10
FactoryLink 6.6.0 / Device Interface Guide / 243
Allen-Bradley
Examples (Symbolic File Addressing)
@SYMBOL:0
External Device
Interface
@AAAAAAAA:word
11
•
ALLEN-BRADLEY
•
Allen-Bradley Address Entries
•
•
PLC-5 Addresses
Depending on the file type being addressed, the Allen-Bradley protocol module
supports two formats for addressing PLC-5s.
The Allen-Bradley PLC-5 Input and Output Image tables use two address
formats:
filetype:[wordnumber][/bit]
filetype:[wordnumber][,length]
where
filetype
wordnumber
(Required) One of the letters (I or O) specifying a PLC-5 Input or
Output Image table
(Optional) Word number in octal
Valid Entry: 0 - 777 (default=0)
bit
length
(Optional) Bit address in octal
(Optional) Number of words in decimal
I:34/17
Bit 17 of word 28 in the Input Image table
O:/0
Bit 0 of Word 0 in the Output Image table
I:,100
First 100 word of the Input Image table
244 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY
Allen-Bradley Address Entries
The rest of the Allen-Bradley PLC-5 data table files use two address formats:
filetype[filenumber]:[element][.subelement][/bit]
where
filetype
(Required) One of the letters specifying a PLC-5 file type shown
in the following table:
Table 11-0 PLC-5 File Types
Type
Description
Default File #
# Words/Element
Status
2
1
B
Binary
3
1
T
Timer
4
3
C
Counter
5
3
R
Control
6
3
N
Integer
7
1
F
Floating-point
8
2
A
ASCII
N/A
1
D
BCD
N/A
1
filenumber
(Optional) File number in decimal. If not specified, file number is
assumed to be the default file number for the file type specified.
Valid Entry: 0 - 999
element
(Optional) Element number in specified file in decimal
(default=0).
subelement
(Optional) Subelement number in decimal (default=0).
bit
length
N7:23/15
(Optional) Bit address in decimal.
(Optional) Number of words in decimal.
Bit 15 of word 23 of integer file 7. (Word 23 is the 24th word in the
file.)
FactoryLink 6.6.0 / Device Interface Guide / 245
Allen-Bradley
S
External Device
Interface
filetype[filenumber]:[element][.subelement][,length]
11
•
ALLEN-BRADLEY
•
Allen-Bradley Address Entries
•
•
F8:17
Float value 17 in Floating-point file 8. (Float word 17 is the 18th
float word.)
B17:/255
Bit 15 of Word 15 of Bit file 17. (Bit 15 is the most significant bit.
Word 15 is the 16th word.)
B3/255
Bit 15 of word 15 of Bit file 3. (Bit 15 is the most significant bit.
Word 15 is the 16th word.)
PLC 5-250 Native Mode Addresses
The Allen-Bradley protocol module supports a limited subset of PLC5-250 native
mode addresses. It supports only those features specifically described in this
document. If you try to use other features, FactoryLink application errors will
occur.
PLC Type PLC-250
Use the PLC type PLC-250 in the Logical Station table to describe a logical station
as a PLC5-250. This PLC type supports limited native addressing to a PLC5-250.
Unsolicited Read Support
Create a logical station with a PLC type of PLC-2 for unsolicited reads from the
PLC5-250. The PLC5-250 may then send Unprotected Write (PLC-2 format)
commands to the protocol module. The protocol module ignores any definitions of
unsolicited reads on a station with a PLC type of PLC-250.
Native Addressing
Specify all numbers in the address in decimal.
The following are limitations on the data that can be accessed:
• The data must reside either in the resource manager or a logic processor
addressable from the resource manager.
• The file’s native element must not contain subelements.
• The file identifier must consist of a single character.
246 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY
Allen-Bradley Address Entries
Address Format
11
Use the following address format:
where
spaces
Are for readability only; do not include them in the actual address
string
brackets []
Are optional in the address string
colon (:)
Are required in the address string
External Device
Interface
[module_id] file_id [file_number]: [file_element][/bit_number]
[,msg_length]
MODULE_ID
FILE_ID
The FILE_ID specifies the type of file. It consists of a single uppercase alphabetic
character. Valid FILE_IDs are:
B
Binary files
N
Integer files
L
Long integer files
F
Floating-point files
FILE_NUMBER
The FILE_NUMBER specifies which file of the FILE_ID file is addressed. It
consists of a 1- to 4-character decimal number ranging from 0 to 9999. If the
FILE_NUMBER is omitted, it is assumed to equal 0.
FILE_ELEMENT
The FILE_ELEMENT specifies which element in the file is addressed. It consists
of a 1- to 4-character decimal number ranging from 0 to 9999. If the
FILE_ELEMENT is omitted, it is assumed to equal 0.
FactoryLink 6.6.0 / Device Interface Guide / 247
Allen-Bradley
If 0, the MODULE_ID is the resource manager; if 1-8, MODULE_ID is a logic
processor. If a logic processor is specified, this number is the value set on the
thumbwheel on the front of the logic processor. If the MODULE_ID is omitted, the
resource manager will be assumed.
•
ALLEN-BRADLEY
•
Allen-Bradley Address Entries
•
•
BIT_NUMBER and MESSAGE_LENGTH
The BIT_NUMBER and MESSAGE_LENGTH are the same as the other PLC
types, except that the BIT_NUMBER must range between 0 and 15. Bit 0 is the
least-significant bit; bit 15 is the most-significant bit.
Example
The following sample strings illustrate PLC5-250 native mode addressing format:
Table 11-0 PLC5-250 Native Mode Addressing
Address
Description
0B14:10/15
The most significant bit of the 11th binary word (address 10) of
the 15th binary file (address 14) in the resource manager
B14:10/15
Same as above
3N5:3
The fourth (address 3) integer element of the sixth (address 5)
integer file in logic processor 3
PLC Element Type to FactoryLink Element Type Conversion
Use the same conversions (INT2, INT4. . .) as with logical stations of type PLC-5.
Refer to “PLC-5 Addresses” on page 244 for more information.
248 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY
Allen-Bradley Switch Setup
A LLEN -B RADLEY S WITCH S ETUP
11
1770-KF2 Series B
Table 11-0 Switch Settings for 1770-KF2 Series B
Address
SW1
SW2
1 2 3 4 5 12
DH/DH+
422/232
SW3
SW4
SW5
SW6
SW7
SW8
123
123
12
1234
1 2/1 2
1 2/1 2
UU
DUUD
DD/UD
UD/DU
DUDDD As needed
Allen-Bradley
1771-KA2
The following are the switch settings for the 1771-KA2.
Table 11-0 Switch Settings for the 1771-KA2
SW1
SW2
SW3
123
SW4
123
SW5
12345
12
UUUUU
As needed As needed As needed UU
12
1771-KE
The following are the switch settings and addresses for the 1771-KE.
Table 11-0 Switch Settings and Addresses for the 1771-KE
SW1
Address
12345
12
DDDDD
As needed
123
SW5
123
External Device
Interface
The following are the switch settings and addresses for the 1770-KF2 Series B.
SW6
12
1234
UU
UDDU
FactoryLink 6.6.0 / Device Interface Guide / 249
•
ALLEN-BRADLEY
•
Allen-Bradley Switch Setup
•
•
1771-KG
The following are the switch settings and addresses for the 1771-KG.
Table 11-0 Switch Settings and Addresses for the 1771-KG
SW1
SW2
Address
123
12345
12
123
DUU
DDUUD
As needed
123
1785-KA
The following are the switch settings for the 1785-KA.
Table 11-0 Switch Settings for the 1785-KA
SW1
SW2
SW3
SW4
SW5
SW6
12
12
12
12
123
123
DD
DD
DD
DD
UDD
DUD
250 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY
Run-Time Application Messages
R UN -TIME A PPLICATION M ESSAGES
11
For information about the messages displayed for the EDI task and the format in
which protocol module messages are generated, see Chapter 10, “Messages and
Codes.”
Single-Digit Codes
Hexadecimal error codes 0001 through 000F are Allen-Bradley protocol module
internal errors:
Table 11-0 Allen-Bradley Protocol Module Internal Errors
Error
Message
Description
0001
Internal error (invalid rcv/xmt state)
0002d
Unable to transmit request to Data Highway Interface
0003
Unable to receive request response from Data Highway Interface
0004
Internal error (CPT translate error)
0007
Internal error (DSF translate error)
FactoryLink 6.6.0 / Device Interface Guide / 251
Allen-Bradley
The ER:xxxx string in a message can contain a single-digit or a double-digit error
code. In following descriptions, N represents significant digits and x represents
digits not significant to the error.
• Single-Digit Code Format
ER:xxxN is a single-digit format in which one digit represents a single error
condition. In some cases, two individual codes appear within a string to indicate
multiple error conditions.
• Double-Digit Code Format
ER:xxNN is a double-digit format in which two digits represent a single error
condition.
External Device
Interface
During EDI run time, FactoryLink generates and displays messages for the
Allen-Bradley protocol module on the Run-Time Manager screen and, if so
configured, writes them to message or analog tags. For information about
configuring a message tag, see “Configuring the Logical Station Control Panel” on
page 212. For information about configuring an analog tag, see “Configuring the
Logical Station Information Panel” on page 216.
•
ALLEN-BRADLEY
•
Run-Time Application Messages
•
•
Table 11-0 Allen-Bradley Protocol Module Internal Errors (Continued)
Error
Message
Description
0008
Invalid extended status (above 080h) from Data Highway
Interface
000A
Invalid length retry count exceeded
Double-Digit Codes
Error codes received from the Data Highway interface can signify Local,
Extended, or Remote STS errors.
Local STS Error Codes
EDI error codes from 0010 through 001F denote Local STS errors received from
the Data Highway Interface. Read the least significant nibble of the EDI error
code to obtain the local error code.
Table 11-0 Local STS Errors Received from the Data Highway Interface
Error
Message
Description
0011
Designate node out of buffer space
0012
Remote node specified does not acknowledge (ACK) the
command message
0013
Duplicate token holder detected
0014
Local port is disconnected
252 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY
Run-Time Application Messages
Remote STS Error Codes
Table 11-0 Remote STS Errors Received from the Data Highway Interface
Error Code
Description
Illegal command or format
0022
The host has a problem and will not communicate
0023
The remote node host is missing, disconnected, or shut down
0024
The host could not complete function because of hardware fault
0025
Addressing problem or memory protect rings
0026
Function disallowed because of command protection selection
0027
Processor is in program mode
0028
Compatibility mode file missing or communication zone problem
0029
Remote node cannot buffer command
002B
Remote node problem caused by download
Extended STS Error Codes
EDI error codes above 002F denote Extended STS errors received from the Data
Highway interface. Subtract 0030 from the EDI error code to obtain the Extended
error code.
Table 11-0 Extended STS Errors Received from the Data Highway Interface
Error
Message
Description
0031
Error in converting block address
0032
Fewer levels specified in address to address
FactoryLink 6.6.0 / Device Interface Guide / 253
Allen-Bradley
0021
11
External Device
Interface
EDI error codes from 0020 through 002F denote Remote STS errors received from
the Data Highway Interface. Read the least significant nibble of the EDI error
code as the most significant nibble of the remote error code to obtain the remote
error code.
•
ALLEN-BRADLEY
•
Run-Time Application Messages
•
•
Table 11-0 Extended STS Errors Received from the Data Highway Interface (Continued)
Error
Message
Description
0033
More levels specified in address than system supports
0034:
Symbol not found
0035
The symbol is of improper format
0036
Address does not point to something usable
0037
The file is the wrong size
0038
Cannot complete request; situation has changed since the start
of the command
0039
The file is too large
003A
The transaction size plus word address is too large
003B
Access denied; improper privilege
003C
Condition cannot be generated; resource is not available (some
have upload active)
003D
Condition already exists; resource is already available
003E
The shutdown could not be executed
003F
Requestor does not have upload or download access; noprivilege
0040
Histogram overflow
0041
Illegal data type
0042
Bad parameter
0043
An address reference(s) exists to a deleted data table(s)
Note
The EDI protocol module uses command code OF.
254 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 12
General Electric
12
When you choose General Electric Fanuc from the Configuration Manager Main
Menu, the General Electric configuration panels are displayed:
External Device
Interface
This chapter contains information needed to set up and configure bidirectional
communications between the FactoryLink real-time database and one or more
General Electric devices, using GE CCM protocol.
General Electric
FactoryLink 6.6.0 / Device Interface Guide / 255
•
GENERAL ELECTRIC
•
Configuring the Logical Station Control Panel
•
•
C ONFIGURING
THE
L OGICAL S TATION C ONTROL P ANEL
Note
Before completing the protocol-specific General Electric
configuration panels, you must complete the External Device
Definition panel. See “Identifying Protocol Types and Defining
Logical Ports” on page 84 for details.
To bring the Logical Station Control panel to the foreground, click on its title bar
in the display of all configuration panels.
Complete a row for each logical port specified in the External Device Definition
panel you want to define as a communication path for read and write operations.
Logical Port
Enter a number, defined in the External Device Definition panel
Logical Port column, to represent a particular communication path
to a device.
Valid Entry: previously defined logical port number
(default=0)
256 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL ELECTRIC
Configuring the Logical Station Control Panel
Baud Rate
Enter the speed at which the protocol module communicates with
the devices linked to FactoryLink via this logical port. This entry
must match the baud rate configuration of the devices. Refer to
the device manufacturers documentation for details.
9600, 19200 (default=9600)
Parity
Enter the parity error correction during transmission via this
logical port. This entry must match the configuration of the
devices communicating via this port. Refer to the device
manufacturer’s documentation for details.
Valid Entry: none, even, odd (default=none)
Data Bits
External Device
Interface
Valid Entry: 110, 150, 300, 600, 1200, 2400, 3600, 4800, 7200,
12
Enter the number of data bits used during transmission via this
logical port. This entry must match the configuration of the
devices communicating via this port. Refer to the device
manufacturer’s documentation for details.
Valid Entry: 8
Stop Bits
Enter the number of bits sent after a character to create a pause
before the start of the next character. This entry must match the
configuration of the devices communicating via this port. Refer to
the device manufacturer’s documentation for details.
Valid Entry: 1
Timeout
Enter the length of time, in tenths of a second, the protocol
module will wait to receive a response to a read or write command
before timing out. You must enter a value greater than 0 for the
protocol module to timeout.
Valid Entry: 0 - 9999 (default=20 or 2 seconds)
Status Msg
Tag Name
(Optional) Enter a tag name for a message element to which a
text string will be written to indicate a communications error
associated with this logical port.
Valid Entry: standard element tag name
Valid Data Type: message
When the panel is complete, click on Enter to validate the information. Define the
data type (message) for any tag names displayed in the Tag Definition dialog.
FactoryLink 6.6.0 / Device Interface Guide / 257
General Electric
For information about displaying the text stored in a Status Msg
Tag Name element for an operator using this application, see the
Application Editor.
•
GENERAL ELECTRIC
•
Configuring the Logical Station Control Panel
•
•
Table 12-0 provides sample entries for the General Electric Logical Station
Control panel:
Table 12-0 Sample General Electric Logical Station Control Panel
Field
Entry
Description
Logical Port
0
Specifies the logical
communication path configured
by this table
Baud Rate
9600
Specifies the communication rate
Parity
NONE
No parity checking
Data Bits
8
Specifies 8 data bits in the
transmission
Stop Bits
1
Specifies 1 stop bit in the
transmission
Timeout
10
The response timeout 1 second
Status Msg Tag Name
GENE_LPORT0_
MSG
Error messages written to the
message element
GENE_LPORT0_MSG
258 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL ELECTRIC
Configuring the Logical Station Information Panel
C ONFIGURING
THE
L OGICAL S TATION I NFORMATION P ANEL
12
External Device
Interface
From the Logical Station Control panel, select the row for the logical port you are
configuring and click on Next to bring the Logical Station Information panel to the
foreground.
Complete a row for each device to communicate through this logical port.
Error/Status Tag
Name
(Optional) Enter a tag name for an analog element in which to
store communications error codes associated with this device
(logical station).
For information about displaying the codes stored in an
Error/Status Tag Name element for an operator using this
application, see the Application Editor.
Logical Station
(Decimal)
Enter a number to identify the logical station to which the
information in this row pertains. A logical station represents the
combination of a logical port with a physical station. Assign a
unique number to each device communicating through this
logical port.
FactoryLink 6.6.0 / Device Interface Guide / 259
General Electric
Valid Entry: standard element tag name
Valid Data Type: analog
•
GENERAL ELECTRIC
•
Configuring the Logical Station Information Panel
•
•
You will later enter this logical station number in a read or write
table to represent the device defined in this row. In a read or
write table, this number will identify the device to or from which
data is to be sent or received.
Valid Entry: 0 - 255
Device Type
Enter the type of General Electric device to which
communications are to be directed.
SERIES_1 GE Series One PLC
SERIES _3
GE Series Three PLC
SERIES _5
GE Series Five PLC
SERIES _6
GE Series Six PLC
S1_JR
Physical Station
GE Series One JR PLC
S1_PLUS
GE Series One PLUS PLC
SRS_9070
GE Series 9070
SRS_9030
GE Series 9030
Enter the physical address of the General Electric device.
Valid Entry: 0 - 255
Comment
(Optional) Enter reference information about this logical station.
Valid Entry: alphanumeric string of up to 16 characters
When the panel is complete, click on Enter to validate the information. Define the
data type (analog) for any tag names displayed in the Tag Definition dialog.
260 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL ELECTRIC
Configuring the Logical Station Information Panel
Table 12-0 provides sample entries for the General Electric Logical Station
Information panel:
12
Table 12-0 Sample General Electric Logical Station Information Panel
Entry
Description
Error/Status Tag Name
GENE_STATION0_
STATUS
Contains information about
communication errors.
Logical Station
0
Specifies the logical
communication path.
Device Type
SERIES_1
Specifies the physical device type
associated with this logical
station.
Physical Station
0
Specifies the physical station
number associated with this
logical station.
External Device
Interface
Field
General Electric
FactoryLink 6.6.0 / Device Interface Guide / 261
•
GENERAL ELECTRIC
•
Configuring the Read/Write Control Panel
•
•
C ONFIGURING
THE
R EAD /WRITE C ONTROL P ANEL
To bring the Read/Write Control panel to the foreground, click on its title bar in
the display of all configuration panels or click on Next from the Logical Station
Information panel.
Complete a row for each read or write table.
Tip
Refer to Chapter 8, “Application Design Tips and Techniques,” for
information about triggering schemes using elements defined in
this panel.
Table Name
Give this read or write request a name. Define one request (table)
per line and do not include spaces in the name. You can define as
many tables in this panel as available memory allows. Try to
make the table name reflective of the operation it represents.
262 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL ELECTRIC
Configuring the Read/Write Control Panel
Valid Entry: alphanumeric string of up to 16 characters
Exception Write
For EDI to interpret this operation as a triggered block write or
as a read operation, accept the default of NO.
For EDI to interpret this operation as an exception write and
write element values to the device only when those values
change, enter YES.
12
External Device
Interface
If this is a triggered read or a block write table, when the trigger
element (Block Read Trigger for a read operation or Block Write
Trigger for a write operation) is forced to 1 (ON), the element
prompts FactoryLink to process this table and any other table in
which the same trigger is defined.
In an exception write, an internal change-status indicator within
the element containing the data to be written prompts the write
operation. If an element is configured for an exception write and
EDI recognizes this indicator has been set since the last scan of
the real-time database (indicating the value of the element has
changed), EDI writes this element’s value to the device.
Valid Entry: yes, no
Tip
Do not specify elements expected to change at frequent and
unpredictable intervals in an exception write table. Any element
specified will be written to the device in its own packet (message)
each time it changes. Defining elements that change value
frequently as exception writes can slow down communications or
result in an error message.
Block Read
Priority
FactoryLink 6.6.0 / Device Interface Guide / 263
General Electric
If this is a block read operation, enter a number to indicate the
priority of this table, relative to other read operations. The
highest priority is 1. This number influences the order in which
the EDI task handles the queuing of block read requests. If EDI
receives two requests at the same time, it processes the request
with the highest priority first. The default is 1.
•
GENERAL ELECTRIC
•
Configuring the Read/Write Control Panel
•
•
If this is a write operation, accept the default of 1. This field
defaults to 1 regardless of whether the operation being defined is
a block read.
Valid Entry: 1 - 4 (default=1)
Note
The Block Read Trigger, Block Read Disable, Block Read Complete, and
Block Read State elements apply only to triggered read operations.
Do not define these elements for write operations.
Block Read
Trigger
If this is a write operation, ignore this field.
If this is a triggered read operation, this field is required. Enter a
tag name for a digital element to initiate a block read of the
addresses specified in the Read/Write Information panel. When
this element’s value is forced to 1 (ON), the addresses are read.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Read
Disable
If this is a write operation, ignore this field.
If this is a triggered read operation, this field is optional. If you
need a digital element to disable a block read of the elements
specified in this table, enter a tag name. When this tag’s value is
forced to 1 (ON), the read operation is not executed, even when
the block read trigger is set to 1.
To re-enable a block read table that has been disabled, set this
element back to 0 (OFF).
Valid Entry: standard element tag name
Valid Data Type: digital
Tip
This element can be used to disable a block read operation that is
either part of a cascaded loop or is self-triggered. The triggering
cycle will cease upon disabling, however. To re-enable a cascaded
loop or a self-triggered read table, the Block Read Trigger element
must be toggled or forced to 1. Refer to Chapter 8, “Application
Design Tips and Techniques,” for further details.
264 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL ELECTRIC
Configuring the Read/Write Control Panel
Block Read
Complete
If this is a write operation, ignore this field.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Read State
12
External Device
Interface
If this is a triggered read operation, this field is optional. If you
need a digital element to indicate when this operation is
complete, enter a tag name. This element is forced to 1 (ON) at
startup. After the elements defined in the Read/Write
Information panel have been updated in the FactoryLink
database, the complete element is forced to 1 again.
If this is a write operation, ignore this field.
If this is a triggered read operation, this field is optional. If you
need a digital element to indicate the state of this operation (in
progress or complete), enter a tag name. This element is forced to
1 (ON) at startup. While the table is being processed, the element
is set to 0 (OFF). After the elements defined in the Read/Write
Information panel have been updated in the FactoryLink
database, the state element is forced back to 1.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write
Priority
If this is a block or exception write operation, enter a number to
indicate the priority of this table, relative to other write
operations. The highest priority is 1. This number influences the
order in which the EDI task handles the queuing of write
requests. If EDI receives two requests at the same time, it
processes the request with the highest priority first. The default
is 1.
Valid Entry: 1 - 4 (default=1)
Note
The Block Write Trigger, Block Write Disable, Block Write Complete, and
Block Write State elements apply only to write operations. Do not
define these elements for read operations.
FactoryLink 6.6.0 / Device Interface Guide / 265
General Electric
If this is a read operation, accept the default of 1. This field
defaults to 1 regardless of whether the operation being defined is
a block or exception write.
•
GENERAL ELECTRIC
•
Configuring the Read/Write Control Panel
•
•
Block Write Trigger
If this is a read operation or an exception write operation you do
not plan to periodically disable, ignore this field.
If this is a block write table or an exception write table you plan
to periodically disable, this field is required. Enter a tag name for
a digital element to initiate a block write of the element values
specified in the Read/Write Information panel to the addresses
defined to receive the values. When this element’s value is forced
to 1 (ON), FactoryLink writes the values.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write
Disable
If this is a read operation or an exception write operation you do
not plan to periodically disable, ignore this field.
If this is a block write table or an exception write table you plan
to periodically disable, this field is optional. Enter a tag name for
a digital element to disable a block write to the addresses
specified in this table. When this tag’s value is forced to 1 (ON),
the write operation is not executed, even when the block write
trigger is set to 1.
To re-enable a block write table that has been disabled, set this
element back to 0 (OFF).
Valid Entry: standard element tag name
Valid Data Type: digital
Tip
This element can be used to disable a block write operation that is
either part of a cascaded loop or is self-triggered. The triggering
cycle will cease upon disabling, however. To re-enable a cascaded
loop or a self-triggered write table, the Block Write Trigger element
must be toggled or forced to 1. Refer to Chapter 8, “Application
Design Tips and Techniques,” for further details.
266 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL ELECTRIC
Configuring the Read/Write Control Panel
Block Write
Complete
If this is a read or exception write operation, ignore this field.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write State
12
External Device
Interface
If this is a block write table, this field is optional. If you need a
digital element to indicate when this operation is complete, enter
a tag name. This element is forced to 1 (ON) at startup. After the
data defined in this table’s Read/Write Information panel has
been written to the device, the complete element is forced to 1
again.
If this is a read or exception write operation, ignore this field.
If this is a block write operation, this field is optional. If you need
a digital element to indicate the state of this operation (in
progress or complete), enter a tag name. This element is forced to
1 (ON) at startup. While the table is being processed, the element
is set to 0 (OFF). After the data defined in this table’s Read/Write
Information panel has been written to the device, the state
element is forced back to 1.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
When the panel is complete, click on Enter to validate the information. Define the
data type (digital) for any tag names displayed in the Tag Definition dialog.
General Electric
FactoryLink 6.6.0 / Device Interface Guide / 267
•
GENERAL ELECTRIC
•
Configuring the Read/Write Control Panel
•
•
Table 12-0 provides sample entries for the General Electric Read/Write Control
panel:
Table 12-0 Sample General Electric Read/Write Control Panel
Field
Entry
Description
Table Name
READ
Name of the read/write table.
Exception Write
NO
This is not an exception write.
Block Read Priority
1
The block read priority for the
READ table is set to 1.
Block Read Trigger
GENE_READ_
TRIGGER
When the value of
GENE_READ_TRIGGER is 1, a
block read of values specified in
the Read/Write Information
panel associated with this table
occurs.
Block Read Disable
GENE_READ_
DISABLE
When triggered, GENE_READ_
DISABLE disables the block read
operation.
Block Read Complete
GENE_READ_
COMPLETE
The value of GENE_READ_
COMPLETE is set to 1 when the
read is complete.
Block Write Priority
1
The write priority for this table is
set to 1 by default.
Block Write Trigger
Block Write Complete
Block Write Disable
Block Write State
268 / FactoryLink 6.6.0 / Device Interface Guide
Since this is a read table, the
elements specific to write
requests are not defined.
GENERAL ELECTRIC
Configuring the Read/Write Information Panel
C ONFIGURING
THE
R EAD /WRITE I NFORMATION P ANEL
12
External Device
Interface
From the Read/Write Control panel, select the row for the table you are
configuring and click on Next to bring the Read/Write Information panel to the
foreground.
For a Read Table—Add a panel entry for each FactoryLink database element in
which data read from the device will be stored when the operation executes.
For a Write Table—Add a panel entry for each element to be written when the
operation executes.
Tip
FactoryLink 6.6.0 / Device Interface Guide / 269
General Electric
Alternatively, the elements you define in the Read/Write
Information panel can be configured in the Tag Definition dialog in
the Application Editor. Refer to the Application Editor for details.
•
GENERAL ELECTRIC
•
Configuring the Read/Write Information Panel
•
•
Tag Name
For a read table, specify a tag name for an element in which
FactoryLink will store the data read from the device.
For a write table, specify a tag name for an element containing a
value to be written to the device.
Valid Entry: standard element tag name
Valid Data Type: digital, analog, float, message
Logical Station
Enter the number representing the device from which the data is
to be read or to which the element’s value will be written. This
number was originally defined in the Logical Station Information
panel for the logical port through which communications with
this device occurs.
Valid Entry: previously defined logical station number
Data Type
Specify the type of data being read from or written to the device
for each element defined in the Tag Name field.
REG Series 5/6 Register Table, 9030, 9070
INPUT Series 6 Input Status Table, 9030, 9070
OUTPUT Series 6 Output Status Table, 9030, 9070
REAL_O Series 6 Real Output points
REAL_I Series 6 Real Input points
DESC_O Series 6 Internal Discrete Output Reference
DESC_I Series 6 Internal Discrete Input Reference
DIAG Diagnostic status area
1+_INP
Series 5I1+Inputs
2+_INP
Series 5I2+Inputs
LC_INP Series 5 Local Inputs
SP_INP
Series 5 Special Inputs
1+_OUT
Series 5 O1+Outputs
2+_OUT
Series 5 O2+Outputs
LC_OUT
Series 5 Local Outputs
1-_OUT
Series 5 Internal Coils O1-
2-_OUT
Series 5 Internal Coils O2-
TIMER Series 1, 1JR, 1+ and 3 Timer and Counter
270 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL ELECTRIC
Configuring the Read/Write Information Panel
Series 1, 1JR, 1+ and 3 External I\O
INT_IO
Series 1, 1JR, 1+ and 3 Internal I/O
S_REG
Series 1, 1JR, 1+ and 3 Shift Registers
D_REG
Series 1, and 3 Data Registers
PORT
Channel
Port ON/OFF
Enter the channel number in the controller on which the address
is located.
Valid Entry: 0 - 15
This channel number is valid for Series 6 and the following data
types: REAL_O, REAL_I, DESC_O, and DESC_I.
Address
Dec
12
External Device
Interface
EXT_IO
For a read table, enter the address in the device’s memory where
the value to be stored in this element is located.
For a write table, enter the address in the device’s memory to
which the element value will be written.
Valid Entry: 1 - 16384 (decimal address for Series 5 and 6,
9030, 9070)
Address
Octal
For a read table, enter the address in the device’s memory where
the value to be stored in this element is located.
For a write table, enter the address in the device’s memory to
which the element value will be written.
Valid Entry: 1 - 10000 (octal address for Series 1, 1+ JR, and 3)
Bit
Offset
This field is required for digital data type. If the element (entry in
the Tag Name column) associated with this entry is digital, enter
the bit offset within the word that contains the value to be read or
to which the element value is to be written. Bit 1 is the most
significant bit (MSB) and bit 16 is the least significant bit.
Valid Entry: 0 - 15
If you enter a FactoryLink digital element in the Tag Name field
and specify the data type as REG, TIMER, or D_REG, the
protocol module reads the Bit Offset; otherwise, it is ignored.
When the panel is complete, click on Enter to validate the information. Define the
data type (digital, analog, long analog, or floating-point) for any tag names
displayed in the Tag Definition dialog.
FactoryLink 6.6.0 / Device Interface Guide / 271
General Electric
Leave this field blank for all other FactoryLink data types.
•
GENERAL ELECTRIC
•
Configuring the Read/Write Information Panel
•
•
Table 12-0 provides sample entries for the General Electric Read/Write
Information panel:
Table 12-0 Sample General Electric Read/Write Information Panel
Field
Entry
Description
Table Name
READ
Display only; specifies the
Read/Write table name.
Tag Name
GERDR1
The value read from the device
will be stored in GERDR1.
Logical Station
0
Specifies the path to send the
request.
Data Type
REG
Data type for this controller.
Channel
1
Specifies the channel in the
controller where the address is
located.
Address Dec
10
Decimal address of the word
being read.
272 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL ELECTRIC
Run-Time Application Messages
R UN -TIME A PPLICATION M ESSAGES
12
For information about the messages displayed for the EDI task and the format in
which protocol module messages are generated, see Chapter 10, “Messages and
Codes.”
External Device
Interface
During EDI run time, FactoryLink generates and displays messages for the
General Electric protocol module on the Run-Time Manager screen and, if so
configured, writes them to message or analog tags. For information about
configuring a message tag, see “Configuring the Logical Station Control Panel” on
page 256. For information about configuring an analog tag, see “Configuring the
Logical Station Information Panel” on page 259.
ER:xxxx
The ER:xxxx string can contain a single-digit or a double-digit error code. In the
examples shown below, N represents significant digits and x represents digits not
significant to the error.
• Single-Digit Code Format
ER:xxxN and ER:xxNx are single-digit formats in which one digit represents a
single error condition.
• Double-Digit Code Format
ER:xNNx is a double-digit format in which two digits represent a single error
condition.
If you define message elements in the General Electric Logical Station Control
panel for all logical stations on this logical port, the protocol module copies these
error messages in the following format:
GENE read request status: [1]. GE error: [2]
GENE read response for write request: [1]. GE error: [2]
where
[1]
is one of the message codes 1 - 4 listed in Table 12-0 on page 274.
This message code is displayed as a text string.
[2]
is one of the message codes 1 - F listed in Table 12-0 on page 274.
This message code is displayed as a text string.
FactoryLink 6.6.0 / Device Interface Guide / 273
General Electric
GENE write response: [1]. GE error: [2]
•
GENERAL ELECTRIC
•
Run-Time Application Messages
•
•
For example:
GENE read request status:
IO_ERROR
GE error:
RCV_FDB_ERR
This example indicates an input/output error in receiving an FDB message.
Single-Digit Codes
The following tables list the single-digit error codes that can be generated and
displayed by the General Electric protocol module.
Table 12-0 Single-Digit Error Code Format ER:xxxN
Code
Text String
Description
xxx1
IO_ERROR
Transmission error
xxx2
IO_ABORTED
Transmission aborted
xxx3
IO_XLATE_ERR
Invalid transmit message length or
transmit buffer too short
xxx4
UNKNOWN_ERR
Unknown error
Table 12-0 Single-digit Error Code Format ER:xxNx
Code
Text String
Description
xx1x
XMIT_ERR
Error occurred during transmit
xx2x
RCV_ERR
Error occurred during receive
xx3x
RCV_ENQ_ERR
Error receiving ENQ message
xx4x
RCV_HDR_ERR
Error receiving HDR message
xx5x
RCV_FDB_ERR
Error receiving FDB message
xx6x
RCV_ACK_ERR
Error receiving ACK message
xx7x
XMIT_ENQ_ERR
Error transmitting ENQ message
xx8x
XMIT_HDR_ERR
Error transmitting HDR message
xx9x
XMIT_ACK_ERR
Error transmitting ACK message
274 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL ELECTRIC
Run-Time Application Messages
Table 12-0 Single-digit Error Code Format ER:xxNx (Continued)
12
Code
Text String
Description
XMIT_FDB_ERR
Error transmitting FDB message
xxBx
XMIT_NAK_ERR
Error transmitting NAK message
xxCx
RCV_ENQ_TIMEOUT
Timeout error receiving ENQ
message
xxDx
RCV_HDR_TIMEOUT
Timeout error receiving HDR
message
xxEx
RCV_FDB_TIMEOUT
Timeout error receiving FDB
message
xxFx
RCV_ACK_TIMEOUT
Timeout error receiving ACK
message
External Device
Interface
xxAx
Double-Digit Codes
The double-digit format is displayed in the error string’s middle two digits. This
format contains a 1 in the hundredth’s position (ER: x1Nx). Table 12-0 lists the
double-digit error codes that can be generated and displayed by the General
Electric protocol module.
Table 12-0 Double-Digit Error Code Format ER:xNNx
Code
Text String
Description
RCV_EOT_TIMEOUT
Timeout error receiving EOT
message
x11x
RCV_EOT_ERR
Error receiving ENQ message
FactoryLink 6.6.0 / Device Interface Guide / 275
General Electric
x10x
•
GENERAL ELECTRIC
•
Run-Time Application Messages
•
•
276 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 13
General Purpose
Interface
The information provided in the “Application Programs” and “Capabilities,
Limitations, and Trade-Offs” sections can help you determine if the GPI is
suitable for your application.
FactoryLink 6.6.0 / Device Interface Guide / 277
General Purpose
Interface
You can use the GPI protocol module with a variety of devices. To determine the
cable connections needed to set up your particular external device, refer to the
documentation available from the manufacturer.
External Device
Interface
The General Purpose Interface (GPI) protocol module provides a communication
interface between a FactoryLink application and external devices using
asynchronous communication techniques and protocols such as ASCII or binary.
The GPI is a general purpose protocol module that was written for no specific
external device.
13
•
GENERAL PURPOSE INTERFACE
•
Application Programs
•
•
A PPLICATION P ROGRAMS
The GPI protocol module provides a set of options and capabilities to support
many, though not all, asynchronous devices. The FactoryLink application controls
overall transactions, such as retries and error recovery.
The FactoryLink application performs the following additional tasks:
• Defines and implements the general FactoryLink application.
• Provides correct information in the command tables and ensures the
information is triggered at the appropriate time. (For information about
command tables, refer to the “Configuring the Command/Response Control
Panel” on page 289.)
• Monitors the communication response status and FactoryLink data returned
from the GPI communication interface.
• Logs and/or manipulates the data received by the FactoryLink real-time
database.
278 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
Capabilities, Limitations, and Trade-Offs
C APABILITIES , L IMITATIONS ,
AND
TRADE -O FFS
While it is quite flexible, the GPI protocol module cannot support every
asynchronous protocol. Since the GPI was not written for a specific device, it is
difficult to describe all of its capabilities and limitations. To determine if the GPI
is suitable for your particular application, evaluate it based on the following
concerning its capabilities and limitations. Then, decide if the GPI is suitable for
your specific external device.
13
External Device
Interface
The GPI protocol module provides bidirectional asynchronous communications
between a FactoryLink application and external devices. The GPI provides a
variety of options that allow you to implement many different types of
asynchronous protocols at the FactoryLink application level.
Capabilities
The GPI has the following capabilities:
• Handles more than one protocol at a time.
• Makes available a wide selection of checksum routines.
• Handles up to eight different response formats for an outgoing message. Each
response must share the same end-of-response indicator. (For example, if eight
response tables define the response formats, each table might have the
response data length in field 2).
Limitations
In general, the GPI has the following limitations:
• Permits only single handshaking protocols
• Lacks support for protocols which require checksums to handle
special-character sequences
• Lacks support for protocols which require character substitutions for
special-character sequences
Trade-Offs and Compromises in Design
Any engineering design makes trade-offs and compromises in design. Flexibility
was the major goal for the GPI protocol module. This consideration had priority in
matters such as speed and ease of use.
FactoryLink 6.6.0/ Device Interface Guide / 279
General Purpose
Interface
• Communicates with more than one device at a time.
•
GENERAL PURPOSE INTERFACE
•
Accessing the Configuration Panels
•
•
A CCESSING
THE
C ONFIGURATION P ANELS
Note
Before completing the protocol-specific General Purpose Interface
configuration panels, you must complete the External Device
Definition panel. See “Identifying Protocol Types and Defining
Logical Ports” on page 84 for details.
When you choose General Purpose Interface from the Configuration Manager Main
Menu, the GPI configuration panels are displayed.
280 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
Configuring the Logical Station Control Panel
C ONFIGURING
THE
L OGICAL S TATION C ONTROL P ANEL
13
To bring the Logical Station Control panel to the foreground, click on its title bar
in the display of all configuration panels.
External Device
Interface
Logical
Port
Enter a number, defined in the External Device Definition panel
Logical Port column, to represent a particular communication path
to a device.
Valid Entry: previously defined logical port number
(default=0)
LPORT Status
Message Tag
(Optional) Enter a tag name for a message element to which a
text string will be written to indicate a communications error
associated with this logical port.
For information about displaying the text stored in an LPORT
Status Message Tag element for an operator using this
application, refer to the Application Editor.
Valid Entry: standard element tag name
Valid Data Type: message
FactoryLink 6.6.0/ Device Interface Guide / 281
General Purpose
Interface
Complete a row for each logical port specified in the External Device Definition
panel you want to define as a communication path for read and write operations.
•
GENERAL PURPOSE INTERFACE
•
Configuring the Logical Station Control Panel
•
•
LPORT Status
Analog Tag
(Optional) Enter a tag name for an analog element in which to
store communications error codes associated with this logical
port.
For information about displaying the codes stored in an LPORT
Status Analog Tag element for an operator using this application,
see the Application Editor.
Valid Entry: standard element tag name
Valid Data Type: analog
Baud Rate
Enter the speed at which the protocol module communicates with
the devices linked to FactoryLink via this logical This entry must
match the baud rate configuration of the devices. Refer to the
device manufacturer’s manual for details.
Valid Entry: 150, 300, 600, 1200, 4800, 9600, 19200
(default=9600)
Parity
Enter the parity error correction during transmission via this
logical port. This entry must match the configuration of the
devices communicating via this port. Refer to the device
manufacturer’s manual for details.
Valid Entry: odd, even, none (default=none)
Data Bits
Enter the number of data bits used during transmission via this
logical port. This entry must match the configuration of the
devices communicating via this port. Refer to the device
manufacturer’s manual for details.
Valid Entry: 5, 6, 7, 8 (default=8)
Stop Bits
Enter the number of bits sent after a character to create a pause
before the start of the next character. This entry must match the
configuration of the devices communicating via this port. Refer to
the device manufacturer’s manual for details.
Valid Entry: 1, 2 (default=1)
Response
Timeout
(0.1 Sec)
Enter the maximum amount of time, in tenths of a second, the
protocol module will wait to receive the first character of a device
response after an outgoing command table is triggered. For the
protocol module to time out, you must enter a value greater than
0.
Valid Entry: 1 - 32000 (default=30 or 3 seconds)
282 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
Configuring the Logical Station Control Panel
Inter Char
Timeout
(0.1 Sec)
Enter the maximum amount of time, in tenths of a second, the
protocol module allows between the reception of two consecutive
characters.
13
Valid Entry: 1 - 32000 (default=30 or 3 seconds)
This field is required for the protocol module to time out while in
unsolicited mode.
Enter the maximum amount of time, in tenths of a second, the
protocol module will wait to receive the first character of a device
response after an outgoing command table that puts the GPI in
unsolicited mode is triggered. For the protocol module to time out,
you must enter a value greater than 0.
Valid Entry: 1 - 32000 (default=30 or 3 seconds)
Send Buff Size
External Device
Interface
Unsolicited
Timeout
(0.1 Sec)
Specify the size of the buffer required to hold the outgoing
message (the response command).
Valid Entry: 256 - 32000 (default=1024 bytes)
Specify the size of the buffer required to hold the incoming
response (the response data).
Valid Entry: 256 - 32000 (default=1024 bytes)
Device Type
(Optional) Enter reference information about the device type.
Valid Entry: alphanumeric string of up to 10 characters
Protocol Type
Port On/Off
(Reserved for future use)
Enter a tag name for a digital element to temporarily disable the
sending and receiving of messages to and from devices
communicating via this port. When this element’s value is 1, the
port is disabled for GPI messages.
Valid Entry: standard element tag name
Valid Data Type: digital
FactoryLink 6.6.0/ Device Interface Guide / 283
General Purpose
Interface
Receive Buff Size
•
GENERAL PURPOSE INTERFACE
•
Configuring the Logical Station Control Panel
•
•
CAUTION
During normal operations, disable the Status Debug Level feature.
Only when debugging an application should you enable this
feature.
Status/
Debug
Level
During normal operations, enter STAT_OFF.
When debugging your application, enter either STAT_ON, LOG1,
or LOG2 (depending on the desired debug level) to specify how to
log: the bytes of the outgoing message just before they are
transmitted, the bytes of the incoming response after they are
received (before they are parsed).
STAT_OFF Reports only analog error values to the LSTA
Status Analog Tag element
STAT_ON Reports analog error values and error message
text to the screen
LOG1 Performs the functions of STAT_ON and also
prints the outgoing and incoming message
protocols in hexadecimal bytes
LOG2 Performs the functions of LOG1 and also prints
the analog error value and error message text to
the screen
When the panel is complete, click on Enter to validate the information. Define the
data type (message) for any tag names displayed in the Tag Definition dialog.
284 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
Configuring the Logical Station Information Panel
C ONFIGURING
THE
L OGICAL S TATION I NFORMATION P ANEL
LSTA Status
Analog Tag
(Optional) Enter a tag name for an analog element in which to
store communications error codes associated with this device
(logical station).
You can animate output-text objects to display the codes stored in
an Error/Status Tag Name element on a graphics screen. For
more information, see the Application Editor.
Valid Entry: standard element tag name
Valid Data Type: analog
FactoryLink 6.6.0/ Device Interface Guide / 285
General Purpose
Interface
Complete a row for each device to communicate through this logical port.
13
External Device
Interface
From the Logical Station Control panel, select the row for the logical port you are
configuring and click on Next to bring the Logical Station Information panel to the
foreground.
•
GENERAL PURPOSE INTERFACE
•
Configuring the Logical Station Information Panel
•
•
Logical
Station
[Decimal]
Enter a number to identify the logical station to which the
information in this row pertains. A logical station represents the
combination of a logical port with a physical station. Assign a
unique number to each device communicating through this
logical port.
You will later enter this logical station number in a command or
response table to represent the device defined in this row. In a
command or response table, this number will identify the device
to or from which data is to be sent or received.
Valid Entry: 0 - 999
When the panel is complete, click on Enter to validate the information. Define the
data type (analog) for any tag names displayed in the Tag Definition dialog.
286 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
GPI Command/Response Table
GPI C OMMAND /R ESPONSE TABLE
13
A GPI Command/Response table consists of two panels: GPI Command/Response
Control and GPI Command/Response Information. Because you use the same type
of GPI Command/Response table to configure both commands and responses, it is
important to be able to distinguish between a command table and a response
table. The panels are referred to with the type of table being configured in
boldfaced, italicized type to help you readily identify the type of table being
discussed in this chapter.
External Device
Interface
The GPI Command/Response table defines the protocol needed to communicate
with an external device. This protocol contains both a message sent by the GPI to
the external device (an “outgoing message,” which you configure as a command),
and a response coming from the external device to the GPI (an “incoming
response,” which you configure as a response).
For example, in a discussion of the GPI Command/Response Information panel for
a command table, the panel is referred to as GPI Command/Response
Information.
Use the GPI Command/Response table to define:
• The outgoing message sent by the GPI (in a command table)
• The information needed to parse the incoming response from the external
device (in a response table)
Note
If you expect a response from the external device, you must
configure separate command and response tables for both the
outgoing message and for the incoming response, respectively.
FactoryLink 6.6.0/ Device Interface Guide / 287
General Purpose
Interface
The panel name is displayed in regular italicized text when the panel referred to
could apply to either a command or a response table.
•
GENERAL PURPOSE INTERFACE
•
GPI Command/Response Table
•
•
Command Table
The command table defines the complete asynchronous communication protocol
and processing needed to format an outgoing message to the external device. The
commands can be triggered by the FactoryLink application.
The entries in the command table consist of the following information:
• Data from FactoryLink elements
• Special characters (such as preamble/postamble strings or delimiters)
• Special processing (such as computed message lengths, checksumming, data
format conversions, or mathematical functions)
If you expect a response to the outgoing message, you must configure the
command table to specify one or more other response tables that define the
possible responses to the outgoing message.
For example, in an outgoing message, the command table initiates either a
command or response operation to the external device. It formats (but does not
process) any incoming response data. If the command or response operation
requires a response from the external device, you must configure this command
table to define the end-of-response delimiter of the data from that external device
and specify which other table contains the response format.
The section, “Summary of Basic Concepts” on page 307 contains a diagram that
shows how these concepts relate to one another.
Response Table
The response table defines the information needed to parse an incoming response
to an asynchronous communication (outgoing message). The entries consist of the
following information:
• Data to be parsed out of the response, converted, and returned to FactoryLink
elements
• Special characters (such as preamble/postamble strings or delimiters)
• Special processing (such as checking embedded message lengths,
checksumming, data format conversions, or mathematical functions)
The GPI parses the incoming response from the external device and matches it to
the incoming response formats. The GPI then extracts the relevant data from the
incoming response and writes it to the FactoryLink elements.
288 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
Configuring the Command/Response Control Panel
C ONFIGURING
THE
C OMMAND /R ESPONSE C ONTROL P ANEL
13
To bring the Command/Response Control panel to the foreground, click on its title
bar in the display of all configuration panels.
External Device
Interface
Table Name
Give this command or response table a name. Define one table
per line and do not include spaces in the name. You can define as
many tables in this panel as available memory allows. Try to
make the table name reflective of the operation it represents.
When the Command Trigger element is forced to 1 (ON),
FactoryLink processes this table and any other table in which the
same trigger is defined.
Valid Entry: alphanumeric string of up to 16 characters
Enable
Response
For EDI to interpret this table as an outgoing command, accept
the default of NO.
For EDI to interpret this table as an incoming response, enter
YES or FORCE to indicate whether all change-status indicators
are to be set to 1 (ON) when an incoming response occurs, or just
the ones for values that have changed.
FactoryLink 6.6.0/ Device Interface Guide / 289
General Purpose
Interface
Complete a row for each command or response table you want transmitted to a
device. Each row represents a table and includes the table name, table type, and
(for a command table) one or more trigger elements.
•
GENERAL PURPOSE INTERFACE
•
Configuring the Command/Response Control Panel
•
•
If you enter YES, the incoming message will be processed as
specified in the GPI Command/Response Information panel. The
message will serve as a valid check against the incoming data
response and change-status indicators will only be set for
elements with values that have changed since the last incoming
response; that is, if the current value of the element is equal to
the new value, the change-status indicator is unaffected. If a
different value is being stored the element, however, it will
overwrite the current value and the element’s change-status
indicator will be set to 1 (ON).
If you enter FORCE, the incoming message will be processed as
specified in the GPI Command/Response Information panel. The
incoming data is stored and the change-status indicator in each
element is automatically set to 1, regardless of whether the
current value matches the new value; that is, if the values have
not changed since the last incoming response, the indicators are
still set.
Valid Entry: yes, no, force (default=no)
Command
Priority
If this is an outgoing command table, enter a number to indicate
the priority of this table, relative to other command tables. The
highest priority is 1. This number influences the order in which
the EDI task handles the queuing of command tables. If EDI
receives two tables at the same time, it processes the one with the
highest priority first.
If this is an incoming response table, accept the default of 1. This
field defaults to 1 regardless of whether the table being defined is
for a command or for a response.
Valid Entry: 1 - 4 (default=1)
Note
The Command Trigger, Command Disable, Command Sent, and
Command Complete elements apply only to outgoing messages. Do
not define these elements for incoming responses.
290 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
Configuring the Command/Response Control Panel
Command
Trigger
If this is an incoming response table, ignore this field.
Valid Entry: standard element tag name
Valid Data Type: digital
Tip
The techniques discussed in Chapter 8, “Application Design Tips
and Techniques,” for triggering with the Block Write Trigger, Block
Write Complete, and Block Write State elements also work with the
Command Trigger, Command Sent, and Command Complete elements.
If this is an incoming response table, ignore this field.
If this is an outgoing command table you plan to periodically
disable, this field is optional. Enter a tag name for a digital
element to disable the operation defined in the
Command/Response Information panel. When this element’s
value is forced to 1 (ON), the operation is not executed, even when
the Command Trigger element is set to 1.
To re-enable a command table that has been disabled, set this
element back to 0 (OFF).
Tip
The Command Disable element can be used to disable a command
table that is either part of a cascaded loop or is self-triggered. The
triggering cycle will cease upon disabling, however. To re-enable a
cascaded loop or a self-triggered command table, the Command
Trigger element must be toggled or forced to 1. For further details,
refer to Chapter 8, “Application Design Tips and Techniques.”
Valid Entry: standard element tag name
Valid Data Type: digital
FactoryLink 6.6.0/ Device Interface Guide / 291
General Purpose
Interface
Command
Disable
13
External Device
Interface
If this is an outgoing command table, this field is required. Enter
a tag name for a digital element to initiate the operation defined
in the Command/Response Information panel. When this
element’s value is forced to 1 (ON), FactoryLink processes the
table.
•
GENERAL PURPOSE INTERFACE
•
Configuring the Command/Response Control Panel
•
•
Command
Sent
If this is an incoming response table, ignore this field.
If this is an outgoing command table and you need a digital
element to indicate when this operation is complete, this field is
optional. Enter a tag name. This element is forced to 1 (ON) at
startup. After the data defined in this table’s Command/Response
Information panel has been written to the device, the Command
Sent element is forced to 1 again.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
Command
Complete
If this is an incoming response table, ignore this field.
If this is an outgoing command table and you need a digital
element to indicate the state of this operation (in progress or
complete), this field is optional. Enter a tag name. This element is
forced to 1 (ON) at startup. While the table is being processed, the
element is set to 0 (OFF). After the data defined in this table’s
Command/Response Information panel has been written to the
device, the Command Complete element is forced back to 1.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
Logical Station
This number was originally defined in the Logical Station
Information panel for the logical port through which
communications with this device occurs.
If this is an incoming response table, enter the number
representing the device sending the response back to the GPI
protocol module.
If this is an outgoing command table, enter the number
representing the device to which the operation defined in the
Command/Response Information panel will be sent.
Valid Entry: previously defined logical station number
When the panel is complete, click on Enter to validate the information.
292 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
Configuring the Command/Response Information Panel
C ONFIGURING
THE
C OMMAND /R ESPONSE I NFORMATION P ANEL
13
External Device
Interface
You can configure the GPI Command/Response Information panel for commands
that can be triggered by the FactoryLink application. Each GPI
Command/Response Information panel defines the complete communication
protocol and the processing needed to format one outgoing message to the external
device. In addition, the GPI Command/Response Information panel identifies one
or more responses to the communication. The entries in the GPI
Command/Response Information panel consist of data from FactoryLink
elements; special characters such as preamble/postamble strings or delimiters;
and special processing such as computed message lengths, checksumming, data
format conversions, or mathematical functions.
Each line of the GPI Command/Response Information panel specifies one of the
following GPI functions:
• Defines a field of the outgoing message or incoming response
• Modifies a previously defined field
message in this table
• Defines STAT_TAG elements to report the status of transactions
• Defines the connector (unique response ID) between the outgoing message and
its plausible incoming response
For a diagram of these relationships, refer to “Associating an Outgoing Message
with an Incoming Response” on page 313.
CAUTION
To satisfy current EDI task requirements, you must configure at
least one FactoryLink element for each GPI Command/Response
table. FactoryLink elements associated with the STAT_TAG option
of the GPI do not satisfy this EDI task requirement.
FactoryLink 6.6.0/ Device Interface Guide / 293
General Purpose
Interface
• Specifies a method to detect the end-of-expected-response to the outgoing
•
GENERAL PURPOSE INTERFACE
•
Configuring the Command/Response Information Panel
•
•
When you configure a GPI Command/Response table, to satisfy current EDI task
requirements, do one of the following things:
• Enter TAGVALUE in the Field Type column. The element name associated with
this field satisfies the EDI task requirement.
• Enter STRING, NUMERIC, or PROCESS in the Field Type column, and a
“dummy” FactoryLink element name in the Tag Name column. The GPI will
ignore this FactoryLink “dummy” element.
• In a command table, if you configure the GPI for the unsolicited mode, enter
STRING in the Field Type column, 0 (zero) in the Field Length column, and a
“dummy” FactoryLink element name in the Tag Name column.
For further information about configuring the GPI for the unsolicited mode, refer
to “Putting the Protocol Module in Unsolicited Mode” on page 317.
From the Command/Response Control panel, select the row for the table you are
configuring and click on Next to bring the Command/Response Information panel
to the foreground.
Use this panel to define an outgoing message (command) to a device or the
parameters of an expected incoming response from a device.
294 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
Configuring the Command/Response Information Panel
Tag Name
For a read table, specify a tag name for an element in which
FactoryLink will store the data read from the device. For a write
table, specify a tag name for an element containing a value to be
written to the device.
Field Type
Specify either the source of the field value, an end-of-response,
the command/ response table link, the debug status of the
outgoing message or incoming response, or notification to the
application that database updates for the response are done. To
determine what to enter, use the following descriptions:
To specify the source of the field value:
External Device
Interface
Valid Entry: standard element tag name
Valid Data Type: digital, analog, longana, float, message
13
To specify the source of the field value:
The field’s value comes from the element
specified in the Tag Name column for this row.
STRING
The field’s value is specified in the Constant
String column for this row.
NUMERIC
The field’s value is specified in the Constant
Numeric column for this row.
RAW VALUE
The field’s value is the whole, unparsed
response. Define a tag name for a message
element in the Tag Name column for this row.
PROCESS
PROCESS is only valid in a command table.
The field’s value is the result of some
computation or processing at run time. Define
this computation in the Process Function
column for this row.
FactoryLink 6.6.0/ Device Interface Guide / 295
General Purpose
Interface
TAGVALUE
•
GENERAL PURPOSE INTERFACE
•
Configuring the Command/Response Information Panel
•
•
To specify the end-of-response:
RESP_FXD
If the expected response is known in advance,
in the Field Type column for this row, enter
RESP_FXD. In the Response LN, POS, TM
column, enter the length of the expected
response.
RESP_VAR
If the length of the expected response is not
known in advance but is given in the incoming
response itself, in the Field Type column for
this row, enter RESP_VAR. In the Response
LN, POS, TM column, enter the position of the
byte giving the response length.
RESP_TM
If the entire response can be received in a
reasonable amount of time, in the Field Type
column for this row, enter RESP_TM. In the
Response LN, POS, TM column, enter the
response time.
RESP_STR
If the expected response is terminated by a
string of special characters, in the Field Type
column for this row, enter RESP_STR. In the
Constant String column, enter the string.
To specify a command/response table link:
RESP_ID
296 / FactoryLink 6.6.0 / Device Interface Guide
Enter RESP_ID when specifying a unique
response format identification number that
identifies the command/response tables in
which the protocol module compares a
received response with associated response
formats. While you can reference up to eight
IDs, the incoming response can define only
one. To indicate which response format from a
GPI Command/Response Information panel to
use to parse the reply to this command,
complete the Response ID field. For more
information, refer to “Associating an Outgoing
Message with an Incoming Response” on page
313.
GENERAL PURPOSE INTERFACE
Configuring the Command/Response Information Panel
To specify the debug status:
STAT_TAG
13
To specify application notification of response data completion:
DB_DONE
Note that because of the DB_DONE tag is
only set when tag values have been updated,
it cannot be used with a response packet type
of MULT_RSP (see definition of Response
Packet).
Allowed DB_DONE tag types are digital,
analog, float, long analog, or message. The tag
is set to 1 or “1” for a message tag. It is the
responsibility of the application to clear the
tag if required.
Field Pos.
Enter a decimal number to identify this field’s position in the
completed communication message.
Valid Entry: 1 - 999
Field Len.
Enter a decimal number to identify the field’s length in bytes.
Valid Entry: 1 - 999 (bytes)
FactoryLink 6.6.0/ Device Interface Guide / 297
General Purpose
Interface
(Optional) This field allows you to enter the
name of a tag to be set to 1 (one) when the
response message has been processed. The
specified tag is set after any values extracted
from the incoming message have been
returned or any status tag has been updated
with the result of processing (as the result of a
STAT_TAG entry).
External Device
Interface
For each outgoing message and incoming
response, configure an analog element and a
message element. The analog element reports
a numeric value. The message element
reports an informative message. Enter
STAT_TAG in the Field Type column and the
element name in the Tag Name column.
•
GENERAL PURPOSE INTERFACE
•
Configuring the Command/Response Information Panel
•
•
Bit
Pos.
Enter a decimal number that defines the specific bit of a byte. In
general, you can map up to eight digital elements into a single
byte of the outgoing message, or map eight bits of an incoming
response to eight FactoryLink digital elements.
Valid Entry: 1 - 8
Process
Function
If you enter PROCESS in the Field Type column, this field is
required. Define the process function and the scope of that
function. Process functions perform specific operations on
specified fields of a table.
For a complete list of process functions and descriptions, see
“Using Process Functions” on page 320.
Fld#
If you enter PROCESS in the Field Type column, this field is
required. Specify a number to indicate the starting range of
decimal field numbers over which the process function operates.
For example, to compute the exclusive-or (XOR) function for
fields 1 through 10 (inclusive), enter XOR in Process Function
column, l in the first Fld# column, and 10 in the second Fld#
column. The numbers 1 and 10 define the range of fields over
which the XOR function is computed.
Valid Entry: 1 - 999
Arg.
If you enter PROCESS in the Field Type column, this field is
required. Specify a decimal value to be used as a process function
argument.
For example, for the process function SLxx (shift left xx-bit
positions), enter SL in the Process Function column and xx (a
decimal number) in the Arg column.
Valid Entry: -32768 - +32767
Conversion
Function
Specify the conversion performed on this field after its value is
obtained from a FactoryLink element (as the result of a process
function operation) or from incoming data from an external device
or process function.
Valid Entry: For a list of possible conversion functions, refer
to “Using Conversion Functions” on page 341.
Format String
If you enter TSPRINTF in the Conversion Function column, this
field is required. Specify information about formatting the field of
an outgoing message.
Valid Entry: alphanumeric string of up to 16 characters
298 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
Configuring the Command/Response Information Panel
Response ID
Valid Entry: 1 - 255
Response LN,
POS, TM
If you enter RESP_FXD, RESP_VAR, RESP_TM, or RESP_STR
in the Field Type column, this field is required. Define the length,
position, or timeout of the expected response. Depending upon the
conditions, you might also need to enter information in the Field
Type column, the Constant String column, or both.
13
External Device
Interface
If you enter RESP_ID in the Field Type column, this field is
required. Define a unique numeric identifier that specifies which
response format from a GPI Command/Response Information
panel to use to parse the reply to this command. Every incoming
response defines one unique identifier (ID). Every outgoing
message references from 1 to 8 response Ids.
Valid Entry: 1 - 999
If:
You know the expected
response length in advance
RESP_FXD in the Field Type
column, and the response
length in this column
You do not know the response
length in advance but it is
given at the beginning of the
response
RESP_VAR in the Field Type
column, and the position of the
byte specifying the length in
this column
The end of response must be
detected by the protocol
module from a string of special
characters
RESP_STR in the Field Type
column, and the string of
special characters in the
Constant String column
It is not possible to specify the
length of the response or a
terminating string for the
response
RESP_STR in the Field Type
column, and RESP_TM in the
Field Type column
If you enter RESP_FXD, RESP_VAR, RESP_TM, or RESP_STR
in the Field Type column, this field is required. Specify how an
incoming response is grouped when it returns to the GPI protocol
module:
NO_RSP You expect no response. If you enter NO_RSP, for
the GPI protocol module to process the table, enter
FactoryLink 6.6.0/ Device Interface Guide / 299
General Purpose
Interface
Response Packets
Enter:
•
GENERAL PURPOSE INTERFACE
•
Configuring the Command/Response Information Panel
•
•
RESP_FXD, RESP_VAR, RESP_TM, or
RESP_STR in the Field Type column. The protocol
module will ignore the Field Type entry.
SNGL_RSP You expect a single-packet response. GPI processes
the received response and returns it to
FactoryLink in a single packet.
MULT_RSP You expect a multiple-packet response. GPI
queues the entire received response in its internal
buffer for later retrieval via the BUFR_RSP
delimiter in a different outgoing message.
BUFR_RSP
Constant Numeric
GPI processes buffered response data and returns
it to FactoryLink; repeated calls may be necessary
to take information from the internal buffer.
(Optional) If the entry in the Field Type column is NUMERIC,
define a field value in an outgoing message or a delimiter to
parse/match in the incoming response.
Valid Entry: 0 - 32657
Constant String
(Optional) If you enter STRING or RESP_STR in the Field Type
column, define a field value in an outgoing message or a delimiter
to parse/match in the incoming response.
Valid Entry: alphanumeric string of up to 30 characters
Comment
(Optional) Enter reference information about this table.
When the panel is complete, click on Enter to validate the information.
300 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
Flexibility and Design of the GPI
F LEXIBILITY
AND
D ESIGN
OF THE
GPI
13
Enter the following information in the columns of the command tables you
configure to describe these bytes:
• The Field Type, which specifies where to obtain or enter the field’s value
• The Field Pos, which specifies the field’s position in the outgoing message or
incoming response
External Device
Interface
The primary goal in designing the GPI protocol module was the flexibility to use it
with a variety of external devices. In simple terms, the outgoing message from the
communication port is just a series of bytes. To describe each byte, the GPI needs
to know only the byte’s value and its position in the message.
Note
If you do not know the value of a field or byte at configuration, the value must be
calculated at run time. If you know the value at configuration, then specify it as a
constant (numeric or string). If the field’s value must be calculated at run time,
the value must come either from a FactoryLink element or from the result of a
calculation on other fields. For example, a checksum value may be the result of an
exclusive-or (XOR) on the bytes of an outgoing message. Refer to “Using Process
Functions” on page 320 for further information about the process function XOR.
FactoryLink 6.6.0/ Device Interface Guide / 301
General Purpose
Interface
Throughout this chapter, the term “column” refers to areas for data
within the GPI configuration tables, and the term “field” refers to
the fields of a communication message. When you enter
information in the columns of a command or response table, you
are configuring an outgoing message or an incoming response
containing fields that are composed of bytes.
•
GENERAL PURPOSE INTERFACE
•
Formatting an Outgoing Message
•
•
F ORMATTING
AN
O UTGOING M ESSAGE
The following components typically comprise the format of the outgoing message:
• Preamble
• Device Address
• Data
• Checksum
• Postamble
The next sections provide the following information for these components:
• A diagram of the format and sources of information in the outgoing message
• A discussion of the field entries
• A sample GPI Command/Response Information panel for a command table
Format and Sources of Information in the Outgoing Message
The outgoing message illustrated in the following diagram consists of several
parts, including Preamble, Device Address, Data, Checksum, and Postamble. (The
term “checksum” refers to all error checking schemes, such as CRC, LRC, and
Modulo 256.)
The illustration describes only one possible scenario. In this diagram, the
breakdown of the outgoing message into fields and the length of each field is
provided to clarify and to demonstrate the various parts of an outgoing message.
Using other features of the GPI, you could construct other divisions or
combinations.
302 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
Formatting an Outgoing Message
13
External Device
Interface
Table 13-0 Outgoing Message Fields
Field
Description
Field 1
One-byte constant used as the start-of-command character, STX;
the Preamble is a special character whose value you know at
configuration.
Field 2
Two-byte Device Address whose value comes from the analog
element, ATAG.
Field 3
One-byte digital Data field consisting of 8-bits where only bit6,
bit4, and bit2 change during the command; these correspond to
digital elements DTAG6, DTAG4, and DTAG2, respectively. The
other bits do not change.
FactoryLink 6.6.0/ Device Interface Guide / 303
General Purpose
Interface
The fields described in the following table correspond to the fields in the outgoing
message illustrated in the previous diagram.
•
GENERAL PURPOSE INTERFACE
•
Formatting an Outgoing Message
•
•
Table 13-0 Outgoing Message Fields (Continued)
Field
Description
Field 4
Four-byte Data area whose value comes from the floating point
element, FTAG.
Field 5
Ten-byte Data area whose value comes from the message
element, MTAG.
Field 6
One-byte Checksum whose value is computed using process
function XOR (exclusive-or) on the bytes of fields 2 through 5,
inclusive. Except for the preamble and postamble fields, this will
be the XOR of all bytes of the message.
Field 7
One-byte end-of-command character, ETX; at configuration, you
know the value of the special character Postamble is a special
character.
Sample Information Panel for a Command Table
The format and sources of information for the outgoing message establish a basis
for understanding the entries in Table 13-0.
Table 13-0 GPI Command/Response Information
Field Field Bit
Pos Len Pos.
Process
Funct.
Fld#
Fld#
Arg.
Constan
tNumeri
c
Constan
t
String
1
1
*
*
*
*
*
*
\x02
STX
TAGVALUE 2
2
*
*
*
*
*
*
*
DEVICE
ADDR
dtag2 TAGVALUE 3
1
2
*
*
*
*
*
*
Data
dtag4 TAGVALUE 3
1
4
*
*
*
*
*
*
Data
dtag6 TAGVALUE 3
1
6
*
*
*
*
*
*
Data
ftag
4
*
*
*
*
*
*
*
Data
10
*
*
*
*
*
*
*
Data
Tag
Name
Field
Type
STRING
atag
TAGVALUE 4
mtag TAGVALUE 5
304 / FactoryLink 6.6.0 / Device Interface Guide
Comment
GENERAL PURPOSE INTERFACE
Formatting an Outgoing Message
Table 13-0 GPI Command/Response Information (Continued)
13
Tag
Name
Field
Type
Field Field Bit
Pos Len Pos.
Process
Funct.
Fld#
Fld#
Arg.
Constan
tNumeri
c
Constan
t
String
Comment
PROCESS
6
1
*
XOR
2
5
*
*
*
Checksum
*
STRING
7
1
*
*
*
*
*
*
\x03
ETX
For simplification purposes, some of the columns in this panel are omitted. For a complete
GPI Command/Response Information panel, refer to “Configuring the Command/Response
Control Panel” on page 289.
External Device
Interface
*
Note: An asterisk (*) indicates a “don’t care” entry. The GPI does not need this entry and will
not use it.
General Purpose
Interface
FactoryLink 6.6.0/ Device Interface Guide / 305
•
GENERAL PURPOSE INTERFACE
•
Debugging Tools
•
•
D EBUGGING TOOLS
The following tools aid you in debugging the application.
Status/Debug Levels
When enabled, this feature logs information about the steps the GPI protocol
module takes to compose each outgoing message and to parse each incoming
response. You can use the logged information to debug the application. Disable
this feature during normal operations.
Table 13-0 describes the various levels of status/debug information logged or
displayed:
Table 13-0 Status/Debug Information
Debug Entry
Description
STAT_OFF
Reports only analog error values to the element
STAT_ON
Reports analog error values and message error text to the
FactoryLink element
LOG1
Reports STAT_ON plus prints the outgoing and incoming
messages in hexadecimal bytes to the screen
LOG2
Reports LOG2 plus prints the analog error value and error
message to the screen
For further information about the Debug/Status Level, refer to the “Configuring
the Command/Response Control Panel” on page 289.
RAW VALUE
This feature allows up to 255 bytes of the incoming response to be read into a
FactoryLink message element before parsing the response.
STAT_TAG
This feature provides alphanumeric status information at different stages of the
GPI response or command operation. This information is then passed on via
FactoryLink analog and message elements.
306 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
Summary of Basic Concepts
S UMMARY
OF
B ASIC C ONCEPTS
13
The following summarizes the basic concepts of the GPI protocol module:
• An outgoing communication message is made up of bytes. When constructing
• The value of the bytes is either known at the time of configuration or the
value is obtained at run time.
• The position of each field/byte is always known at configuration.
• The format of the outgoing message is described to the GPI protocol module via
an outgoing message configured in a command table.
• The format of the incoming response is described to the GPI protocol module via
External Device
Interface
this outgoing message, the value and position of these bytes is of major concern.
an incoming response configured in a response table.
• At configuration, through unique identifiers (IDs), you correlate the command
and response tables.
FactoryLink 6.6.0/ Device Interface Guide / 307
General Purpose
Interface
The following diagram illustrates how to configure two GPI Command/Response
tables for an expected response and how to link these tables together with a
unique ID (configured in the ID field of the GPI Command/Response Information
panel).
•
GENERAL PURPOSE INTERFACE
•
Summary of Basic Concepts
•
•
Diagram of a Complete Communication and Response
Command Table
Outgoing Message to the
External Device
External Device
ID 101
Response Table
Incoming Response Data
returned to FactoryLink
ID 101
308 / FactoryLink 6.6.0 / Device Interface Guide
Response
GENERAL PURPOSE INTERFACE
GPI Functions
GPI F UNCTIONS
13
This section describes the functions of the GPI protocol module and shows the
relationships among the different columns of the GPI configuration tables.
Principles of Operation
You must configure the GPI Command/Response tables with the following
information to enable communications to occur between a FactoryLink application
and an external device via the GPI protocol module:
External Device
Interface
The sample tables omit some fields to simplify some of the discussions in this
section. Refer to “Configuring the Command/Response Control Panel” on page 289
for complete descriptions of the entries in the GPI configuration tables.
• The format of the outgoing message
• The format of the incoming response from the external device
Defining the Outgoing Message
Defining the outgoing message involves completing specific columns in the GPI
Command/Response Information panel for the command table, including
specifying packet responses you expect to receive from the external device.
Completing the Command/Response Information Panel
You need to define an outgoing message in a command table if your application
requires that the GPI protocol module request data from an external device. This
puts the GPI protocol module in the “solicited mode.” Refer to “Putting the
Protocol Module in Unsolicited Mode” on page 317 for information about the
unsolicited mode.
FactoryLink 6.6.0/ Device Interface Guide / 309
General Purpose
Interface
Configuring the GPI Command/Response tables requires an understanding of the
external device protocol and the options that the GPI protocol module provides.
The GPI Command/Response table describes the external device protocol to the
GPI in a “language” the GPI understands. The GPI provides this language as a set
of tools for you to use to set up communications.
•
GENERAL PURPOSE INTERFACE
•
GPI Functions
•
•
Use the following columns in the GPI Command/Response Information panel to
define the message in the command table for the outgoing message.
Field Type
Defines the following delimiters of an outgoing message:
TAGVALUE Element used for data retrieval or storage.
NUMERIC Constant value entered at configuration.
STRING String entered at configuration.
PROCESS Computed value entered at run-time through use
of a predefined process function, such as XOR
(exclusive-or).
RESP_ID Unique number assigned to the outgoing message
Response ID which matches an incoming
message’s Response ID field.
RESP_VAR Response length (in bytes) is given in the response
itself; byte position for the response length is
defined in the Response LN, POS, TM field and the
type of packet in the Response Packets field.
RESP_STR Response has a special terminating character
defined in Constant field (such as POSTAMBLE
“EXT.”).
RESP_FXD Response length (in bytes) is known at
configuration; number of bytes is defined in the
Response LN, POS, TM field.
RESP_TM Response received in a specified amount of time;
the response time is defined in the Response LN,
POS, TM field.
Field Pos
Specifies the sequence of the bytes in the outgoing message
(external device protocol).
Field Len
Specifies the size of the field in bytes.
Process Function
Specifies the operations performed to produce results which will
be substituted for a defined field.
Constant Numeric
Specifies a value used in an outgoing message.
Constant String
Specifies a string used in an outgoing message.
310 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
GPI Functions
Specifying Packet Responses
Use the following columns in the outgoing message command table’s GPI
Command/Response Information panel to specify packet responses.
Specify an entry (RESP_FXD, RESP_VAR, RESP_TM, or RESP_STR) in the Field
Type column for each entry in the Response Packets column.
Response Packet
In the command table, specify which of the following types of response packets you
expect to receive from the external device:
External Device
Interface
Field Type
13
• No response – If you do not expect a response to the outgoing message, do not
configure a response table (so there will be no unique response identifier).
• Single-packet response – If you expect a single-packet response, the GPI
• Multiple packet and buffered responses – If you expect a multiple-packet
response, the collection of data may be too large for a single response table
(incoming message) to handle. To transfer large amounts of data to the
FactoryLink real-time database from the GPI internal buffers, you may need to
trigger the response table several times. To do this, enter MULT_RSP in the
Response Packet column of the outgoing message. The MULT_RSP command
sets up the queues for the internal buffer but returns no packets until another
outgoing message with BUFR_RSP is triggered. Repeat this triggering as
needed until the GPI processes all the buffered data in the Response Packet
column.
Table 13-0 describes the valid entries for the Response Packet column in the GPI
Command/Response Information panel of a command table:
Note
If you enter NO_RSP, you must also enter an End-of-Response
indicator (RESP_FXD, RESP_VAR, RESP_TM, or RESP_STR) in
the Field Type column for the protocol module to process the table.
(The protocol module will ignore this Field Type entry.)
FactoryLink 6.6.0/ Device Interface Guide / 311
General Purpose
Interface
protocol module can return the entire incoming response to the FactoryLink
real-time database as the response to a single outgoing message.
•
GENERAL PURPOSE INTERFACE
•
GPI Functions
•
•
Table 13-0 Valid Entries for the Response Packet Column
Valid Response Type
Description
NO_RSP
Expects no response to the outgoing message.
SNGL_RSP
Processes the received response and returns it to
FactoryLink all at once.
MULT_RSP
Queues the entire received response in its internal
buffer for later retrieval via the BUFR_RSP delimiter.
Returns no data to FactoryLink at this time.
BUFR_RSP
Processes buffered response data and returns it to
FactoryLink; repeated calls may be necessary to take
all information from the internal buffer.
Formatting the Incoming Response
Use the following columns in the GPI Command/Response Information panel to
define the format of the expected response from the external device in the
response table for the incoming response:
• Field Type
• Field Pos
• Field Len
• Conversion Function
• Response Packets
• Constant Numeric
• Constant String
Define the format of the incoming message (the expected response) in the GPI
Command/Response Information panel for the response table using real-time
database elements so the GPI can return the response to the FactoryLink
database. Like the outgoing message, the incoming response is composed of fields
or bytes. Indicate the position of each field of the incoming response by
configuring the position in the Field Pos column of the response table’s GPI
Command/Response Information panel.
312 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
GPI Functions
Configure the incoming response using the following guidelines:
• If you know the field length, enter the length in bytes in the Field Len column.
• If the field’s value is to be returned to FactoryLink, enter the keyword
TAGVALUE in the Field Type column and an element name in the Tag Name
column.
• If the field type is NUMERIC or STRING, then the GPI protocol module parses
the field as a response delimiter and expects to find the content of the field in
the Constant Numeric and Constant String columns.
Refer to “Defining the Outgoing Message” on page 309 for further information
about entries for the columns of the incoming response.
External Device
Interface
• If you do not know the field length, enter a -1 in the Field Len column and a
delimiter in the Constant String column.
13
Associating an Outgoing Message with an Incoming Response
In the GPI Command/Response Information panel, for the outgoing message and
incoming response, enter an identification (ID) number in the Response ID column
and the keyword RESP_ID in the Field Type column.
Assign each response format a unique identification (ID) number. If a GPI
Command/Response Information panel for a command table that defines an
outgoing message contains more than one RESP_ID entry, use a different ID for
each response. The GPI protocol module compares the received response with all
response formats associated with the RESP_ID in the GPI Command/Response
Information panel for the corresponding response table (incoming response) and
processes it appropriately. In the GPI Command/Response Information panel for
the command table, you can reference up to eight ID numbers; the incoming
response can define only one. This relationship is illustrated in the following
diagram.
FactoryLink 6.6.0/ Device Interface Guide / 313
General Purpose
Interface
Use the Field Type and Response ID columns in the GPI Command/Response
Information panel to associate an outgoing message with its incoming (expected)
response:
•
GENERAL PURPOSE INTERFACE
•
GPI Functions
•
•
Outgoing Message Tables
Outgoing Message
Format
Outgoing Message
Format
Response IDs: 1, 21,
50, 63, 65, 66, 97, 108
Response IDs: 1, 65
Outgoing Message
Format
Response IDs: 21,
63, 66
Incoming Response Tables
Incoming Response
Format
Incoming Response
Format
Incoming Response
Format
Incoming Response
Format
Unique Response
ID: 1
Unique Response
ID: 50
Unique Response
ID: 65
Unique Response
ID: 97
Incoming Response
Format
Incoming Response
Format
Incoming Response
Format
Incoming Response
Format
Unique Response
ID: 21
Unique Response
ID: 63
Unique Response
ID: 66
Unique Response
ID: 108
314 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
GPI Functions
Specifying Methods to Detect an End-of-Response
• Field Type
• Response LN, POS, TM
• Constant Numeric
• Constant String
Define how the GPI protocol module detects an end-of-response for each outgoing
message. In the Field Type column of the GPI Command/Response Information
panel, enter one of the end-of-responses described; if indicated, also enter
corresponding information in the Response LN, POS, TM column:
If the external device returns a fixed response, enter RESP_FXD
in the Field Type column. In the Response LN, POS, TM column,
enter the length of the response in bytes. To determine the type of
response, refer to documentation for your specific external device.
RESP_VAR
If the external device returns a variable length response, enter
RESP_VAR in the Field Type column. In the Response LN, POS, TM
column, enter the byte position in the response that specifies the
number of bytes to follow before you reach the end of the
response. To determine the type of response, refer to
documentation for your specific external device.
RESP_TM
If the GPI receives the response length in a reasonable amount of
time, enter RESP_TM in the Field Type column. Also, enter the
response time in the Response LN, POS, TM column.
RESP_STR
If special characters terminate the response, enter RESP_STR in
the Field Type column. Also, enter the special characters in the
Constant String column.
FactoryLink 6.6.0/ Device Interface Guide / 315
General Purpose
Interface
RESP_FXD
13
External Device
Interface
Use the following columns in the GPI Command/Response Information panel for
the command table defining the outgoing message to specify various methods to
detect an end-of-response.
•
GENERAL PURPOSE INTERFACE
•
GPI Functions
•
•
Non-Printable or “Don’t Care” Characters
Use the following columns in the GPI Command/Response Information panel in
both the outgoing message and the incoming response for non-printable or “don’t
care” characters:
• Format String
• Constant Numeric
• Constant String
If you enter a string containing non-printable or “don’t care” characters in the
Constant String column, it can be used in two different ways:
• To detect the end-of-response (in conjunction with the RESP_STR option)
• As a field delimiter (with the STRING option in a GPI Command/Response
Information panel)
Characters in a string may be one of the following types:
• Printable characters. If all characters of the string are printable, simply enter
the string as it appears. For example, if the string is ABCD, enter ABCD.
• Non-printable characters. If one or more of the characters in a string are
non-printable, enter \x followed by the Hexadecimal ASCII value of the
character. For example, using this format, the string A, B, followed by the
non-printable characters EOT, ending with D, F, becomes AB\x04DF. (04 is the
hexadecimal ASCII value of “EOT.”)
Note
After the entry \x, you must enter two hexadecimal digits.
316 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
GPI Functions
Table 13-0 lists special non-printable characters used with the GPI protocol
module:
13
Table 13-0 Non-Printable Characters Used With the GPI Protocol
External Device
Interface
Non-Printable Characters
\t or \T
Tab
\n or \N
New line
\r or \R
Carriage return
\\
Backslash (\)
Initiating a Transmission
Use the Command Trigger column in the outgoing message command table’s GPI
Command/Response Control panel to initiate a transmission. To initiate the
transmission of an outgoing message, trigger the command table’s GPI
Command/Response Information panel that defines the outgoing message.
Putting the Protocol Module in Unsolicited Mode
Use the following columns in the outgoing message command table’s GPI
Command/Response Information panel to put the protocol module in the
unsolicited mode:
• Field Type
• Format String
• Response Packets
• Response ID
If your application requires that the GPI receive data from an external device
without requesting it, then you must configure and trigger a GPI
Command/Response Information panel with no field positions specified. (In other
words, do not build an outgoing message.) This puts the GPI in unsolicited mode.
FactoryLink 6.6.0/ Device Interface Guide / 317
General Purpose
Interface
A response can be terminated by a special string of characters; some are fixed and
some are variable (such as a checksum). Use the fixed characters to detect the end
of a response, but ignore the variable characters. Treat the variable characters
like “don’t care” characters and enter \xxx in the variable character’s position(s)
in the string.
•
GENERAL PURPOSE INTERFACE
•
GPI Functions
•
•
For the outgoing message, enter the same response format information as
required for a solicited table.
• RESP_ID: Describes which command/response tables to use for parsing the
response
• RESP_FXD, RESP_VAR, and RESP_STR: Describe how to detect the
end-of-response
• SNGL_RSP, and MULT_RSP: Describe the type of incoming response
For information about putting the protocol module in solicited mode, refer to
“Defining the Outgoing Message” on page 309.
Reporting Message Status
Use the following columns in the GPI Command/Response Information panel to
report the status of the outgoing message or the incoming response:
• Tag Name
• Field Type
If you configure the proper real-time database elements, the GPI can report the
status of each outgoing message or incoming response to FactoryLink.
To do this, for each outgoing message or incoming response, configure two
elements, one analog and one message, which are defined in the following
manner:
• The message element reports information about status of the outgoing message
or incoming response.
• The analog element reports a numeric value and can be used in Math and Logic
applications. Refer to Chapter 6, “Configuring Math & Logic” in Configuration
Guide.
Enter the element name in Tag Name column of the GPI Command/Response
Information panel and the keyword STAT_TAG in the Field Type column. Define a
separate set of elements for each outgoing message and incoming response.
Note
You should use different elements for the STAT_TAG entry for
different tables. If you use the same set of elements for the
STAT_TAG in different tables, information from one table
overwrites information from another table.
318 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
GPI Functions
Converting a Field’s Value
Use the following columns in the GPI Command/Response Information panel in
both the outgoing message and the incoming response to convert a field’s value:
• Field Type
• Field Pos
• Field Len
• Conversion Function
In an outgoing message, the values of a field come from two sources:
External Device
Interface
• Tag Name
13
• During configuration, as a constant
• At run time, from a FactoryLink element
In the incoming response, when parsing the received response and returning
values to FactoryLink, similar conversions are possible.
For a complete list of conversion functions, refer to “Using Conversion Functions”
on page 341.
FactoryLink 6.6.0/ Device Interface Guide / 319
General Purpose
Interface
Before substituting these values in a field, convert them to a required format
using the conversion functions. For example, if the device protocol requires
ASCII conversion, the binary value of a field whose source is a FactoryLink
element can be converted to ASCII before transmission.
•
GENERAL PURPOSE INTERFACE
•
Using Process Functions
•
•
U SING P ROCESS F UNCTIONS
Use the following columns in the outgoing message command table’s GPI
Command/Response Information panel with process functions:
• Field Pos
• Process Function
• Fld#
• Arg
Process functions perform several tasks. Depending on their functionality, process
functions perform specific operations on entries in the FLD# and Argument
columns. The results that these operations produce are substituted for the value
in the field being defined.
The following information describes some of these tasks:
LEN
Calculates the length of the range of bytes between the first Fld#,
inclusive and the second Fld# and substitutes the result for the
current field.
XOR
Calculates the exclusive-or (XOR) of the range of bytes between
the first Fld#, inclusive and the second Fld# and substitutes the
result for the current field.
ADD
Adds the value given in Arg. to the value in the current field.
For further information about each process function, refer to “Using Process
Functions” on page 338
Associating a Digital Element to a Bit
Use the following columns in the GPI Command/Response Information panel in
both the outgoing message and the incoming response to associate a digital
element to a bit:
• Tag Name
• Field Type
• Field Len
• Bit Pos
In the outgoing message and the incoming response, you can associate a
FactoryLink digital element to a bit and can also map up to eight FactoryLink
digital elements into a single byte.
320 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
Using Process Functions
Note
Bit 1 is the LSB (Least Significant Bit) and bit 8 is the MSB (Most
Significant Bit) of the byte.
Determining the Sources of Field Values
13
External Device
Interface
To link a digital element to a bit of a field, enter the FactoryLink digital element
in the Tag Name column of the GPI Command/Response Information panel, and
the position of the bit (1 through 8) in the Bit Pos column. For all digital elements
accessing the same byte, the field position will be the same. Enter one (1) in the
Field Len column.
To determine the sources of field values, use the following columns in the GPI
Command/Response Information panel in both the outgoing message and the
incoming response:
• Tag Name
• Process Function
• Constant Numeric
• Constant String
Note
For the incoming response, the Process Function is not valid.
If you know the value of a field at configuration, then you can specify it as a
numeric constant or string constant. If the value must be determined at run-time,
then it either comes from a FactoryLink element or results from a calculation. For
example, an LRC value is the result of XOR (exclusive-or) on specific bytes of an
outgoing message.
FactoryLink 6.6.0/ Device Interface Guide / 321
General Purpose
Interface
• Field Type
•
GENERAL PURPOSE INTERFACE
•
Using Process Functions
•
•
To determine the sources of field values, use the following guidelines:
Table 13-0 Field Value Sources
If the Field Value Is:
Enter:
Known at configuration
NUMERIC or STRING for Field Type,
and the specific value of the field for
Constant Numeric or Constant String
Extracted from a FactoryLink element
at run-time
TAGVALUE for Field Type, the element
name for Tag Name, and the length of
the field for Field Len
Computed
PROCESS for Field Type, and the
process function in the Process Function
column
Returned to FactoryLink from data
from the device
TAGVALUE in Field Type column, the
FactoryLink element name in Tag
Name column, and the length of the
field in the Field Len column
Modifying a Previously Defined Field
Use the following columns in the outgoing message command table’s GPI
Command/Response Information panel to modify a previously defined field:
• Tag Name
• Field Type
• Process Function
By making multiple entries that reference the same Field Position column in the
command table, you can modify the same field more than once. For example, use
the process function LEN to calculate the number of bytes in a range of fields.
Enter the result in the field being defined. Finally, use either the process function
ADD or SUB to add or subtract a number from this value.
For further information about process functions, refer to “Using Process
Functions” on page 338.
322 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
GPI Configuration
GPI C ONFIGURATION
13
This section illustrates how to configure an outgoing message for the GPI to
communicate with the PMD 300 Programmable Message Display.
This section provides configuration table entries for an outgoing message from the
GPI and for an expected incoming response from a PMD 300 programmable
device. The outgoing message contains instructions for displaying operator
messages. The incoming response parameters and tags prepare FactoryLink for
the expected reply from the device.
The PMD 300 is an intelligent, alphanumeric display panel that interfaces with
any type of controller. The device provides complete information about machine or
process diagnostics, operator prompting, and fault indications. For further
information about the PMD 300, refer to the manufacturer’s documentation.
FactoryLink 6.6.0 / Device Interface Guide / 323
External Device
Interface
Configuration Example
•
GENERAL PURPOSE INTERFACE
•
GPI Configuration
•
•
Command/Response Information Panel Entries
The Command/Response Information panel entries illustrated in this section
instruct the GPI device protocol module to display a message on a PMD 300
display panel. For an explanation of the outgoing message format for the PMD
300 device, see “Defining the Outgoing Message to the GPI” on page 334.
324 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
GPI Configuration
Entries for Outgoing Message Table
OUTGOING_MSG
Table 13-0 OUTGOING_MSG: Tag Name through Bit Pos.
Field
Tag Name
Field
Type
Field
Pos.
Field
Len.
NUMERIC
1
1
PROCESS
2
1
NUMERIC
3
1
NUMERIC
4
1
NUMERIC
5
1
NUMERIC
6
1
PROCESS
7
1
cb1_0 (digital)
TAGVALUE
8
1
cb1_4 (digital)
TAGVALUE
8
1
cb1_6 (digital)
TAGVALUE
8
1
cb2_4 (digital)
TAGVALUE
9
1
cb2_6 (digital)
TAGVALUE
9
1
cb3_0 (digital)
TAGVALUE
10
1
cb3_1 (digital)
TAGVALUE
10
1
cb3_2 (digital)
TAGVALUE
10
1
Bit
Pos....
FactoryLink 6.6.0 / Device Interface Guide / 325
13
External Device
Interface
The following series of tables lists, by row, sample Command/Response
Information panel entries for an outgoing message table, OUTGOING_MSG. In
this section, the entries are presented in several tables to accommodate the
numerous panel entry columns.
•
GENERAL PURPOSE INTERFACE
•
GPI Configuration
•
•
Table 13-0 OUTGOING_MSG: Tag Name through Bit Pos. (Continued)
Field
Tag Name
Field
Type
Field
Pos.
Field
Len.
cb3_3 (digital)
TAGVALUE
10
1
cb3_4 (digital)
TAGVALUE
10
1
cb3_5 (digital)
TAGVALUE
11
56
cb3_6 (digital)
TAGVALUE
12
1
scrlmsg (message)
TAGVALUE
13
1
stat_msg (message) STAT_TAG
11
56
stat_ana (analog)
12
1
Bit
Pos....
RESP_VAR
RESP_ID
STAT_TAG
Table 13-0 OUTGOING_MSG: Process Function through Arg.
Process Function
Tag Name...
Range
...Process
Function
LEN
326 / FactoryLink 6.6.0 / Device Interface Guide
Arg....
Fld#
2
Fld#
13
GENERAL PURPOSE INTERFACE
GPI Configuration
Table 13-0 OUTGOING_MSG: Process Function through Arg. (Continued)
13
Process Function
Range
...Process
Function
Arg....
Fld#
Fld#
LEN
7
11
XOR
2
11
ONESCOMP
12
cb1_0 (digital)
cb1_4 (digital)
cb1_6 (digital)
cb2_4 (digital)
cb2_6 (digital)
cb3_0 (digital)
cb3_1 (digital)
cb3_2 (digital)
cb3_3 (digital)
cb3_4 (digital)
cb3_5 (digital)
cb3_6 (digital)
scrlmsg (message)
FactoryLink 6.6.0 / Device Interface Guide / 327
External Device
Interface
Tag Name...
•
GENERAL PURPOSE INTERFACE
•
GPI Configuration
•
•
Table 13-0 OUTGOING_MSG: Process Function through Arg. (Continued)
Process Function
Tag Name...
...Process
Function
Range
Arg....
Fld#
Fld#
stat_msg (message)
stat_ana (analog)
Table 13-0 OUTGOING_MSG: Conversion Function through Resp. LN, POS, TM
Conversion Function
Tag Name...
...Conversion
Function
cb1_0 (digital)
cb1_4 (digital)
cb1_6 (digital)
cb2_4 (digital)
cb2_6 (digital)
328 / FactoryLink 6.6.0 / Device Interface Guide
Format
String
Response
Response
ID
Response
LN, POS, TM...
GENERAL PURPOSE INTERFACE
GPI Configuration
Table 13-0 OUTGOING_MSG: Conversion Function through Resp. LN, POS, TM (Continued)
13
Conversion Function
...Conversion
Function
Format
String
Response
ID
Response
LN, POS, TM...
cb3_0 (digital)
cb3_1 (digital)
cb3_2 (digital)
cb3_3 (digital)
cb3_4 (digital)
cb3_5 (digital)
cb3_6 (digital)
scrlmsg (message)
2
111
stat_msg (message)
stat_ana (analog)
Table 13-0 OUTGOING_MSG: Response Packets through Comment
Response
Tag Name...
...Response
Packets
Command/Response
Constant
Numeric
170
Constant
String
Comment
Hex AA
CMD Length
FactoryLink 6.6.0 / Device Interface Guide / 329
External Device
Interface
Tag Name...
Response
•
GENERAL PURPOSE INTERFACE
•
GPI Configuration
•
•
Table 13-0 OUTGOING_MSG: Response Packets through Comment (Continued)
Response
Tag Name...
...Response
Packets
Command/Response
Constant
Numeric
Comment
Constant
String
16
Unit Addr
2
Unit Addr
2
Msg Len
1
Ctrl
Msg Len
cb1_0 (digital)
Ctrl Byte 1
cb1_4 (digital)
Ctrl Byte 1
cb1_6 (digital)
Cntrl Byte 1
cb2_4 (digital)
Ctrl Byte 2
cb2_6 (digital)
Ctrl Byte 2
cb3_0 (digital)
Ctrl Byte 3
cb3_1 (digital)
Ctrl Byte 3
cb3_2 (digital)
Ctrl Byte 3
cb3_3 (digital)
Ctrl Byte 3
cb3_4 (digital)
Ctrl Byte 3
cb3_5 (digital)
Ctrl Byte 3
cb3_6 (digital)
Ctrl Byte 3
scrlmsg (message)
Scroll Message
Exclusive-Or
One’s Complement
330 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
GPI Configuration
Table 13-0 OUTGOING_MSG: Response Packets through Comment (Continued)
13
Response
...Response
Packets
Constant
Numeric
Constant
String
sngl_rsp
Comment
Response Variable
Response ID
stat_msg (message)
Status - Message
stat_ana (analog)
Status - Analog
Entries for Incoming Response Table
The following series of tables lists sample Command/Response Information panel
entries for an incoming response table, INCOMING_RSP, that defines parameters
for the various types of expected PMD 300 replies to the outgoing message defined
in OUTGOING_MSG.
INCOMING_RSP
Table 13-0 INCOMING_RSP: Tag Name through Bit Pos.
Field
Tag Name
Field
Type
Field
Pos.
Field
Len.
NUMERIC
1
1
length
TAGVALUE
2
1
uaddr
TAGVALUE
3
2
NUMERIC
4
1
reply
TAGVALUE
5
1
error
TAGVALUE
6
1
cksum
TAGVALUE
7
2
Bit
Pos....
FactoryLink 6.6.0 / Device Interface Guide / 331
External Device
Interface
Tag Name...
Command/Response
•
GENERAL PURPOSE INTERFACE
•
GPI Configuration
•
•
Table 13-0 INCOMING_RSP: Tag Name through Bit Pos. (Continued)
Field
Tag Name
Field
Type
Field
Pos.
Field
Len.
Bit
Pos....
RESP_ID
astring
STAT_TAG
mstring
STAT_TAG
Table 13-0 INCOMING_RSP: Process Function through Arg.
Process Function
Tag Name...
...Process
Function
length
uaddr
reply
error
cksum
astring
mstring
332 / FactoryLink 6.6.0 / Device Interface Guide
Range
Arg....
Fld#
Fld#
GENERAL PURPOSE INTERFACE
GPI Configuration
Table 13-0 INCOMING_RSP: Conversion Function through Response LN, POS, TM
13
Conversion Function
...Conversion
Function
Format
String
Response
ID
Response
LN, POS, TM...
length
uaddr
HI-LOW16
reply
error
cksum
HI-LOW16
astring
mstring
Table 13-0 INCOMING_RSP: Response Packets through Comment
Response
Tag Name...
...Response
Packets
Command/Response
Constant
Numeric
170
Constant
String
Comment
Hex AA
length
Length
uaddr
Unit Address
0
reply
Place Holder
(Delimiter)
Reply Code
FactoryLink 6.6.0 / Device Interface Guide / 333
External Device
Interface
Tag Name...
Response
•
GENERAL PURPOSE INTERFACE
•
GPI Configuration
•
•
Table 13-0 INCOMING_RSP: Response Packets through Comment (Continued)
Response
Tag Name...
...Response
Packets
Command/Response
Constant
Numeric
Constant
String
Comment
error
Error Code
cksum
Error Checking
Response ID
astring
Analog Status
Tag
mstring
Analog Status
Tag
Defining the Outgoing Message to the GPI
The field entries described below are for the sample GPI configuration:
1
One-byte numeric constant with a value of 170 (Hex AA).
2
Size equals the length of the entire outgoing message except for
the first byte (Hex AA). The process function LEN calculates the
number of bytes in Fields 2 - 13 (inclusive). Use the result of the
calculation as the value of the second field of the outgoing
message.
3, 4, 5, 6
One-byte numeric types whose values you know at configuration:
enter their corresponding values in the Constant Numeric
column.
7
The length of the string to be displayed on the device plus the
number of control bytes. Three control bytes occupy fields 8, 9,
and 10. The LEN process function calculates the number of bytes
of fields 7 - 11 (inclusive). The result is the value of Byte 7.
334 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
GPI Configuration
8, 9, 10
This example defines the digital elements in the following
manner:
The FactoryLink application links three digital elements—
CB1_0, CB1_4, and CB1_6—to bits 1, 5, and 7 of field 8 (control
byte 1).
The FactoryLink links two digital elements—CB2_4 and CB2_6—
to bits 5 and 7 of Field 9 (control byte 2). (Field 7 in this example
is the second control byte for the PMD 300 protocol.)
The FactoryLink application links seven digital elements—cb3_0,
CB3_1, CB3_2, CB3_3, CB3_4, CB3_5, and CB3_6—to field 3
(control byte 3).
11
12, 13
TAGVALUE. The FactoryLink message element SCRLMSG,
which is 56 bytes long and linked to field 11, contains the string
that the PMD 300 will display on screen.
Process functions that calculate the checksum using the PMD 300
protocol. Field 12 is the exclusive-or (XOR) of all the bytes from
fields 2 - 11 (inclusive); therefore, use process function XOR on
this range of fields. Field 13 is the one's complement of the
previous field.
The following three entries for the sample GPI configuration do
not require field positions:
RESP_ID
The unique response ID is 111.
RESP_VAR
Single packet response; length is the second byte of the response
data.
STAT_TAG
FactoryLink message element STAT_MSG and analog element
STAT_ANA.
FactoryLink 6.6.0 / Device Interface Guide / 335
13
External Device
Interface
These are control bytes. The PMD 300 customizes the string
displayed on its screen using the value of these control bytes. The
FactoryLink application controls the PMD device’s capabilities by
linking various digital elements (up to eight per byte) to
individual bits of these control bytes. This provides much
flexibility at the application level.
•
GENERAL PURPOSE INTERFACE
•
GPI Configuration
•
•
Defining Response Termination and Status Elements
The PMD 300 example illustrates how to define response termination and status
elements. The GPI protocol module then relays this status/error information
about the outgoing message which is transmitted to the device.
In the Field Type column of the PMD 300 GPI Command/Response table, the
single-packet response, SNGL_RSP, specifies a variable-length response.
According to the PMD 300 protocol, the second byte of the response specifies the
length of the response. For the GPI protocol module to detect the end-of-response,
enter a 2 (for the second byte) in the Response LN, POS, TM column. The number
of bytes in the response begins with third byte.
In the Response Packet column, the single-packet response SNGL_RSP is an
example of a common response.
The next line in the table matches the response to the response format required by
the outgoing message with the unique response ID, 111.
The last two lines of the table define FactoryLink analog and message elements.
This allows the GPI protocol module to report the status of the outgoing message
to the FactoryLink application.
336 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
GPI Configuration
Defining the Incoming Response to the GPI
The following field entries describe the sample GPI configuration:
One-byte numeric constant with a value of 170 (hexadecimal
value AA)
2
One-byte length of the incoming message stored in a FactoryLink
analog element
3
Two-byte unit address received in HILOW format
4
One-byte numeric place holder (delimiter)
5
One-byte reply code that will be stored in a FactoryLink analog
element
6
One-byte error code that will be stored in a FactoryLink analog
element
7
Two-byte checksum received in HILOW format that will be stored
in a FactoryLink analog element
The following entries do not require field positions:
RESP_ID
STAT_TAG
The unique response ID is 111
FactoryLink elements ASTRING and MSTRING
FactoryLink 6.6.0 / Device Interface Guide / 337
External Device
Interface
1
13
•
GENERAL PURPOSE INTERFACE
•
Using Process Functions
•
•
U SING P ROCESS F UNCTIONS
This section contains information about the process functions to use with the GPI
protocol module.
Depending on their functionality, process functions perform various operations on
entries in the GPI tables. To produce the desired value, you enter a specific
process function in the FLD# and Arg columns.
Note
For the Field Type PROCESS, the Field Length can only be 1 or 2
bytes. Also, if a PROCESS FUNCTION has entries in the FLD# or
Arg columns, then, depending on the value specified in the Field
Length, it is a “char” (1-byte) or a “short” (2-bytes).
Process Functions Table
The table below describes operations of each process function:
Table 13-0 Process Function Operations
Name
Use
Description
ADD
ADD Arg
ADDS the value given in Arg to the
present value of the current field.
AM
AM Arg
AND MASKS (AM) the value of the
current field with the value in Arg.
AND
AND, FLD#
Bit-wise AND operation on FLD#.
CRCCCITT
CRCCCITT FLD#, Arg
Computes the CRC of the specified
range using a CRC_SEED=0x1021
(inclusive). Uses Arg to set the initial
value.
CRCCC_RV
CRCCC_RV FLD#, Arg Computes the CRC of the specified
range using a CRC_SEED=0x8408
(inclusive). Uses Arg to set the initial
value.
338 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
Using Process Functions
Table 13-0 Process Function Operations (Continued)
13
Name
Use
Description
CRC16 FLD#, Arg
Computes the CRC of the specified
range using a CRC_SEED=0x8005
(inclusive). Uses Arg to set the initial
value.
CRC16_RV
CRC16_RV FLD#, Arg
Computes the CRC of the specified
range using a CRC_SEED=0xA001
(inclusive). Uses Arg to set the initial
value.
MOD256
MOD256, FLD#, Arg
Computes Modulo 256 checksum; uses
Arg to set the initial value.
EM
EM Arg
Exclusive-or the value of the current
field with the value in Arg.
EOR
EOR, FLD#
Bit-wise EXCLUSIVE-OR operation on
FLD#.
LEN
LEN, FLD#
Computes the LENGTH in bytes of a
range of fields in a message starting
with number in the first FLD# through
the second FLD#, inclusive.
Substitutes the result for the current
field.
OM
OM Arg
OR MASKS (OM) the value of the
current field with the value in Arg.
ONESCOMP
ONESCOMP FLD#
Puts the ONE’S COMPLEMENT of
FLD# notice current field.
(ONESCOMP is the same as negation.)
TWOSCOMP
FLD#
Puts the TWO’S COMPLEMENT of
FLD# into the current field.
OR
OR, FLD#
Bit-wise OR operation on FLD#.
SL
SL Arg
SHIFTS LEFT (SL) the value of the
current field Arg number of times.
FactoryLink 6.6.0 / Device Interface Guide / 339
External Device
Interface
CRC16
•
GENERAL PURPOSE INTERFACE
•
Using Process Functions
•
•
Table 13-0 Process Function Operations (Continued)
Name
Use
Description
SR
R Arg
SHIFTS RIGHT (SR) the value of the
current field Arg number of times.
SUB
SUB Arg
SUBtracts the value given in Arg from
the present value of the current field.
SWAP
SWAP
SWAPs the two consecutive bytes in
the current field.
XOR
XOR, FLD#
Computes the EXCLUSIVE-Or of the
range of bytes between FLD#,
inclusive, and substitutes the result for
the current field.
340 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
Using Conversion Functions
U SING C ONVERSION F UNCTIONS
13
The contents of a field in an outgoing message can come from a two sources:
• At run time, from a FactoryLink real-time database element
Before substituting these values in the field, you can convert them to some other
type of value. For example, the binary value of a field whose source is a
FactoryLink element can be converted to ASCII before transmission. When
parsing the incoming message or returning values to the FactoryLink elements, it
is possible to perform similar conversions.
The table below shows various conversion functions to use with the GPI protocol
module:
Table 13-0 GPI Protocol Conversion Functions
Name
A_TO_FL
Description
When parsing the response used to convert ASCII numerals to
the appropriate FactoryLink data type, the GPI uses ANSI C
standard functions to convert ASCII numerals to appropriate
FactoryLink data types as follows:
GPI Conversion
Function Name:
ANSI C
Function:
FactoryLink
Data Type:
A_TO_FL
atoi( )
ANALOG
A_TO_FL
atol( )
LONGANA
A_TO_FL
atof( )
FLOAT
ASCII
Converts like %s format
BCD
Binary Coded Decimal
BINARY
Base 2
DECASC
Converts like %0d format
DECIMAL
Base 10
HEX
Base 16
FactoryLink 6.6.0 / Device Interface Guide / 341
External Device
Interface
• During configuration, from a constant
•
GENERAL PURPOSE INTERFACE
•
Using Conversion Functions
•
•
Table 13-0 GPI Protocol Conversion Functions (Continued)
Name
Description
HEXASC
Converts like %0x format
HILOW16
Converts to a 2-byte MSB LSB
HILOW32
Converts to a 4-byte MSW LSW
IEEEHL4
Converts to a 4-byte IEEE MSW LSW
IEEELH4
Converts to a 4-byte IEEE LSW MSW
IEEEHL8
Converts to an 8-byte IEEE MSDW LSDW
IEEELH8
Converts to an 8-byte IEEE LSDW MSDW
LOWHI16
Converts to a 2-byte LSB MSB
LOWHI32
Converts to a 4-byte LSW MSW
MBUSFLOT
Converts to a Modicon float format
where:
LSB is the least-significant byte.
MSB is the most-significant byte.
LSW is the least-significant word.
MSW is the most-significant word.
LSDW is the least-significant double word.
MSDW is the most-significant double word.
Word is a 2-byte entity.
Double Word is a 4-byte entity.
NONE
No conversion necessary
OCTASC
Converts like %0 format
342 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
Using Conversion Functions
Table 13-0 GPI Protocol Conversion Functions (Continued)
13
Name
Converts according to the explicit format given in the Format
String column; the TSPRINTF function is a “tiny” sprintf( ) that
handles %s, %d, %u, %x, %0, %lu, %lx, %lX, %l0, and %%. It
recognizes width and pad specifications (%3d, %03d, etc.), long
values, and left or right justification. Is tiny sprintf() correct?
Note: Because the TSPRINTF function does not recognize floating point formats
(%e, %f, %g) and minimum widths, use it with FactoryLink Analog, Longana,
and Message types with the appropriate format string.
FactoryLink 6.6.0 / Device Interface Guide / 343
External Device
Interface
TSPRINTF
Description
•
GENERAL PURPOSE INTERFACE
•
Sample Protocols
•
•
S AMPLE P ROTOCOLS
This section provides sample protocols that illustrate the format of various
messages and responses. Use these as examples of protocols and not in your
specific application.
Response Protocols
Table 13-0 Sample Outgoing Message, Request Protocol
Field 1
Field 2
Field 3
Field 4
Field 5
Field 6
Field 7
@
0001
xxxx
xxxx
FCS
*
CR
Field 1
(1 byte) Preamble
Constant value
Field 2
(2 byte) PLC device address
Constant value
Field 3
(2 byte) Response chars
Constant value or FactoryLink analog element
Field 4
(2 byte) Response header charsd
Constant value or FactoryLink analog element
Field 5
(2 byte) Frame check sequence
PROCESS
Field 6
(1 byte) Command terminator
Constant value
Field 7
(1 byte) Postamble
Constant value
RESP_ID
RESP_STR
101
Constant value “CR”
344 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
Sample Protocols
13
Table 13-0 Sample Incoming Response, Response Protocol
Field 2
Field 3
Field 4
Field 5
Field 6
Field 7
Field 8
#
0001
xxxx
xxxx
xxxx
FCS
*
CR
Field 1
(1 byte) Preamble
Constant value
Field 2
(2 byte) PLC device address
Constant value
Field 3
(2 byte) Response chars
FactoryLink analog element
Field 4
(2 byte) Response header chars
FactoryLink analog element
Field 5
(2 byte) Frame check sequence
FactoryLink analog, digital, or float element
Field 6
(1 byte) FCS Checksum codes
Constant value (Optional)
Field 7
(1 byte) Command terminator
Constant value (Optional)
Field 8
(1 byte) Postamble
Constant value (Optional)
RESP_ID
101
FactoryLink 6.6.0 / Device Interface Guide / 345
External Device
Interface
Field 1
•
GENERAL PURPOSE INTERFACE
•
Sample Protocols
•
•
Command Protocols
Table 13-0 Sample Outgoing Message, Request Protocol
Field 1
Field 2
Field 3
Field 4
Field 5
Field 6
Field 7
Field 8
@
0001
xxxx
xxxx
xxxx
FCS
*
CR
Field 1
(1 byte) Preamble
Constant value
Field 2
(2 byte) PLC device address
Constant value
Field 3
(2 byte) Command chars
Constant value or FactoryLink analog element
Field 4
(2 byte) Command header chars
Constant value or FactoryLink analog element
Field 5
(?-byte) Command data
FactoryLink analog, digital, or float elements
Field 6
(2 byte) Frame check sequence
Process function
Field 7
(1 byte) Command terminator
Constant value
Field 8
(1 byte) Postamble
Constant value
RESP_ID
RESP_FXD
222
Length of 11 bytes constant value
346 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
Sample Protocols
13
Table 13-0 Sample Incoming Response, Response Protocol
Field 2
Field 3
Field 4
Field 5
Field 6
Field 7
#
0001
xxxx
xxxx
FCS
*
CR
Field 1
(1 byte) Preamble
Constant value
Field 2
(2 byte) PLC device address
Constant value
Field 3
(2 byte) Response chars
FactoryLink analog element
Field 4
(2 byte) Response header chars
FactoryLink analog element
Field 5
(2 byte) Frame check sequence
Constant value (Optional)
Field 6
(1 byte) Response terminator
Constant value (Optional)
Field 7
(1 byte) Postamble
Constant value (Optional)
RESP_ID
222
FactoryLink 6.6.0 / Device Interface Guide / 347
External Device
Interface
Field 1
•
GENERAL PURPOSE INTERFACE
•
Sample Protocols
•
•
Network Response Protocols
Table 13-0 Sample Outgoing Message, Request Protocol
Field
1
Field
2
Field
3
Field
4
Field
5
Field
6
Field
7
Field
8
Field
9
Field
10
Field
11
:
xxxx
01
xx
0006
20
xx
xxxx
xxxx
xxxx
;
Field 1
(1 byte) Preamble
Constant value
Field 2
(2 byte) Length of network command
Constant value
Field 3
(1 byte) Network send data command
Constant value
Field 4
(1 byte) Secondary network address
Constant value
Field 5
(2 byte) Response length
Constant value
Field 6
(1 byte) Response code
Constant value
Field 7
(1 byte) Response memory type
Constant value
Field 8
(1 byte) # of data elements
Constant value
Field 9
(?-byte) Address of response data
Constant value
Field 10
(2 byte) Checksum codes
Process function
Field 11
(1 byte) Postamble
Constant value (Optional)
RESP_ID
RESP_STR
1
Constant string (;)
348 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
Sample Protocols
13
Table 13-0 Sample Incoming Message, Response Protocol
Field
2
Field
3
Field
4
Field
5
Field
6
Field
7
Field
8
Field
9
Field
10
Field
11
:
xxxx
01
xx
0006
20
xx
xxxx
xxxx
xxxx
;
Field 1
(1 byte) Preamble
Constant value
Field 2
(2 byte) Length of network command
Constant value
Field 3
(1 byte) Network send data command
Constant value
Field 4
(1 byte) Secondary network address
Constant value
Field 5
(2 byte) Response length
Constant value
Field 6
(1 byte) Response command code
Constant value
Field 7
(1 byte) Response memory type
Constant value
Field 8
(1 byte) # of data elements
Constant value
Field 9
(?-byte) Response data from device
FactoryLink analog, digital, or float element
Field 10
(2 byte) Checksum codes
Process function
Field 11
(1 byte) Postamble
Constant value (Optional)
RESP_ID
1
FactoryLink 6.6.0 / Device Interface Guide / 349
External Device
Interface
Field
1
•
GENERAL PURPOSE INTERFACE
•
Sample Protocols
•
•
Network Command Protocols
Table 13-0 Sample Outgoing Message, Request Protocol
Field
1
:
Field
2
xxxx
Field
3
01
Field
4
xx
Field
5
0006
Field
6
20
Field
7
xx
Field
8
xxxx
Field
9
DDDD xxxx
Field 1
(1 byte) Preamble
Constant value
Field 2
(2 byte) Length of network command
Constant value
Field 3
(1 byte) Network send data command
Constant value
Field 4
(1 byte) Secondary network address
Constant value
Field 5
(2 byte) Command length
Constant value
Field 6
(1 byte) Command code
Constant value
Field 7
(1 byte) Command memory type
Constant value
Field 8
(1 byte) # of data elements
Constant value
Field 9
(?-byte) Command data
FactoryLink analog, digital, or float element(s)
Field 10
(2 byte) Checksum codes
Process function
Field 11
(1 byte) Postamble
Constant value
RESP_ID
RESP_STR
555
Constant string (;)
350 / FactoryLink 6.6.0 / Device Interface Guide
Field
10
Field
11
;
GENERAL PURPOSE INTERFACE
Sample Protocols
13
Table 13-0 Sample Incoming Response, Response Protocol
Field
2
Field
3
Field
4
Field
5
Field
6
Field
7
Field
8
Field
9
Field
10
Field
11
Field
12
:
xxxx
01
xx
0005
xx
30
HH
EE
FF
xxxx
;
Field 1
(1 byte) Preamble
Constant value
Field 2
(2 byte) Length of network command
Constant value
Field 3
(1 byte) Network send data command
Constant value
Field 4
(1 byte) Secondary network address
Constant value
Field 5
(2 byte) Command length
Constant value
Field 6
(1 byte) Command error code
FactoryLink analog or digital element
Field 7
(1 byte) Command code
Constant value (Place holder)
Field 8
(1 byte) Attached device status
FactoryLink analog element or digital element
Field 9
(1 byte) Device auxiliary power source
FactoryLink analog or digital element
Field 10
(1 byte) NIM status code
FactoryLink analog or digital element
Field 11
(2 byte) Checksum codes
FactoryLink analog (Optional)
Field 12
(1 byte) Postamble
Constant value (Optional)
RESP_ID
555
FactoryLink 6.6.0 / Device Interface Guide / 351
External Device
Interface
Field
1
•
GENERAL PURPOSE INTERFACE
•
Run-Time Application Messages
•
•
R UN -TIME A PPLICATION M ESSAGES
During EDI run time, FactoryLink generates and displays messages for the
General Purpose Interface protocol module on the Run-Time Manager screen and,
if so configured, writes them to message or analog tags. For information about
configuring these tags, see “Configuring the Logical Station Control Panel” on
page 281 and “Configuring the Logical Station Information Panel” on page 285.
For information about the messages displayed for the EDI task and the format in
which protocol module messages are generated, see Chapter 10, “Messages and
Codes.”
GPI Error Codes
The remainder of this section describes the status/error codes written to
FactoryLink analog and message elements and defined through the STAT_TAG
feature of the GPI protocol module. The following are the formats for the GPI
error codes:
• The GPI reports a numeric code via FactoryLink analog elements.
• The GPI reports an alphanumeric description via FactoryLink message
elements.
• The GPI uses even-numbered codes as information or acknowledgment codes.
• The GPI uses odd-numbered codes as error codes.
• The GPI uses 1xx codes for making or transmitting the outgoing message.
• The GPI uses 2xx codes for parsing the response.
• The GPI uses 3xx codes for the logical port and reports them to the logical port
MSG STATUS elements. These codes apply to the operation of the logical port
(the GPI protocol module) as a whole. They are not related to the individual
transactions. At startup, the FactoryLink application checks their status.
1xx: Even-Numbered Information/Acknowledge Codes for Building/Transmitting the
Outgoing Message
Table 13-0
Analog
Message Element
100
asyndsf.c(DSF_WRITE): Start to make the cmnd
102
asyncpt(xmit) xmitED MSG SUCCESSFULLY
352 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
Run-Time Application Messages
1xx: Odd-Numbered Error Codes for Building/Transmitting the Outgoing Message
13
Table 13-0
Message Element
External Device
Interface
Analog
101
ASYNDSF.C(DSF_WRITE): cmnd length of %d exceeds
SND_BUF_LEN, FLD#%D
103
ASYNDSF.C(DSF_WRITE): Invalid FLD TYPE %d; FLD %d
105
ASYNDSF.C(DSF_WRITE): MAX_TERM_STR reached
107
ASYNDSF.C(DSF_WRITE): dsf_t_q_mail returned ERROR
109
ASYNDSF.C(GET_BUF_INX): Invalid INFO_TYPE=%D IN DIV_DEF
111
ASYNDSF.C(WRT_DO_STRING): Invld cnvr FUNC %D
STRING,fld #%d
for
113
ASYNDSF.C(WRT_DO_NUMERIC): Invld cnvr Func %d
NUMERIC, fld #%d
for
115
ASYNDSF.C(WRT_DO_PROCESS): Invld PROCESS Func %d,
#%D
117
ASYNDSF.C(WRT_DO_PROCESS): Invld cnvr FUNC%D for
PROCESS, fld #%d
119
ASYNDSF.C(WRT_DO_PROCESS): Invld PROCESS Func %d,
#%d
121
ASYNDSF.C(WRT_DO_PROCESS): Invld cnvr Func %d
PROCESS, FLD #%D
123
ASYNDSF.C(WRT_DO_PROCESS): Invld fld len%d for a
PROC_FUNC FLD #%D
125
ASYNCPT(XMIT): xmit error
FLD
fld
for
FactoryLink 6.6.0 / Device Interface Guide / 353
•
GENERAL PURPOSE INTERFACE
•
Run-Time Application Messages
•
•
2xx: Even-Numbered Informative/Acknowledge Codes for Parsing the Response
Table 13-0
Analog
Message Element
200
ASYNDSF.C(PROCESS_RESPONSE): Start to PROC RESP #%D
202
ASYNDSF.C(PROCESS_RESPONSE): MULT_RSP Completed
204
ASYNDSF.C(PROCESS_RESPONSE): ProcessED Resp ID# %d AOK
2xx: Odd-Numbered Error Codes for Parsing the Response
Table 13-0
Analog
Message Element
201
ASYNDSF.C(PROCESS_RESPONSE): RSP_BUF too short %d
203
ASYNDSF.C(PROCESS_RESPONSE): inter char time out
205
ASYNDSF.C(PROCESS_RESPONSE): RSP_TM_OUT
207
ASYNDSF.C(PROCESS_RESPONSE): RESPONSE ERROR
209
ASYNDSF.C(MATCH_RSP): Invalid DIV-DS.INFO_TYPE=%D,
RPS_ID =%D
211
ASYNDSF.C(GET_USL_BUF_INX): DLMTR FOR FLD #%D,
RSP ID #%D, not found
213
ASYNDSF.C(GET_USL_BUF_INX): End of RSP_BUF reached
INX %D, FLD #%D, RSP ID #%D
215
ASYNDSF.C(GET_USL_BUF_INX): DLMTR FOR FLD # %D,
RSP ID #%D, not found
217
ASYNDSF.C(GET_USL_BUF_INX): End of RSP_BUF
REACHED, INX%D, FLD #%D, RSP ID #%D
219
ASYNDSF.C(RD_DO_TAGVALUE): Fld. Len. Exceeded 255;
RESP #%D
354 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
Run-Time Application Messages
Table 13-0 (Continued)
13
Analog
Message Element
ASYNDSF.C(RD_DO_TAGVALUE): Invalid CNVR for digital;
FLD# %D
223
ASYNDSF.C(RD_DO_TAGVALUE): Invalid cnvr for analog;
FLD# %D
225
ASYNDSF.C(RD_DO_TAGVALUE): Invalid cnvr for lanalog;
FLD# %D
227
ASYNDSF(RD_DO_TAGVALUE): Invalid cnvr for float; FLD#
%D
229
ASYNDSF.C(RD_DO_TAGVALUE): Invalid cnvr for MESSAGE
Tag; FLD#%D
231
ASYNDSF.C(RD_DO_TAGVALUE): Invalid fl_type%d for FLD#
%D
233
ASYNDSF.C(RD_DO_STRING): STRING; Parser failed FLD#
%D
235
ASYNDSF.C(RD_DO_NUMERIC): NUMERIC, Parser failed,
FLD# %D
237
ASYNDSF.C(RD_DO_RAWVALUE): Fld. Len. Exceeded 255;
Resp #%d
239
ASYNDSF.C(RD_DO_RAWVALUE): Invalid cnvr for MESSAGE
Tag fld#%d
241
ASYNDSF.C(RD_DO_RAWVALUE): Invalid FL_TYPE %d for
RAWVALUE
243
ASYNDSF.C(PROCESS_RESPONSE): USL_TM_OUT
FactoryLink 6.6.0 / Device Interface Guide / 355
External Device
Interface
221
•
GENERAL PURPOSE INTERFACE
•
Run-Time Application Messages
•
•
3xx: Even-Numbered Informative/Acknowledge Codes for the Logical Port
Table 13-0
Analog
Message Element
302
ASYNDSF.C(ALLOC_MEM_ON_ARTIC): AllocED %d bytes on
ARTIC for SND bufr
304
ASYNDSF.C(ALLOC_MEM_ON_ARTIC): AllocED %d bytes on Artic
for RCV BUFR
306
ASYNDSF.C(ALLOC_MEM_ON_SU): ALLOCED %D bytes for SND
BUFR
308
ASYNDSF.C(ALLOC_MEM_ON_SU): ALLOCED %D bytes for RCV
BUFR
310
ASYNDSF.C(FREE_MEM_ON_SU): freed mem for send and RCV
BUFRS
314
ASYNDSF.C (DSF_START): PORT_SETUP_AOK
3xx: Odd-Numbered Error Codes for the Logical Port
Table 13-0
Analog
Message Element
301
ASYNDSF.C(ALLOC_MEM_ON_ARTIC): Unable to alloc mem
on Artic for SND BUFR %D bytes
303
ASYNDSF.C(ALLOC_MEM_ON_ARTIC): Unable to alloc mem
on ARTIC for RCV BUFR %D bytes
305
ASYNDSF.C(ALLOC_MEM_ON_SU): Unable to alloc mem for
SND BUFR
307
ASYNDSF.C(ALLOC_MEM_ON_SU): Unable to alloc mem for
RCV BUFR
311
ASYNCPT.C(CPT_START): Protection bit failure (ASYNCPT)
313
ASYNCPT.C(CPT_START): PORT_SETUP failed%04Xh
356 / FactoryLink 6.6.0 / Device Interface Guide
GENERAL PURPOSE INTERFACE
Run-Time Application Messages
Table 13-0 (Continued)
13
Analog
Message Element
ASYNCPT.C(CPT_TSLICE): unknown state: %d
317
ASYNCPT.C(XMIT): xmit error
319
ASYNCPT.C(XMIT): CPT_SND_USL returned: %04XH
321
ASYNCPT.C(XMIT): INVALID PKT_TYPE: %04XH
323
ASYNCPT.C(RCV_CK_RSP_TM): receive character error
%04XH
325
ASYNCPT.C(RCV_CK_RSP_TM): USL_TM_OUT error
327
ASYNCPT.C(RCV_CK_RSP_TM): RSP_TM_OUT error
329
ASYNCPT.C(RCV_CHAR): receive character error %04Xh
331
ASYNCPT.C(RCV_CHAR): ICH_TM_OUT error
333
ASYNCPT.C(RCV_CHAR): TOTAL_TM_OUT reached
335
ASYNCPT.C(RCV_RSP_TM): TOTAL_TM_OUT reached
337
ASYNCPT.C(RCV_FINITO): CPT_SND_USL returned: %04XH
FactoryLink 6.6.0 / Device Interface Guide / 357
External Device
Interface
315
•
GENERAL PURPOSE INTERFACE
•
Run-Time Application Messages
•
•
358 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 14
Modicon Modbus
14
Note
External Device
Interface
This chapter contains information needed to set up and configure bidirectional
communications between the FactoryLink real-time database and any Modicon
Modbus PLC.
Before completing the protocol-specific Modicon Modbus
configuration panels, you must complete the External Device
Definition panel. See “Identifying Protocol Types and Defining
Logical Ports” on page 84 for details.
When you choose Modicon Modbus from the Configuration Manager Main Menu,
the Modicon Modbus configuration panels are displayed.
Modicon Modbus
FactoryLink 6.6.0 / Device Interface Guide / 359
•
MODICON MODBUS
•
Configuring the Logical Station Control Panel
•
•
C ONFIGURING
THE
L OGICAL S TATION C ONTROL P ANEL
To bring the Logical Station Control panel to the foreground, click on its title bar
in the display of all configuration panels.
Complete a row for each logical port specified in the External Device Definition
panel you want to define as a communication path for read and write operations.
Logical Port
Enter a number, defined in the External Device Definition panel
Logical Port column, to represent a particular communication path
to a Modicon Modbus device.
Valid Entry: previously defined logical port number
Baud Rate
Enter the speed at which the protocol module communicates with
the devices linked to FactoryLink via this logical port. This entry
must match the baud rate configuration of the devices. Refer to
the device manufacturer’s documentation for details.
Valid Entry: 110, 150, 300, 600, 1200, 2400, 3600, 4800, 7200,
9600, 19200 (default=9600)
Parity
Enter the parity error correction during transmission via this
logical port. This entry must match the configuration of the
devices communicating via this port. Refer to the device
manufacturer’s documentation for details.
Valid Entry: none, even, or odd (default=odd)
360 / FactoryLink 6.6.0 / Device Interface Guide
MODICON MODBUS
Configuring the Logical Station Control Panel
Data Bits
Enter the number of data bits used during transmission via this
logical port. This entry must match the configuration of the
devices communicating via this port. Refer to the device
manufacturer’s documentation for details.
Stop Bits
Enter the number of bits sent after a character to create a pause
before the start of the next character. This entry must match the
configuration of the devices communicating via this port. Refer to
the device manufacturer’s documentation for details.
Valid Entry: 1, 2 (default=1)
Timeout
Enter the length of time, in tenths of a second, the protocol
module will wait to receive a response to a read or write command
before timing out. You must enter a value greater than 0 for the
protocol module to timeout.
External Device
Interface
Valid Entry: 7, 8 (default=8)
14
Valid Entry: 1 - 32000 (default=30)
RTU ASCII
Enter the communication mode for this logical port.
Valid Entry: RTU, ASCII (default=RTU)
Message Tag
Enter a tag name for a message element to which a text string
will be written to indicate a communications error associated
with this logical port.
Valid Entry: standard element tag name
Valid Data Type: message
When the panel is complete, click on Enter to validate the information. Define the
data type (message) for any tag names displayed in the Tag Definition dialog.
Modicon Modbus
FactoryLink 6.6.0 / Device Interface Guide / 361
•
MODICON MODBUS
•
Configuring the Logical Station Information Panel
•
•
C ONFIGURING
THE
L OGICAL S TATION I NFORMATION P ANEL
From the Logical Station Control panel, select the row for the logical port you are
configuring and click on Next to bring the Logical Station Information panel to the
foreground.
Complete a row for each device to communicate through this logical port.
Error/Status Tag
Name
(Optional) Enter a tag name for an analog element in which to
store communications error codes associated with this device
(logical station).
You can animate output-text objects to display the codes stored in
an Error/Status Tag Name element on a graphics screen. Refer to
the Application Editor for more information.
Valid Entry: standard element tag name
Valid Data Type: analog
362 / FactoryLink 6.6.0 / Device Interface Guide
MODICON MODBUS
Configuring the Logical Station Information Panel
Logical Station
You will later enter this logical station number in a read or write
table to represent the device defined in this row. In a read or
write table, this number will identify the device to or from which
data is to be sent or received.
Valid Entry: 0 - 999
Device Type
Enter the type of Modicon device represented by this entry. The
following table lists the valid entries and their variations. You
can specify any of the valid entry variations in this field.
Valid Entry
14
External Device
Interface
Enter a number to identify the logical station to which the
information in this row pertains. A logical station represents the
combination of a logical port with a physical station. Assign a
unique number to each device communicating through this
logical port.
Variation
184
184, 1, or 18
384
384, 3, or 38
484
484, 4, or 48
584
584, 5, or 58
884
884, 8, or 88
984
984, 9, or 98
984BITWRITE
984-BW
(Used for mask writes)
M84 (Micro84)
Enter the physical address of the Modicon device represented by
this entry.
Valid Entry: 1 - 24 (default=1)
Comment
(Optional) Enter reference information about this logical station.
Valid Entry: 1 - 31
When the panel is complete, click on Enter to validate the information. Define the
data type (analog) for any tag names displayed in the Tag Definition dialog.
FactoryLink 6.6.0 / Device Interface Guide / 363
Modicon Modbus
Station Address
M84, M, or M8
•
MODICON MODBUS
•
Configuring the Read/Write Control Panel
•
•
C ONFIGURING
THE
R EAD /WRITE C ONTROL P ANEL
To bring the Read/Write Control panel to the foreground, click on its title bar in
the display of all configuration panels or click on Next from the Logical Station
Information panel.
A read or write table should not contain more than the maximum number of
contiguous registers allowed for a single message accessing a type of register. The
maximum number allowed varies from one register type to the next.
If more than the maximum number of contiguous register addresses are defined,
multiple messages are generated for the operation. For example, if a block read
table for a holding register contains entries that access contiguous addresses from
100 to 127, two messages are generated. The first message reads the first 125
addresses (addresses 100 to 124). The second message reads addresses 125
through 127.
The following table lists the maximum number of contiguous registers included in
a single block read or write message for each supported register type.
364 / FactoryLink 6.6.0 / Device Interface Guide
MODICON MODBUS
Configuring the Read/Write Control Panel
Table 14-1 Maximum Contiguous Registers in a Single Message
14
Type of
Register
Holding
Input Status
Input
184, 384
800
800
484
512
800
584, 884, 984
2000
800
M84
64
64
184, 384
100
100
484
254
60
584, 884, 984
125
100
M84
32
32
184, 384
800
484
512
584, 884, 984
2000
M84
64
184, 384
100
484
32
584, 884, 984
125
M84
4
100
100
FactoryLink 6.6.0 / Device Interface Guide / 365
Modicon Modbus
Memory
Maximum Number Maximum Number
For Block Read
For Block Write
External Device
Interface
Coil
Modicon Model
Number
•
MODICON MODBUS
•
Configuring the Read/Write Control Panel
•
•
Complete a row for each read or write table.
Tip
Refer to Chapter 8, “Application Design Tips and Techniques,” for
information about triggering schemes using elements defined in
this panel.
Table Name
Give this read or write request a name. Define one request (table)
per line and do not include spaces in the name. You can define as
many tables in this panel as available memory allows. Try to
make the table name reflective of the operation it represents.
If this is a triggered read or a block write table, when the trigger
element (Block Read Trigger for a read operation or Block Write
Trigger for a write operation) is forced to 1 (ON), the element
prompts FactoryLink to process this table and any other table in
which the same trigger is defined.
Valid Entry: alphanumeric string of up to 16 characters
Exception Write
For EDI to interpret this operation as a triggered block write or
as a read operation, accept the default of NO.
For EDI to interpret this operation as an exception write and
write element values to the device only when those values
change, enter YES.
In an exception write, an internal change-status indicator within
the element containing the data to be written prompts the write
operation. If an element is configured for an exception write and
EDI recognizes this indicator has been set since the last scan of
the real-time database (indicating the value of the element has
changed), EDI writes this element’s value to the device.
Tip
Do not specify elements expected to change at frequent and
unpredictable intervals in an exception write table. Any element
specified will be written to the device in its own packet (message)
each time it changes. Defining elements that change value
frequently as exception writes can slow down communications or
result in an error message.
366 / FactoryLink 6.6.0 / Device Interface Guide
MODICON MODBUS
Configuring the Read/Write Control Panel
Block Read Priority
If this is a write operation, accept the default of 1. This field
defaults to 1 regardless of whether the operation being defined is
a block read.
Valid Entry: 1 - 4 (default=1)
Note
14
External Device
Interface
If this is a block read operation, enter a number to indicate the
priority of this table, relative to other read operations. The
highest priority is 1. This number influences the order in which
the EDI task handles the queuing of block read requests. If EDI
receives two requests at the same time, it processes the request
with the highest priority first. The default is 1.
The Block Read Trigger, Block Read Disable, Block Read Complete, and
Block Read State elements apply only to triggered read operations.
Do not define these elements for write operations.
Block Read Trigger
If this is a write operation, ignore this field.
If this is a triggered read operation, this field is required. Enter a
tag name for a digital element to initiate a block read of the
addresses specified in the Read/Write Information panel. When
this element’s value is forced to 1 (ON), the addresses are read.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Read
Disable
If this is a write operation, ignore this field.
FactoryLink 6.6.0 / Device Interface Guide / 367
Modicon Modbus
If this is a triggered read operation, this field is optional. If you
need a digital element to disable a block read of the elements
specified in this table, enter a tag name. When this tag’s value is
forced to 1 (ON), the read operation is not executed, even when
the block read trigger is set to 1.
•
MODICON MODBUS
•
Configuring the Read/Write Control Panel
•
•
To re-enable a block read table that has been disabled, set this
element back to 0 (OFF).
Tip
This element can be used to disable a block read operation that is
either part of a cascaded loop or is self-triggered. The triggering
cycle will cease upon disabling, however. To re-enable a cascaded
loop or a self-triggered read table, the Block Read Trigger element
must be toggled or forced to 1. Refer to Chapter 8, “Application
Design Tips and Techniques,” for further details.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Read
Complete
If this is a write operation, ignore this field.
If this is a triggered read operation, this field is optional. If you
need a digital element to indicate when this operation is
complete, enter a tag name. This element is forced to 1 (ON) at
startup. After the elements defined in the Read/Write
Information panel have been updated in the FactoryLink
database, the complete element is forced to 1 again.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Read State
If this is a write operation, ignore this field.
If this is a triggered read operation, this field is optional. If you
need a digital element to indicate the state of this operation (in
progress or complete), enter a tag name. This element is forced to
1 (ON) at startup. While the table is being processed, the element
is set to 0 (OFF). After the elements defined in the Read/Write
Information panel have been updated in the FactoryLink
database, the state element is forced back to 1.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write Priority
If this is a block or exception write operation, enter a number to
indicate the priority of this table, relative to other write
operations. The highest priority is 1. This number influences the
368 / FactoryLink 6.6.0 / Device Interface Guide
MODICON MODBUS
Configuring the Read/Write Control Panel
order in which the EDI task handles the queuing of write
requests. If EDI receives two requests at the same time, it
processes the request with the highest priority first. The default
is 1.
Valid Entry: 1 - 4 (default=1)
Note
The Block Write Trigger, Block Write Disable, Block Write Complete, and
Block Write State elements apply only to write operations. Do not
define these elements for read operations.
Block Write Trigger
External Device
Interface
If this is a read operation, accept the default of 1. This field
defaults to 1 regardless of whether the operation being defined is
a block or exception write.
14
If this is a read operation or an exception write operation you do
not plan to periodically disable, ignore this field.
If this is a block write table or an exception write table you plan
to periodically disable, this field is required. Enter a tag name for
a digital element to initiate a block write of the element values
specified in the Read/Write Information panel to the addresses
defined to receive the values. When this element’s value is forced
to 1 (ON), FactoryLink writes the values.
Valid Entry: standard element tag name
Valid Data Type: digital
Tip
Block Write
Disable
If this is a read operation or an exception write operation you do
not plan to periodically disable, ignore this field.
FactoryLink 6.6.0 / Device Interface Guide / 369
Modicon Modbus
The Block Write Disable element can be used to disable a block write
operation that is either part of a cascaded loop or is self-triggered.
The triggering cycle will cease upon disabling, however. To
re-enable a cascaded loop or a self-triggered write table, the Block
Write Trigger element must be toggled or forced to 1. Refer to
Chapter 8, “Application Design Tips and Techniques,” for details.
•
MODICON MODBUS
•
Configuring the Read/Write Control Panel
•
•
If this is a block write table or an exception write table you plan
to periodically disable, this field is optional. Enter a tag name for
a digital element to disable a block write to the addresses
specified in this table. When this tag’s value is forced to 1 (ON),
the write operation is not executed, even when the block write
trigger is set to 1.
To re-enable a block write table that has been disabled, set this
element back to 0 (OFF).
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write
Complete
If this is a read or exception write operation, ignore this field.
If this is a block write operation, this field is optional. If you need
a digital element to indicate when this operation is complete,
enter a tag name. This element is forced to 1 (ON) at startup.
After the data defined in this table’s Read/Write Information
panel has been written to the device, the complete element is
forced to 1 again.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write State
If this is a read or exception write operation, ignore this field.
If this is a block write operation, this field is optional. If you need
a digital element to indicate the state of this operation (in
progress or complete), enter a tag name. This element is forced to
1 (ON) at startup. While the table is being processed, the element
is set to 0 (OFF). After the data defined in this table’s Read/Write
Information panel has been written to the device, the state
element is forced back to 1.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
When the panel is complete, click on Enter to validate the information. Define the
data type (digital) for any tag names displayed in the Tag Definition dialog.
370 / FactoryLink 6.6.0 / Device Interface Guide
MODICON MODBUS
Configuring the Read/Write Information Panel
C ONFIGURING
THE
R EAD /WRITE I NFORMATION P ANEL
14
External Device
Interface
From the Read/Write Control panel, select the row for the table you are
configuring and click on Next to bring the Read/Write Information panel to the
foreground.
For a Read Table—Add a panel entry for each FactoryLink database element in
which data read from the device will be stored when the operation executes.
For a Write Table—Add a panel entry for each element to be written when the
operation executes.
Tip
Tag Name
For a read table, specify a tag name for an element in which
FactoryLink will store the data read from the device.
FactoryLink 6.6.0 / Device Interface Guide / 371
Modicon Modbus
Alternatively, the elements you define in the Read/Write
Information panel can be configured in the Tag Definition dialog in
the Application Editor. Refer to the Application Editor for details.
•
MODICON MODBUS
•
Configuring the Read/Write Information Panel
•
•
For a write table, specify a tag name for an element containing a
value to be written to the device.
Tag Type
Logical Station
Element Description
Valid for
Register
Types:
Analog
A tag that stores a signed 16-bit
integer with a value range between
-32,768 and +32,767
HREG
IREG
XMEMnn
Digital
A tag that stores a binary that
indicates either a set (1) or unset (0)
bit
COIL
HREG
INP
IREG
Float
A tag that stores a floating-point
integer with a value that can range
up to 31 places to the right side of the
decimal point
HREG
Longana
A tag that stores a signed 32-bit
integer with a value range between +
or - 2 billion
HREG
Message
A tag that stores ASCII text
HREG
Enter the number representing the device from which the data is
to be read or to which the element’s value will be written. This
number was originally defined in the Logical Station Information
panel for the logical port through which communications with
this device occurs.
Valid Entry: previously defined logical station number
Reg Address
Enter the register address in Modicon memory where this
element’s value is located. The format of a register address is:
paaaaa
where
p Address prefix that identifies the Modicon register
type
372 / FactoryLink 6.6.0 / Device Interface Guide
MODICON MODBUS
Configuring the Read/Write Information Panel
aaaaa Actual address of the register
For example, for holding register address 400001, enter 1. The 4
indicates the register type, and the leading zeros are not
necessary.
If you are defining an address for floating-point or long analog tag
types, keep in mind that these tag types are addressed in pairs.
The first register in the pair contains the high-order word; the
second register contains the low-order word.
14
External Device
Interface
When defining register addresses, do not include the address
prefix or leading zeros. The prefix indicates the register type, and
this information is specified in the Data Type field of this panel.
The leading zeros are extraneous.
Enter the address for the starting register in a register pair; the
companion register is implied.
Try to maintain consistency when using register addresses for
floating-point and long analog FactoryLink data types. Adopt
either an odd or even starting register sequence and maintain
that sequence. For example:
1, 3, 5, 7, 9, ...
or
2, 4, 6, 8, 10, ...
If you are defining an address for a message tag type, the
address specifies the first in a group of registers that contain the
message characters. The message length is specified in the Bit
Offset/MSG Length field.
If you are reading or writing to extended memory, a block
read, block write, or exception write operation may read or write
multiple register addresses for the same register file.
Modicon Modbus
FactoryLink 6.6.0 / Device Interface Guide / 373
•
MODICON MODBUS
•
Configuring the Read/Write Information Panel
•
•
Bit Offset/MSG
Length
This field is required for digital data type. If the element (entry in
the Tag Name column) associated with this entry is digital, enter
the bit offset within the word that contains the value to be read or
to which the element value is to be written. Bit 1 is the most
significant bit (MSB) and bit 16 is the least significant bit.
Leave this field blank for all other FactoryLink data types.
For digital tags that reference an address in memory from
a holding register or input register (see Data Type field
description), this is the bit offset between 1 and 16 within a
register word that contains the value of the element. When
defining this offset, follow Modicon’s convention for bit ordering,
where bit 1 is the most significant bit (MSB) and bit 16 is the
least significant bit (LSB).
MSB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
LSB
16
For digital tags that reference mask write functions, use
this field to indicate which bit between 1 and 16 will change in
the register as a result of a mask write command. You can only
address one bit per tag entry.
For message tags, this is the number of bytes in the device’s
memory, between 1 and 80, containing the message. This number
of bytes, starting from the location specified in the Address field of
this panel, is read into the message tag as raw binary data. The
FactoryLink Modbus Plus protocol module does not perform
verification on these bytes to see if they are printable ASCII.
Valid Entry: 1 - 16 if data type is digital
Data Type
Specify the type of data being read from or written to the device
for each element defined in the Tag Name field.
Data Type
COIL
Valid Operations
Block read operations read current value of the
element.
Block write and exception write operations are
used to force the state of coils to either on or
off.
374 / FactoryLink 6.6.0 / Device Interface Guide
MODICON MODBUS
Configuring the Read/Write Information Panel
Data Type
HREG
Valid Operations
Block write and exception write operations are
used to set the contents of a holding register.
INP
Block read operations read the ON/OFF status
of discrete inputs. Input is stored in a
controller as bits. Each bit has an address.
IREG
Block read operations are used to read the
binary contents of an input register.
MASK
Exception write operations are used to set or
clear bits within a holding register. The
current state of the digital tag determines the
ON/OFF setting of the bit within the holding
register. To set a bit within the holding
register, the digital tag must be set to 1(ON)
and to clear a bit, it must be set to 0 (OFF).
XMEMnn
Block read operations read the contents of
extended memory.
External Device
Interface
Block read operations are used to get contents
of a holding register.
14
Block write and exception write operations
write to extended memory.
When the panel is complete, click on Enter to validate the information. Define the
data type (digital, analog, long analog, or floating-point) for any tag names
displayed in the Tag Definition dialog.
Modicon Modbus
FactoryLink 6.6.0 / Device Interface Guide / 375
•
MODICON MODBUS
•
Run-Time Application Messages
•
•
R UN -TIME A PPLICATION M ESSAGES
During EDI run time, FactoryLink generates and displays messages for the
Modicon Modbus protocol module on the Run-Time Manager screen and, if so
configured, writes them to message or analog tags. For information about
configuring a message tag, see “Configuring the Logical Station Control Panel” on
page 360. For information about configuring an analog tag, see “Configuring the
Logical Station Information Panel” on page 362.
For information about the messages displayed for the EDI task, see Chapter 10,
“Messages and Codes.”
Run-Time Manager Codes
The following error codes can appear in messages displayed on the Run-Time
Manager screen. The first number refers to the hexadecimal code; the second
number is its decimal equivalent.
1 (Decimal equivalent: 1)
Cause:
Unknown I/O state.
Action:
Verify the device configuration and cabling. The FactoryLink
configuration tables must contain the proper station addresses
and parameters. The Logical Station Control panel must contain
the proper baud rate, parity, and data format parameters.
2 (Decimal equivalent: 2)
Cause:
I/O error in transmitting or receiving data.
Action:
Refer to the previous description of code 1.
3 (Decimal equivalent: 3)
Cause:
I/O aborted because of a time-out while the protocol module is
waiting for a device response.
Action:
Refer to the description of code 1.
4 (Decimal equivalent: 4)
Cause:
I/O data translation error.
Action:
Refer to the description of code 1.
376 / FactoryLink 6.6.0 / Device Interface Guide
MODICON MODBUS
Run-Time Application Messages
15 (Decimal equivalent: 21)
Exception response—The slave cannot respond to the function
code given in the query.
Action:
Check the read and write tables and verify the data types are
valid for the destination device.
25 (Decimal equivalent: 37)
Cause:
Exception response—The data address received in the query by
the device is not valid.
Action:
Verify the register addresses in the table experiencing the error.
14
External Device
Interface
Cause:
35 (Decimal equivalent: 53)
Cause:
Exception response—An invalid data value in the query has
been detected by the device.
Action:
Depending on the data type of the table in error, verify each tag
value is valid for the specified data type.
45 (Decimal equivalent: 69)
Cause:
Exception response—The device has experienced an
unrecoverable error while executing a requested action.
Action:
Determine whether the device is in proper working order. It
might require servicing.
55 (Decimal equivalent: 85)
Exception response—The device requires a long time to carry out
the requested action.
Action:
If the ladder logic programmed into the device is inefficient, it
can result in time-consuming processing of requests. Reprogram
the device according to the manufacturer’s recommendations.
65 (Decimal equivalent: 101)
Cause:
Exception response—The device is busy carrying out a
previously requested action.
Action:
The device needs more time to finish processing the current
request before it begins processing the next one. Lessen the
frequency of requests sent to the device.
FactoryLink 6.6.0 / Device Interface Guide / 377
Modicon Modbus
Cause:
•
MODICON MODBUS
•
Run-Time Application Messages
•
•
75 (Decimal equivalent: 117)
Cause:
Exception response—The device cannot perform the program
function received in the query.
Action:
Use the Modicon diagnostic software to determine the cause of
the problem.
85 (Decimal equivalent: 113)
Cause:
Exception response—The device attempted to read extended
memory but detected a memory parity error.
Action:
Determine whether the device is in proper working order. It
might require servicing.
In Message Tags
This section describes the run-time messages as they appear in the message tags.
Modbus: Communications OK
Cause:
Normal.
Action:
None. This is only an information message.
Modbus: Exception error decimalcode on write to Lsta logical station
Cause:
An error occurred on a write request to the specified logical
station.
Action:
The specified error is the decimal equivalent of a hexadecimal
error code. For details, refer to “Run-Time Manager Codes” on
page 376.
Modbus: Exception error decimalcode on read to Lsta logical station
Cause:
An error occurred on a read request to the specified logical
station.
Action:
The specified error is the decimal equivalent of a hexadecimal
error code. For details, refer to “Run-Time Manager Codes” on
page 376.
378 / FactoryLink 6.6.0 / Device Interface Guide
MODICON MODBUS
Run-Time Application Messages
Modbus: Write error decimalcode to Lsta logical station
An error occurred on a write request to the specified logical
station.
Action:
The specified error is the decimal equivalent of a hexadecimal
error code. For details, refer to “Run-Time Manager Codes” on
page 376.
Modbus: Read error decimalcode to Lsta logical station
Cause:
An error occurred on a read request to the specified logical
station.
Action:
The specified error is the decimal equivalent of a hexadecimal
error code. For details, refer to “Run-Time Manager Codes” on
page 376.
14
External Device
Interface
Cause:
Modicon Modbus
FactoryLink 6.6.0 / Device Interface Guide / 379
•
MODICON MODBUS
•
Run-Time Application Messages
•
•
380 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 15
Modicon Modbus Plus
15
Note
Before completing the protocol-specific Modicon Modbus Plus
configuration panels, you must complete the External Device
Definition panel. See “Identifying Protocol Types and Defining
Logical Ports” on page 84 for details.
Sample panel entries are provided in Chapter 6, “Reading Data from a Device,”
and Chapter 7, “Writing Data to a Device.”
FactoryLink 6.6.0 / Device Interface Guide / 381
Modicon Modbus Plus
When you choose Modicon Modbus Plus from the Configuration Manager Main
Menu, the Modicon Modbus Plus configuration panels are displayed.
External Device
Interface
The FactoryLink EDI task allows you to configure bidirectional communications
between the FactoryLink real-time database and any Modicon Modbus Plus PLC.
•
MODICON MODBUS PLUS
•
Configuring the Logical Station Control Panel
•
•
C ONFIGURING
THE
L OGICAL S TATION C ONTROL P ANEL
To bring the Logical Station Control panel to the foreground, click on its title bar
in the display of all configuration panels.
Complete a row for each logical port specified in the External Device Definition
panel you want to define as a communication path for read and write operations.
Logical Port
Enter a number, defined in the External Device Definition panel
Logical Port column, to represent a particular communication path
to a device.
Valid Entry: previously defined logical port number
Adapter Number
Enter the number assigned to the SA85 host adapter.
In a Windows environment, follow the installation procedure
in the appropriate LNET (LocalNet Library) software manual to
set up the SA85 driver for your specific hardware system.
Configure the SA85 card as adapter 0 or 1.
In an OS/2 environment, Adapter Number must match the /n
parameter of the line for the SA85 device assignment
(MPHOST.SYS) in the CONFIG.SYS file.
Valid Entry: 0 or 1
382 / FactoryLink 6.6.0 / Device Interface Guide
MODICON MODBUS PLUS
Configuring the Logical Station Control Panel
LPORT Status
Message Tag
(Optional) Enter a tag name for a message element to which a
text string will be written to indicate a communications error
associated with this logical port.
Data Master Paths
Enter a number between 1 and 8 that defines the number of
internal master paths on the SA85 device for command/response
transactions.
Valid Entry: 1 - 8
DS1 through DS8
Specify whether or not this path can be used as a data slave (DS)
path for unsolicited data. This can be one of the following:
External Device
Interface
Valid Entry: standard element tag name
Valid Data Type: message
15
YES This path can be used as a data slave path.
NO This path cannot be used as a data slave path.
When the panel is complete, click on Enter to validate the information. Define the
data type (message) for any tag names displayed in the Tag Definition dialog.
FactoryLink 6.6.0 / Device Interface Guide / 383
Modicon Modbus Plus
These fields let you specify up to eight paths. For information
about data slave paths, refer to the Modicon Modbus Plus
Network Programming Guide.
•
MODICON MODBUS PLUS
•
Configuring the Logical Station Information Panel
•
•
C ONFIGURING
THE
L OGICAL S TATION I NFORMATION P ANEL
From the Logical Station Control panel, select the row for the logical port you are
configuring and click on Next to bring the Logical Station Information panel to the
foreground.
Complete a row for each device to communicate through this logical port.
LSTA Status
Analog Tag
(Optional) Enter a tag name for an analog element in which to
store communications error codes associated with this device
(logical station).
You can animate output-text objects to display the codes stored in
an Error/Status Tag Name element on a graphics screen. Refer to
the Application Editor for more information.
Valid Entry: standard element tag name
Valid Data Type: analog
Logical Station
Decimal
Enter a number to identify the logical station to which the
information in this row pertains. A logical station represents the
combination of a logical port with a physical station. Assign a
unique number to each device communicating through this
logical port.
384 / FactoryLink 6.6.0 / Device Interface Guide
MODICON MODBUS PLUS
Configuring the Logical Station Information Panel
You will later enter this logical station number in a read or write
table to represent the device defined in this row. In a read or
write table, this number will identify the device to or from which
data is to be sent or received.
PLC Type
Enter the type of Modicon device represented by this entry. Use
984-BITWRITE if mask write operations are supported by this
device. You can specify 984-BITWRITE for the following Modicon
models: A120, A130, A141, A145, 685E, 785E, AT4, VM4.
Valid Entry: 984 or 984-BITWRITE
Physical Station
Enter the physical address of the Modicon device represented by
this entry. Be sure this number corresponds to the actual address
setting of the device.
External Device
Interface
Valid Entry: 0 - 999 (default=0)
15
Valid Entry: 1 - 64 (default=1)
Enter a number between 1 and 64 that defines the Modbus Plus
network address of a router/bridge. Up to four routes can be
defined for each physical station.
Valid Entry: 1 - 64
Response Timeout
0.01 sec
Enter the length of time, in hundredths of a second, the protocol
module will wait to receive a response to a read or write command
before timing out. You must enter a value greater than 0 for the
protocol module to timeout.
For example, if you specify 300, timeout occurs after 3 seconds
has elapsed. If the number of retries is 3, communications
terminates in 9 seconds for that transmission attempt.
Valid Entry: 1 - 300 (default=100)
Number of Retries
Enter a number between 0 and 10 that defines the maximum
number of consecutive times a read or write command is sent
before communications between FactoryLink and the device
terminates for that transmission attempt.
Valid Entry: 0 - 10 (default=3)
FactoryLink 6.6.0 / Device Interface Guide / 385
Modicon Modbus Plus
Router 1 - Router 4
•
MODICON MODBUS PLUS
•
Configuring the Logical Station Information Panel
•
•
LSTA Failure
Digital Tag
(Optional) Enter a tag name assigned to reference a digital
element that contains the status of communication attempts for
this logical station. If the value of this element is 0 (off), the
communication attempt to this logical station was successful. If
the value of this element is 1 (on), the communication attempt to
this logical station failed. You can employ this tag to create an
alarm in the Alarm Supervisor that indicates a communication
failure.
Valid Entry: standard element tag name
Valid Data Type: digital
LSTA Failure
Message Tag
(Optional) Enter a tag name assigned to reference a message
element that contains text describing the status of
communication attempts for this logical station. This tag works in
conjunction with the LSTA Failure Digital Tag field to display a
meaningful error message for the operator on the Alarm
Supervisor screen.
Valid Entry: standard element tag name
Valid Data Type: message
Comment
(Optional) Enter reference information about this logical station.
Valid Entry: alphanumeric string of 1 to 16 characters
When the panel is complete, click on Enter to validate the information. Define the
data type (analog) for any tag names displayed in the Tag Definition dialog.
386 / FactoryLink 6.6.0 / Device Interface Guide
MODICON MODBUS PLUS
Configuring the Read/Write Control Panel
C ONFIGURING
THE
R EAD /WRITE C ONTROL P ANEL
If more than the maximum number of contiguous register addresses are defined,
multiple messages are generated for the operation. For example, if a block read
table for a holding register in a 984 device contains entries that access contiguous
addresses from 100 to 127, two messages are generated. The first message reads
the first 125 addresses (addresses 100 to 124). The second message reads
addresses 125 through 127.
The following table lists the maximum number of contiguous registers included in
a single block read or write message for each supported register type.
FactoryLink 6.6.0 / Device Interface Guide / 387
Modicon Modbus Plus
A read or write table should not contain more than the maximum number of
contiguous registers allowed for a single message accessing a type of register. The
maximum number allowed varies from one register type to the next.
15
External Device
Interface
To bring the Read/Write Control panel to the foreground, click on its title bar in
the display of all configuration panels or click on Next from the Logical Station
Information panel.
•
MODICON MODBUS PLUS
•
Configuring the Read/Write Control Panel
•
•
Table 15-1 Maximum Contiguous Registers in a Single Message
Type of
Register
Maximum Number
For Block Read
Maximum Number
For Block Write
Coil
2000
800
Holding
125
100
Global
32 global data words 32 global data words
Input Status 2000
Input
125
Mask
Exception write: 1
Statistics
Word
54 words
Memory
100
100
Complete a row for each read or write table.
Tip
Refer to Chapter 8, “Application Design Tips and Techniques,” for
information about triggering schemes using elements defined in
this panel.
Table Name
Give this read or write request a name. Define one request (table)
per line and do not include spaces in the name. You can define as
many tables in this panel as available memory allows. Try to
make the table name reflective of the operation it represents.
If this is a triggered read or a block write table, when the trigger
element (Block Read Trigger for a read operation or Block Write
Trigger for a write operation) is forced to 1 (ON), the element
prompts FactoryLink to process this table and any other table in
which the same trigger is defined.
Valid Entry: alphanumeric string of up to 16 characters
388 / FactoryLink 6.6.0 / Device Interface Guide
MODICON MODBUS PLUS
Configuring the Read/Write Control Panel
Unsolicited Read
For EDI to interpret this operation as a triggered block read or as
a write operation, accept the default of NO.
If you enter YES, the incoming data will be stored in the element
represented by the tag name specified in the Read/Write
Information panel. If the current value of the element is equal to
the new value, the change-status indicator is unaffected. If a
different value is being stored the element, however, it will
overwrite the current value and the element’s change-status
indicator will be set to 1 (ON).
15
External Device
Interface
If this is an unsolicited read operation, enter YES. EDI will
interpret this operation as an unsolicited read and emulate the
device’s addressing structure based on entries you make in the
Read/Write Information panel. The incoming data will be stored
in the real-time database as specified in this field.
Valid Entry: yes, no (default=no)
For EDI to interpret this operation as a triggered block write or
as a read operation, accept the default of NO.
For EDI to interpret this operation as an exception write and
write element values to the device only when those values
change, enter YES. Do not specify elements expected to change at
frequent and unpredictable intervals in an exception write table.
Any element specified will be written to the device in its own
packet (message) each time it changes. Defining elements that
change value frequently as exception writes can slow down
communications or result in an error message.
In an exception write, an internal change-status indicator within
the element containing the data to be written prompts the write
operation. If an element is configured for an exception write and
EDI recognizes this indicator has been set since the last scan of
the real-time database (indicating the value of the element has
changed), EDI writes this element’s value to the device.
Valid Entry: yes, no (default=no)
FactoryLink 6.6.0 / Device Interface Guide / 389
Modicon Modbus Plus
Exception Write
•
MODICON MODBUS PLUS
•
Configuring the Read/Write Control Panel
•
•
Block Read Priority
If this is a block read operation, enter a number to indicate the
priority of this table, relative to other read operations. The
highest priority is 1. This number influences the order in which
the EDI task handles the queuing of block read requests. If EDI
receives two requests at the same time, it processes the request
with the highest priority first. The default is 1.
If this is an unsolicited read or a write operation, accept the
default of 1. This field defaults to 1 regardless of whether the
operation being defined is a block read.
Valid Entry: 1 - 4 (default = 1)
Note
The Block Read Trigger, Block Read Disable, Block Read Complete, and
Block Read State elements apply only to triggered read operations.
Do not define these elements for unsolicited read operations or for
write operations.
Block Read Trigger
If this is an unsolicited read or a write operation, ignore this field.
If this is a triggered read operation, this field is required. Enter a
tag name for a digital element to initiate a block read of the
addresses specified in the Read/Write Information panel. When
this element’s value is forced to 1 (ON), the addresses are read.
Valid Entry: standard element tag name
Valid Data Type: digital
Tip
The Block Read Disable element can be used to disable a block read
operation that is either part of a cascaded loop or is self-triggered.
The triggering cycle will cease upon disabling, however. To
re-enable a cascaded loop or a self-triggered read table, the Block
Read Trigger element must be toggled or forced to 1. Refer to
Chapter 8, “Application Design Tips and Techniques,” for details.
390 / FactoryLink 6.6.0 / Device Interface Guide
MODICON MODBUS PLUS
Configuring the Read/Write Control Panel
Block Read
Disable
If this is an unsolicited read or a write operation, ignore this field.
To re-enable a block read table that has been disabled, set this
element back to 0 (OFF).
Valid Entry: standard element tag name
Valid Data Type: digital
Block Read
Complete
If this is an unsolicited read or a write operation, ignore this field.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Read State
If this is an unsolicited read or a write operation, ignore this field.
If this is a triggered read operation, this field is optional. If you
need a digital element to indicate the state of this operation (in
progress or complete), enter a tag name. This element is forced to
1 (ON) at startup. While the table is being processed, the element
is set to 0 (OFF). After the elements defined in the Read/Write
Information panel have been updated in the FactoryLink
database, the state element is forced back to 1.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write Priority
If this is a block or exception write operation, enter a number to
indicate the priority of this table, relative to other write
operations. The highest priority is 1. This number influences the
order in which the EDI task handles the queuing of write
requests. If EDI receives two requests at the same time, it
processes the request with the highest priority first. The default
is 1.
FactoryLink 6.6.0 / Device Interface Guide / 391
Modicon Modbus Plus
If this is a triggered read operation, this field is optional. If you
need a digital element to indicate when this operation is
complete, enter a tag name. This element is forced to 1 (ON) at
startup. After the elements defined in the Read/Write
Information panel have been updated in the FactoryLink
database, the complete element is forced to 1 again.
15
External Device
Interface
If this is a triggered read operation, this field is optional. If you
need a digital element to disable a block read of the elements
specified in this table, enter a tag name. When this tag’s value is
forced to 1 (ON), the read operation is not executed, even when
the block read trigger is set to 1.
•
MODICON MODBUS PLUS
•
Configuring the Read/Write Control Panel
•
•
If this is a read operation, accept the default of 1. This field
defaults to 1 regardless of whether the operation being defined is
a block or exception write.
Valid Entry: 1 - 4 (default = 1)
Note
The Block Write Trigger, Block Write Disable, Block Write Complete, and
Block Write State elements apply only to write operations. Do not
define these elements for read operations.
Block Write Trigger
If this is a read operation or an exception write operation you do
not plan to periodically disable, ignore this field.
If this is a block write table or an exception write table you plan
to periodically disable, this field is required. Enter a tag name for
a digital element to initiate a block write of the element values
specified in the Read/Write Information panel to the addresses
defined to receive the values. When this element’s value is forced
to 1 (ON), FactoryLink writes the values.
Valid Entry: standard element tag name
Valid Data Type: digital
Tip
The Block Write Disable element can be used to disable a block write
operation that is either part of a cascaded loop or is self-triggered.
The triggering cycle will cease upon disabling, however. To
re-enable a cascaded loop or a self-triggered write table, the Block
Write Trigger element must be toggled or forced to 1. Refer to
Chapter 8, “Application Design Tips and Techniques,” for details.
Block Write
Disable
If this is a read operation or an exception write operation you do
not plan to periodically disable, ignore this field.
If this is a block write table or an exception write table you plan
to periodically disable, this field is optional. Enter a tag name for
a digital element to disable a block write to the addresses
specified in this table. When this tag’s value is forced to 1 (ON),
the write operation is not executed, even when the block write
trigger is set to 1.
392 / FactoryLink 6.6.0 / Device Interface Guide
MODICON MODBUS PLUS
Configuring the Read/Write Control Panel
To re-enable a block write table that has been disabled, set this
element back to 0 (OFF).
Block Write
Complete
If this is a read or exception write operation, ignore this field.
If this is a block write table, this field is optional. If you need a
digital element to indicate when this operation is complete, enter
a tag name. This element is forced to 1 (ON) at startup. After the
data defined in this table’s Read/Write Information panel has
been written to the device, the complete element is forced to 1
again.
15
External Device
Interface
Valid Entry: standard element tag name
Valid Data Type: digital
Do not use this element when more than one logical port is
specified in a single table.
Block Write State
If this is a read or exception write operation, ignore this field.
If this is a block write operation, this field is optional. If you need
a digital element to indicate the state of this operation (in
progress or complete), enter a tag name. This element is forced to
1 (ON) at startup. While the table is being processed, the element
is set to 0 (OFF). After the data defined in this table’s Read/Write
Information panel has been written to the device, the state
element is forced back to 1.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
When the panel is complete, click on Enter to validate the information. Define the
data type (digital) for any tag names displayed in the Tag Definition dialog.
FactoryLink 6.6.0 / Device Interface Guide / 393
Modicon Modbus Plus
Valid Entry: standard element tag name
Valid Data Type: digital
•
MODICON MODBUS PLUS
•
Configuring the Read/Write Information Panel
•
•
C ONFIGURING
THE
R EAD /WRITE I NFORMATION P ANEL
From the Read/Write Control panel, select the row for the table you are
configuring and click on Next to bring the Read/Write Information panel to the
foreground.
For a Read Table—Add a panel entry for each FactoryLink database element in
which data read from the device will be stored when the operation executes.
For a Write Table—Add a panel entry for each element to be written when the
operation executes.
Tip
Alternatively, the elements you define in the Read/Write
Information panel can be configured in the Tag Definition dialog in
the Application Editor. Refer to the Application Editor for details.
394 / FactoryLink 6.6.0 / Device Interface Guide
MODICON MODBUS PLUS
Configuring the Read/Write Information Panel
Tag Name
For a read table, specify a tag name for an element in which
FactoryLink will store the data read from the device.
15
For a write table, specify a tag name for an element containing a
value to be written to the device.
panel for a discussion on register types.)
Tag Type
Element Description
Valid for
Register
Types
A tag that stores a signed 16-bit
integer with a value range between
-32,768 and +32,767
HREG
GLBL
IREG
STATHI
STATLO
XMEMnn
Digital
A tag that stores a binary that
indicates either a set (1) or unset (0)
bit
COIL
HREG
INP
IREG
Float
A tag that stores a floating point
integer with a value that can range
up to 31 places to the right side of the
decimal point
HREG
Longana
A tag that stores a signed 32-bit
integer with a value range between +
or - 2 billion
HREG
Message
A tag that stores ASCII text
HREG
FactoryLink 6.6.0 / Device Interface Guide / 395
Modicon Modbus Plus
Analog
External Device
Interface
Valid Entry: standard element tag name
Valid Data Type: The following table lists valid tag types for each
register type. (Refer to the Data Type field of this
•
MODICON MODBUS PLUS
•
Configuring the Read/Write Information Panel
•
•
Logical Station
Enter the number representing the device from which the data is
to be read or to which the element’s value will be written. This
number was originally defined in the Logical Station Information
panel for the logical port through which communications with
this device occurs.
Valid Entry: previously defined logical station number
Reg Address
For a read table, enter the address in the device’s memory where
the value to be stored in this element is located.
For a write table, enter the address in the device’s memory to
which the element value will be written.
The format of a register address is:
paaaaa
where
p The address prefix that identifies the Modicon
register type
aaaaa The actual address of the register
When defining register addresses, do not include the address
prefix or leading zeros. The prefix indicates the register type, and
this information is specified in the Data Type field of this panel.
The leading zeros are extraneous.
For example, for holding register address 400001, enter 1. The 4
indicates the register type, and the leading zeros are not
necessary.
If you are defining an address for floating-point or long analog tag
types, keep in mind these tag types are addressed in pairs. The
first register in the pair contains the high-order word; the second
register contains the low-order word.
Enter the address for the starting register in a register pair; the
companion register is implied.
Try to maintain consistency when using register addresses for
floating-point and long analog FactoryLink data types. Adopt
either an odd or even starting register sequence and maintain
that sequence. For example,
1, 3, 5, 7, 9, ...
or
2, 4, 6, 8, 10, ...
396 / FactoryLink 6.6.0 / Device Interface Guide
MODICON MODBUS PLUS
Configuring the Read/Write Information Panel
If you are defining an address for a message tag type, the
address specifies the first in a group of registers that contain the
message characters. The message length is specified in the Bit
Offset/MSG Length field.
For global data word read operations, it is assumed the first
global data word received is always word 1, the second is word 2,
and so on. If you specify a register address in the block read table
that is larger than the total number of global data words that will
actually be received, an error is generated.
If you are defining an address to read the high or low byte
of a statistical word, each pair addresses a single register
between 1 and 54.
To access the low and high bytes of a single word, enter the same
register address twice for two separate analog tags. Define
STATHI in the Data Type field for the first tag and STATLO in the
Data Type field for the second tag.
If you want to create a single word value, use Math & Logic to
“OR” the bytes together.
If you want to access the high and low bytes of a common register,
you must define them in the same block read table or the values
retrieved may not be synchronized.
If you are defining a STATCLR exception write operation,
do not specify a register address. Accept the default of 1.
If you are reading or writing to extended memory, a block
read, block write, or exception write operation may read or write
multiple register addresses for the same register file.
FactoryLink 6.6.0 / Device Interface Guide / 397
Modicon Modbus Plus
Although global data is considered contiguous in block write
tables, you can define register addresses that do not appear
contiguous on the information panel. For example, if you specify
register address 1, 5, 7, 20, and 25, a message is generated for
registers 1 through 25. A value of 0 is stored for those registers
within the range that do not appear in the information table.
External Device
Interface
If you are defining an address for global data words, they
are in the register address range of 1 to 32.
15
•
MODICON MODBUS PLUS
•
Configuring the Read/Write Information Panel
•
•
Bit Offset/MSG
Length
This field is required for digital data type. If the element (entry in
the Tag Name column) associated with this entry is digital, enter
the bit offset within the word that contains the value to be read or
to which the element value is to be written. Bit 1 is the most
significant bit (MSB) and bit 16 is the least significant bit.
The purpose of this field depends on the tag type of the element.
For digital tags that reference an address in memory from
a holding register or input register (see Data Type field
description), this is the bit offset between 1 and 16 within a
register word that contains the value of the element. When
defining this offset, follow Modicon’s convention for bit ordering,
where bit 1 is the most significant bit (MSB) and bit 16 is the
least significant bit (LSB).
MSB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
LSB
16
For digital tags that reference mask write functions, use
this field to indicate which bit between 1 and 16 will change in
the register as a result of a mask write command. You can only
address one bit per tag entry.
For message tags, this is the number of bytes in the device’s
memory, between 1 and 80, containing the message. This number
of bytes, starting from the location specified in the Address field of
this panel, is read into the message tag as raw binary data. The
FactoryLink Modbus Plus protocol module does not perform
verification on these bytes to see if they are printable ASCII.
Data Type
Specify the type of data being read from or written to the device
for each element defined in the Tag Name field.
The following table describes the register types supported by the
FactoryLink Modbus protocol module. For additional information
about Modicon register types, refer to the Modicon controller
manuals.
Data Type
COIL
Valid Operations
Block read operations read current value of the
element.
Block write and exception write operations are
used to force the state of coils to either on or off.
398 / FactoryLink 6.6.0 / Device Interface Guide
MODICON MODBUS PLUS
Configuring the Read/Write Information Panel
Data Type
HREG
Valid Operations
Block write and exception write operations are
used to set the contents of a holding register.
GLBL or GL
Block read operations are used to read global
data.
Block write operations are used to write global
data. This requires that the local computer
with the SA85 adapter be assigned as a logical
station with a physical station address of 0.
Block read operations read the ON/OFF status
of discrete inputs. Input is stored in a controller
as bits.
IREG
Block read operations are used to read the
binary contents of an input register.
MASK
Exception write operations are used to set or
clear bits within a holding register. The current
state of the digital tag determines the ON/OFF
setting of the bit within the holding register. To
set a bit within the holding register, the digital
tag must be set to 1 (ON) and to clear a bit, it
must be set to 0 (OFF).
STATHI,
STATLO
Block read operations read the high or low
bytes of a statistics word.
STATCLR
Exception write operations clear statistics
data.
XMEMnn
Block read operations read the contents of
extended memory.
Block write and exception write operations
write to extended memory.
FactoryLink 6.6.0 / Device Interface Guide / 399
Modicon Modbus Plus
INP
External Device
Interface
Block read operations are used to get contents
of a holding register.
15
•
MODICON MODBUS PLUS
•
Configuring the Read/Write Information Panel
•
•
When the panel is complete, click on Enter to validate the information. Define the
data type (digital, analog, long analog, or floating-point) for any tag names
displayed in the Tag Definition dialog.
400 / FactoryLink 6.6.0 / Device Interface Guide
MODICON MODBUS PLUS
Modbus Plus Cable Diagram
M ODBUS P LUS C ABLE D IAGRAM
15
This section contains a pin-out diagram for connecting an SA85 card to a 984
Modicon controller.
Figure 15-0 Pin-out Diagram—Connecting an SA85 Card to a Modicon Controller
Continuity
from
Black Wires
to PIN 3
Continuity
from
White Wires
to PIN 2
Continuity
from
Bare Wires
To PIN1
External Device
Interface
For complete information about Modbus Plus cable diagrams, refer to AEG’s
Modicon Modbus Plus Network Planning and Installation Guide.
.
321
Trim Wires
after checking
Continuity
Note: Wiring direction shown
for 984-685/785 Controller
FactoryLink 6.6.0 / Device Interface Guide / 401
Modicon Modbus Plus
O O O O
O O O O O
•
MODICON MODBUS PLUS
•
Run-Time Application Messages
•
•
R UN -TIME A PPLICATION M ESSAGES
During EDI run time, FactoryLink generates and displays messages for the
Modbus Plus protocol module on the Run-Time Manager screen and, if so
configured, writes them to message or analog tags. For information about
configuring a message tag, see “Configuring the Logical Station Control Panel” on
page 382. For information about configuring an analog tag, see “Configuring the
Logical Station Information Panel” on page 384. For information about the
messages displayed for the EDI task and the format in which protocol module
messages are generated, see Chapter 10, “Messages and Codes.”
The following three messages occur at startup:
Modbus Plus: Software Protection bit failure; bits (x) and number (y) required
Cause:
One or both of the option bits (where x and y are decimal values)
required to run this protocol module are missing.
Action:
Install the required option bits in the master key.
Modbus Plus: SA85 Adapter (n) not found
Cause:
For Windows—The SA85 card is incorrectly installed—placed
in the wrong slot in EISA chassis, a bad memory address switch
settings, or a bad software interrupt setting.
Action:
Verify the path for MBHOST.SYS is correct, and check its
parameters in the CONFIG.SYS file. If either is incorrect, make
the correction and restart the program.
Cause:
For OS/2—Either MPHOST.SYS has not been loaded or its
associated parameters have not been correctly added to the
CONFIG.SYS file.
Action:
Verify the path for MPHOST.SYS is correct, and check its
parameters in the CONFIG.SYS file. If either is incorrect, make
the correction and restart the program.
Cause:
For HP-UNIX—Either the SA85 card is incorrectly installed or
the HP-UNIX installation procedure failed, or was not executed
correctly. An incorrectly installed card could mean it is in the
wrong slot in EISA chassis or the memory address switch
settings are bad.
Action:
Verify the installation procedure was executed correctly. Check
the SA85 installation and switch selections. Retry FactoryLink
Modbus Plus EDI protocol module task.
402 / FactoryLink 6.6.0 / Device Interface Guide
MODICON MODBUS PLUS
Run-Time Application Messages
Modbus Plus: SA85 Adapter (x) identified as node (y)
For Windows—The Windows SA85 Modbus Plus loaded
successfully and the adapter (where x is a decimal value) shown
is at the Modbus Plus address node number (where y is a
decimal value).
Action:
None.
Cause:
For OS/2—The OS/2 SA85 Modbus Plus loaded successfully and
the adapter (where x is a decimal value) shown is at the Modbus
Plus address node number (where y is a decimal value).
Action:
None.
15
External Device
Interface
Cause:
Run-Time Messages
The following logical port and logical station messages occur after the application
starts up:
The EDI task writes logical port messages to the LPORT tag when this tag is
defined on the Read/Write table.
Modbus Plus: Communications OK
Cause:
Normal.
Action:
None.
Modbus Plus: Lsta n: Write Request Error, 0xnn
Cause:
A command for a WRITE operation was made to logical station
(n) resulting in a NetBIOS return code of 0xnn, a hexadecimal
value. This error occurred on a WRITE table operation to a
specific logical station.
Action:
Refer to the section discussing NetBIOS Error Return Codes in
the Modicon IBM Host-Based Devices Users Guide for details.
FactoryLink 6.6.0 / Device Interface Guide / 403
Modicon Modbus Plus
Logical Port Messages
•
MODICON MODBUS PLUS
•
Run-Time Application Messages
•
•
Modbus Plus: Lsta n: Write Response Error, 0xnn
Cause:
A response to a WRITE operation was made to logical station (n)
resulting in an error with a NetBIOS return code of 0xnn, a
hexadecimal value. This error occurred on a WRITE table
operation to a specific logical station.
Action:
Refer to the section discussing NetBIOS Error Return Codes in
the Modicon IBM Host-Based Devices Users Guide for details.
Modbus Plus: Lsta n: Read Request Error, 0xnn
Cause:
A READ operation request was made to logical station n
resulting in a NetBIOS return code of 0xnn, a hexadecimal
value. This error occurred on a READ table operation to a
specific logical station.
Action:
Refer to the section discussing NetBIOS Error Return Codes in
the Modicon IBM Host-Based Devices Users Guide for details.
Modbus Plus: Lsta n: Read Response Error, 0xnn
Cause:
A response to a READ operation request was made to logical
station n resulting in a NetBIOS return code of 0xnn, a
hexadecimal value.
Action:
Refer to the section discussing NetBIOS Error Return Codes in
the Modicon IBM Host-Based Devices Users Guide for details.
Modbus Plus: Illegal func code 0xnn rcvd for unsol data
Cause:
An illegal command function code was detected in an unsolicited
message. Modbus Plus only expects the Preset Multiple Regs
command—Modbus command function 0x10—as the only valid
command for unsolicited operations.
Action:
Decrease the rate at which unsolicited data is sent to
FactoryLink; or be certain the PLC is attempting to send only
function code 0x10 for unsolicited messages.
404 / FactoryLink 6.6.0 / Device Interface Guide
MODICON MODBUS PLUS
Run-Time Application Messages
Logical Station Messages
The EDI task writes logical station messages to the LSTA tag when this tag is
defined on the Read/Write table.
Cause:
Normal.
Action:
None.
Lsta: n Netbios Transmit Error 0xnn
Cause:
A NetBIOS error 0xnn, a hexadecimal value, resulted from the
send of a Modbus command.
Action:
Refer to the section discussing NetBIOS Error Return Codes in
the Modicon IBM Host-Based Devices Users Guide for details.
Cause:
A NetBIOS error 0xnn, a hexadecimal value, resulted from the
request for a Modbus response to a previously sent Modbus
command request.
Action:
Refer to the section discussing NetBIOS Error Return Codes in
the Modicon IBM Host-Based Devices Users Guide for details.
Lsta: n Incurred a Time-out Error
Cause:
All retries have been exhausted in the attempt to get a response
from logical station n.
Action:
Check on status of logical station n: Is it powered off, off line, or
have a faulty cable connection?
Lsta: n Exception Response Error x
Cause:
An exception response 0xnn, a hexadecimal value, was received
from logical station n. A controller encountered a programming
or operation error while attempting to carry out a Modbus
command request. Typically, this error flags an illegal data
reference in a message or controller problems, a no response to
an interface panel or communication difficulties with a slave.
Action:
Refer to the section discussing NetBIOS Error Return Codes in
the Modicon IBM Host-Based Devices Users Guide for details.
FactoryLink 6.6.0 / Device Interface Guide / 405
Modicon Modbus Plus
Lsta: n Netbios Receive Error 0xnn
External Device
Interface
Lsta: n Communications OK
15
•
MODICON MODBUS PLUS
•
Run-Time Application Messages
•
•
Lsta: n Insufficient number of global data words rcvd
Cause:
The number of words returned was less than expected during a
read of global data. The number expected is always equal to or
greater than the largest register address specified in the READ
table for global data.
Action:
Either adjust the number of global data words broadcast by the
controller, or adjust the number of tags defined in the block
READ table for global data.
406 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 16
OMRON
16
• C120
• C200H
External Device
Interface
This chapter contains information needed to set up and configure bidirectional
communications between the FactoryLink real-time database and the following
devices, either directly or using the OMRON Host Link:
• C500
• C1000
• C2000
When you choose OMRON Host Link Protocol from the Configuration Manager Main
Menu, the OMRON Host Link Protocol configuration panels are displayed.
OMRON
FactoryLink 6.6.0 / Device Interface Guide / 407
•
OMRON
•
Configuring the Logical Station Control Panel
•
•
C ONFIGURING
THE
L OGICAL S TATION C ONTROL P ANEL
Note
Before completing the protocol-specific Omron configuration
panels, you must complete the External Device Definition panel.
See “Identifying Protocol Types and Defining Logical Ports” on
page 84 for details.
To bring the Logical Station Control panel to the foreground, click on its title bar
in the display of all configuration panels.
Complete a row for each logical port specified in the External Device Definition
panel you want to define as a communication path for read and write operations.
Logical Port
Enter a number, defined in the External Device Definition panel
Logical Port column, to represent a particular communication path
to a device.
Valid Entry: previously defined logical port number
(default=0)
Baud Rate
Enter the speed at which the protocol module communicates with
the devices linked to FactoryLink via this logical port. This entry
must match the baud rate configuration of the devices. Refer to
the device manufacturers documentation for details.
408 / FactoryLink 6.6.0 / Device Interface Guide
OMRON
Configuring the Logical Station Control Panel
Valid Entry: 9600
Parity
Valid Entry: odd
Data Bits
Enter the number of data bits used during transmission via this
logical port. This entry must match the configuration of the
devices communicating via this port. Refer to the device
manufacturers documentation for details.
Valid Entry: 8
Stop Bits
16
External Device
Interface
Enter the parity error correction during transmission via this
logical port. This entry must match the configuration of the
devices communicating via this port. Refer to the device
manufacturers documentation for details.
Enter the number of bits sent after a character to create a pause
before the start of the next character. This entry must match the
configuration of the devices communicating via this port. Refer to
the device manufacturers documentation for details.
Valid Entry: 1
Timeout
Enter the length of time the protocol module will wait to receive a
response to a read or write command before timing out. You must
enter a value greater than 0 for the protocol module to timeout.
Valid Entry: 1 - 32767 (default=10)
When the panel is complete, click on Enter to validate the information. Define the
data type (message) for any tag names displayed in the Tag Definition dialog.
Table 16-0 provides sample entries for the OMRON Logical Station Control panel:
Table 16-0 Sample OMRON Logical Station Control Panel Entries
Field
Entry
Description
0
Specifies the logical
communication path configured
by this table.
Baud Rate
9600
Specifies the communication
rate.
Parity
EVEN
No parity checking.
FactoryLink 6.6.0 / Device Interface Guide / 409
OMRON
Logical Port
•
OMRON
•
Configuring the Logical Station Control Panel
•
•
Table 16-0 Sample OMRON Logical Station Control Panel Entries (Continued)
Field
Entry
Description
Data Bits
8
Specifies 8 data bits in the
transmission.
Stop Bits
1
Specifies 1 stop bit in the
transmission.
Response Timeout (0.1
Sec)
10
The response timeout is 1 second.
410 / FactoryLink 6.6.0 / Device Interface Guide
OMRON
Configuring the Logical Station Information Panel
C ONFIGURING
THE
L OGICAL S TATION I NFORMATION P ANEL
16
External Device
Interface
From the Logical Station Control panel, select the row for the logical port you are
configuring and click on Next to bring the Logical Station Information panel to the
foreground.
Complete a row for each device to communicate through this logical port.
Error/Status Tag
Name
(Optional) Enter a tag name for an analog element in which to
store communications error codes associated with this device
(logical station).
You can animate output-text objects to display the codes stored in
an Error/Status Tag Name element on a graphics screen. Refer to
the Application Editor for more information.
Valid Entry: standard element tag name
Valid Data Type: analog
OMRON
FactoryLink 6.6.0 / Device Interface Guide / 411
•
OMRON
•
Configuring the Logical Station Information Panel
•
•
Logical Station
Enter a number to identify the logical station to which the
information in this row pertains. A logical station represents the
combination of a logical port with a physical station. Assign a
unique number to each device communicating through this
logical port.
You will later enter this logical station number in a read or write
table to represent the device defined in this row. In a read or
write table, this number will identify the device to or from which
data is to be sent or received.
Valid Entry: 0 - 999
Device Type
Enter the type of OMRON device to which communications are to
be directed.
C20 C120 PLC
K/P-SR K & P-Series PLCs (C20K, C28K, C40K, C60K,
C20P, C28P, C40P, C60P)
C120 C120 & C120F PLCs
C200H C200H PLC (default)
C500 C500 PLC
C500F C500F PLC
C1000H C1000H PLC
C2000H C2000H PLC
Physical Station
Enter the physical station address of the OMRON device with
which the EDI task communicates when using this logical station
in a Read/Write table.
Valid Entry: 0 - 31
Comment
(Optional) Enter reference information about this logical station.
Valid Entry: alphanumeric string of up to 21 characters
When the panel is complete, click on Enter to validate the information. Define the
data type (analog) for any tag names displayed in the Tag Definition dialog.
412 / FactoryLink 6.6.0 / Device Interface Guide
OMRON
Configuring the Logical Station Information Panel
Table 16-0 provides sample entries for the OMRON Logical Station Information
panel:
16
Table 16-0 Sample OMRON Logical Station Information Panel Entries
Entry
Description
Error/Status Tag Name
OMRN_STATION0_
STATUS
Contains information about
communication errors
Logical Station
0
Specifies the logical
communication path
Physical Station
0
Specifies the physical station
address associated with this
logical station
Device Type
C200H
Specifies the external device type
associated with this logical
station
External Device
Interface
Field
OMRON
FactoryLink 6.6.0 / Device Interface Guide / 413
•
OMRON
•
Configuring the Read/Write Control Panel
•
•
C ONFIGURING
THE
R EAD /WRITE C ONTROL P ANEL
To bring the Read/Write Control panel to the foreground, click on its title bar in
the display of all configuration panels or click on Next from the Logical Station
Information panel.
Complete a row for each read or write table.
Tip
Refer to Chapter 8, “Application Design Tips and Techniques,” for
information about triggering schemes using elements defined in
this panel.
Table Name
Give this read or write request a name. Define one request (table)
per line and do not include spaces in the name. You can define as
many tables in this panel as available memory allows. Try to
make the table name reflective of the operation it represents.
If this is a triggered read or a block write table, when the trigger
element (Block Read Trigger for a read operation or Block Write
Trigger for a write operation) is forced to 1 (ON), the element
prompts FactoryLink to process this table and any other table in
which the same trigger is defined.
Valid Entry: alphanumeric string of up to 16 characters
414 / FactoryLink 6.6.0 / Device Interface Guide
OMRON
Configuring the Read/Write Control Panel
Exception Write
For EDI to interpret this operation as a triggered block write or
as a read operation, accept the default of NO.
In an exception write, an internal change-status indicator within
the element containing the data to be written prompts the write
operation. If an element is configured for an exception write and
EDI recognizes this indicator has been set since the last scan of
the real-time database (indicating the value of the element has
changed), EDI writes this element’s value to the device.
16
External Device
Interface
For EDI to interpret this operation as an exception write and
write element values to the device only when those values
change, enter YES.
Tip
Do not specify elements expected to change at frequent and
unpredictable intervals in an exception write table. Any element
specified will be written to the device in its own packet (message)
each time it changes. Defining elements that change value
frequently as exception writes can slow down communications or
result in an error message.
Block Read
Priority
If this is a block read operation, enter a number to indicate the
priority of this table, relative to other read operations. The
highest priority is 1. This number influences the order in which
the EDI task handles the queuing of block read requests. If EDI
receives two requests at the same time, it processes the request
with the highest priority first. The default is 1.
If this is a write operation, accept the default of 1. This field
defaults to 1 regardless of whether the operation being defined is
a block read.
Valid Entry: 1 - 4 (default=1)
The Block Read Trigger, Block Read Disable, Block Read Complete, and
Block Read State elements apply only to triggered read operations.
Do not define these elements for write operations.
FactoryLink 6.6.0 / Device Interface Guide / 415
OMRON
Note
•
OMRON
•
Configuring the Read/Write Control Panel
•
•
Block Read
Trigger
If this is a write operation, ignore this field.
If this is a triggered read operation, this field is required. Enter a
tag name for a digital element to initiate a block read of the
addresses specified in the Read/Write Information panel. When
this element’s value is forced to 1 (ON), the addresses are read.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Read
Disable
If this is a write operation, ignore this field.
If this is a triggered read operation, this field is optional. If you
need a digital element to disable a block read of the elements
specified in this table, enter a tag name. When this tag’s value is
forced to 1 (ON), the read operation is not executed, even when
the block read trigger is set to 1.
To re-enable a block read table that has been disabled, set this
element back to 0 (OFF).
Valid Entry: standard element tag name
Valid Data Type: digital
Tip
This element can be used to disable a block read operation that is
either part of a cascaded loop or is self-triggered. The triggering
cycle will cease upon disabling, however. To re-enable a cascaded
loop or a self-triggered read table, the Block Read Trigger element
must be toggled or forced to 1. Refer to Chapter 8, “Application
Design Tips and Techniques,” for further details.
Block Read
Complete
If this is a write operation, ignore this field.
If this is a triggered read operation, this field is optional. If you
need a digital element to indicate when this operation is
complete, enter a tag name. This element is forced to 1 (ON) at
startup. After the elements defined in the Read/Write
Information panel have been updated in the FactoryLink
database, the complete element is forced to 1 again.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
416 / FactoryLink 6.6.0 / Device Interface Guide
OMRON
Configuring the Read/Write Control Panel
Block Read State
If this is a write operation, ignore this field.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write
Priority
If this is a block or exception write operation, enter a number to
indicate the priority of this table, relative to other write
operations. The highest priority is 1. This number influences the
order in which the EDI task handles the queuing of write
requests. If EDI receives two requests at the same time, it
processes the request with the highest priority first. The default
is 1.
16
External Device
Interface
If this is a triggered read operation, this field is optional. If you
need a digital element to indicate the state of this operation (in
progress or complete), enter a tag name. This element is forced to
1 (ON) at startup. While the table is being processed, the element
is set to 0 (OFF). After the elements defined in the Read/Write
Information panel have been updated in the FactoryLink
database, the state element is forced back to 1.
If this is a read operation, accept the default of 1. This field
defaults to 1 regardless of whether the operation being defined is
a block or exception write.
Valid Entry: 1 - 4 (default=1)
Note
The Block Write Trigger, Block Write Disable, Block Write Complete, and
Block Write State elements apply only to write operations. Do not
define these elements for read operations.
Block Write Trigger
If this is a read operation or an exception write operation you do
not plan to periodically disable, ignore this field.
Valid Entry: standard element tag name
Valid Data Type: digital
FactoryLink 6.6.0 / Device Interface Guide / 417
OMRON
If this is a block write table or an exception write table you plan
to periodically disable, this field is required. Enter a tag name for
a digital element to initiate a block write of the element values
specified in the Read/Write Information panel to the addresses
defined to receive the values. When this element’s value is forced
to 1 (ON), FactoryLink writes the values.
•
OMRON
•
Configuring the Read/Write Control Panel
•
•
Block Write
Disable
If this is a read operation or an exception write operation you do
not plan to periodically disable, ignore this field.
If this is a block write table or an exception write table you plan
to periodically disable, this field is optional. Enter a tag name for
a digital element to disable a block write to the addresses
specified in this table. When this tag’s value is forced to 1 (ON),
the write operation is not executed, even when the block write
trigger is set to 1.
To re-enable a block write table that has been disabled, set this
element back to 0 (OFF).
Valid Entry: standard element tag name
Valid Data Type: digital
Tip
This element can be used to disable a block write operation that is
either part of a cascaded loop or is self-triggered. The triggering
cycle will cease upon disabling, however. To re-enable a cascaded
loop or a self-triggered write table, the Block Write Trigger element
must be toggled or forced to 1. Refer to Chapter 8, “Application
Design Tips and Techniques,” for further details.
Block Write
Complete
If this is a read or exception write operation, ignore this field.
If this is a block write table, this field is optional. If you need a
digital element to indicate when this operation is complete, enter
a tag name. This element is forced to 1 (ON) at startup. After the
data defined in this table’s Read/Write Information panel has
been written to the device, the complete element is forced to 1
again.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write State
If this is a read or exception write operation, ignore this field.
If this is a block write operation, this field is optional. If you need
a digital element to indicate the state of this operation (in
progress or complete), enter a tag name. This element is forced to
1 (ON) at startup. While the table is being processed, the element
418 / FactoryLink 6.6.0 / Device Interface Guide
OMRON
Configuring the Read/Write Control Panel
is set to 0 (OFF). After the data defined in this table’s Read/Write
Information panel has been written to the device, the state
element is forced back to 1.
Valid Entry: standard element tag name
Valid Data Type: digital
When the panel is complete, click on Enter to validate the information. Define the
data type (digital) for any tag names displayed in the Tag Definition dialog.
Table 16-0 provides sample entries for the OMRON Read/Write Control panel:
External Device
Interface
Do not use this element when more than one logical port is
specified in a single table.
16
Table 16-0 Sample OMRON Read/Write Control Panel Entries
Field
Entry
Description
READ
Specifies the table name.
Exception Write
NO
The table will not perform
exception writes.
Block Read Priority
1
The block read priority for the
table will be 1.
Block Read Trigger
OMRN_READ_
TRIGGER
When the value of OMRN_
READ_TRIGGER is 1 or (on), a
block read of values specified by
the Read/Write Information
panel associated with table 1
occurs.
Block Read Disable
OMRN_READ_
DISABLE
This element is defined to disable
the block read operations.
Block Read Complete
OMRN_READ_
COMPLETE
The value of OMRN_READ_
COMPLETE is set to 1 when the
read is complete.
Block Read State
OMRN_READ_
STATE
The value for OMRN_READ_
STATE is set to 1 if a read
operation of table 1 is in
progress, and the value is 0 if it
is inactive.
FactoryLink 6.6.0 / Device Interface Guide / 419
OMRON
Table Name
•
OMRON
•
Configuring the Read/Write Control Panel
•
•
Table 16-0 Sample OMRON Read/Write Control Panel Entries
Field
Block Write Priority
Entry
1
Block Write Trigger
Block Write Complete
Block Write Disable
Block Write State
420 / FactoryLink 6.6.0 / Device Interface Guide
Description
The write priority for this table is
set to 1 by default.
Since this is a read table, the
elements specific to write
requests are not defined.
OMRON
Configuring the Read/Write Information Panel
C ONFIGURING
THE
R EAD /WRITE I NFORMATION P ANEL
16
External Device
Interface
From the Read/Write Control panel, select the row for the table you are
configuring and click on Next to bring the Read/Write Information panel to the
foreground.
For a Read Table—Add a panel entry for each FactoryLink database element in
which data read from the device will be stored when the operation executes.
For a Write Table—Add a panel entry for each element to be written when the
operation executes.
Tip
Alternatively, the elements you define in the Read/Write
Information panel can be configured in the Tag Definition dialog in
the Application Editor. Refer to the Application Editor for details.
For a read table, specify a tag name for an element in which
FactoryLink will store the data read from the device.
For a write table, specify a tag name for an element containing a
value to be written to the device.
Valid Entry: standard element tag name
Valid Data Type: digital, analog, float
FactoryLink 6.6.0 / Device Interface Guide / 421
OMRON
Tag Name
•
OMRON
•
Configuring the Read/Write Information Panel
•
•
Logical Station
Enter the number representing the device from which the data is
to be read or to which the element’s value will be written. This
number was originally defined in the Logical Station Information
panel for the logical port through which communications with
this device occurs.
Valid Entry: previously defined logical station number
Data Area
Enter the data area of the OMRON controller to be read/written.
Refer to “OMRON Data Types and PLC Data Areas” on page 426
for more information about these data areas.
ST PLC operating status; channel number is ignored.
Use element type A and data type BIN1.
ER
PLC errors; channel number must be 0 or 1 for
error word 1 or 2, respectively. Use data type
BIN1.
IR
I/O and internal relay area.
HR
Holding relay area.
AR
Auxiliary relay area.
LR
Link relay area.
TC
Timer/counter area. Use element type D and data
type TCTR.
DM
PV
Channel
Data memory area.
Present value area. Use element type A or F and
data type BCD1, BCD2, TIM, or TIMH.
Enter the channel number within the data area of the value to be
read or written.
Valid Entry: 0 - 9999
Bit Offset
This field is required for digital data type. If the element (entry in
the Tag Name column) associated with this entry is digital, enter
the bit offset within the word that contains the value to be read or
to which the element value is to be written. Bit 1 is the most
significant bit (MSB) and bit 16 is the least significant bit.
Leave this field blank for all other FactoryLink data types.
Valid Entry: 0 (least significant bit), 15 (most significant bit)
422 / FactoryLink 6.6.0 / Device Interface Guide
OMRON
Configuring the Read/Write Information Panel
Data Type
Specify the type of data being read from or written to the device
for each element defined in the Tag Name field. Refer to “OMRON
Data Types and PLC Data Areas” on page 426 for valid data
types.
16-bit binary value (-32768 to 32767). Use
element type D or A.
BIN2
Two consecutive 16-bit binary values or 32-bit
binary value (0 to 4294967295). Use element type
F.
BCD1
16-bit BCD value (0 to 9999). Use element type A.
BCD2
Two consecutive 16-bit BCD values or 32-bit BCD
value (0 to 9999999). Use element type F.
TIM
16-bit timer BCD value with units of 0.1 second
(0.0 to 999.9). Use element type F.
TIMH
16-bit high-speed timer BCD value with units of
0.01 second (0.00 to 99.99). Use element type F.
TCTR
One-bit timer/counter value (0 or 1). Use element
type D and data area TC.
External Device
Interface
BIN1
16
When the panel is complete, click on Enter to validate the information. Define the
data type (digital, analog, or floating-point) for any tag names displayed in the
Tag Definition dialog.
OMRON
FactoryLink 6.6.0 / Device Interface Guide / 423
•
OMRON
•
Configuring the Read/Write Information Panel
•
•
Table 16-0 provides sample entries for the OMRON1 Read/Write Information
panel:
Table 16-0 Sample OMRON Read/Write Information Panel Entries
Field
Entry
Description
Table Name
READ
Specifies the Read/Write table
name.
Tag Name
OMRNRDR1
The value read from the device is
stored in OMRNRDR1.
Logical Station
0
Specifies the path to send the
request.
Data Area
IR
Data area of the controller to be
read/written.
Channel
10
Channel number in the external
device.
Bit Offset
1
Specific location of information to
read.
Data Type
BIN1
Data type read from or written to
this controller.
424 / FactoryLink 6.6.0 / Device Interface Guide
OMRON
Technical Notes: Monitor Mode
TECHNICAL N OTES : M ONITOR M ODE
16
Some OMRON factory configurations operate normally in MONITOR mode. In
this case, writes to the PLC will occur normally and no other actions are needed.
Other OMRON factory configurations may require that the PLC operate in RUN
or PROGRAM mode. If this is necessary, override the setting on the Programming
Console and place the PLC in MONITOR mode using the following procedure:
External Device
Interface
The OMRON PLC operates in the RUN, MONITOR, or PROGRAM modes. For
the FactoryLink OMRON protocol module to write to an external device, ensure
that the OMRON PLC is in the MONITOR mode by setting the switch on the
OMRON Programming Console to MONITOR. In this mode, the OMRON PLC
monitors bit or channel data from the data areas or specific program addresses
and reads it to the FactoryLink real-time database.
1. In the OMRON Read/Write Information panel, configure an analog element.
2. Enter ST in the Data Area field (for the OMRON PLC operating status) and
enter BIN1 in the Data Type field.
3. To change the operating mode of the PLC to the MONITOR mode, force write
an 02 (which represents MONITOR mode in the ST area) to the FactoryLink
analog element.
Refer to the OMRON Host Link Unit Operation Manual for further information
about the OMRON Status Write and changing the operating mode.
To avoid manually performing this procedure each time you start FactoryLink,
configure Math and Logic to perform this operation automatically at startup.
Refer to Chapter 6, “Configuring Math & Logic” in Configuration Guide for
further information about configuring the Math and Logic task.
OMRON
FactoryLink 6.6.0 / Device Interface Guide / 425
•
OMRON
•
OMRON Data Types and PLC Data Areas
•
•
OMRON D ATA TYPES
AND
PLC D ATA A REAS
The following table shows the FactoryLink data types and the OMRON data types
that are to be used for each OMRON PLC data area:
Table 16-0 Data Types and PLC Data Areas
FactoryLink Data Type
D
A
F
OMRON Data Type
OMRON PLC Data Area
BIN1
ER
BIN1
IR, HR, AR
TCTR
TC
BIN1
ST
BIN1
ER
BIN1
IR, HR, AR
BCD1
LR and DM
BCD1
PV
BIN2
IR, HR, AR
BCD2
LR and DM
TIM
LR and DM
TIMH
LR and DM
BCD2
PV
TIM
PV
426 / FactoryLink 6.6.0 / Device Interface Guide
OMRON
Run-Time Application Messages
R UN -TIME A PPLICATION M ESSAGES
16
For information about the messages displayed for the EDI task and the format in
which protocol module messages are generated, see Chapter 10, “Messages and
Codes.”
The ER: string in a message can contain either a single-character or a
double-character error code. In following descriptions, n represents the
significant characters of the error.
• Single-Character Code Format
ER:000n is a single-character format in which one character represents a single
error condition. In some cases, two individual codes appear within a string to
indicate multiple error conditions.
• Double-Character Code Format
ER:00nn is a double-character format in which two characters represent a
single error condition. Decode the ER:00nn string by interpreting nn’s most
significant digit (MSD), the leftmost integer, and least significant digit (LSD),
the rightmost integer.
External Device
Interface
During EDI run time, FactoryLink generates and displays messages for the
Omron protocol module on the Run-Time Manager screen and, if so configured,
writes them to message or analog tags. For information about configuring a
message tag, see “Configuring the Logical Station Control Panel” on page 408. For
information about configuring an analog tag, see “Configuring the Logical Station
Information Panel” on page 411.
OMRON
FactoryLink 6.6.0 / Device Interface Guide / 427
•
OMRON
•
Run-Time Application Messages
•
•
OMRON Error Codes
The following error code values occur in the LSD.
Example:
If:
ER:0043
Then:
MSD = 4
LSD = 3
Case 0:
ER:000e OMRON Response Errors
1
Cause:
Not executable in RUN mode.
Action:
Command request cannot be performed with the device in RUN
mode.
Cause:
Not executable in MONITOR mode.
Action:
Command request cannot be performed with the device in
MONITOR mode.
Cause:
Not executable with PROM mounted.
Action:
Command request cannot be performed with the device with
PROM mounted.
Cause:
Address over (data overflow).
Cause:
Not executable in PROGRAM mode.
Action:
Command request cannot be performed with the device in
PROGRAM mode.
2
3
4
B
428 / FactoryLink 6.6.0 / Device Interface Guide
OMRON
Run-Time Application Messages
C
Not executable with PROM mounted.
Action:
Command request cannot be performed with the device with
PROM mounted.
Cause:
Not executable in LOCAL mode.
Action:
Command request cannot be performed with the device in
LOCAL mode.
D
Case 1:
ER:001e OMRON Response Errors
16
External Device
Interface
Cause:
0
Cause:
Parity error.
Action:
Verify the parity setup matches the device.
Cause:
Framing error.
Action:
Verify the number of data and stop bits set up matches the
device.
Cause:
Overrun.
Action:
Verify the number of data and stop bits setup matches the
device.
Cause:
FCS error.
Action:
Verify the parity and the number of data and stop bits setup
matches the device.
1
2
3
OMRON
FactoryLink 6.6.0 / Device Interface Guide / 429
•
OMRON
•
Run-Time Application Messages
•
•
4
Cause:
Format error (parameter length error).
Action:
Verify the Read/Write configuration panel entries are valid for
device parameter. Contact Customer Support if the problem
persists.
Cause:
Entry number data error (parameter error, data code error, data
length error).
Action:
Verify the Read/Write configuration panel entries are valid for
device parameter. Contact Customer Support if the problem
persists.
Cause:
Instruction not found.
Action:
Verify the Read/Write configuration panel entries are valid for
device parameter. Contact Customer Support if the problem
persists.
Cause:
Frame length error.
Action:
Verify the Read/Write configuration panel entries are valid for
device parameter. Contact Customer Support if the problem
persists.
Cause:
Command not executable due to inexecutable error clear,
non-registration of I/O table, etc.
Action:
Contact OMRON for more information.
5
6
8
9
430 / FactoryLink 6.6.0 / Device Interface Guide
OMRON
Run-Time Application Messages
Case 2:
ER:002e OMRON Response Errors
16
0
I/O table generation impossible due to unrecognized Remote I/O
Unit, channel over, or duplication of Optical Transmitting I/O
Unit.
Action:
Contact OMRON for more information.
ER:003e Read/write Request Aborted
1
Case 4:
Cause:
Transmit error.
Action:
Verify the cable has been constructed properly and that it is
connected to the logical port and device.
External Device
Interface
Case 3:
Cause:
ER:004e Read/Write Request Reception Error
2
Cause:
Timeout error.
Action:
Verify the cable has been connected to the logical port and
device. Also, check that the timeout period has been defined for
the recommended time.
Cause:
Received invalid response character.
Action:
Verify the parity and the number of data and stop bits are
configured properly for the device. Also, verify the cable ground
wire is connected properly.
Cause:
Reception buffer overflow. Response too large for reception
buffer.
Action:
Contact Customer Support immediately.
3
4
OMRON
FactoryLink 6.6.0 / Device Interface Guide / 431
•
OMRON
•
Run-Time Application Messages
•
•
5
Cause:
Received invalid start of data response character.
Action:
Verify the parity and the number of data and stop bits are
configured properly for the device.
Cause:
Received NAK response for command request.
Action:
Verify the Read/Write configuration panel entries are valid for
device parameter. Also, verify the parity and the number of data
and stop bits are configured properly for the device and that the
cable ground wire is connected properly.
6
Case 5:
ER:005e OMRON Response Packet Errors
0
Cause:
Queuing read request error.
Action:
Verify the IBM RIC/ARTIC board and the OMRON protocol
module have sufficient data storage defined. Contact Customer
Support if the problem persists.
Cause:
Queuing write request error.
Action:
Verify the IBM RIC/ARTIC board and the OMRON protocol
module have sufficient data storage defined. Contact Customer
Support if the problem persists.
Cause:
Read or write request too large for the transmit buffer.
Action:
Contact Customer Support immediately.
Cause:
OMRON read/write response produced an unknown error.
Action:
Contact Customer Support immediately.
1
2
3
432 / FactoryLink 6.6.0 / Device Interface Guide
OMRON
Run-Time Application Messages
Case A:
ER:00Ae OMRON Response Errors
16
0
Aborted due to parity error in transmit data.
Action:
Verify the parity setup matches the device.
Cause:
Aborted due to framing error in transmit data.
Action:
Verify the number of data and stop bits setup matches the
device.
Cause:
Aborted due to overrun in transmit data.
Action:
Verify the number of data and stop bits set up matches the
device.
Cause:
Aborted due to format error in transmit data.
Action:
Verify the Read/Write configuration panel entries are valid for
device parameter. Contact Customer Support if the problem
persists.
Cause:
Aborted due to entry number data error in transmit data.
Action:
Verify the Read/Write configuration panel entries are valid for
device parameter. Contact Customer Support if the problem
persists.
Cause:
Aborted due to frame length error in transmit data.
Action:
Verify the Read/Write configuration panel entries are valid for
device parameter. Contact Customer Support if the problem
persists.
1
External Device
Interface
Cause:
2
4
5
FactoryLink 6.6.0 / Device Interface Guide / 433
OMRON
8
•
OMRON
•
Run-Time Application Messages
•
•
Case B:
ER:00Be OMRON Response Errors
0
Cause:
Not executable because program area is not 16K bytes.
434 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 17
Siemens CP525
17
Note
External Device
Interface
This chapter contains information to set up and configure bidirectional
communications between the FactoryLink real-time database and the Siemens
CP525 using RK512 with either 3964 or 3964R protocol.
Before completing the protocol-specific Siemens CP525
configuration panels, you must complete the External Device
Definition panel. See “Identifying Protocol Types and Defining
Logical Ports” on page 84 for details.
FactoryLink 6.6.0 / Device Interface Guide / 435
Siemens CP525
When you choose Siemens CP525 from the Configuration Manager Main Menu, the
Siemens CP525 configuration panels are displayed.
•
SIEMENS CP525
•
Configuring the Logical Station Control Panel
•
•
C ONFIGURING
THE
L OGICAL S TATION C ONTROL P ANEL
To bring the Logical Station Control panel to the foreground, click on its title bar
in the display of all configuration panels.
Complete a row for each logical port specified in the External Device Definition
panel you want to define as a communication path for read and write operations.
Logical Port
Enter a number, defined in the External Device Definition panel
Logical Port column, to represent a particular communication path
to a device.
Valid Entry: previously defined logical port number
Baud Rate
Enter the speed at which the protocol module communicates with
the devices linked to FactoryLink via this logical port. This entry
must match the baud rate configuration of the devices. Refer to
the device manufacturer’s documentation for details.
Valid Entry: 110, 150, 300, 600, 1200, 2400, 3600, 4800, 7200,
9600, 19200 (default=9600)
Parity
Enter the parity error correction during transmission via this
logical port. This entry must match the configuration of the
devices communicating via this port. Refer to the device
manufacturer’s documentation for details.
Valid Entry: none, even, odd (default=even)
436 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS CP525
Configuring the Logical Station Control Panel
Data Bits
Enter the number of data bits used during transmission via this
logical port. This entry must match the configuration of the
devices communicating via this port. Refer to the device
manufacturer’s documentation for details.
Stop Bits
Enter the number of bits sent after a character to create a pause
before the start of the next character. This entry must match the
configuration of the devices communicating via this port. Refer to
the device manufacturer’s documentation for details.
Valid Entry: 1, 2 (default=1)
Response
Timeout 0.1 Sec
Enter the length of time, in tenths of a second, the protocol
module will wait to receive a response to a read or write command
before timing out. You must enter a value greater than 0 for the
protocol module to timeout.
External Device
Interface
Valid Entry: 7, 8 (default=8)
17
Valid Entry: standard Siemens timeouts, based on the baud
rate (default=0)
Enter the type of error detection protocol.
None Siemens Procedure 3964
BCC (Default) Siemens Procedure 3964R
Retry Request
Enter the maximum number of times the protocol module will
retry a read or write command to a device communicating
through this logical port if the command response is invalid or is
not received.
Valid Entry: 0 - 65535 (default=3)
Master/Slave
Indicate whether the FactoryLink station is the Master or the
Slave of the communications channel.
M (Default) Master
S Slave
Status Msg Tag
(Optional) Enter a tag name for a message element to which a
text string will be written to indicate a communications error
associated with this logical port.
Valid Entry: standard element tag name
Valid Data Type: message
FactoryLink 6.6.0 / Device Interface Guide / 437
Siemens CP525
LRC Error
Detection
•
SIEMENS CP525
•
Configuring the Logical Station Control Panel
•
•
When the panel is complete, click on Enter to validate the information. Define the
data type (message) for any tag names displayed in the Tag Definition dialog.
Table 17-0 provides sample entries for the Siemens 525 Logical Station Control
panel:
Table 17-0 Sample Siemens 525 Logical Station Control Panel Entries
Field
Entry
Description
Logical Port
0
Specifies the logical
communication path configured
by this table.
Baud Rate
9600
Specifies the communication
rate.
Parity
EVEN
Adds a parity bit to the sum of
the transmitted bits to make it
even.
Data Bits
8
Specifies 8 data bits in the
transmission.
Stop Bits
1
Specifies 1 stop bit in the
transmission.
Response Timeout (0.1
Sec)
100
The response timeout is 10
seconds.
LRC Error Detection
BCC
Specifies the error checking
method.
Retry Request
3
Attempt the request three times
before generating a timeout.
Master/Slave
M
Master (default).
Status Msg Tag
SIEM_LPORT0_
MSG
Message tag containing Siemens
error messages.
438 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS CP525
Configuring the Logical Station Information Panel
C ONFIGURING
THE
L OGICAL S TATION I NFORMATION P ANEL
Error /Status Tag
Name
(Optional) Enter a tag name for an analog element in which to
store communications error codes associated with this device
(logical station).
You can animate output-text objects to display the codes stored in
an Error/Status Tag Name element on a graphics screen. Refer to
the Application Editor for more information.
Valid Entry: standard element tag name
Valid Data Type: analog
Logical Station
Enter a number to identify the logical station to which the
information in this row pertains. A logical station represents the
combination of a logical port with a physical station. Assign a
unique number to each device communicating through this
logical port.
FactoryLink 6.6.0 / Device Interface Guide / 439
Siemens CP525
Complete a row for each device to communicate through this logical port.
17
External Device
Interface
From the Logical Station Control panel, select the row for the logical port you are
configuring and click on Next to bring the Logical Station Information panel to the
foreground.
•
SIEMENS CP525
•
Configuring the Logical Station Information Panel
•
•
You will later enter this logical station number in a read or write
table to represent the device defined in this row. In a read or
write table, this number will identify the device to or from which
data is to be sent or received.
Valid Entry: 0 - 999
Max Packet
Length
Define the maximum number of bytes the device defined in this
row can transmit in one message. Most devices can transmit 256
bytes, or 128 registers of data. The protocol being used
(point-to-point or IEEE 802.3) does not affect the maximum
packet size.
Valid Entry: 32, 64
Comment
(Optional) Enter reference information about this logical station.
Valid Entry: alphanumeric string of up to 21 characters
When the panel is complete, click on Enter to validate the information. Define the
data type (analog) for any tag names displayed in the Tag Definition dialog.
Table 17-0 provides sample entries for the Siemens 525 Logical Station
Information panel:
Table 17-0 Sample Siemens 525 Logical Station Information Panel Entries
Field
Entry
Description
Error/Status Tag Name
SIEM_STATION0_
STATUS
Contains information about
communication errors.
Logical Station
0
Specifies the logical
communication path.
Max Packet Length
64
Maximum packet length is 64.
440 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS CP525
Configuring the Read/Write Control Panel
C ONFIGURING
THE
R EAD /WRITE C ONTROL P ANEL
Siemens CP525
Complete a row for each read or write table.
Tip
Refer to Chapter 8, “Application Design Tips and Techniques,” for
information about triggering schemes using elements defined in
this panel.
Table Name
17
External Device
Interface
To bring the Read/Write Control panel to the foreground, click on its title bar in
the display of all configuration panels or click on Next from the Logical Station
Information panel.
Give this read or write request a name. Define one request (table)
per line and do not include spaces in the name. You can define as
many tables in this panel as available memory allows. Try to
make the table name reflective of the operation it represents.
If this is a triggered read or a block write table, when the trigger
element (Block Read Trigger for a read operation or Block Write
Trigger for a write operation) is forced to 1 (ON), the element
prompts FactoryLink to process this table and any other table in
which the same trigger is defined.
Valid Entry: alphanumeric string of up to 16 characters
FactoryLink 6.6.0 / Device Interface Guide / 441
•
SIEMENS CP525
•
Configuring the Read/Write Control Panel
•
•
Unsolicited Read
For EDI to interpret this operation as a triggered block read or as
a write operation, accept the default of NO.
If this is an unsolicited read operation, enter YES or FORCE. EDI
will interpret this operation as an unsolicited read and emulate
the device’s addressing structure based on entries you make in
the Read/Write Information panel. The incoming data will be
stored in the real-time database as specified in this field.
If you enter YES, the incoming data will be stored in the element
represented by the tag name specified in the Read/Write
Information panel. If the current value of the element is equal to
the new value, the change-status indicator is unaffected. If a
different value is being stored the element, however, it will
overwrite the current value and the element’s change-status
indicator will be set to 1 (ON).
If you enter FORCE, the data is stored in the specified element
and the change-status indicator is automatically set to 1,
regardless of whether the current value matches the new value.
Valid Entry: yes, no, force (default=no)
Exception Write
For EDI to interpret this operation as a triggered block write or
as a read operation, accept the default of NO.
For EDI to interpret this operation as an exception write and
write element values to the device only when those values
change, enter YES. Do not specify elements expected to change at
frequent and unpredictable intervals in an exception write table.
Any element specified will be written to the device in its own
packet (message) each time it changes. Defining elements that
change value frequently as exception writes can slow down
communications or result in an error message.
In an exception write, an internal change-status indicator within
the element containing the data to be written prompts the write
operation. If an element is configured for an exception write and
EDI recognizes this indicator has been set since the last scan of
the real-time database (indicating the value of the element has
changed), EDI writes this element’s value to the device.
Valid Entry: yes, no (default=no)
442 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS CP525
Configuring the Read/Write Control Panel
Block Read
Priority
If this is an unsolicited read or a write operation, accept the
default of 1. This field defaults to 1 regardless of whether the
operation being defined is a block read.
Valid Entry: 1 - 4 (default=1)
Note
17
External Device
Interface
If this is a block read operation, enter a number to indicate the
priority of this table, relative to other read operations. The
highest priority is 1. This number influences the order in which
the EDI task handles the queuing of block read requests. If EDI
receives two requests at the same time, it processes the request
with the highest priority first. The default is 1.
The Block Read Trigger, Block Read Disable, Block Read Complete, and
Block Read State elements apply only to triggered read operations.
Do not define these elements for unsolicited read operations or for
write operations.
If this is an unsolicited read or a write operation, ignore this field.
If this is a triggered read operation, this field is required. Enter a
tag name for a digital element to initiate a block read of the
addresses specified in the Read/Write Information panel. When
this element’s value is forced to 1 (ON), the addresses are read.
Valid Entry: standard element tag name
Valid Data Type: digital
Tip
The Block Read Disable element can be used to disable a block read
operation that is either part of a cascaded loop or is self-triggered.
The triggering cycle will cease upon disabling, however. To
re-enable a cascaded loop or a self-triggered read table, the Block
Read Trigger element must be toggled or forced to 1. Refer to
Chapter 8, “Application Design Tips and Techniques,” for details.
FactoryLink 6.6.0 / Device Interface Guide / 443
Siemens CP525
Block Read
Trigger
•
SIEMENS CP525
•
Configuring the Read/Write Control Panel
•
•
Block Read
Disable
If this is an unsolicited read or a write operation, ignore this field.
If this is a triggered read operation, this field is optional. If you
need a digital element to disable a block read of the elements
specified in this table, enter a tag name. When this tag’s value is
forced to 1 (ON), the read operation is not executed, even when
the block read trigger is set to 1.
To re-enable a block read table that has been disabled, set this
element back to 0 (OFF).
Valid Entry: standard element tag name
Valid Data Type: digital
Block Read
Complete
If this is an unsolicited read or a write operation, ignore this field.
If this is a triggered read operation, this field is optional. If you
need a digital element to indicate when this operation is
complete, enter a tag name. This element is forced to 1 (ON) at
startup. After the elements defined in the Read/Write
Information panel have been updated in the FactoryLink
database, the complete element is forced to 1 again.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Read State
If this is an unsolicited read or a write operation, ignore this field.
If this is a triggered read operation, this field is optional. If you
need a digital element to indicate the state of this operation (in
progress or complete), enter a tag name. This element is forced to
1 (ON) at startup. While the table is being processed, the element
is set to 0 (OFF). After the elements defined in the Read/Write
Information panel have been updated in the FactoryLink
database, the state element is forced back to 1.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write
Priority
If this is a block or exception write operation, enter a number to
indicate the priority of this table, relative to other write
operations. The highest priority is 1. This number influences the
order in which the EDI task handles the queuing of write
requests. If EDI receives two requests at the same time, it
processes the request with the highest priority first. The default
is 1.
444 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS CP525
Configuring the Read/Write Control Panel
If this is a read operation, accept the default of 1. This field
defaults to 1 regardless of whether the operation being defined is
a block or exception write.
17
Valid Entry: 1 - 4 (default=1)
The Block Write Trigger, Block Write Disable, Block Write Complete, and
Block Write State elements apply only to write operations. Do not
define these elements for read operations.
Block Write Trigger
If this is a read operation or an exception write operation you do
not plan to periodically disable, ignore this field.
Valid Entry: standard element tag name
Valid Data Type: digital
Tip
The Block Write Disable element can be used to disable a block
write operation that is either part of a cascaded loop or is
self-triggered. The triggering cycle will cease upon disabling,
however. To re-enable a cascaded loop or a self-triggered write
table, the Block Write Trigger element must be toggled or forced to 1.
Refer to Chapter 8, “Application Design Tips and Techniques,” for
further details.
Block Write
Disable
If this is a read operation or an exception write operation you do
not plan to periodically disable, ignore this field.
If this is a block write table or an exception write table you plan
to periodically disable, this field is optional. Enter a tag name for
a digital element to disable a block write to the addresses
specified in this table. When this tag’s value is forced to 1 (ON),
the write operation is not executed, even when the block write
trigger is set to 1.
FactoryLink 6.6.0 / Device Interface Guide / 445
Siemens CP525
If this is a block write table or an exception write table you plan
to periodically disable, this field is required. Enter a tag name for
a digital element to initiate a block write of the element values
specified in the Read/Write Information panel to the addresses
defined to receive the values. When this element’s value is forced
to 1 (ON), FactoryLink writes the values.
External Device
Interface
Note
•
SIEMENS CP525
•
Configuring the Read/Write Control Panel
•
•
To re-enable a block write table that has been disabled, set this
element back to 0 (OFF).
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write
Complete
If this is a read or exception write operation, ignore this field.
If this is a block write table, this field is optional. If you need a
digital element to indicate when this operation is complete, enter
a tag name. This element is forced to 1 (ON) at startup. After the
data defined in this table’s Read/Write Information panel has
been written to the device, the complete element is forced to 1
again.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write State
If this is a read or exception write operation, ignore this field.
If this is a block write operation, this field is optional. If you need
a digital element to indicate the state of this operation (in
progress or complete), enter a tag name. This element is forced to
1 (ON) at startup. While the table is being processed, the element
is set to 0 (OFF). After the data defined in this table’s Read/Write
Information panel has been written to the device, the state
element is forced back to 1.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
When the panel is complete, click on Enter to validate the information. Define the
data type (digital) for any tag names displayed in the Tag Definition dialog.
446 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS CP525
Configuring the Read/Write Control Panel
Table 17-0 provides sample entries for the Siemens 525 Read/Write Control panel:
17
Table 17-0 Sample Siemens 525 Read/Write Control Panel Entries
Entry
Description
READ
Specifies the table name.
Unsolicited Read
NO
Table will not perform
unsolicited reads.
Exception Write
NO
Table will not perform exception
writes.
Block Read Priority
1
Priority for tables set to 1.
Block Read Trigger
SIEM_READ_
TRIGGER
When the value of SIEM_READ_
TRIGGER is 1 or (on), a block
read of values specified by the
Read/Write Information panel
associated with SIEMBRD
occurs.
Block Write Priority
1
The write priority for this table is
set to 1 by default.
Block Write Trigger
Since this is a read table, the
elements specific to write
requests are not defined.
Block Write Complete
Block Write Disable
Block Write State
FactoryLink 6.6.0 / Device Interface Guide / 447
Siemens CP525
Table Name
External Device
Interface
Field
•
SIEMENS CP525
•
Configuring the Read/Write Information Panel
•
•
C ONFIGURING
THE
R EAD /WRITE I NFORMATION P ANEL
From the Read/Write Control panel, select the row for the table you are
configuring and click on Next to bring the Read/Write Information panel to the
foreground.
For a Read Table—Add a panel entry for each FactoryLink database element in
which data read from the device will be stored when the operation executes.
For a Write Table—Add a panel entry for each element to be written when the
operation executes.
Tip
Alternatively, the elements you define in the Read/Write
Information panel can be configured in the Tag Definition dialog in
the Application Editor. Refer to the Application Editor for details.
Tag Name
For a read table, specify a tag name for an element in which
FactoryLink will store the data read from the device.
For a write table, specify a tag name for an element containing a
value to be written to the device.
Valid Entry: standard element tag name
Valid Data Type: digital, analog, longana, float, message
448 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS CP525
Configuring the Read/Write Information Panel
Logical Station
Valid Entry: previously defined logical station number
PLC Region
Enter the data area of the PLC to be read/written.
For read operations:
CB Counters
DB Data block
17
External Device
Interface
Enter the number representing the device from which the data is
to be read or to which the element’s value will be written. This
number was originally defined in the Logical Station Information
panel for the logical port through which communications with
this device occurs.
DX Extended data block
FB Flag bytes
IB Input bytes
OB Output bytes
TB Timers
For write operations:
DB Data block
DX Extended data block
Data Block
Enter the data block number of the address to be read or written.
Valid Entry: 3 - 255
Word/ Byte
Enter the address of word in word regions or address of byte in
byte regions that is read or written.
0-255 CB, DB, DX, FB, PB, TB
0-127 IB, OB
Bit/Length
(For digital elements) Bit in the word or byte that is read or
written.
0 (LSB) - 15 (MSB): For word regions
0 (LSB) - 7 (MSB): For byte regions
(For message elements) Length in word or byte that is read or
written.
FactoryLink 6.6.0 / Device Interface Guide / 449
Siemens CP525
PB Peripheral blocks
•
SIEMENS CP525
•
Configuring the Read/Write Information Panel
•
•
Length in words: (For word regions) Limited to the packet size
for the station: 64 = 64 words; 32 = 32 words
Length in bytes: (For byte regions) Limited to the packet size
for the station: 64 = 128 bytes; 32 = 64 bytes
Data Type
Specify the type of data being read from or written to the device
for each element defined in the Tag Name field.
Valid Entry: Refer to “Siemens CP525 Data Types” on page
453.
Coordination
Flag CPU
Specify the number of the CPU that is to process the read or write
operation or enter NONE for no CPU.
Valid Entry: NONE, 0 - 4 (default=NONE)
Coordination
Flag Byte
Specify the byte number of the coordination flag or enter NONE if
no coordination flag is set.
Valid Entry: NONE, 0 - 254 (default=NONE)
Coordination
Flag Bit
Specify the bit number of the coordination flag or enter NONE if
no coordination flag is set.
Valid Entry: NONE, 0 - 7 (default=NONE)
When the panel is complete, click on Enter to validate the information. Define the
data type (digital, analog, long analog, or floating-point) for any tag names
displayed in the Tag Definition dialog.
450 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS CP525
Configuring the Read/Write Information Panel
Table 17-0 provides sample entries for the Siemens 525 Read/Write Information
panel:
17
Table 17-0 Sample Siemens 525 Read/Write Information Panel Entries
Entry
Description
READ
Specifies the Read/Write table
name.
Tag Name
SIEMDIG1
The value read from the device
will be stored in SIEMDIG1.
Logical Station
0
Specifies the path to send the
request.
PLC Region
DB
Data block.
Data Block
10
Data block in the PLC to write
the value of SIEMDIG1.
Word/Byte
6
Word/byte in the PLC to write
the value of SIEMDIG1.
Bit/Length
3
Bit/length of the value written.
Data Type
DW
Defaults to Siemens data type
BIN.
Coordination Flag CPU
NONE
Coordination Flag Byte
NONE
Coordination Flag Bit
NONE
FactoryLink 6.6.0 / Device Interface Guide / 451
Siemens CP525
Table Name
External Device
Interface
Field
•
SIEMENS CP525
•
Siemens CP525 Switches
•
•
S IEMENS CP525 S WITCHES
For information about setting Siemens CP525 switches, refer to Section 3.4 of
Siemens COM525 for CP524 and CP525 (S5-DOS), Volume 1, order number
6ES5998-1DB21, release 05.
452 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS CP525
Siemens CP525 Data Types
S IEMENS CP525 D ATA TYPES
17
Table 17-0 Default Conversions for FactoryLink Data Types
FactoryLink Data Types
Siemens PLC Data Types
DIG
Analog
INT2
Longana
INT4
Float
FLT
Message
LOHI
Each FactoryLink data type also has a range of valid Siemens PLC data types.
You may choose to specify a Siemens PLC data type. The following table shows the
FactoryLink data types, and the corresponding Siemens PLC data types.
Table 17-0 Digital Conversion
PLC Type
DIG
Conversion
Single bit of a word or byte is read or written
Table 17-0 Analog Conversion
PLC Type
INT2
Conversion
Converts the FactoryLink value to or from a 2-byte, signed
integer
FactoryLink 6.6.0 / Device Interface Guide / 453
Siemens CP525
Digital
External Device
Interface
When you configure the Data Type field of the Siemens CP525 Read/Write
Information panel, each FactoryLink data type has a default Siemens PLC data
type. By using the PLC data type BIN, you may specify the default entry in
configuration table. (For compatibility with previous versions, the Data Type DW
defaults to BIN.) The following table shows the default conversions for each of the
FactoryLink data types.
•
SIEMENS CP525
•
Siemens CP525 Data Types
•
•
Table 17-0 Analog Conversion (Continued)
PLC Type
Conversion
INT4
Converts the FactoryLink value to or from a 4-byte, signed
integer
BCD3
Converts the FactoryLink value to or from a 2-byte, unsigned,
three-digit, binary-coded decimal
BCD7
Converts the FactoryLink value to or from a 4-byte, unsigned,
seven-digit, binary-coded decimal
FLT
Converts the FactoryLink value to or from a 4-byte, Siemens
PLC floating-point
BYTE
(Valid only in byte PLC regions) Converts the FactoryLink value
to or from a single unsigned byte (0 - 255)
Table 17-0 Longana Conversion
PLC Type
Conversion
INT2
Converts the FactoryLink value to or from a 2-byte, signed
integer
INT4
Converts the FactoryLink value to or from a 4-byte signed
integer
BCD3
Converts the FactoryLink value to or from a 2-byte, unsigned,
three-digit, binary-coded decimal
BCD7
Converts the FactoryLink value to or from a four-digit,
unsigned, seven-digit, binary-coded decimal
FLT
Converts the FactoryLink value to or from a 4-byte Siemens PLC
floating-point
BYTE
(Valid only in byte PLC regions) Converts the FactoryLink value
to or from a single unsigned byte (0 - 255)
454 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS CP525
Siemens CP525 Data Types
Table 17-0 Floating-Point Conversion
17
PLC Type
Conversion
INT4
Converts the FactoryLink value to or from a 4-byte, signed
integer
BCD3
Converts the FactoryLink value to or from a 2-byte, unsigned
three-digit, binary-coded decimal
BCD7
Converts the FactoryLink value to or from a 4-byte, unsigned,
seven-digit, binary-coded decimal
FLT
Converts the FactoryLink value to or from a 4-byte, Siemens
PLC Floating-point
BYTE
(Valid only in byte PLC regions) Converts the FactoryLink value
to or from a single, unsigned byte (0 - 255)
Table 17-0 Message Conversion
PLC Type
Conversion
HILO
Consecutive bytes in the FactoryLink message element are read
or written to the PLC as a high-order (HI) byte followed by a
low-order (LO) byte.
LOHI
Consecutive bytes in the FactoryLink message element are read
or written to the PLC as a low-order (LO) byte followed by a
high-order (HI) byte.
FactoryLink 6.6.0 / Device Interface Guide / 455
Siemens CP525
Converts the FactoryLink value to or from a 2-byte, signed
integer
External Device
Interface
INT2
•
SIEMENS CP525
•
Run-Time Application Messages
•
•
R UN -TIME A PPLICATION M ESSAGES
During EDI run time, FactoryLink generates and displays messages for the
Siemens CP525 protocol module on the Run-Time Manager screen and, if so
configured, writes them to message or analog tags. For information about
configuring a message tag, see “Configuring the Logical Station Control Panel” on
page 436. For information about configuring an analog tag, see “Configuring the
Logical Station Information Panel” on page 439.
For information about the messages displayed for the EDI task and the format in
which protocol module messages are generated, see Chapter 10, “Messages and
Codes.”
The ER:xxxN string in a message contains a single-digit error code. N represents
significant digits and x represents digits not significant to the error. ER:xxxN is a
single-digit format in which one digit represents a single error condition. In some
cases, two individual codes appear within a string to indicate multiple error
conditions.
0001h
Cause:
Internal error.
Action:
Contact Customer Support.
Cause:
Unable to successfully communicate with PLC.
Action:
Check line parameters (baud rate, data bits, etc.), cable, CP525
programming.
Cause:
Unable to receive response to read/write request.
Action:
Check CP525 programming.
Cause:
Internal error.
Action:
Contact Customer Support.
0002h
0003h
0004h
456 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS CP525
Run-Time Application Messages
XX05h
Received error code XXh from Siemens PLC in response packet.
Action:
Refer to Siemens CP525 documentation.
Cause:
After retry count, received more or fewer bytes than requested in
read request packet.
Action:
Contact Customer Support.
Cause:
Internal error.
Action:
Contact Customer Support.
0006h
0007h
17
External Device
Interface
Cause:
Siemens CP525
FactoryLink 6.6.0 / Device Interface Guide / 457
•
SIEMENS CP525
•
Run-Time Application Messages
•
•
458 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 18
Siemens H1
18
• CP-535, CP-143 card
• CP-1433, CP-1434
External Device
Interface
This chapter contains information needed to set up and configure bidirectional
communications between the FactoryLink real-time database and any Siemens
Simatic S5 or S505 PLC using one of the following interfaces:
• Ethernet interface card over an Ethernet network
S IEMENS H1 C OMMUNICATIONS
Communication in the Siemens H1 protocol module occurs between the Siemens
Ethernet Interface and the Device Control Module (DCM) using logical entities
called Transport Service Access Points (TSAPs).
TSAPs are communication points that link the Siemens Ethernet Interface and
the DCM. TSAPs work in pairs. A DCM TSAP works with a Siemens Ethernet
Interface TSAP, with one TSAP on each side of the communication link.
Types of Communication
On one side of the communication link, the DCM performs three types of
communication. Each type of communication has an associated TSAP pair. The
DCM performs the following types of communication:
• Solicited Reads—Block reads of data from the Siemens PLC to the real-time
database.
S505—The Read Active/Passive TSAP pair consists of a Read active TSAP in
the DCM and a Read passive TSAP in the Siemens Ethernet Interface card.
• Solicited Writes—Block and exception writes of data from the real-time
database to the Siemens PLC.
S5—The Write Active/Passive TSAP pair consists of a Send active TSAP in the
DCM and a Receive passive TSAP in the Siemens Ethernet Interface card.
FactoryLink 6.6.0 / Device Interface Guide / 459
Siemens H1
S5—The Read Active/Passive TSAP pair consists of a Fetch active TSAP in the
DCM and a Fetch passive TSAP in the Siemens Ethernet Interface card.
•
SIEMENS H1
•
Siemens H1 Communications
•
•
S505—The Write Active/Passive TSAP pair consists of a Write active TSAP in
the DCM and a Write passive TSAP in the Siemens Ethernet Interface card.
• Unsolicited Reads
S5—Siemens PLC-generated writes sending data from the Siemens PLC to the
real-time database. The Write Active/Passive TSAP pair consists of a Receive
passive in the DCM and a Send active in the Siemens Ethernet Interface card.
S505—Siemens PLC-generated writes sending data from the Siemens PLC to
the real-time database. The Write Active/Passive TSAP pair consists of a Write
passive in the DCM and a Write active in the Siemens Ethernet Interface card.
Table 18-0 describes the relationships between the three types of communication
performed by the DCM and the TSAP pairs.
Table 18-0 Communications and the TSAP Pairs
TSAP Pair
Type of
Communication
Initiator of the
Communication
Siemens PLC
Ethernet
Interface
DCM
Type of Data
Exchanged
Solicited Reads/
Siemens Read
Active/Passive
FactoryLink
Fetch passive
(S5)
Read passive
(S505)
Fetch active
(S5)
Read active
(S505)
Block reads
Solicited Writes/
Siemens Write
Active/Passive
FactoryLink
Receive passive
(S5)
Write passive
(S505)
Send active (S5) Block and
exception writes
Write active
(S505)
Unsolicited Reads/
Siemens Write
Active/Passive
External
Device
Send active
Receive passive
Siemens PLCgenerated
writes
where:
Active
Describes the Siemens Interface co-processor jobs and denotes
the initiator or “master” of the link.
Passive
Describes the Siemens Interface co-processor jobs and denotes
the receiver or “slave” of the link.
460 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Siemens H1 Communications
Fetch
Send
Describes the Siemens Interface co-processor jobs that transmit
information to an external device. These are only Active.
Describes the Siemens Interface co-processor jobs that receive
information from an external device. These are only Passive.
Defining a TSAP Pair
Each line you configure in the Siemens H1 Logical Station Information panel
corresponds to a specific Siemens Ethernet Interface on the LAN. The information
you configure in each line enables the Device Control Module to allocate TSAPs
and to connect each DCM TSAP with its corresponding Siemens Ethernet
Interface TSAP.
18
External Device
Interface
Receive
Describes the Siemens Interface co-processor jobs that request
information from an external device. These are either Active or
Passive.
To define a TSAP pair, you must first obtain the following information:
• The DCM FactoryLink platform Ethernet adapter address
• The Siemens PLC Ethernet adapter address
• The Remote TSAP ID
• The Local TSAP ID
Note
The terms “local” and “remote” are relative to your configuration.
When you configure the Siemens H1 tables, make the FactoryLink
side of the communications link “local” and the Siemens Ethernet
Interface side “remote.”
The TSAP ID is an eight-character, fixed-length ASCII string. As long as the
Device Control Module and the Siemens Ethernet Interface are programmed with
corresponding values, these fields can be any eight-character ASCII string. The
Siemens Ethernet Interface programming software defaults the TSAP ID based
on the Ethernet Interface's SSNR (CP board number) and ANR (CP job number).
FactoryLink 6.6.0 / Device Interface Guide / 461
Siemens H1
You must program the Ethernet adapter address of the FactoryLink platform in
the Siemens Ethernet Interface. For further information about the Ethernet
address of the FactoryLink platform, refer to “Siemens H1 Adapter Display
Utility (H1MPDISP)” on page 511.
•
SIEMENS H1
•
Siemens H1 Communications
•
•
Depending on the version of Siemens programming software used, the TSAP ID
defaults to either:
____SSAA (COM535) or
___SS_AA (COM143)
where
“_”
Is a space character in Siemens software programming displays
SS
Is the SSNR (card) number if two-digits
_S
Is the SSNR (card) number if one-digit
AA
Is the ANR (job) number if two-digits
_A
Is the ANR (card) number if one-digit
TSAP IDs and ASCII Equivalents
The EDI task processes the TSAP ID fields by space-padding-right-justifying the
8-byte string to the right-most non-space character. The following examples
illustrate the TSAP IDs and their eight-character ASCII equivalents:
Table 18-0 TSAP IDs and ASCII Equivalents
TSAP ID
8-Character ASCII
“1623”
“^^^^1623”
“1623^”
“^^^^1623”
“1623_”
“^^^1623^”
“12_4”
“^^^^12^4”
“12_4”
“^^^^12^4”
“0^1”
“^^^^^0^1”
Note: The “^” is a space and the “_” is a forced-space.
462 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Accessing the Siemens H1 Tables
A CCESSING
THE
S IEMENS H1 TABLES
18
Note
When you choose Siemens Sinec H1 from the Configuration Manager Main Menu,
the Siemens configuration panels are displayed.
External Device
Interface
Before completing the protocol-specific Siemens H1 configuration
panels, you must complete the External Device Definition panel.
See “Identifying Protocol Types and Defining Logical Ports” on
page 84 for details.
Siemens H1
FactoryLink 6.6.0 / Device Interface Guide / 463
•
SIEMENS H1
•
Configuring the Logical Station Control Panel
•
•
C ONFIGURING
THE
L OGICAL S TATION C ONTROL P ANEL
To bring the Logical Station Control panel to the foreground, click on its title bar
in the display of all configuration panels.
Complete a row for each logical port specified in the External Device Definition
panel you want to define as a communication path for read and write operations.
Logical Port
Enter a number, defined in the External Device Definition panel
Logical Port column, to represent a particular communication path
to a device.
Valid Entry: previously defined logical port number
(default=0)
Ethernet
Adapter
Number
Enter the Ethernet adapter installed in the FactoryLink system
for use with this logical port.
Valid Entry: 0 or 1 (default=0)
At run time, the remaining fields of the Siemens H1 Logical
Station Control panel (except for the Status Message Tag field)
control the system resources used by the Device Control Module
(DCM) task. (The DCM task runs outside of FactoryLink and
provides the interface between the FactoryLink EDI task and the
external device. For more information about the DCM task, refer
to “Siemens H1 Communications” on page 459.)
464 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Configuring the Logical Station Control Panel
Maximum
Concurrent
Tables
Enter the number of tables configured to perform reads/writes on
which the DCM task can operate simultaneously. A table can be a
block read table, a block write table, or an exception write entry
in a Read/Write Control panel.
for the number of solicited tables specified in this field. Each of
these solicited tables contains one or more solicited requests. If
you enter a number larger than the number specified in the
Maximum Concurrent Requests field, you are using memory
inefficiently.
Valid Entry: 5 - 100 (default=10)
Maximum
Concurrent
Requests
External Device
Interface
Enter a number that is equal to or smaller than the Maximum
Concurrent Requests. At startup, the DCM task allocates memory
18
Enter the number of solicited requests (individual read or write
transactions) on which the DCM task can operate simultaneously.
Each request requires slightly over 4 kilobytes of memory.
Valid Entry: 5 - 100 (default=10)
Number
Unsolicited
Buffers
Enter the shared pool of memory available for all logical stations
with configured unsolicited operations. The DCM has a structure
similar to the solicited request for each concurrently active
unsolicited write command received from the PLC transaction.
Each buffer contains slightly over 4 kilobytes of memory.
Valid Entry: 5 - 100 (default=10)
Unsolicited Queue
Size
Enter the internal queue size of unsolicited write commands
(number of elements on queue) received from the PLC awaiting
formatting for the FactoryLink database.
Valid Entry: 5 - 100 (default=10)
Number
Ethernet
Buffers
Enter the shared pool of DCM allocated buffers used by all logical
stations to transmit or receive Ethernet packets. Each buffer is
slightly over 1500 bytes in length.
Valid Entry: 5 - 250 (default=30)
Enter the amount of time in seconds a logical station’s solicited
connections remain active without solicited transactions
occurring.
In the DCM, each connected logical station requires periodic
processing to maintain the connection while no actual solicited
transactions take place with the PLC. Solicited operations to
disconnected stations require additional overhead to reconnect
before a transaction can take place. Therefore, set this time
FactoryLink 6.6.0 / Device Interface Guide / 465
Siemens H1
Solicited Idle
Disconnect
Timeout
(Seconds)
•
SIEMENS H1
•
Configuring the Logical Station Control Panel
•
•
according to the application. For example, when reading from a
station on a 10- to 11-second trigger, set this field to 12 seconds or
more (to keep the connection active) or less than 10 seconds (to
disconnect).
Valid Entry: 0 (never) - 32767 (default=120)
Unsolicited Idle
Disconnect
Timeout
(Seconds)
Enter the amount of time in seconds a logical station’s unsolicited
connections remain active without unsolicited transactions
occurring.
In the DCM, each connected logical station requires periodic
processing to maintain the connection while no actual unsolicited
transactions are taking place with the PLC. Unsolicited
operations to disconnected stations require additional overhead
to reconnect before a transaction can take place. Therefore, set
this time according to the needs of your application. For example,
when reading from a station on a 10- to 11-second trigger (that is,
if the PLC sends messages every 10 to 11 seconds), set the
unsolicited idle disconnect timeout to 12 seconds or more (to keep
the connection active) or less than 10 seconds (to disconnect).
Valid Entry: 0 (never) - 32767 (default=300)
Status
Msg Tag
(Optional) Enter a tag name for a message element to which a
text string will be written to indicate a communications error
associated with this logical port.
Valid Entry: standard element tag name
Valid Data Type: message
When the panel is complete, click on Enter to validate the information. Define the
data type (message) for any tag names displayed in the Tag Definition dialog.
Table 18-0 provides sample entries for the Siemens H1 Logical Station Control
panel:
Table 18-0 Sample Siemens H1 Logical Station Control Panel Entries
Field
Entry
Description
Logical Port
0
Communications path specified
for this configuration.
Ethernet Adapter
Number
0
Number of the Ethernet adapter
used in this configuration.
466 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Configuring the Logical Station Control Panel
Table 18-0 Sample Siemens H1 Logical Station Control Panel Entries (Continued)
18
Field
Entry
Description
10
The DCM can operate 10
solicited tables at the same time.
Maximum Concurrent
Requests
10
The DCM can operate 10
solicited requests at the same
time.
Number Unsolicited
Buffers
10
Ten buffers will be used for
storage of data from unsolicited
requests for all the logical
stations.
External Device
Interface
Maximum Concurrent
Tables
Ten elements will be on queue
from unsolicited requests
awaiting formatting in the
FactoryLink real-time database.
Unsolicited Queue Size
30
Thirty DCM allocated buffers
have been configured for use by
all logical stations for Ethernet
packets.
Solicited Idle
Disconnect Timeout
(Seconds)
120
The logical station’s solicited
connection remains active for 120
seconds without solicited
transactions occurring.
Unsolicited Idle
Disconnect Timeout
(Seconds)
300
The logical station’s unsolicited
connections remain active for 300
seconds without unsolicited
transactions occurring.
Status Msg Tag
H1MP_LPORT0_
MSG
The EDI task writes errors for
this logical port 0 to this message
element.
FactoryLink 6.6.0 / Device Interface Guide / 467
Siemens H1
Number Ethernet
Buffers
•
SIEMENS H1
•
Configuring the Logical Station Information Panel
•
•
C ONFIGURING
THE
L OGICAL S TATION I NFORMATION P ANEL
From the Logical Station Control panel, select the row for the logical port you are
configuring and click on Next to bring the Logical Station Information panel to the
foreground.
Complete a row for each device to communicate through this logical port.
Error/Status Tag
Name
(Optional) Enter a tag name for an analog element in which to
store communications error codes associated with this device
(logical station).
You can animate output-text objects to display the codes stored in
an Error/Status Tag Name element on a graphics screen. Refer to
the Application Editor for more information.
Valid Entry: standard element tag name
Valid Data Type: analog
Logical Station
Enter a number to identify the logical station to which the
information in this row pertains. A logical station represents the
combination of a logical port with a physical station. Assign a
unique number to each device communicating through this
logical port.
468 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Configuring the Logical Station Information Panel
You will later enter this logical station number in a read or write
table to represent the device defined in this row. In a read or
write table, this number will identify the device to or from which
data is to be sent or received.
PLC Type
Type of Siemens device associated with this logical station.
S5 (Default) Siemens S5 series PLC with either
CP-535 or CP-143
S505 Siemens 505 family stations with the following
Ethernet cards installed:
CP-1433
External Device
Interface
Valid Entry: previously defined logical station number
18
CP-1434
Remote Adapter
Address
(hexadecimal)
Enter the 6-byte (12-nibble) Ethernet address of the Siemens H1
Ethernet defined on this line.
Valid Entry: six address bytes (set by the Ethernet)
080006
------
01
--
0
-
000
--Byte 5 (right nibble) and Byte 6
Hexadecimal number of each
module
Byte 5 (left nibble) systems
identifier for Siemens system
each position
Byte 4 Siemens area UBE
Byte 1-3 number for Siemens
Enter the TSAP ID for the Fetch Passive TSAP on the Siemens
Interface Card with which the Device Control Module
communicates for solicited read operations on this logical station.
Valid Entry: any 8-character ASCII string
FactoryLink 6.6.0 / Device Interface Guide / 469
Siemens H1
Solicited Rd
Remote FCHP
TSAP ID
•
SIEMENS H1
•
Configuring the Logical Station Information Panel
•
•
Solicited Rd
Local FCHA
TSAP ID
Enter the TSAP ID for the Fetch Active TSAP provided by the
Device Control Module with which the DCM communicates for
solicited read operations on this logical station.
Valid Entry: any 8-character ASCII string
Solicited Rd
Station Status
Tag Name
(Optional) Enter the name of an element that reports the
connection status of the two TSAPs for solicited (block) reads. A
value of 0 (OFF) indicates no connection. A value of 1 (ON)
indicates connection.
Valid Entry: standard element tag name
Valid Data Type: digital
Solicited Wr
Remote RECV
TSAP ID
Enter the TSAP ID for the receive passive TSAP on the Siemens
Interface Card with which the DCM communicates for solicited
write operations on this logical station.
Valid Entry: any 8-character ASCII string
Solicited Wr
Local SEND
TSAP ID
Enter the TSAP ID for the send active TSAP provided by the
Device Control Module with which the DCM communicates for
solicited write operations on this logical station.
Valid Entry: any 8-character ASCII string
Solicited Wr
Station Status
Tag Name
(Optional) Enter the name of an element that reports the
connection status of the two TSAPs for solicited (block and
exception) writes. A value of 0 (OFF) indicates no connection. A
value of 1 (ON) indicates connection.
Valid Entry: standard element tag name
Valid Data Type: digital
Unsolicited Rd
Remote SEND
TSAP ID
Enter the TSAP ID for the Send Active TSAP on the Siemens
Interface Card with which the DCM communicates for unsolicited
read operations on this logical station.
Valid Entry: any 8-character ASCII string
Unsolicited Rd
Local RECV
TSAP ID
Enter the TSAP ID for the Receive Passive TSAP provided by the
DCM with which the DCM communicates for unsolicited read
operations on this logical station.
Valid Entry: any 8-character ASCII string
470 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Configuring the Logical Station Information Panel
Unsolicited Rd
Station Status
Tag Name
(Optional) Enter the name of an element that reports the
connection status of the two TSAPs for unsolicited reads. A value
of 0 (OFF) indicates no connection. A value of 1 (ON) indicates
connection.
Comment
(Optional) Enter reference information about this logical station.
Valid Entry: alphanumeric string of up to 21 characters
When the panel is complete, click on Enter to validate the information. Define the
data type (analog) for any tag names displayed in the Tag Definition dialog.
External Device
Interface
Valid Entry: standard element tag name
Valid Data Type: digital
18
Table 18-0 provides sample entries for the Siemens H1 Logical Station
Information panel:
Table 18-0 Sample Siemens H1 Logical Station Information Panel Entries
Field
Entry
Description
H1MP_STATION0_
STATUS
(Optional) Errors for this logical
station are written to this analog
element.
Logical Station
0
Communications path for the
communication.
Remote Adapter
Address (hexadecimal)
0800006010001
Remote Ethernet address (in
hexadecimal).
Solicited Rd Remote
FCHP TSAP ID
85
Fetch Passive TSAP SSNR 8,
ANR 5.
Solicited Rd Local
FCHA TSAP ID
81
Fetch Active TSAP SSNR 8,
ANR 1.
Solicited Rd Station
Status Tag Name
H1MP_LS0_R
(Optional) Digital element
containing the status of the
TSAP for solicited read
operations for logical station 1.
Has a value of 0 (OFF) when
disconnected and 1 (ON) when
connected.
FactoryLink 6.6.0 / Device Interface Guide / 471
Siemens H1
Error Status Tag Name
•
SIEMENS H1
•
Configuring the Logical Station Information Panel
•
•
Table 18-0 Sample Siemens H1 Logical Station Information Panel Entries (Continued)
Field
Entry
Description
Solicited Wr Remote
RECV TSAP ID
84
Receive Passive TSAP SSNR 8,
ANR 4.
Solicited Wr Local
SEND TSAP ID
82
Send Active TSAP SSNR 8,
ANR 2.
Solicited Wr Station
Status Tag Name
H1MP_LS0_W
(Optional) Digital element
containing the status of the
TSAP for solicited write
operations for logical station 1.
Has a value of 0 (OFF) when
disconnected and 1 (ON) when
connected.
Unsolicited Rd Remote
SEND TSAP ID
87
Send Active TSAP SSNR 8,
ANR 7.
Unsolicited Rd Local
SEND TSAP ID
8 10
Receive Passive SSNR 8,
ANR 10.
Unsolicited Rd Station
Status Tag Name
H1MP_LS0_U
(Optional) Digital element
containing the status of the
TSAP for unsolicited read
operations for logical station 1.
Has a value of 0 (OFF) when
disconnected and 1 (ON) when
connected.
Comment
472 / FactoryLink 6.6.0 / Device Interface Guide
(Optional) Information about this
logical station.
SIEMENS H1
Configuring the Read/Write Control Panel
C ONFIGURING
THE
R EAD /WRITE C ONTROL P ANEL
18
External Device
Interface
To bring the Read/Write Control panel to the foreground, click on its title bar in
the display of all configuration panels or click on Next from the Logical Station
Information panel.
Complete a row for each read or write table.
Tip
Refer to Chapter 8, “Application Design Tips and Techniques,” for
information about triggering schemes using elements defined in
this panel.
Table Name
If this is a triggered read or a block write table, when the trigger
element (Block Read Trigger for a read operation or Block Write
Trigger for a write operation) is forced to 1 (ON), the element
prompts FactoryLink to process this table and any other table in
which the same trigger is defined.
Valid Entry: alphanumeric string of up to 16 characters
FactoryLink 6.6.0 / Device Interface Guide / 473
Siemens H1
Give this read or write request a name. Define one request (table)
per line and do not include spaces in the name. You can define as
many tables in this panel as available memory allows. Try to
make the table name reflective of the operation it represents.
•
SIEMENS H1
•
Configuring the Read/Write Control Panel
•
•
Unsolicited Read
For EDI to interpret this operation as a triggered block read or as
a write operation, accept the default of NO.
If this is an unsolicited read operation, enter YES or FORCE. EDI
will interpret this operation as an unsolicited read and emulate
the device’s addressing structure based on entries you make in
the Read/Write Information panel. The incoming data will be
stored in the real-time database as specified in this field.
If you enter YES, the incoming data will be stored in the element
represented by the tag name specified in the Read/Write
Information panel. If the current value of the element is equal to
the new value, the change-status indicator is unaffected. If a
different value is being stored the element, however, it will
overwrite the current value and the element’s change-status
indicator will be set to 1 (ON).
If you enter FORCE, the data is stored in the specified element
and the change-status indicator is automatically set to 1,
regardless of whether the current value matches the new value.
Valid Entry: no, yes, force (default=no)
Exception Write
For EDI to interpret this operation as a triggered block write or
as a read operation, accept the default of NO.
For EDI to interpret this operation as an exception write and
write element values to the device only when those values
change, enter YES.
In an exception write, an internal change-status indicator within
the element containing the data to be written prompts the write
operation. If an element is configured for an exception write and
EDI recognizes this indicator has been set since the last scan of
the real-time database (indicating the value of the element has
changed), EDI writes this element’s value to the device.
Valid Entry: no, yes (default=no)
Tip
Do not specify elements expected to change at frequent and
unpredictable intervals in an exception write table. Any element
specified will be written to the device in its own packet (message)
each time it changes. Defining elements that change value
frequently as exception writes can slow down communications or
result in an error message.
474 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Configuring the Read/Write Control Panel
Block Read
Priority
If this is an unsolicited read or a write operation, accept the
default of 1. This field defaults to 1 regardless of whether the
operation being defined is a block read.
Valid Entry: 1 - 4 (default=1)
Note
18
External Device
Interface
If this is a block read operation, enter a number to indicate the
priority of this table, relative to other read operations. The
highest priority is 1. This number influences the order in which
the EDI task handles the queuing of block read requests. If EDI
receives two requests at the same time, it processes the request
with the highest priority first. The default is 1.
The Block Read Trigger, Block Read Disable, Block Read Complete, and
Block Read State elements apply only to triggered read operations.
Do not define these elements for unsolicited read operations or for
write operations.
Block Read
Trigger
If this is an unsolicited read or a write operation, ignore this field.
If this is a triggered read operation, this field is required. Enter a
tag name for a digital element to initiate a block read of the
addresses specified in the Read/Write Information panel. When
this element’s value is forced to 1 (ON), the addresses are read.
Valid Entry: standard element tag name
Valid Data Type: digital
Tip
FactoryLink 6.6.0 / Device Interface Guide / 475
Siemens H1
The Block Read Disable element can be used to disable a block read
operation that is either part of a cascaded loop or is self-triggered.
The triggering cycle will cease upon disabling, however. To
re-enable a cascaded loop or a self-triggered read table, the Block
Read Trigger element must be toggled or forced to 1. Refer to
Chapter 8, “Application Design Tips and Techniques,” for details.
•
SIEMENS H1
•
Configuring the Read/Write Control Panel
•
•
Block Read
Disable
If this is an unsolicited read or a write operation, ignore this field.
If this is a triggered read operation, this field is optional. If you
need a digital element to disable a block read of the elements
specified in this table, enter a tag name. When this tag’s value is
forced to 1 (ON), the read operation is not executed, even when
the block read trigger is set to 1.
To re-enable a block read table that has been disabled, set this
element back to 0 (OFF).
Valid Entry: standard element tag name
Valid Data Type: digital
Block Read
Complete
If this is an unsolicited read or a write operation, ignore this field.
If this is a triggered read operation, this field is optional. If you
need a digital element to indicate when this operation is
complete, enter a tag name. This element is forced to 1 (ON) at
startup. After the elements defined in the Read/Write
Information panel have been updated in the FactoryLink
database, the complete element is forced to 1 again.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Read
State
If this is an unsolicited read or a write operation, ignore this field.
If this is a triggered read operation, this field is optional. If you
need a digital element to indicate the state of this operation (in
progress or complete), enter a tag name. This element is forced to
1 (ON) at startup. While the table is being processed, the element
is set to 0 (OFF). After the elements defined in the Read/Write
Information panel have been updated in the FactoryLink
database, the state element is forced back to 1.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write
Priority
If this is a block or exception write operation, enter a number to
indicate the priority of this table, relative to other write
operations. The highest priority is 1. This number influences the
order in which the EDI task handles the queuing of write
requests. If EDI receives two requests at the same time, it
processes the request with the highest priority first. The default
is 1.
476 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Configuring the Read/Write Control Panel
If this is a read operation, accept the default of 1. This field
defaults to 1 regardless of whether the operation being defined is
a block or exception write.
18
Valid Entry: 1 - 4 (default=1)
The Block Write Trigger, Block Write Disable, Block Write Complete, and
Block Write State elements apply only to write operations. Do not
define these elements for read operations.
Block Write Trigger
If this is a read operation or an exception write operation you do
not plan to periodically disable, ignore this field.
External Device
Interface
Note
If this is a block write table or an exception write table you plan
to periodically disable, this field is required. Enter a tag name for
a digital element to initiate a block write of the element values
specified in the Read/Write Information panel to the addresses
defined to receive the values. When this element’s value is forced
to 1 (ON), FactoryLink writes the values.
Valid Entry: standard element tag name
Valid Data Type: digital
Tip
The Block Write Disable element can be used to disable a block
write operation that is either part of a cascaded loop or is
self-triggered. The triggering cycle will cease upon disabling,
however. To re-enable a cascaded loop or a self-triggered write
table, the Block Write Trigger element must be toggled or forced to 1.
Refer to Chapter 8, “Application Design Tips and Techniques,” for
further details.
If this is a read operation or an exception write operation you do
not plan to periodically disable, ignore this field.
If this is a block write table or an exception write table you plan
to periodically disable, this field is optional. Enter a tag name for
a digital element to disable a block write to the addresses
specified in this table. When this tag’s value is forced to 1 (ON),
the write operation is not executed, even when the block write
trigger is set to 1.
FactoryLink 6.6.0 / Device Interface Guide / 477
Siemens H1
Block Write
Disable
•
SIEMENS H1
•
Configuring the Read/Write Control Panel
•
•
To re-enable a block write table that has been disabled, set this
element back to 0 (OFF).
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write
Complete
If this is a read or exception write operation, ignore this field.
If this is a block write table, this field is optional. If you need a
digital element to indicate when this operation is complete, enter
a tag name. This element is forced to 1 (ON) at startup. After the
data defined in this table’s Read/Write Information panel has
been written to the device, the complete element is forced to 1
again.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write State
If this is a read or exception write operation, ignore this field.
If this is a block write operation, this field is optional. If you need
a digital element to indicate the state of this operation (in
progress or complete), enter a tag name. This element is forced to
1 (ON) at startup. While the table is being processed, the element
is set to 0 (OFF). After the data defined in this table’s Read/Write
Information panel has been written to the device, the state
element is forced back to 1.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
When the panel is complete, click on Enter to validate the information. Define the
data type (digital) for any tag names displayed in the Tag Definition dialog.
478 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Configuring the Read/Write Control Panel
Table 18-0 provides sample entries for the Siemens H1 Read/Write Control panel:
Table 18-0 Sample Siemens H1 Read/Write Control Panel Entries
Entry
Description
READ
The name of this table is READ.
Unsolicited
Read
NO
This is not an unsolicited read table.
Exception
Write
NO
This is not an exception write table.
Block Read
Priority
1
The block read priority, which is set
automatically if you do not enter a
value, is set to the default of 1, the
highest priority.
Block Read
Trigger
H1MP_READ_TRIGGER
When the value of
H1MP_READ_TRIGGER is 1,
FactoryLink reads the configured
address and writes its value to the
element configured for this table (in
the Read/Write Information panel).
Block Read
Disable
H1MP_READ_DISABLE
When the value of
H1MP_READ_DISABLE is 1,
FactoryLink disregards the trigger
element, H1MP_READ_TRIGGER,
and does not process the READ table.
Block Read
Complete
H1MP_READ_COMPLETE Once the data is read and stored in
the database element defined (in the
Read/Write Information panel) to
receive it, FactoryLink forces a value
of 1 to H1MP_READ_COMPLETE.
Block Read
State
H1MP_READ_STATE
Once the data is read and stored in
the database element defined to
receive it, FactoryLink forces a value
of 1 to H1MP_READ_STATE. During
the read operation,
H1MP_READ_STATE is set to 0.
FactoryLink 6.6.0 / Device Interface Guide / 479
Siemens H1
Table
Name
External Device
Interface
Column
18
•
SIEMENS H1
•
Configuring the Read/Write Control Panel
•
•
Table 18-0 Sample Siemens H1 Read/Write Control Panel Entries (Continued)
Column
Block Write
Priority
Entry
1
Block Write
Trigger
Block Write
Complete
Block Write
Disable
Block Write
State
480 / FactoryLink 6.6.0 / Device Interface Guide
Description
The write priority for this table is set
to 1 by default.
Since this is a read table, the
elements specific to write requests are
not defined.
SIEMENS H1
Configuring the Read/Write Information Panel
C ONFIGURING
THE
R EAD /WRITE I NFORMATION P ANEL
18
External Device
Interface
From the Read/Write Control panel, select the row for the table you are
configuring and click on Next to bring the Read/Write Information panel to the
foreground.
For a Read Table—Add a panel entry for each FactoryLink database element in
which data read from the device will be stored when the operation executes.
For a Write Table—Add a panel entry for each element to be written when the
operation executes.
Tip
Alternatively, the elements you define in the Read/Write
Information panel can be configured in the Tag Definition dialog in
the Application Editor. Refer to the Application Editor for details.
For a read table, specify a tag name for an element in which
FactoryLink will store the data read from the device.
For a write table, specify a tag name for an element containing a
value to be written to the device.
Valid Entry: standard element tag name
Valid Data Type: digital, analog, longana, float, message
FactoryLink 6.6.0 / Device Interface Guide / 481
Siemens H1
Tag Name
•
SIEMENS H1
•
Configuring the Read/Write Information Panel
•
•
Logical Station
Enter the number representing the device from which the data is
to be read or to which the element’s value will be written. This
number was originally defined in the Logical Station Information
panel for the logical port through which communications with
this device occurs.
Valid Entry: previously defined logical station number
Data Region
Enter the PLC region to be read or written.
For valid data regions, refer to the Data Region tables listed
under the Region Index field.
For special DCM commands for a specific logical station, enter
LSCMD. Data regions that accept LSCMD and logical station
variables are marked with an asterisk (*) in the data regions
tables listed under the Region Index field. For further information,
see “Logical Station Commands” on page 492.
Region Index
For DB, DX, or DE regions, enter the region index number.
For S505 stations, enter the first index number.
For valid entries, refer to Table 18-0 and Table 18-0.
For regions that specify a logical station variable which you can
modify at run time using a logical station command, enter a
nonzero negative number from -1 to -8. Refer to “Logical Station
Commands” on page 492 for more information.
Table 18-0 and Table 18-0 describe the data regions supported by
the Siemens H1 protocol module:
Table 18-0 S5 Data Regions
Key
Description
Element
Size
(bytes)
Max
Region
Index
Max
Element
Number
Default
Type
Read
Only
CB
Counters
2
0
255
BIN
No
DB
Data Block
2
255*
2047
BIN
No
DE
External Data Block
2
255*
2047
BIN
No
DX
Expanded Data Block
2
255*
2047
BIN
No
EB
Expanded Peripheral
1
0
255
BYTE
No
482 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Configuring the Read/Write Information Panel
Table 18-0 S5 Data Regions (Continued)
18
Key
Description
Max
Region
Index
Max
Element
Number
Default
Type
Read
Only
FB
Flags
1
0
255
BYTE
No
IB
Input Image
1
0
127
BYTE
No
OB
Output Image
1
0
127
BYTE
No
QB
Output Image
1
0
127
BYTE
No
PB
Peripheral
1
0
255
BYTE
No
TB
Timers
2
0
255
BIN
No
RS
System Data Area
2
0
511
BIN
No
External Device
Interface
Element
Size
(bytes)
Note: Max Region Index values with an asterisk (*) indicate data regions that accept logical
station variables.
Table 18-0 S505 Data Regions
Key
Description
Element
Size
(bytes)
Max
Region
Index
Max
Element
Number
Default
Type
Read
Only
Analog Alarm Ack Flags
2
0
65535*
INT2
No
AADB
Alarm Deadband
4
0
65535*
FLT
No
ACFH
High Word Alarm C-Flag
2
0
65535*
INT2
No
ACFL
Low Word Alarm C-Flag
2
0
65535*
INT2
No
AERR
Error
4
0
65535*
FLT
Yes
AHA
High Alarm Limit
4
0
65535*
FLT
No
Note: Max Region Index values and Max Element Numbers with an asterisk (*) indicate
data regions that accept logical station variables.
FactoryLink 6.6.0 / Device Interface Guide / 483
Siemens H1
AACK
•
SIEMENS H1
•
Configuring the Read/Write Information Panel
•
•
Table 18-0 S505 Data Regions (Continued)
Key
Description
Element
Size
(bytes)
Max
Region
Index
Max
Element
Number
Default
Type
Read
Only
AHHA
High-High Alarm Limit
4
0
65535*
FLT
No
ALA
Low Alarm Limit
4
0
65535*
FLT
No
ALLA
Low-Low Alarm Limit
4
0
65535*
FLT
No
AODA
Orange Deviation Alarm
Limit
4
0
65535*
FLT
No
APV
Process Variable
4
0
65535*
FLT
No
APVH
PV High Limit
4
0
65535*
FLT
No
APVL
PV Low Limit
4
0
65535*
FLT
No
ARCA
Rate of Change Alarm Limit 4
0
65535*
FLT
No
ASP
Setpoint
4
0
65535*
FLT
No
ASPH
Setpoint High Limit
4
0
65535*
FLT
No
ASPL
Setpoint Low Limit
4
0
65535*
FLT
No
ATS
Sample Rate in Seconds
4
0
65535*
FLT
No
AVF
V-Flags
2
0
65535*
BIN
Yes
AYDA
Yellow Deviation Alarm
Limit
4
0
65535*
FLT
No
C
Control Register
Boo1
0
16383
BIN
No
DCC
Drum Current Count
4
255*
255
BIN
Yes
DCP
Drum Count Preset
2
255*
255
INT2
No
DSC
Drum Step Current
2
255*
255
INT2
No
Note: Max Region Index values and Max Element Numbers with an asterisk (*) indicate
data regions that accept logical station variables.
484 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Configuring the Read/Write Information Panel
Table 18-0 S505 Data Regions (Continued)
18
Key
Description
Max
Region
Index
Max
Element
Number
Default
Type
Read
Only
Drum Step Preset
2
255*
255
INT2
No
G
G (Local App global
Variables)
2
0
65535
INT2
No
GA
G (App A global Variables)
2
0
65535
INT2
No
GB
B (App B global Variables)
2
0
65535
INT2
No
GC
G (App C global Variables)
2
0
65535
INT2
No
GD
G (App D global Variables)
2
0
65535
INT2
No
GE
G (App E global Variables)
2
0
65535
INT2
No
GF
G (App F global Variables)
2
0
65535
INT2
No
GG
G (App G global Variables)
2
0
65535
INT2
No
GH
G (App H global Variables)
2
0
65535
INT2
No
GI
G (App I global Variables)
2
0
65535
INT2
No
GJ
G (App J global Variables)
2
0
65535
INT2
No
GK
G (App K global Variables)
2
0
65535
INT2
No
GL
G (App L global Variables)
2
0
65535
INT2
No
GM
G (App M global Variables)
2
0
65535
INT2
No
GN
G (App N global Variables)
2
0
65535
INT2
No
GO
G (App O global Variables)
2
0
65535
INT2
No
GP
G (App P global Variables)
2
0
65535
INT2
No
GQ
G (App Q global Variables)
2
0
65535
INT2
No
Note: Max Region Index values and Max Element Numbers with an asterisk (*) indicate
data regions that accept logical station variables.
FactoryLink 6.6.0 / Device Interface Guide / 485
Siemens H1
DSP
External Device
Interface
Element
Size
(bytes)
•
SIEMENS H1
•
Configuring the Read/Write Information Panel
•
•
Table 18-0 S505 Data Regions (Continued)
Key
Description
Element
Size
(bytes)
Max
Region
Index
Max
Element
Number
Default
Type
Read
Only
GR
G (App R global Variables)
2
0
65535
INT2
No
GS
G (App S global Variables)
2
0
65535
INT2
No
GT
G (App T global Variables)
2
0
65535
INT2
No
GU
G (App U global Variables)
2
0
65535
INT2
No
GV
G (App V global Variables)
2
0
65535
INT2
No
GW
G (App W global Variables)
2
0
65535
INT2
No
GX
G (App X global Variables)
2
0
65535
INT2
No
GY
G (App Y global Variables)
2
0
65535
INT2
No
GZ
G (App Z global Variables)
2
0
65535
INT2
No
K
Constant
2
0
16777215
INT2
No
LACK
Loop Alarm Acknowledge
Flags
2
0
65535*
INT2
No
LADB
Alarm Deadband
4
0
65535*
FLT
No
LCFH
High Word Loop C-Flags
2
0
65535*
INT2
No
LCFL
Low Word Loop C-Flags
2
0
65535*
INT2
No
LERR
Error
4
0
65535*
FLT
Yes
LHA
High Alarm Limit
4
0
65535*
FLT
No
LHHA
High-High Alarm Limit
4
0
65535*
FLT
No
LKC
Gain
4
0
65535*
FLT
No
Note: Max Region Index values and Max Element Numbers with an asterisk (*) indicate
data regions that accept logical station variables.
486 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Configuring the Read/Write Information Panel
Table 18-0 S505 Data Regions (Continued)
18
Key
Description
Max
Region
Index
Max
Element
Number
Default
Type
Read
Only
Derivative Gain Limiting
Coefficient
4
0
65535*
FLT
No
LLA
Low Alarm Limit
4
0
65535*
FLT
No
LLLA
Low-Low Alarm Limit
4
0
65535*
FLT
No
LMN
Output (percent)
4
0
65535*
FLT
No
LMX
Bias
4
0
65535*
FLT
No
LODA
Orange Deviation Alarm
Limit
4
0
65535*
FLT
No
LPV
Process Variable
4
0
65535*
FLT
No
LPVH
PV High Limit
4
0
65535*
FLT
No
LPVL
PV Low Limit
4
0
65535*
FLT
No
LRCA
Rate of Change Alarm Limit 4
0
65535*
FLT
No
LRSF
RAMP/SOAK Status Flags
2
0
65535*
BIN
Yes
LRSN
RAMP/SOAK Step Number
2
0
65535*
INT2
No
LSP
Setpoint
4
0
65535*
FLT
No
LSPH
Setpoint High Limit
4
0
65535*
FLT
No
LSPL
Setpoint Low Limit
4
0
65535*
FLT
No
LTD
Rate Time (minutes)
4
0
65535*
FLT
No
LTI
Reset Time (minutes)
4
0
65535*
FLT
No
LTS
Sample Rate (seconds)
4
0
65535*
FLT
No
Note: Max Region Index values and Max Element Numbers with an asterisk (*) indicate
data regions that accept logical station variables.
FactoryLink 6.6.0 / Device Interface Guide / 487
Siemens H1
LKD
External Device
Interface
Element
Size
(bytes)
•
SIEMENS H1
•
Configuring the Read/Write Information Panel
•
•
Table 18-0 S505 Data Regions (Continued)
Key
Description
Element
Size
(bytes)
Max
Region
Index
Max
Element
Number
Default
Type
Read
Only
LVF
V-Flags
2
0
65535*
BIN
No
LYDA
Yellow Deviation Alarm
Limit
4
0
65535*
FLT
No
STW
System Status Words
2
0
65535
BIN
No
TCC
Timer/Counter Current
2
0
65535
BCD4
No
TCP
Timer/Counter Preset
2
0
65535
BCD4
No
V
Variable Memory
2
0
16777215
INT2
No
WX
Word Input
2
0
65535
INT2
No
WY
Word Output
2
0
65535
INT2
No
X
Discrete Input
Boo1
0
16383
BIN
No
Y
Discrete Output
Boo1
0
16383
BIN
No
Note: Max Region Index values and Max Element Numbers with an asterisk (*) indicate
data regions that accept logical station variables.
Element
Enter the element in the data region to be read or written:
a bit-number in bit-regions, a byte-number in byte-regions,
a word-number in word-regions, or a floating-point-number
in floating-point-regions.
Valid Entry: For valid data regions, refer to the data region
tables in the description for the previous field,
Region Index.
488 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Configuring the Read/Write Information Panel
Bit or Length
(Use with digital or message elements only) Enter the bit or
length in the PLC the Siemens H1 protocol module reads.
18
For digital elements: The bit to be read or written.
0 - 15 (S5) Word regions: data block, counters, timers
1 - 16 (S505) Word regions: data block, counters, timers
1 - 32 (S505) Double word (4 byte) element regions
0-7
(S5) Byte regions: flags, input, output, peripheral
External Device
Interface
For message elements: The message length to be read or
written. The bit or length denotes the number of PLC elements to
place in the message.
1 - 8 (S505) Byte regions
1 - 127
Word regions: message length in words
1 - 255 Byte regions: message length in bytes
1 - 63 (S505) Double word region message length
PLC Data Type
Specify the type of data being read from or written to the device
for each element defined in the Tag Name field. For more
information about valid combinations of FactoryLink data types,
PLC regions, and PLC data types, refer to “Siemens H1 Data
Types” on page 507.
BIN Default conversion based on the type of
FactoryLink real-time database element.
BYTE (Use with PLC byte-regions only) 1-byte unsigned
integer.
INT2 2-byte signed integer.
INT4 4-byte signed integer.
BCD7 4-byte, 7-digit signed Binary Coded Decimal in the
high-order nibble.
FLT 4-byte Siemens Floating Point Representation.
DIG The bit specified to be read or written to or from a
FactoryLink real-time database element.
FactoryLink 6.6.0 / Device Interface Guide / 489
Siemens H1
BCD3 2-byte, 3-digit signed Binary Coded Decimal in the
high-order nibble.
•
SIEMENS H1
•
Configuring the Read/Write Information Panel
•
•
HILO A character-string high-order byte followed by a
low-order byte.
LOHI A character string low-order byte followed by a
high-order byte.
DEF The default PLC data type for the data region. For
definitions of the default types by data region,
refer to “Siemens H1 Data Types” on page 507.
BCD4 Two bytes containing four Binary Coded Decimal
(BCD) digits.
UINT2 2-byte unsigned integer.
UINT4 4-byte unsigned integer.
TRNS2 Transparent 2-byte entity. Two-bytes to or from
the communication packet will be transferred to or
from the highest 2-bytes (in memory) of the
FactoryLink real-time database element. Any
additional space in the element will be zeroed on
reads and ignored on writes.
TRNS4 Transparent 4-byte entity. Four-bytes to or from
the communication packet will be transferred to or
from the highest 4-bytes (in memory) of the
FactoryLink real-time database element. Any
additional space in the element will be zeroed on
reads and ignored on writes.
When the panel is complete, click on Enter to validate the information. Define the
data type (digital, analog, long analog, or floating-point) for any tag names
displayed in the Tag Definition dialog.
490 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Configuring the Read/Write Information Panel
Table 18-0 provides sample entries for the Siemens H1 Read/Write Information
panel:
18
Table 18-0 Sample Siemens H1 Read/Write Information Panel Entries
Entry
Description
Table Name
READ
The table name defined in the Read/Write
Control panel is displayed.
Tag Name
H1MPDIG1 When the READ table is triggered by
H1MP_READ_TRIGGER (defined in the
Read/Write Control panel), FactoryLink
processes the table. The value read from
the device is stored in H1MPDIG1.
Logical Station
0
The value stored in this element is read
from the Siemens H1 device configured as
logical station 0.
PLC Region
FB
PLC region that is being read.
External Device
Interface
Field
Region Index
Element
100
Bit or Length
3
PLC Data Type
DIG
The data being read from the device is
digital.
Siemens H1
FactoryLink 6.6.0 / Device Interface Guide / 491
•
SIEMENS H1
•
Logical Station Commands
•
•
L OGICAL STATION C OMMANDS
The Siemens H1 protocol module supports three run-time logical station
commands:
• Activate/Deactivate Station—Activates or deactivates the logical station and
stops or resumes operation of a specified logical station. This command is valid
only in exception write tables.
• Set Remote Parameters—Reconfigures information in the Logical Station
Information panel so a single logical station can access multiple remote
stations. This command is valid only in block write tables.
• Set Logical Station Variables—Provides flexible indexing that allows you to
access multiple data regions within a PLC by changing a logical station variable
referenced by the Region Index field or element in a Read/Write table.
To specify these commands in the Siemens H1 Logical Station Information panel,
use the special PLC data region, LSCMD (logical station command). For other
information about the PLC data region, refer to “Configuring the Read/Write
Information Panel” on page 481.
Activate/Deactivate Station Command
At run time, the following command activates or deactivates the logical station. To
configure this command, enter the following information in the Siemens H1
Read/Write Information panel:
Field Name
Entry
Tag Name
Digital element containing the desired
station state, either:
Activate (set, 1, true)
or
Deactivate (reset, 0, false)
Logical Station
0 - 999 (station to activate or
deactivate)
PLC Region
LSCMD
Data Block
1
Word or Byte
Not applicable
492 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Logical Station Commands
Field Name
Entry
Not applicable
PLC Data Type
Not applicable
Active/inactive Status
At run time, the status of each logical station is either active or inactive. The
following conditions define the status of each logical station:
• Active logical stations (set at program initiation) respond to solicited or remote
station requests.
External Device
Interface
Bit or Length
18
• Inactive logical stations abort solicited operations and reject any attempts by a
remote station to connect.
• During the transition between active and inactive, the logical station aborts any
new or pending solicited request, disconnects all TSAPs for that logical station,
and handles the transition from inactive to active in the same way as it handles
recovery from a disconnected station.
Set Remote Parameters Command
To allow a single logical station access to multiple remote stations, configure
information in the Siemens H1 Logical Station Information panel using the Set
Remote Parameters command. While processing a Set Remote Parameters
command, the Siemens H1 protocol module deactivates the logical station. Once
the command is complete, the Siemens H1 protocol module reactivates the logical
station.
Note
FactoryLink 6.6.0 / Device Interface Guide / 493
Siemens H1
Use the Set Remote Parameters command only when changing the
parameters of remote physical stations of the same device type. If
you change remote physical stations of different device types (such
as redefining an S5 logical station as an S505 physical station or
an S505 logical station as an S5 physical station), undesirable
results may occur in your application. The EDI task does support
nor check for dissimilar device-type changes.
•
SIEMENS H1
•
Logical Station Commands
•
•
Configuring the Set Remote Parameters Command
To set the logical station remote parameters, enter the following information in
the Siemens H1 Read/Write Information panel:
Field Name
Entry
Tag Name
Message element
Logical Station
0 - 999 (logical station to reconfigure
set parameters)
PLC Region
LSCMD
Region Index
2
Element
Not applicable
Bit or Length
Not applicable
PLC Data Type
Not applicable
If a block write table with the Set Remote Parameters command contains any
other commands, a row error may occur. For information about row errors, refer to
“Set Logical Station Commands and Row Errors” on page 504.
Format
The message element you configured as a Set Remote Parameters command in the
Siemens H1 Read/Write Information panel contains an ASCII representation of
the Siemens Logical Station Information panel. This message element is used to
reconfigure the logical station at run time.
Each field in the Logical Station Information panel is represented in the message
element by an ASCII string. Each ASCII string in the message element is
separated by a semicolon. When reconfiguring the Logical Station Information
panel using the Set Remote Parameters command, you only specify the fields you
want to change. If one of the Logical Station Information fields is unchanged, a
semicolon place holder must be used in the Set Remote Parameters command
message element. When reconfiguring the Logical Station Information panel
using this message element, refer to “Siemens H1 Communications” on page 459.
494 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Logical Station Commands
You must always construct the message element to be the following ASCII
representation of the Siemens H1 Logical Station Information panel fields.
Description
Remote Adapter Address
Enter 12-hexadecimal digits
Solicited Rd Remote FCHP TSAP ID
Any 8-character ASCII string
Solicited Rd Local FCHA TSAP ID
Any 8-character ASCII string
Solicited Wr Remote RECV TSAP ID
Any 8-character ASCII string
Solicited Wr Local SEND TSAP ID
Any 8-character ASCII string
Unsolicited Rd Remote SEND TSAP ID
Any 8-character ASCII string
Unsolicited Rd Local RECV TSAP ID
Any 8-character ASCII string
External Device
Interface
Field Name
18
Siemens H1
FactoryLink 6.6.0 / Device Interface Guide / 495
•
SIEMENS H1
•
Logical Station Commands
•
•
Example 1: Message Element
The following is a Set Remote Parameters message element example:
080006010005;RMT_FCHP;LCL_FCHA;RMT_RECV;LCL_SEND;RMT_SEND;LCL_REC;
where
080006010005;
RMT_FCHP;
LCL_FCH;
RMT_RECV;
LCL_SEND;
RMT_SEND;
Is the hexadecimal remote adapter address of the Siemens H1
Ethernet
Is the Solicited Rd Remote FCHP TSAP ID
Is the Solicited Rd Local FCHA ID TSAP ID
Is the Solicited Wr Remote RECV TSAP ID
Is the Solicited Wr Local SEND TSAP ID
Is the Unsolicited Rd Remote SEND TSAP ID
LCL_REC
Is the Unsolicited Rd Local RECV TSAP ID
;
(Semicolon) Terminates the message string
Delimit each remote parameter field with a semicolon.
496 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Logical Station Commands
Example 2: Message Element Using the Current TSAP ID
For example, the following message element changes the Ethernet address of a
logical station but keeps the current TSAP ID (does not change the TSAP IDs):
18
External Device
Interface
The Set Remote Parameters command is configured as a message element. You
change this element at run time to represent the new field values for the Siemens
Logical Station Information panel. The value of each field is separated by a
semicolon. When reconfiguring the Siemens Logical Station Information panel
using the Set Remote Parameters command, you only need to specify the fields
that change. If one of the Siemens Logical Station Information panel fields
remains unchanged, a semicolon place holder must be used in the Set Remote
Parameters command message element. You must always construct the message
element to be an ASCII representation of the Siemens Logical Station Information
panel.
80006010005;;;;;;;
where
080006010005
;;;;;;
;
Is the hexadecimal remote adapter address of the Siemens H1
Ethernet
(Six semicolons) Are placeholders for the unchanged fields in the
Siemens Logical Station Information panel
(Semicolon) Terminates the message string
Set Remote Parameters Example
The Siemens H1MP allows you to use logical station commands to change the
physical station address within the logical station at run time using the Set
Remote Parameters command.
FactoryLink 6.6.0 / Device Interface Guide / 497
Siemens H1
In this example, read/write table 2 is configured to read ten 2-byte integers from
an external PLC. The logical station number is configured as 1. In Siemens
read/write table 1, the message element set_param_msg is configured to be logical
station command, Set Remote Parameters. This means you can construct
set_param_msg to alter the physical station address inside logical station 1. Then,
before table 1 is triggered, you can trigger table 1 which will override the Siemens
Logical Station Information panel fields, allowing you access to different PLCs at
run time without configuring separate Read/Write and Logical Station tables.
•
SIEMENS H1
•
Logical Station Commands
•
•
Figure 18-0 Set Remote Parameters
Protocol
Module
Base
Module
set_param_msg
CML
498 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Logical Station Commands
To take advantage of the H1MP protocol module’s Set Remote Parameters
command, you must configure at least two read/write tables. In this example,
table 1 declares the element set_param_msg as a Set Remote Parameters
command (LSCMD 2).
18
External Device
Interface
Table 2 defines a read/write table to access ten 2-byte integers in logical station 1.
The set_param_msg element in table 1 is configured to change the physical
station configured as logical station 1 at run time. Therefore, you do not need to
configure any more read/write tables to read ten 2-byte integers. Table 2 alone can
be used to read ten 2-byte integers from any external device by setting
set_param_msg and triggering table 1 before you trigger table 2.
Siemens H1
FactoryLink 6.6.0 / Device Interface Guide / 499
•
SIEMENS H1
•
Logical Station Commands
•
•
Set Logical Station Variables Command
The Set Logical Station Variables command provides flexible indexing that allows
you to access multiple data areas at run time without having to configure a
separate Read/Write table for each one.
Configuring the Set Logical Station Variables Command
To configure a message element as a Set Logical Station Variables command,
enter the following information in the Siemens H1 Read/Write Information panel:
Field Name
Entry
Tag Name
Message element
Logical Station
0 - 999
PLC Region
LSCMD
Region Index
3
Element, Bit or Length, PLC Data Type
Not applicable
Logical Station Variables
Instead of hard-coding the index values into a line of the Siemens H1 Read/Write
Information panel, the Set Logical Station Variables command allows each logical
station to have eight variable index values called logical station variables. These
variables have the following characteristics:
• For both the S5 and S505 logical stations, they are unsigned-bytes with values
ranging from 0 - 255.
• For S5 logical stations with zero-based addressing (addresses begin with zero)
on the communications line, the variable index values equal the value specified.
(For example, for a specified value of 3, the variable value is 3.)
• For S505 stations with zero-based addressing on the communications line and
one-based addressing (addresses begin with one) in the address description, the
variable index values equal the specified value decremented by one. (For
example, for a specified value of 3, the variable value is 2.)
• At DCM startup, the S5 variable index values default to 0. The S505 variable
index values default to 1.
500 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Logical Station Commands
Format
For example, to set the logical station variables for an S5 logical station at start
up to:
1
2 3 4
5
6
7
18
External Device
Interface
The Set Logical Station Variables command is configured as a message element.
You change this element at run time to represent the new values for the logical
station variables. The value of each variable is separated by a semicolon. When
reconfiguring the logical station variables using the Set Logical Station Variables
command, you only need to specify the variables that change. If one of the logical
station variables is unchanged, a semicolon place holder must be used in the Set
Logical Station Variables command message element. You must always construct
the message element to be an ASCII representation of the logical station
variables.
8
5 0 0 0 0 12 0 15
Create the following message element string:
Set_Station_Msg =“5;;;;;12;;15;”
You can use these variables for the element number in S505 Loop and Alarm
variables, or as the first index in double index regions in either S5 or S505 logical
stations.
Note
Ensure this message contains seven semicolons plus a terminating
semicolon.
Set Logical Station Variables Example
flexibility to change the data blocks you access within the PLC at run time using a
Math and Logic procedure without having to configure a new read/write table.
In this example, read/write table 2 is configured to read ten 2-byte integers from
an external PLC. The Region Index value is configured to be logical station variable
number 3. This means when table 2 is triggered, it will look in the third logical
station variable for the Region Index value.
FactoryLink 6.6.0 / Device Interface Guide / 501
Siemens H1
The Siemens H1MP allows you to use logical station variables to control the
Region Index in the Read/Write Information panel at run time. This provides the
•
SIEMENS H1
•
Logical Station Commands
•
•
A message element, set_sta_msg, is configured as a Set Logical Station Variable
command 3 in read/write table 1. In this example, set_sta_msg is used in the
Math and Logic procedure to change the value of the logical station variables.
Before read/write table is 2 is triggered to read the ten 2-byte integers, table 1 is
triggered to set the logical station variable 3. This allows you to access a different
data region in the PLC with each triggered read because you have the power to
change the value of logical station variable 3 where the read/write table Region
Index field is pointing to get its value.
Figure 18-0 Logical Station Variables
Logical Station Variables
1 2 3 4 5 6 7 8
PLC
Protocol
Module
Base
Module
set_sta_msg
CML
502 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Logical Station Commands
To take advantage of the H1MP protocol module’s Logical Station Variables
command, you must configure at least two read/write tables. In this example,
table 1 declares the element set_sta_msg as a Set Logical Station Variables
(LSCMD) 3.
18
External Device
Interface
You can use this element at run time to dynamically set Region Index 3 for table 2.
Once you set the value of set_sta_msg in an IML procedure and trigger the table,
the logical station variables take on the values as specified in the element
set_sta_msg. You then trigger table 2 and read the ten 2-byte integers. Notice in
table 2 the Region Index starts with a negative number. This indicates that logical
station variable 3 contains the actual Region Index table 2 will read.
Siemens H1
FactoryLink 6.6.0 / Device Interface Guide / 503
•
SIEMENS H1
•
Logical Station Commands
•
•
Set Logical Station Commands and Row Errors
A block write table which contains logical station commands can only contain
logical station commands; otherwise row errors occur. Row errors may result from
any of the following conditions:
• If a table has a Set Parameters command as its first entry (by logical port), for
example, and a command other than a Set Parameters command is given.
• If a table does not contain a logical station command as its first entry (by logical
port) and a logical station command is given.
A row error is a line in the Siemens H1 Read/Write Information table containing
an invalid entry. If a row error is detected during start up, an error message is
displayed on the screen and the entry is ignored. For further information about
logical station command error codes that can be generated and displayed at start
up, refer to “Run-Time Application Messages” on page 512.
In a single block write table, the Siemens H1 protocol module can define multiple
logical station Set Parameters commands (instead of defining multiple logical
stations in multiple block write tables). However, no provisions are made in the
Siemens H1 to check for multiple commands to the same logical station.
Therefore, should multiple commands be made to the same logical station, the last
command processed defines the values for the logical station.
Note
The last command entered may not be the last command
processed. To avoid row errors, ensure you enter only Set
Parameters commands in block write tables containing Set
Parameters commands.
504 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Cable Diagrams
C ABLE D IAGRAMS
18
This section contains information about connecting the Siemens H1 Ethernet
system using a thick net or thin net bus.
Figure 18-0 illustrates two PCs running FactoryLink using a thick net bus. The
first PC uses a transceiver cable through a transceiver to connect to the Ethernet
bus. The second PC uses a thin net coax cable through a thick-to-thin transceiver
to connect with the Ethernet bus. A transceiver cable through a transceiver to the
Ethernet bus connects the Siemens S5 PLC with a CP535 or CP143 card.
External Device
Interface
Thick Net Bus
Figure 18-0 Thick Net Bus
PC with FactoryLink
CP535/CP143
Siemens
S5 PLC
Transceiver Cable
(Thick to Thin)
Transceiver Cable
Bus Cable
Thick Net
Bus Cable
Thin Net Coax
Transceiver
Transceiver
Transceiver
PC with FactoryLink
Siemens H1
FactoryLink 6.6.0 / Device Interface Guide / 505
•
SIEMENS H1
•
Cable Diagrams
•
•
Thin Net Bus
Figure 18-0 illustrates a PC running FactoryLink using a cable connected to an
Ethernet thin net coax cable. A second part of the diagram illustrates a Siemens
S5 PLC with a CP535 or CP143 card connected using a transceiver cable through
a transceiver to the Ethernet thin net coax cable.
Figure 18-0 Thin Net Bus
Coax Cable
(Thin Net)
PC with FactoryLink
CP535/CP143
Siemens
S5 PLC
Thin Transceiver
Transceiver Cable
506 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Siemens H1 Data Types
S IEMENS H1 D ATA TYPES
18
This section lists the data conversions for FactoryLink real-time database
elements:
• Digital
• Analog
• Floating-point
External Device
Interface
The Siemens H1 multiplatform protocol module provides data conversions
between the FactoryLink real-time database and the Siemens PLC. The specific
conversion performed depends on the FactoryLink data type and the specific PLC
type.
• Floating long analog
• Message
Table 18-0 Digital Conversion
PLC Type
Conversion
Same as DIG
BCD3
Invalid PLC type for digital
BCD7
Invalid PLC type for digital
BYTE
Invalid PLC type for digital
DIG
Specified bit read or write to or from the FactoryLink element
FLT
Invalid PLC type for digital
INT2
Invalid PLC type for digital
INT4
Invalid PLC type for digital
HILO
Invalid PLC type for digital
LOHI
Invalid PLC type for digital
Siemens H1
BIN
FactoryLink 6.6.0 / Device Interface Guide / 507
•
SIEMENS H1
•
Siemens H1 Data Types
•
•
Table 18-0 Analog Conversion
PLC Type
Conversion
BIN
Same as INT2
BCD3
2-byte 3-digit Binary Coded Decimal with sign maximum: 999;
minimum: -999
BCD7
4-byte 7-digit Binary Coded Decimal with sign maximum: 32767;
minimum: -32768
BYTE
Valid only in byte regions, unsigned byte maximum: 0;
minimum: 255
DIG
Invalid PLC type for analog
FLT
4-byte signed Siemens floating-point maximum: 32767;
minimum: -32768
INT2
2-byte signed integer maximum: 32767; minimum: -32768
INT4
4-byte signed integer maximum: 32767; minimum: -32768
HILO
Invalid PLC type for analog
LOHI
Invalid PLC type for analog
508 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Siemens H1 Data Types
18
Table 18-0 Floating Point Conversion
Conversion
BIN
Same as FLT
BCD3
2-byte 3-digit Binary Coded Decimal with sign maximum: 999;
minimum: -999
BCD7
4-byte 7-digit Binary Coded Decimal with sign maximum:
9999999; minimum: -9999999
BYTE
Valid only in byte regions, unsigned byte maximum: 0;
minimum: 255
DIG
Invalid PLC type for float
FLT
4-byte Siemens floating-point
INT2
2-byte signed integer maximum: 32767; minimum: -32768
INT4
4-byte signed integer maximum: 2147483647; minimum:
-2147483648
HILO
Invalid PLC type for float
LOHI
Invalid PLC type for float
External Device
Interface
PLC Type
Table 18-0 Floating Long Analog Conversion
PLC Type
Conversion
Same as INT4
BCD3
2-byte 3-digit Binary Coded Decimal with sign maximum: 999;
minimum: -999
BCD7
4-byte 7-digit Binary Coded Decimal with sign maximum:
9999999; minimum: -9999999
FactoryLink 6.6.0 / Device Interface Guide / 509
Siemens H1
BIN
•
SIEMENS H1
•
Siemens H1 Data Types
•
•
Table 18-0 Floating Long Analog Conversion (Continued)
PLC Type
Conversion
BYTE
Valid only in byte regions, unsigned byte maximum: 0;
minimum: 255
FLT
4-byte signed Siemens floating-point maximum: 2147483647;
minimum: -2147483648
INT2
2-byte signed integer maximum: 32767; minimum: -32768
INT4
4-byte signed integer maximum: 2147483647; minimum:
-2147483648
HILO
Invalid PLC type for long analog
LOHI
Invalid PLC type for long analog
Table 18-0 Message Conversion
PLC Type
Conversion
BIN
Same as HILO
BCD3
Invalid PLC type for message
BCD7
Invalid PLC type for message
BYTE
Invalid PLC type for message
DIG
Invalid PLC type for message
FLT
Invalid PLC type for message
INT2
Invalid PLC type for message
INT4
Invalid PLC type for message
HILO
Character string high-order byte followed by low-order byte
LOHI
Character string low-order byte followed by high-order byte
510 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Siemens H1 Adapter Display Utility (H1MPDISP)
S IEMENS H1 A DAPTER D ISPLAY U TILITY (H1MPDISP)
18
This section discusses the adapter display utility, HLMPDISP.
• Verifies the configuration of the Ethernet adapter
• Provides the proper address to be programmed into the Siemens Ethernet
Interface card
This utility program resides in the ${FLINK}/EDI/H1MP directory. The method
for invoking the program depends on the platform being used.
External Device
Interface
For each FactoryLink platform, the Siemens H1 EDI package contains an adapter
display utility, H1MPDISP.EXE, that provides the following services:
The program displays the following information:
Adapter#
Accessible
00
YES
01
NO
CP Address
AA0004003105
—————
where
Adapter#
Accessible
Is the LAN adapter number of the LAN adapter described in the
remainder of the line.
Indicates whether the adapter is properly configured and
accessible to the DCM task:
If YES, then the adapter can be accessed and is valid for the
Siemens H1.
If NO, then the adapter cannot be accessed and is either not
installed or improperly configured.
CP Address
FactoryLink 6.6.0 / Device Interface Guide / 511
Siemens H1
Is a 12-character hexadecimal address you must program into the
Siemens CP535/CP143 Ethernet Interface card. It is the remote
adapter address for each job (ANR) that communicates with this
adapter.
•
SIEMENS H1
•
Run-Time Application Messages
•
•
R UN -TIME A PPLICATION M ESSAGES
During EDI run time, FactoryLink generates and displays messages for the
Siemens H1 protocol module on the Run-Time Manager screen and, if so
configured, writes them to message or analog tags. For information about
configuring a message tag, see “Configuring the Logical Station Control Panel” on
page 464. For information about configuring an analog tag, see “Configuring the
Logical Station Information Panel” on page 468.
For information about the messages displayed for the EDI task and the format in
which protocol module messages are generated, see Chapter 10, “Messages and
Codes.”
0001h
Cause:
Internal protocol module error.
Action:
Call Customer Support for assistance.
Cause:
Communication error.
Action:
Verify you have properly configured the External Device
Definitions and Logical Station Information tables and the
Ethernet installation and the Siemens CP535 programming
parameters are correct.
Cause:
Communication error.
Action:
Verify the Siemens CP535 and the PLC programming
parameters are correct.
Cause:
Internal protocol module error.
Action:
Call Customer Support for assistance.
0002h
0003h
0004h
512 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Run-Time Application Messages
XX05h
Received Siemens error code ’XX’h in response packet.
Action:
For a list of error codes that correspond to the XX values in this
error message, consult the Siemens Communication Processor
CP535 with COM 535 Programming Package (S5 DOS Version),
Chapter 8, Order No. 6ES5998-6SA21, Release 04.
Cause:
Invalid response packet length.
Action:
Call Customer Support for assistance.
Cause:
Internal protocol module error.
Action:
Call Customer Support for assistance.
Cause:
A “FLT” value in the PLC contains invalid floating-point data.
Action:
Verify the value being read is an “FLT.”
Cause:
Inactive station. A solicited (read or write) operation was
requested to an inactive station. This may occur at start up of
the protocol module.
Action:
Allow sufficient time to establish communication before
initiating a solicited operation. If the error persists, ensure the
Siemens H1 Logical Station Information panel and Siemens CP
programming parameters match. Verify the station has not been
disabled through a logical station activate/deactivate command.
Cause:
Invalid value was entered for the logical station commands (set
parameters or activate/deactivate station).
Action:
For a list of the logical station command error codes, refer to
“Run-Time Logical Station Command Error Codes” on page 514.
Correct the value in the field that is specified by the error code.
0006h
18
External Device
Interface
Cause:
0007h
0008h
0009h
FactoryLink 6.6.0 / Device Interface Guide / 513
Siemens H1
AXXXh
•
SIEMENS H1
•
Run-Time Application Messages
•
•
Run-Time Logical Station Command Error Codes
For the Siemens H1 Ethernet, the only errors possible for the logical station
commands come from invalid element values for the set parameters and
activate/deactivate station commands at run time. The logical station generates
two commands:
• 0xAyXX
• 0xA101
For an invalid element value, the logical station generates the error code 0xAyXX
where
A
Is an error from a logical station command
y
Is the specific command
y=1
is the Activate/Deactivate Station command
y = 2 is the Set Remote Parameters command
y = 3 is the Set Logical Station Variables command
XX
Is the error code for the specified field in error
When the protocol module detects an error, it puts the logical station in an
unknown configuration state, and the logical station becomes inactive. To free the
station from this unknown state, issue a set parameters command for that logical
station or restart the logical port.
For the Activate/Deactivate Station command, the logical station generates error
code 0xA101. Theoretically, the Activate/Deactivate command cannot produce
errors since it uses only digital elements whose values, set and reset, are both
valid. However, for consistency in error reporting, the logical station generates
this error code. The logical station generates error code 0xA2XX for the Set
Parameters command.
514 / FactoryLink 6.6.0 / Device Interface Guide
SIEMENS H1
Run-Time Application Messages
The following list defines the codes for both the Activate/Deactivate and Set
Parameters commands:
18
Table 18-0 Activate/Deactivate and Set Parliamentary Codes
Description
0xA101
Activate/Deactivate command
0xA2XX
Set Logical Station parameters
0xA200
Invalid number of fields
0xA201
Invalid field 1, adapter address
0xA202
Invalid field 2, rmt sol read TSA ID
0xA203
Invalid field 3, lcl sol read TSA ID
0xA204
Invalid field 4, rmt sol write TSA ID
0xA205
Invalid field 5, lcl sol write TSA ID
0xA206
Invalid field 6, rmt usl read TSA ID
0xA207
Invalid field 7, lcl usl read TSA ID
External Device
Interface
Code
For further information about activate/deactivate station commands, set
parameters commands, and row errors, refer to “Siemens H1 Adapter Display
Utility (H1MPDISP)” on page 511.
Siemens H1
FactoryLink 6.6.0 / Device Interface Guide / 515
•
SIEMENS H1
•
Run-Time Application Messages
•
•
516 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 19
Square D
19
Note
External Device
Interface
This chapter contains information needed to set up and configure bidirectional
communications between the FactoryLink real-time database and Square D
SY/MAX devices using the IEEE 802.3 communications protocol or SY/MAX
point-to-point serial communications.
Before completing the protocol-specific Square D configuration
panels, you must complete the External Device Definition panel.
See “Identifying Protocol Types and Defining Logical Ports” on
page 84 for details.
FactoryLink 6.6.0 / Device Interface Guide / 517
Square D
When you Choose Square D from the Configuration Manager Main Menu, the
Square D configuration panels are displayed:
•
SQUARE D
•
Configuring the Logical Station Control Panel
•
•
C ONFIGURING
THE
L OGICAL S TATION C ONTROL P ANEL
To bring the Logical Station Control panel to the foreground, click on its title bar
in the display of all Square D configuration panels.
Complete a row for each logical port specified in the External Device Definition
panel you want to define as a communication path for read and write operations.
Note
In this panel, “source” refers to the FactoryLink station and
“destination” refers to the Square D device.
Logical Port
Enter a number, defined in the External Device Definition panel
Logical Port column, to represent a particular communication path
to a device.
Valid Entry: previously defined logical port number
Device
Message Tag
Enter a tag name for a message element to which a text string
will be written to indicate a communications error associated
with this logical port. For information about displaying the text
stored in a Device Message Tag element for an operator using this
application, see the Application Editor.
Valid Entry: standard element tag name
Valid Data Type: message
518 / FactoryLink 6.6.0 / Device Interface Guide
SQUARE D
Configuring the Logical Station Control Panel
Number
of
Retries
Define the maximum number of consecutive times a read or write
command will be sent to a logical station after an unsuccessful
first transmission attempt.
19
Valid Entry: 0 - 99 (default=3)
SR1
A text string that identifies the source route address defined in
the SR1 column is displayed.
Valid Entry: leave blank (display only)
Enter the source route address or drop number of a network
interface module not being used on the Sylink network.
For serial communications, enter the source route address. If you
do not need additional routing, accept the system default of 255.
External Device
Interface
Source
Route
Address
For Ethernet communications, enter the source drop number (see
the description for Source Drop Number).
Valid Entry: 0 - 255 (default=255)
Source Drop
Number
For Ethernet communications, enter the source drop number on
the Ethernet network. If you enter a number in this column,
enter the same number in the previous column, SR1.
Valid Entry: 0 - 255 (default=0)
Note
For the fields Baud Rate through Stop Bits, be sure to enter values
that correspond to the device hardware configuration for all
devices communicating through the specified logical port. To
determine the proper settings, refer to the device manufacturer’s
documentation.
Baud Rate
Enter the speed at which the protocol module communicates with
the devices linked to FactoryLink via this logical port.
Valid Entry: 110, 150, 300, 600, 1200, 2400, 3600, 4800, 7200,
9600, 19200 (default=9600)
Parity
Enter the parity error correction during transmission via this
logical port.
Valid Entry: even
FactoryLink 6.6.0 / Device Interface Guide / 519
Square D
For serial communications, accept the system default of 255.
•
SQUARE D
•
Configuring the Logical Station Control Panel
•
•
Data Bits
Enter the number of data bits used during transmission via this
logical port.
Valid Entry: 8
Stop Bits
Enter the stop bit interval that provides the destination a pause
before the start of the next character.
Valid Entry: 1
Comment
Optionally, enter descriptive reference information about this
logical station.
Valid Entry: alphanumeric string of up to 21 characters
When the panel is complete, click on Enter to validate the information. Define the
data type (message) for any tag names displayed in the Tag Definition dialog.
Table 19-0 provides sample entries for a row defining an Ethernet logical port (the
entry in the Function column in the External Device Definition panel is
ETHERNET):
Table 19-0 Sample Square D Logical Station Control Panel Entries
Column
Entry
Description
Logical Port
0
Device
Message Tag
SQRD_LPORT0_MSG The EDI task will write communications
error messages associated with this
logical port to a message element,
SQRD_LPORT0_MSG.
Number of
Retries
3
A read or write command to any device
communicating via this port will be
retried three times before an error
message is generated.
SR1
126
The network source route address for the
device is 126.
Source Drop
Number
126
The source drop number on the network
is 126.
520 / FactoryLink 6.6.0 / Device Interface Guide
The communication path to be used for
read and write operations between
FactoryLink and devices communicating
via this port is represented as 0.
SQUARE D
Configuring the Logical Station Control Panel
Table 19-0 Sample Square D Logical Station Control Panel Entries (Continued)
19
Column
Entry
Description
This baud rate entry (the speed at which
the FactoryLink station communicates
with the device) of 9600 must match the
baud rate configuration of the Square D
devices communicating with
FactoryLink via logical port 0.
Parity
EVEN
The parity error correction for
transmission via logical port 0 is even
and must match the parity configuration
of the devices using this port.
Data Bits
8
The devices configured for
communications via logical port 0
require 8 data bits.
Stop Bits
1
The devices configured for
communications via logical port 0
require a stop bit of 1.
FactoryLink 6.6.0 / Device Interface Guide / 521
Square D
9600
External Device
Interface
Baud Rate
•
SQUARE D
•
Configuring the Logical Station Information Panel
•
•
C ONFIGURING
THE
L OGICAL S TATION I NFORMATION P ANEL
From the Logical Station Control panel, select the row for the logical port you are
configuring and click on Next to bring the Logical Station Information panel to the
foreground.
Complete a row for each device to communicate through this logical port.
Error/Status Tag
Name
Enter a tag name for an analog element in which to store
communications error codes associated with this device (logical
station). For information about displaying the codes stored in an
Error/Status Tag Name element for an operator using this
application, see the Application Editor.
Valid Entry: standard element tag name
Valid Data Type: analog
Logical
Station
Enter a number to identify the logical station to which the
information in this row pertains. A logical station represents the
combination of a logical port with a physical station. Assign a
unique number to each device communicating through this
logical port.
You will later enter this logical station number in a read or write
table to represent the device defined in this row. In a read or
write table, this number will identify the device to or from which
data is to be sent or received.
Valid Entry: 0 - 999
522 / FactoryLink 6.6.0 / Device Interface Guide
SQUARE D
Configuring the Logical Station Information Panel
Timeout
m sec
Enter the maximum amount of time, in milliseconds, the protocol
module will wait to receive a response to a read or write command
before timing out. For the protocol module to time out, you must
enter a value greater than 0.
Destination Route
Address
A text string that identifies the destination route address defined
in the DRn column for this row is displayed.
Valid Entry: leave blank (display only)
DR1
Enter the destination route address or drop number of a network
interface module connecting to a separate Sylink network.
For serial communications, enter the destination route address. If
you do not need additional routing, accept the system default of
255.
External Device
Interface
Valid Entry: 0 - 9999 (default=100 or 0.1 second)
19
For Ethernet communications, enter the destination drop number
(see the description for Destination Drop Number).
Valid Entry: 0 - 255 (default=255)
DR2 through DR7
Valid Entry: 0 - 255 (default=255)
Destination Drop
Number
For Ethernet communications, enter the destination drop number
on the Ethernet network. If you enter a number in this column,
enter the same number in the DRn column for this row.
For serial communications, accept the system default of 255.
Valid Entry: 0 - 255 (default=255)
Maximum
Packet
size
Define the maximum number of bytes the device defined in this
row can transmit in one message. Most Square D devices can
transmit 256 bytes, or 128 registers of data. The protocol being
used (point-to-point or IEEE 802.3) does not affect the maximum
packet size.
Valid Entry: 0 - 256 (default=256)
When the panel is complete, click on Enter to validate the information. Define the
data type (analog) for any tag names displayed in the Tag Definition dialog.
Table 19-0 provides sample entries for a row defining a logical station
communicating via the logical port specified on the Logical Station Control panel.
FactoryLink 6.6.0 / Device Interface Guide / 523
Square D
If needed, define up to six additional destination route addresses.
If not needed, accept each field’s default of 255.
•
SQUARE D
•
Configuring the Logical Station Information Panel
•
•
Table 19-0 Sample Square D Logical Station Information Panel Entries
Column
Entry
Description
Logical Port
0
Error/Status
Tag Name
SQRD_STATION0_ Communications error codes generated for
STATUS
this logical station will be stored in an
analog element,
SQRD_STATION0_STATUS.
Logical
Station
0
A device communicating with FactoryLink
via logical port 0 is assigned a logical
number of 0.
Timeout m
sec
100
Each of the retries (3) specified in the
Logical Station Control panel will time out
after 100 milliseconds if the device does
not respond.
DR1
54
The destination route address of the device
is 54.
DR2
255
This configuration only requires one
destination route address so the additional
DRn fields default to 255.
DR3
255
DR4
255
DR5
255
DR6
255
DR7
255
Destination
54
Drop Number
Maximum
Packet Size
256
524 / FactoryLink 6.6.0 / Device Interface Guide
The logical port number defined in the
Logical Station Control panel is displayed.
The drop location of the device on the
network path is 54.
The device defined as logical station 0 can
transmit up to 256 bytes in one message.
SQUARE D
Configuring the Read/Write Control Panel
C ONFIGURING
THE
R EAD /WRITE C ONTROL P ANEL
Square D
Complete a row for each read or write table.
Tip
Refer to Chapter 8, “Application Design Tips and Techniques,” for
information about triggering schemes using elements defined in
this panel.
Table Name
19
External Device
Interface
To bring the Read/Write Control panel to the foreground, click on its title bar in
the display of all configuration panels or click on Next from the Logical Station
Information panel.
Give this read or write request a name. Define one request (table)
per line and do not include spaces in the name. You can define as
many tables in this panel as available memory allows. Try to
make the table name reflective of the operation it represents.
If this is a triggered read or a block write table, when the trigger
element (Block Read Trigger for a read operation or Block Write
Trigger for a write operation) is forced to 1 (ON), the element
prompts FactoryLink to process this table and any other table in
which the same trigger is defined.
Valid Entry: alphanumeric string of up to 16 characters
FactoryLink 6.6.0 / Device Interface Guide / 525
•
SQUARE D
•
Configuring the Read/Write Control Panel
•
•
Unsolicited Read
If this is a triggered block read or as a write operation, accept the
default of NO.
If this is an unsolicited read operation, enter YES. EDI will
emulate the device’s addressing structure based on entries you
make in the Read/Write Information panel. The incoming data
will be stored in the element represented by the tag name
specified in the Read/Write Information panel. If the current
value of the element is equal to the new value, the change-status
indicator is unaffected. If a different value is being stored the
element, however, it will overwrite the current value and the
element’s change-status indicator will be set to 1 (ON).
Valid Entry: yes, no (default=no)
Exception Write
For EDI to interpret this operation as a triggered block write or
as a read operation, accept the default of NO.
For EDI to interpret this operation as an exception write and
write element values to the device only when those values
change, enter YES.
In an exception write, an internal change-status indicator within
the element containing the data to be written prompts the write
operation. If an element is configured for an exception write and
EDI recognizes this indicator has been set since the last scan of
the real-time database (indicating the value of the element has
changed), EDI writes this element’s value to the device.
Valid Entry: yes, no (default=no)
Tip
Do not specify elements expected to change at frequent and
unpredictable intervals in an exception write table. Any element
specified will be written to the device in its own packet (message)
each time it changes. Defining elements that change value
frequently as exception writes can slow down communications or
result in an error message.
Block Read
Priority
If this is a block read operation, enter a number to indicate the
priority of this table, relative to other read operations. The
highest priority is 1. This number influences the order in which
the EDI task handles the queuing of block read requests. If EDI
receives two requests at the same time, it processes the request
with the highest priority first. The default is 1.
526 / FactoryLink 6.6.0 / Device Interface Guide
SQUARE D
Configuring the Read/Write Control Panel
If this is an unsolicited read or a write operation, accept the
default of 1. This field defaults to 1 regardless of whether the
operation being defined is a block read.
19
Valid Entry: 1 - 4 (default=1)
The Block Read Trigger, Block Read Disable, Block Read Complete, and
Block Read State elements apply only to triggered read operations.
Do not define these elements for unsolicited read operations or for
write operations.
Block Read
Trigger
If this is an unsolicited read or a write operation, ignore this field.
If this is a triggered read operation, this field is required. Enter a
tag name for a digital element to initiate a block read of the
addresses specified in the Read/Write Information panel. When
this element’s value is forced to 1 (ON), the addresses are read.
If this is an unsolicited read or a write operation, ignore this field.
If this is a triggered read operation, this field is optional. If you
need a digital element to disable a block read of the elements
specified in this table, enter a tag name. When this tag’s value is
forced to 1 (ON), the read operation is not executed, even when
the block read trigger is set to 1.
To re-enable a block read table that has been disabled, set this
element back to 0 (OFF).
Valid Entry: standard element tag name
Valid Data Type: digital
Tip
This element can be used to disable a block read operation that is
either part of a cascaded loop or is self-triggered. The triggering
cycle will cease upon disabling, however. To re-enable a cascaded
loop or a self-triggered read table, the Block Read Trigger element
must be toggled or forced to 1. Refer to Chapter 8, “Application
Design Tips and Techniques,” for further details.
FactoryLink 6.6.0 / Device Interface Guide / 527
Square D
Valid Entry: standard element tag name
Valid Data Type: digital
Block Read
Disable
External Device
Interface
Note
•
SQUARE D
•
Configuring the Read/Write Control Panel
•
•
Block Read
Complete
If this is an unsolicited read or a write operation, ignore this field.
If this is a triggered read operation, this field is optional. If you
need a digital element to indicate when this operation is
complete, enter a tag name. This element is forced to 1 (ON) at
startup. After the elements defined in the Read/Write
Information panel have been updated in the FactoryLink
database, the complete element is forced to 1 again.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Read State
If this is an unsolicited read or a write operation, ignore this field.
If this is a triggered read operation, this field is optional. If you
need a digital element to indicate the state of this operation (in
progress or complete), enter a tag name. This element is forced to
1 (ON) at startup. While the table is being processed, the element
is set to 0 (OFF). After the elements defined in the Read/Write
Information panel have been updated in the FactoryLink
database, the state element is forced back to 1.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write
Priority
If this is a block or exception write operation, enter a number to
indicate the priority of this table, relative to other write
operations. The highest priority is 1. This number influences the
order in which the EDI task handles the queuing of write
requests. If EDI receives two requests at the same time, it
processes the request with the highest priority first. The default
is 1.
If this is a read operation, accept the default of 1. This field
defaults to 1 regardless of whether the operation being defined is
a block or exception write.
Valid Entry: 1 - 4 (default=1)
Note
The Block Write Trigger, Block Write Disable, Block Write Complete, and
Block Write State elements apply only to write operations. Do not
define these elements for read operations.
528 / FactoryLink 6.6.0 / Device Interface Guide
SQUARE D
Configuring the Read/Write Control Panel
Block Write Trigger
If this is a read operation or an exception write operation you do
not plan to periodically disable, ignore this field.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write
Disable
If this is a read operation or an exception write operation you do
not plan to periodically disable, ignore this field.
19
External Device
Interface
If this is a block write table or an exception write table you plan
to periodically disable, this field is required. Enter a tag name for
a digital element to initiate a block write of the element values
specified in the Read/Write Information panel to the addresses
defined to receive the values. When this element’s value is forced
to 1 (ON), FactoryLink writes the values.
If this is a block write table or an exception write table you plan
to periodically disable, this field is optional. Enter a tag name for
a digital element to disable a block write to the addresses
specified in this table. When this tag’s value is forced to 1 (ON),
the write operation is not executed, even when the block write
trigger is set to 1.
Valid Entry: standard element tag name
Valid Data Type: digital
Tip
This element can be used to disable a block write operation that is
either part of a cascaded loop or is self-triggered. The triggering
cycle will cease upon disabling, however. To re-enable a cascaded
loop or a self-triggered write table, the Block Write Trigger element
must be toggled or forced to 1. Refer to Chapter 8, “Application
Design Tips and Techniques,” for further details.
FactoryLink 6.6.0 / Device Interface Guide / 529
Square D
To re-enable a block write table that has been disabled, set this
element back to 0 (OFF).
•
SQUARE D
•
Configuring the Read/Write Control Panel
•
•
Block Write
Complete
If this is a read or exception write operation, ignore this field.
If this is a block write table, this field is optional. If you need a
digital element to indicate when this operation is complete, enter
a tag name. This element is forced to 1 (ON) at startup. After the
data defined in this table’s Read/Write Information panel has
been written to the device, the complete element is forced to 1
again.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write State
If this is a read or exception write operation, ignore this field.
If this is a block write operation, this field is optional. If you need
a digital element to indicate the state of this operation (in
progress or complete), enter a tag name. This element is forced to
1 (ON) at startup. While the table is being processed, the element
is set to 0 (OFF). After the data defined in this table’s Read/Write
Information panel has been written to the device, the state
element is forced back to 1.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
When the panel is complete, click on Enter to validate the information. Define the
data type (digital) for any tag names displayed in the Tag Definition dialog.
530 / FactoryLink 6.6.0 / Device Interface Guide
SQUARE D
Configuring the Read/Write Control Panel
Table 19-0 provides sample entries for a row defining a triggered read table:
19
Table 19-0 Sample Square D Read/Write Control Panel Entries
Entry
Description
READ
The name of this table is READ.
Unsolicited
Read
NO
This is not an unsolicited read table.
Exception
Write
NO
This is not an exception write table.
Block Read
Priority
1
The block read priority, which is set
automatically if you do not enter a
value, is set to the default of 1, the
highest priority.
Block Read
Trigger
SQRD_READ_TRIGGER
When the value of
SQRD_READ_TRIGGER is 1,
FactoryLink reads the configured
address and writes its value to the
element configured for this table (in
the Read/Write Information panel).
Block Read
Disable
SQRD_READ_DISABLE
When the value of
SQRD_READ_DISABLE is 1,
FactoryLink disregards the trigger
element, SQRD_READ_TRIGGER,
and does not process the READ table.
Block Read
Complete
SQRD_READ_COMPLETE Once the data is read and stored in
the database element defined (in the
Read/Write Information panel) to
receive it, FactoryLink forces a value
of 1 to SQRD_READ_COMPLETE.
Block Read
State
SQRD_READ_STATE
Once the data is read and stored in
the database element defined to
receive it, FactoryLink forces a value
of 1 to SQRD_READ_STATE. During
the read operation,
SQRD_READ_STATE is set to 0.
FactoryLink 6.6.0 / Device Interface Guide / 531
Square D
Table
Name
External Device
Interface
Column
•
SQUARE D
•
Configuring the Read/Write Control Panel
•
•
Table 19-0 Sample Square D Read/Write Control Panel Entries (Continued)
Column
Block Write
Priority
Entry
1
Block Write
Trigger
Block Write
Complete
Block Write
Disable
Block Write
State
532 / FactoryLink 6.6.0 / Device Interface Guide
Description
The write priority for this table is set
to 1 by default.
Since this is a read table, the
elements specific to write requests are
not defined.
SQUARE D
Configuring the Read/Write Information Panel
C ONFIGURING
THE
R EAD /WRITE I NFORMATION P ANEL
For a Write Table—Add a panel entry for each element to be written when the
operation executes.
Tip
Alternatively, the elements you define in the Read/Write
Information panel can be configured in the Tag Definition dialog in
the Application Editor. Refer to the Application Editor for details.
Tag Name
For a read table, specify a tag name for an element in which
FactoryLink will store the data read from the device.
For a write table, specify a tag name for an element containing a
value to be written to the device.
Valid Entry: standard element tag name
Valid Data Type: digital, analog, longana, float
FactoryLink 6.6.0 / Device Interface Guide / 533
Square D
For a Read Table—Add a panel entry for each FactoryLink database element in
which data read from the device will be stored when the operation executes.
19
External Device
Interface
From the Read/Write Control panel, select the row for the table you are
configuring and click on Next to bring the Read/Write Information panel to the
foreground.
•
SQUARE D
•
Configuring the Read/Write Information Panel
•
•
Logical Station
Enter the number representing the device from which the data is
to be read or to which the element’s value will be written. This
number was originally defined in the Logical Station Information
panel for the logical port through which communications with
this device occurs.
Valid Entry: previously defined logical station number
Data Type
For each element defined in the Tag Name field, specify the type of
data being read from or written to the device.
Valid Entry: register, status (default=register)
Address
For a read table, enter the address in the device's memory where
the value to be stored in this element is located.
For a write table, enter the address in the device's memory to
which the element value will be written.
Valid Entry: 1 - 8192
Bit Offset
If the element (entry in the Tag Name column) associated with
this entry is digital, enter the bit offset within the word that
contains the value to be read or to which the element value is to
be written. Bit 1 is the most significant bit (MSB) and bit 16 is
the least significant bit.
For all other FactoryLink data types, leave this field blank.
Valid Entry: 1 - 16 if data type is digital
Priority
If this is an unsolicited read operation (that is, you entered YES
in the Unsolicited Read field on the Read/Write Control panel),
enter PRIORITY. Otherwise, accept the default of NORMAL.
Valid Entry: priority, normal (default=normal)
When the panel is complete, click on Enter to validate the information. Define the
data type (digital, analog, long analog, or floating-point) for any tag names
displayed in the Tag Definition dialog.
534 / FactoryLink 6.6.0 / Device Interface Guide
SQUARE D
Configuring the Read/Write Information Panel
Table 19-0 provides sample Read/Write Information panel entries for the triggered
read table defined in Table 19-0 on page 531.
19
Table 19-0 Sample Square D Read/Write Information Panel Entries
Entry
Description
Table Name
READ
The table name defined in the Read/Write
Control panel is displayed.
Tag Name
REG_DIG1
When the READ table is triggered by
SQRD_READ_TRIGGER (defined in the
Read/Write Control panel), FactoryLink
processes the table. The value read from the
device is stored in REG_DIG1.
Logical Station 0
External Device
Interface
Field
The value stored in this element is read
from the Square D device configured as
logical station 0.
REGISTER
A register address is being read.
Address
426
The address of the register is 426.
Bit Offset
12
The bit offset containing the value being
read is 12.
Priority
NORMAL
This read operation will be processed
according to the priority specified in the
Read/Write Control panel.
FactoryLink 6.6.0 / Device Interface Guide / 535
Square D
Data Type
•
SQUARE D
•
Cable Diagram
•
•
C ABLE D IAGRAM
The following figure illustrates how to connect the computer running FactoryLink
to a Square D device. This connection occurs from the host through an RS-232
25-pin ribbon cable to a 25-pin converter, through the converter’s four-wire
RW-422 cable to the Square D’s 9-pin port.
Figure 19-0
Host
RS-232 25-pin
FactoryLink
RS-232 to RS-422 converter
RS-232 null
modem cable
Square D
9-pin
RD-
Pin 1 is TX-
RD+
Pin 2 is TX+
SD-
Pin 3 is RX-
SD+
Pin 4 is RX+
Pins 5 and 6
are jumped
together.
Pins 7 and 8
are jumped
together.
536 / FactoryLink 6.6.0 / Device Interface Guide
SQUARE D
Run-Time Application Messages
R UN -TIME A PPLICATION M ESSAGES
19
For information about the messages displayed for the EDI task and the format in
which protocol module messages are generated, see Chapter 10, “Messages and
Codes.”
External Device
Interface
During EDI run time, FactoryLink generates and displays messages for the
Square D protocol module on the Run-Time Manager screen and, if so configured,
writes them to message or analog tags. For information about configuring a
message tag, see “Configuring the Logical Station Control Panel” on page 518. For
information about configuring an analog tag, see “Configuring the Logical Station
Information Panel” on page 522.
SQRD8023 Messages
SQRD8023:
Error closing Multicast Service Access Point
Cause:
Task was unsuccessful in closing the SAP address. This error
should occur only when stopping the task.
Action:
No action is required.
Error getting SAP frame
Cause:
Task error occurred when attempting to read a message from the
Ethernet adapter card.
Action:
This error can occur in UNIX systems. Define 1n ETH0 ETH0,
where ETH0 is the name of the Ethernet LAN adapter.
SQRD8023:
Error obtaining adapter address
Cause:
Task has unsuccessfully attempted to connect to the Ethernet
communications card.
Action:
This error can occur in UNIX systems. Define 1n ETH0 ETH0,
where ETH0 is the name of the Ethernet LAN adapter.
SQRD8023:
Error obtaining multicast Service Access Point
Cause:
Task has unsuccessfully attempted to connect to the Ethernet
communications card.
Action:
This error can occur in UNIX systems. Define 1n ETH0 ETH0,
where ETH0 is the name of the Ethernet LAN adapter.
FactoryLink 6.6.0 / Device Interface Guide / 537
Square D
SQRD8023:
•
SQUARE D
•
Run-Time Application Messages
•
•
SQRD8023:
Error sending connect command
Cause:
Task was unsuccessful in sending the connect command. This
command is part of initialization and terminates with this error.
Action:
Device address of drop may be incorrect.
SQRD8023:
Error sending multicast
Cause:
Task error attempting to transmit a message from the Ethernet
adapter card.
Action:
This error can occur in UNIX systems. Define 1n ETH0 ETH0,
where ETH0 is the name of the Ethernet LAN adapter.
SQRD8023:
Process unsolicited XMIT_ERROR
Cause:
Task error attempting to process an unsolicited message.
Action:
Change the format of the message sent from the PLC.
SQRD8023:
Protection bit failure
Cause:
Task has attempted to start, but the FactoryLink protection bit
51 could not be located.
Action:
Verify that bit 51 was properly installed.
SQRDRCOM and SQRDSCOM Messages
If using SY/MAX point-to-point serial communications, the following messages
can appear:
SQRDCPT:
PPORT-%d port setup failed
Cause:
Task has unsuccessfully attempted to configure the physical port
indicated by the %d. This error indicates that a physical problem
has occurred.
Action:
Verify that the physical port is correctly defined.
SQRDCPT:
Protection bit failure
Cause:
Task has attempted to start, but the FactoryLink protection bit
51 could not be located.
Action:
Verify that bit 51 was properly installed.
538 / FactoryLink 6.6.0 / Device Interface Guide
SQUARE D
Run-Time Application Messages
SQRDDSF:
PPORT-%d start failed
Task has unsuccessfully attempted to configure the physical port
indicated by the %d. This error indicates that a physical problem
has occurred.
Action:
Verify that the physical port is correctly defined.
SQRDRCOM, SQRDSCOM and SQRDENET Messages
Error messages in the following format can occur with the SY/MAX point-to-point
serial communication or with the 802.3 Ethernet communication protocol module:
SQRDDSF: LSTA - yyy Error - xxx: sss
19
External Device
Interface
Cause:
These errors are associated with return data to the FactoryLink EDI task and the
logical port error message element. They appear in the format described in “EDI
Run-Time Manager Line Format” on page 202.
The following information is also returned to the Device Message Tag element
defined in the Logical Station Control panel:
where:
yyy
Is the logical station where the error occurred
zzz
Is the error number
FactoryLink 6.6.0 / Device Interface Guide / 539
Square D
SQRDDST: LSTA - yyy Error - xxx:sss
•
SQUARE D
•
Run-Time Application Messages
•
•
sss
Is the ASCII string describing the error message (see Table 19-0
on page 541)
540 / FactoryLink 6.6.0 / Device Interface Guide
SQUARE D
Run-Time Application Messages
Table 19-0 ASCII String Meanings and Descriptions
19
If xxx Is:
sss Is an ASCII String
Meaning:
Description
Receive error
An error occurred while the packet was
being received.
2
Timeout
Did not receive a response from the
request.
3
Invalid error code
Invalid error code.
4
Invalid FactoryLink type
for conversion
Invalid FactoryLink element type.
5
SY/MAX error XXX
XXX-SY/MAX error (see Bulletin
30598-713-01).
6
Received too many NAKs
Resent the packet the retry number
without receiving ACK.
7
Received unsupported
Unsolicited Opcode-YYY
Received an unsupported Unsolicited
Opcode-YYY.
8
Transmit error
An error occurred during the
transmission of the packet.
FactoryLink 6.6.0 / Device Interface Guide / 541
External Device
Interface
1
•
SQUARE D
•
Run-Time Application Messages
•
•
542 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 20
Texas Instruments
20
• Directly (point-to-point mode) via a COM port on the system unit
• Over a TIWAY Serial Unilink network (TIWAY mode) via a COM port on the
system unit through the TIWAY Host Adapter module
External Device
Interface
This chapter contains information needed to set up and configure bidirectional
communications between the FactoryLink real-time database and various devices
in either of two ways:
The following table lists the supported device types for point-to-point and network
communications:
Table 20-0 Bidirectional Communications
Point-to-Point
TIWAY Serial Unilink
Texas Instruments 520C
Texas Instruments 530C
Texas Instruments 525
Texas Instruments 530T
Texas Instruments 530C
Texas Instruments 535
Texas Instruments 530T
Texas Instruments 540
Texas Instruments 535
Texas Instruments 545
PM550
Texas Instruments 565
PM550C
Texas Instruments
Texas Instruments 525
Texas Instruments 545
Texas Instruments 560
Texas Instruments 565
Texas Instruments RTU
Texas Instruments 5TI
FactoryLink 6.6.0 / Device Interface Guide / 543
•
TEXAS INSTRUMENTS
•
Texas Instruments Setup
•
•
TEXAS I NSTRUMENTS S ETUP
Before completing the Texas Instruments protocol module configuration panels,
set up the devices as described in the following sections.
DIP Switches
Set the following switches on the Host Adapter. (See Dip Switch Settings for NITP
Protocol Table.)
DIP switch 1
switch 1 up
switch 2 up
switch 3 down
switch 4 down
switch 5 configurable (See Baud Rate Table.)
switch 6 configurable (See Baud Rate Table.)
switch 7 configurable (See Baud Rate Table.)
switch 8 configurable (See Baud Rate Table.)
switch 9 configurable (See Host Command Timeout Table.)
switch 10 configurable (See Host Command Timeout Table.)
DIP switch 2
switch 1 up
switch 2 down
switch 3 up
switch 4 down
switch 5 configurable (See Baud Rate Table.)
switch 6 configurable (See Baud Rate Table.)
switch 7 configurable (See Baud Rate Table.)
switch 8 configurable (See Baud Rate Table.)
switch 9 down
switch 10 down
544 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Texas Instruments Setup
Figure 20-0 DIP Switch Settings for the NITP Protocol
20
Dipswitch Settings for NITP Protocol
1
2
3
4
5
6
7
8
9
10
Dipswitch 1
Host Command timeout
TIWAY I Baud Rate
U
P
1
2
3
4
5
6
7
8
9
Up
Down
Synchronous
Asynchronous
Up
Down
Full Duplex
Half Duplex
Up
Down
NRZI
NRZ
Up
NITP
External Device
Interface
U
P
10
Dipswitch 2
Up
Down
Test Mode
Run Mode
Up
HIU/EHA &
IO Loop Test
MHIU/EHA
Down
Host Port Baud Rate
Synchronous
Asynchronous
Up
Down
Full Duplex
Half Duplex
Up
Down
Even Parity
Odd Parity
Up
Parity Enabled
FactoryLink 6.6.0 / Device Interface Guide / 545
Texas Instruments
Up
Down
•
TEXAS INSTRUMENTS
•
Texas Instruments Setup
•
•
Baud Rate
Set the TIWAY Serial Unilink network baud rate with DIP switch 1 switches 5, 6,
7, and 8. Set the host PC’s (PC running FactoryLink) port baud rate with DIP
switch 2 switches 5, 6, 7, and 8. Baud rates for the TIWAY Serial Unilink network
and the host PC’s port may be configured differently.
Use Figure 20-0 to set the baud rate on DIP switches 1 and/or 2:
Figure 20-0 DIP Switch Baud Rates
Switches
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0 = Down
Baud Rate
0
1
0
1
0
1
0
1
0
1
0
1
110
150
300
600
1200
2400
4800
9600
19200
38400
57600*
115200*
1 = Up
*These values are not available on the Host Port
Up
1
Down
0
546 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Texas Instruments Setup
Timeout
Use Figure 20-0 to set the host PC’s command timeout:
External Device
Interface
Figure 20-0 Host Command Timeout Table
DIPSWITCH 1
Position
9
10
20
Description
Down Down
0 sec - Accepts No
Host Commands (SANM)
Down Up
10 sec Timeout
Up
Down
20 sec Timeout
Up
Up
40 sec Timeout
Texas Instruments
FactoryLink 6.6.0 / Device Interface Guide / 547
•
TEXAS INSTRUMENTS
•
Texas Instruments Setup
•
•
DIP Switches for TIWAY NIM
Use Figure 20-0 to set DIP switches for each NIM:
Figure 20-0 Dipswitch Settings for TIWAY NIM
Dipswitch Settings for TIWAY NIM
Switch
Desired Setting
LOCAL/REMOTE
REMOTE (ONLINE)
KEYDELAY
LCKBIT
NRZI/NRZ
X.25/HDLC
FULL/HALF
SYNC/ASYNC
BAUD
NETWORK ADDRESS
OFF
OFF
NRZI
HDLC
HALF
ASYNC
115.2K
1-254 ARE VALID ADDRESSES
Note
If changing the baud rate of the TIWAY Serial Unilink network,
change the corresponding switches for the Host Adapter.
548 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Accessing the Texas Instruments Tables
A CCESSING
THE
TEXAS I NSTRUMENTS TABLES
20
Note
When you choose Texas Instruments TIWAY/Point-to-Point from the Configuration
Manager Main Menu, the Texas Instruments configuration panels are displayed.
External Device
Interface
Before completing the protocol-specific Texas Instruments
configuration panels, you must complete the External Device
Definition panel. See “Identifying Protocol Types and Defining
Logical Ports” on page 84 for details.
Texas Instruments
FactoryLink 6.6.0 / Device Interface Guide / 549
•
TEXAS INSTRUMENTS
•
Configuring the Unilink Setup Table
•
•
C ONFIGURING
THE
U NILINK S ETUP TABLE
To bring the Unilink Setup panel to the foreground, click on its title bar in the
display of all configuration panels.
If you are communicating directly (point-to-point) with a single TI PLC, you do not
need to configure this table.
Specify the following information:
Logical Port for
UNILINK
Enter a number, defined in the External Device Definition panel
Logical Port column, to represent a particular communication path
to a TI device.
Valid Entry: previously defined logical port number
Comment
Enter reference information about this logical station.
Valid Entry: alphanumeric string of up to 31 characters
When the panel is complete, choose Next.
550 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Configuring the Unilink Setup Table
Table 20-0 provides sample entries for the Texas Instruments TIWAY Unilink
Setup panel:
20
Table 20-0 Sample Texas Instruments TIWAY Unilink Setup Panel Entries
Entry
Description
Logical Port for
UNILINK
0
Specifies the logical
communication path configured
by this table
Comment
Port 1 as MHIU
Port 1 communicates with a
TIWAY Host Adapter
External Device
Interface
Field
From the Unilink Setup panel, select the row for the logical port you are
configuring and click on Next to bring the Unilink Setup Information panel to the
foreground.
Adapter Mode
Specify whether a Host Adapter is the network manager.
MHIU Network Manager
HIU Any other Host Adapter on the network
FactoryLink 6.6.0 / Device Interface Guide / 551
Texas Instruments
Specify the following information:
•
TEXAS INSTRUMENTS
•
Configuring the Unilink Setup Table
•
•
Adapter Station
Enter the address of a Host Adapter on a network. Each Host
Adapter on a TIWAY network must have a unique address.
Valid Entry: 1 - 254
Adapter Max
Station Address
Enter the number of the highest physical station address on the
TIWAY Serial Unilink network associated with a logical station
specified in the Texas Instruments Logical Station Table.
Valid Entry: 1 - 254
NM Option 1
through NM
Option E
(Optional) Thirteen fields that allow you to configure optional
parameters for an MHIU Host Adapter. For a description of these
optional parameters, refer to the section on configuring the
network manager in the TIWAY 1 UNILINK Host Adapter User’s
Manual.
Valid Entry: Refer to the section on configuring the MHIU
command in the TIWAY 1 UNILINK Host
Adapter User’s Manual (default=0)
HIU Option 1
through HIU
Option 3
(Optional) Three fields that allow you to configure optional
parameters for an HIU Host Adapter. For more information about
optional parameters for this field, refer to the section on
configuring the HIU in the TIWAY 1 UNILINK Host Adapter
User’s Manual.
Valid Entry: Refer to the section on configuring the HIU in the
TIWAY 1 UNILINK Host Adapter User’s Manual.
(default=0)
When the panel is complete, choose Next.
552 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Configuring the Unilink Setup Table
Table 20-0 provides sample entries for the Texas Instruments TIWAY Unilink
Setup Information panel:
20
Table 20-0 Sample Texas Instruments TIWAY Unilink Setup Information Panel Entries
Entry
Description
Adapter Mode
MHIU
Host Adapter is configured for
MHIU mode
Adapter Station
5
Address for Host Adapter on the
network
Adapter Max Station
Address
1
The highest NIM address on the
network is 1
NM Option 1 - 9, A-E
1
Not configured because the Host
Adapter is configured in MHIU
mode
HIU Option 1-3
0
External Device
Interface
Field
Texas Instruments
FactoryLink 6.6.0 / Device Interface Guide / 553
•
TEXAS INSTRUMENTS
•
Configuring the Logical Station Control Panel
•
•
C ONFIGURING
THE
L OGICAL S TATION C ONTROL P ANEL
To bring the Logical Station Control panel to the foreground, click on its title bar
in the display of all configuration panels.
Complete a row for each logical port specified in the External Device Definition
panel you want to define as a communication path for read and write operations.
Logical Port
Enter a number, defined in the External Device Definition panel
Logical Port column, to represent a particular communication path
to a TI device.
Valid Entry: previously defined logical port number
Baud Rate
Enter the speed at which the protocol module communicates with
the devices linked to FactoryLink via this logical port. This entry
must match the baud rate configuration of the devices. Refer to
the device manufacturers documentation for details.
Valid Entry: 110, 150, 300, 600, 1200, 2400, 3600, 4800, 7200,
9600, 19200 (default=9600)
Recommended entry is 19200 if using a TI PLC on a TIWAY
network or 9600 if using a point-to-point TI PLC. However, if
using hardware requiring special parameters, you may need to
enter a different baud rate.
554 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Configuring the Logical Station Control Panel
Parity
Enter the parity error correction during transmission via this
logical port. This entry must match the configuration of the
devices communicating via this port. Refer to the device
manufacturers documentation for details.
Data Bits
Enter the number of data bits used during transmission via this
logical port. This entry must match the configuration of the
devices communicating via this port. Refer to the device
manufacturers documentation for details.
Valid Entry: 5, 6, 7, 8
External Device
Interface
Valid Entry: odd, even, none
20
The recommended entry is 7. However, if using hardware
requiring special parameters, you may need to enter a different
data bit.
Stop Bits
Enter the number of bits sent after a character to create a pause
before the start of the next character. This entry must match the
configuration of the devices communicating via this port. Refer to
the device manufacturers documentation for details.
Valid Entry: 1, 2
The recommended entry is 1. However, if using hardware
requiring special parameters, you may need to enter a different
stop bit.
Timeout
Enter the length of time, in tenths of a second, the protocol
module will wait to receive a response to a read or write command
before timing out. You must enter a value greater than 0 for the
protocol module to timeout.
Valid Entry: 0 - 32000
(Optional) Enter a tag name for a message element to which a
text string will be written to indicate a communications error
associated with this logical port.
Valid Entry: standard element tag name
Valid Data Type: message
When the panel is complete, click on Enter to validate the information. Define the
data type (message) for any tag names displayed in the Tag Definition dialog.
FactoryLink 6.6.0 / Device Interface Guide / 555
Texas Instruments
Error Msg
Tag Name
•
TEXAS INSTRUMENTS
•
Configuring the Logical Station Control Panel
•
•
Table 20-0 provides sample entries for the Texas Instruments Logical Station
Control panel:
Table 20-0 Sample Texas Instruments Logical Station Control Panel Entries
Field
Entry
Description
Logical Port
0
Specifies the logical
communication path configured
by this table.
Baud Rate
9600
Specifies the communication
rate.
Parity
ODD
Odd parity checking.
Data Bits
7
Specifies 7 data bits in the
transmission.
Stop Bits
1
Specifies 1 stop bit in the
transmission.
Timeout
30
The response timeout is 3
seconds.
Status Msg Tag
TI_LPORT0_MSG
Error messages are written to
the message element
logical port 0.
556 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Configuring the Logical Station Information Panel
C ONFIGURING
THE
L OGICAL S TATION I NFORMATION P ANEL
20
External Device
Interface
From the Logical Station Control panel, select the row for the logical port you are
configuring and click on Next to bring the Logical Station Information panel to the
foreground.
Complete a row for each device to communicate through this logical port.
Error/Status Tag
Name
(Optional) Enter a tag name for an analog element in which to
store communications error codes associated with this device
(logical station).
Valid Entry: standard element tag name
Valid Data Type: analog
Logical Station
Enter a number to identify the logical station to which the
information in this row pertains. A logical station represents the
combination of a logical port with a physical station. Assign a
unique number to each device communicating through this
logical port.
FactoryLink 6.6.0 / Device Interface Guide / 557
Texas Instruments
You can animate output-text objects to display the codes stored in
an Error/Status Tag Name element on a graphics screen. Refer to
the Application Editor for more information.
•
TEXAS INSTRUMENTS
•
Configuring the Logical Station Information Panel
•
•
You will later enter this logical station number in a read or write
table to represent the device defined in this row. In a read or
write table, this number will identify the device to or from which
data is to be sent or received.
Valid Entry: 0 - 999
Device Type
Enter the TI PLC type to which communications are to be
directed. (When using a TI545, enter TWY565 or PLC 565.)
Valid Entry
Unilink Network
TWY520C
PLC525
TWY525
PLC530C
TWY530C
PLC530T
TWY530T
PLC535
TWY535
PLC540
TWY560
PLC565
TWY565
TWYRTU
TWY5TI
Physical Station
TWY550
(indicates PM550)
TWY550C
(indicates PM550C)
Physical station address of the device with which the EDI task
communicates when using this logical station in a Read/Write
table.
Valid Entry: 1 - 254 (Normally, the physical station number is
the same as the logical station number.)
Comment
(Optional) Enter reference information about this logical station.
Valid Entry: alphanumeric string of up to 31 characters
When the panel is complete, click on Enter to validate the information. Define the
data type (analog) for any tag names displayed in the Tag Definition dialog.
558 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Configuring the Logical Station Information Panel
Table 20-0 provides sample entries for the Texas Instruments Logical Station
Information panel:
20
Table 20-0 Sample Texas Instruments Logical Station Information Panel Entries
Entry
Description
Error/Status Tag Name
TI_STATION0_
STATUS
Contains information about
communication errors
Logical Station
0
Specifies the logical
communication paths.
Device Type
TWY565
Specifies the type of device
connected to the communication
path.
Physical Station
1
Specifies the physical station
numbers associated with the
logical path.
Comment
TI, PORT 0
External Device
Interface
Field
Texas Instruments
FactoryLink 6.6.0 / Device Interface Guide / 559
•
TEXAS INSTRUMENTS
•
Configuring the Read/Write Control Panel
•
•
C ONFIGURING
THE
R EAD /WRITE C ONTROL P ANEL
To bring the Read/Write Control panel to the foreground, click on its title bar in
the display of all configuration panels or click on Next from the Logical Station
Information panel.
Note
If using the loop indexing feature, refer to “Configuring Tables for
Loop Indexing” on page 574 before configuring any Read/Write
tables.
560 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Configuring the Read/Write Control Panel
Complete a row for each read or write table.
20
Tip
Table Name
Give this read or write request a name. Define one request (table)
per line and do not include spaces in the name. You can define as
many tables in this panel as available memory allows. Try to
make the table name reflective of the operation it represents.
External Device
Interface
Refer to Chapter 8, “Application Design Tips and Techniques,” for
information about triggering schemes using elements defined in
this panel.
If this is a triggered read or a block write table, when the trigger
element (Block Read Trigger for a read operation or Block Write
Trigger for a write operation) is forced to 1 (ON), the element
prompts FactoryLink to process this table and any other table in
which the same trigger is defined.
Valid Entry: alphanumeric string of up to 16 characters
Exception
Write
For EDI to interpret this operation as a triggered block write or
as a read operation, accept the default of NO.
For EDI to interpret this operation as an exception write and
write element values to the device only when those values
change, enter YES. Do not specify elements expected to change at
frequent and unpredictable intervals in an exception write table.
Any element specified will be written to the device in its own
packet (message) each time it changes. Defining elements that
change value frequently as exception writes can slow down
communications or result in an error message.
Valid Entry: yes, no (default = no)
FactoryLink 6.6.0 / Device Interface Guide / 561
Texas Instruments
In an exception write, an internal change-status indicator within
the element containing the data to be written prompts the write
operation. If an element is configured for an exception write and
EDI recognizes this indicator has been set since the last scan of
the real-time database (indicating the value of the element has
changed), EDI writes this element’s value to the device.
•
TEXAS INSTRUMENTS
•
Configuring the Read/Write Control Panel
•
•
Block Read Priority
If this is a block read operation, enter a number to indicate the
priority of this table, relative to other read operations. The
highest priority is 1. This number influences the order in which
the EDI task handles the queuing of block read requests. If EDI
receives two requests at the same time, it processes the request
with the highest priority first. The default is 1.
If this is a write operation, accept the default of 1. This field
defaults to 1 regardless of whether the operation being defined is
a block read.
Valid Entry: 1 - 4 (default = 1)
Note
The Block Read Trigger, Block Read Disable, Block Read Complete, and
Block Read State elements apply only to triggered read operations.
Do not define these elements for write operations.
Block Read
Trigger
If this is a write operation, ignore this field.
If this is a triggered read operation, this field is required. Enter a
tag name for a digital element to initiate a block read of the
addresses specified in the Read/Write Information panel. When
this element’s value is forced to 1 (ON), the addresses are read.
Valid Entry: standard element tag name
Valid Data Type: digital
Tip
The Block Read Disable element can be used to disable a block read
operation that is either part of a cascaded loop or is self-triggered.
The triggering cycle will cease upon disabling, however. To
re-enable a cascaded loop or a self-triggered read table, the Block
Read Trigger element must be toggled or forced to 1. Refer to
Chapter 8, “Application Design Tips and Techniques,” for details.
562 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Configuring the Read/Write Control Panel
Block Read
Disable
If this is a write operation, ignore this field.
To re-enable a block read table that has been disabled, set this
element back to 0 (OFF).
Valid Entry: standard element tag name
Valid Data Type: digital
Block Read
Complete
If this is a write operation, ignore this field.
20
External Device
Interface
If this is a triggered read operation, this field is optional. If you
need a digital element to disable a block read of the elements
specified in this table, enter a tag name. When this tag’s value is
forced to 1 (ON), the read operation is not executed, even when
the block read trigger is set to 1.
If this is a triggered read operation, this field is optional. If you
need a digital element to indicate when this operation is
complete, enter a tag name. This element is forced to 1 (ON) at
startup. After the elements defined in the Read/Write
Information panel have been updated in the FactoryLink
database, the complete element is forced to 1 again.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Read State
If this is a write operation, ignore this field.
Valid Entry: standard element tag name
Valid Data Type: digital
FactoryLink 6.6.0 / Device Interface Guide / 563
Texas Instruments
If this is a triggered read operation, this field is optional. If you
need a digital element to indicate the state of this operation (in
progress or complete), enter a tag name. This element is forced to
1 (ON) at startup. While the table is being processed, the element
is set to 0 (OFF). After the elements defined in the Read/Write
Information panel have been updated in the FactoryLink
database, the state element is forced back to 1.
•
TEXAS INSTRUMENTS
•
Configuring the Read/Write Control Panel
•
•
Block Write
Priority
If this is a block or exception write operation, enter a number to
indicate the priority of this table, relative to other write
operations. The highest priority is 1. This number influences the
order in which the EDI task handles the queuing of write
requests. If EDI receives two requests at the same time, it
processes the request with the highest priority first. The default
is 1.
If this is a read operation, accept the default of 1. This field
defaults to 1 regardless of whether the operation being defined is
a block or exception write.
Valid Entry: 1 - 4 (default = 1)
Note
The Block Write Trigger, Block Write Disable, Block Write Complete, and
Block Write State elements apply only to write operations. Do not
define these elements for read operations.
Block Write Trigger
If this is a read operation or an exception write operation you do
not plan to periodically disable, ignore this field.
If this is a block write table or an exception write table you plan
to periodically disable, this field is required. Enter a tag name for
a digital element to initiate a block write of the element values
specified in the Read/Write Information panel to the addresses
defined to receive the values. When this element’s value is forced
to 1 (ON), FactoryLink writes the values.
Valid Entry: standard element tag name
Valid Data Type: digital
Tip
The Block Write Disable element can be used to disable a block write
operation that is either part of a cascaded loop or is self-triggered.
The triggering cycle will cease upon disabling, however. To
re-enable a cascaded loop or a self-triggered write table, the Block
Write Trigger element must be toggled or forced to 1. Refer to
Chapter 8, “Application Design Tips and Techniques,” for details.
564 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Configuring the Read/Write Control Panel
Block Write
Disable
If this is a read operation or an exception write operation you do
not plan to periodically disable, ignore this field.
To re-enable a block write table that has been disabled, set this
element back to 0 (OFF).
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write
Complete
20
External Device
Interface
If this is a block write table or an exception write table you plan
to periodically disable, this field is optional. Enter a tag name for
a digital element to disable a block write to the addresses
specified in this table. When this tag’s value is forced to 1 (ON),
the write operation is not executed, even when the block write
trigger is set to 1.
If this is a read or exception write operation, ignore this field.
If this is a block write table, this field is optional. If you need a
digital element to indicate when this operation is complete, enter
a tag name. This element is forced to 1 (ON) at startup. After the
data defined in this table’s Read/Write Information panel has
been written to the device, the complete element is forced to 1
again.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write State
If this is a read or exception write operation, ignore this field.
Do not use this element when more than one logical port is
specified in a single table.
Valid Entry: standard element tag name
Valid Data Type: digital
When the panel is complete, click on Enter to validate the information. Define the
data type (digital) for any tag names displayed in the Tag Definition dialog.
FactoryLink 6.6.0 / Device Interface Guide / 565
Texas Instruments
If this is a block write operation, this field is optional. If you need
a digital element to indicate the state of this operation (in
progress or complete), enter a tag name. This element is forced to
1 (ON) at startup. While the table is being processed, the element
is set to 0 (OFF). After the data defined in this table’s Read/Write
Information panel has been written to the device, the state
element is forced back to 1.
•
TEXAS INSTRUMENTS
•
Configuring the Read/Write Control Panel
•
•
Table 20-0 provides sample entries for the Texas Instruments Read/Write Control
panel:
Table 20-0 Sample Texas Instruments Read/Write Control Panel Entries
Field
Entry
Description
Table Name
READ
Name of the read/write table.
Exception Write
N
Table READ will perform
exception writes.
Block Read Priority
1
Priority is set to 1.
Block Read Trigger
TI_READ_TRIGGER
When the value of
TI_READ_TRIGGER is 1 or (on),
a block read of values specified
by the Read/Write Information
panel associated with table
READ occurs.
Block Read Disable
TI_READ_DISABLE
The element TI_READ_
DISABLE disables the block read
of table READ when the value is
1.
Block Read State
TI_READ_STATE
The value for TI_READ_STATE
is set to 1 if a read operation of
table READ is in progress, and
the value is 0 if it is inactive.
Block Write Priority
1
Default=1
Block Write Trigger
Block Write State
566 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Configuring the Read/Write Information Panel
C ONFIGURING
THE
R EAD /WRITE I NFORMATION P ANEL
20
External Device
Interface
From the Read/Write Control panel, select the row for the table you are
configuring and click on Next to bring the Read/Write Information panel to the
foreground.
For a Read Table—Add a panel entry for each FactoryLink database element in
which data read from the device will be stored when the operation executes.
For a Write Table—Add a panel entry for each element to be written when the
operation executes.
Alternatively, the elements you define in the Read/Write
Information panel can be configured in the tag definition dialog in
the Application Editor. Refer to the Application Editor for details.
FactoryLink 6.6.0 / Device Interface Guide / 567
Texas Instruments
Tip
•
TEXAS INSTRUMENTS
•
Configuring the Read/Write Information Panel
•
•
Tag Name
For a read table, specify a tag name for an element in which
FactoryLink will store the data read from the device.
For a write table, specify a tag name for an element containing a
value to be written to the device.
Valid Entry: standard element tag name
Valid Data Type: digital, analog, float
Logical Station
Enter the number representing the device from which the data is
to be read or to which the element’s value will be written. This
number was originally defined in the Logical Station Information
panel for the logical port through which communications with
this device occurs.
Valid Entry: previously defined logical station number
Data Type
Specify the type of data being read from or written to the device
for each element defined in the Tag Name field. Refer to the
TIWAY 1 UNILINK Host Adapter User’s Manual for valid data
types for each channel. If using the loop indexing feature, refer to
“Configuring Tables for Loop Indexing” on page 574 for
information about valid entries for this field.
Valid Entry
FactoryLink Type
NONE - (default)
No data type
V - variable memory
Analog
K - constant memory
Analog
X - X input packed
Digital
Y - Y input packed
Digital
C - CR packed
Digital
WX - word input
Analog
WY - word output
Analog
TCP - timer counter preset
Analog
TCC - timer counter current
Analog
DSP - drum step preset
Analog
568 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Configuring the Read/Write Information Panel
Valid Entry
FactoryLink Type
Analog
DCP - drum count preset
Analog
STW - status word
Analog
TI 545 or TI 565 PLCs with s-memory (special-function memory)
can also use the following entries:
Valid
Entry
Description
FactoryLink
Type
LVF
Loop V-flags
Analog
**
LRSF
Loop ramp/soak status
Analog
***
AVF
Analog alarm V-flags
Analog
AACF
Analog alarm C-flags
Floating-point
LCF
Loop C-flags
Floating-point
LKC
Loop gain
Floating-point
LTI
Loop reset
Floating-point
LTD
Loop rate
Floating-point
LHA
Loop high alarm
Floating-point
LLA
Loop low alarm
Floating-point
LPV
Loop process variable
Floating-point
LPVH
Loop pv high limit
Floating-point
LPVL
Loop pv low limit
Floating-point
*
**
***
Read-only. For point-to-point protocol modules, use AVF_
instead of AVF.
Read-only.
Exception write only.
FactoryLink 6.6.0 / Device Interface Guide / 569
Texas Instruments
**
External Device
Interface
DSC - drum step current
20
•
TEXAS INSTRUMENTS
•
Configuring the Read/Write Information Panel
•
•
Valid
Entry
**
*
**
***
Description
FactoryLink
Type
LODA
Loop orange deviation
Floating-point
LYDA
Loop yellow deviation
Floating-point
LTS
Loop sample rate
Floating-point
LSP
Loop setpoint
Floating-point
LMN
Loop output
Floating-point
LERR
Loop error
Floating-point
LMX
Loop bias
Floating-point
LHHA
Loop high alarm limit
Floating-point
LLLA
Loop low alarm limit
Floating-point
LRCA
Loop rate of change limit
Floating-point
LRDS
Loop ram dest. setpoint
Floating-point
LRRC
Loop ramp rate of change
Floating-point
LRST
Loop soak time
Floating-point
LSDB
Loop soak deadband
Floating-point
AHA
Analog alarm high limit
Floating-point
ALA
Analog alarm low limit
Floating-point
APV
Analog alarm process
variable
Floating-point
APVH
Analog alarm PV high limit
Floating-point
APVL
Analog alarm PV low limit
Floating-point
Read-only. For point-to-point protocol modules, use AVF_
instead of AVF.
Read-only.
Exception write only.
570 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Configuring the Read/Write Information Panel
Valid
Entry
Description
FactoryLink
Type
Floating-point
AYDA
Analog alarm yellow
deviation
Floating-point
ATS
Analog alarm sample rate
Floating-point
ASP
Analog alarm setpoint
Floating-point
AERR
Analog alarm error
Floating-point
AHHA
Analog alarm high limit
Floating-point
ALLA
Analog alarm low limit
Floating-point
ARCA
Analog alarm rate of change
Floating-point
LCFH
Analog C flags high order
Analog
LCFL
Analog C flags low order
Analog
ACFH
Analog C flags high order
Analog
ACFL
Analog C flags low order
Analog
***
PORT
Port ON/OFF element type
Digital
*
Read-only. For point-to-point protocol modules, use AVF_
instead of AVF.
Read-only.
Exception write only.
**
**
***
FactoryLink 6.6.0 / Device Interface Guide / 571
Texas Instruments
Analog alarm orange
deviation
External Device
Interface
AODA
20
•
TEXAS INSTRUMENTS
•
Configuring the Read/Write Information Panel
•
•
Note
Use the PORT data type only with an exception write element. A 1
(one) written to this element closes the port associated with the
logical station for this element. No further reads or writes occur. A
0 (zero) written to this element opens the port. Use of the TIWAY
Network reinitializes the Unilink Host Adapter before further
reads or writes occur. After the port is reopened, reads and writes
will operate normally.
Address
Enter the address of the memory location (word) being read or
written to. The system reads the value at the address and
transfers it to the element specified in the Tag Name column. The
amount of memory assigned to each PLC data type depends on
several factors, including the PLC model and the amount of
memory installed in the system. If not using the loop indexing
feature, do not configure more than one Read/Write table to write
to the same address.
If using the loop indexing feature, the Address field may need to
be left blank. Refer to “Loop Indexing” on page 574 for
information about configuring tables for loop indexing.
DCP, LRDS, LRRC, LRST, and LSDB data types require you
employ additional parameters to determine the Address field
entry. Refer to “Additional Parameters for TI Data Types” on page
584 for information about these parameters.
Valid Entry: 1 - 32767, 1 - 64 (used with TI 545 or TI 565 PLCs
with s-memory; see additional data types listed
in the preceding table)
Loop Index
If not using loop indexing, leave this field blank.
(Optional; use only with TI 545 or TI 565 PLCs having s-memory)
Alphanumeric string representing an analog element whose
value determines the loop element. The system reads the PLC
address specified in the Logical Station and Data Type fields and
writes the returned data to the loop element specified by the
value of the loop index variable. The value of this loop index
variable designates one of the elements specified in the Tag Name
field. The loop index variable is valid only for s-memory data
types such as loop variable and analog alarms.
572 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Configuring the Read/Write Information Panel
Refer to the Data Type field description on page 568 for valid
s-memory data types. Refer to “Configuring Tables for Loop
Indexing” on page 574 for more information about loop indexing.
20
Valid Entry: NONE, LOOP1, LOOP2, LOOP3, LOOP4,
When the panel is complete, click on Enter to validate the information. Define the
data type (digital, analog, or floating-point) for any tag names displayed in the
Tag Definition dialog.
Table 20-0 provides sample entries for the Texas Instruments Read/Write
Information panel:
External Device
Interface
LOOP5, LOOP6, LOOP7, LOOP8, LOOP9,
LOOP10, LOOP11, LOOP12, LOOP13, LOOP14,
LOOP15, LOOP16 (default=NONE)
Table 20-0 Sample Texas Instruments Read/Write Information Panel Entries
Field
Entry
Description
READ
Specifies the Read/Write table
name
Tag Name
TX_DIG_01
Destination elements in the
real-time database for the
addresses read from the PLC
Logical Station
0
Specifies the path to send the
request
Data Type
Y
Variables in memory addresses 1
and 50
Address
1
Memory addresses
Loop Index
NONE
Texas Instruments
Table Name
FactoryLink 6.6.0 / Device Interface Guide / 573
•
TEXAS INSTRUMENTS
•
Loop Indexing
•
•
L OOP I NDEXING
You can configure a TI PLC to read and write to up to 64 loop elements in the
FactoryLink real-time database using a loop index variable.
A loop index variable is an analog element whose value specifies which of up to 64
elements (loop elements) in the real-time database that it will read or write to.
Up to 16 loop index variables can be defined. These loop index variables constitute
a loop index.
Configuring Tables for Loop Indexing
To implement the loop indexing option, configure the following tables:
• One initial Read/Write table that references up to 16 loop index variables
• One or more Read/Write tables that reference the loop index variables specified
in the initial Read/Write table and defined in the Application Editor task
Initial Read/Write Table
First, configure one Texas Instruments Read/Write table that references up to 16
loop index variables.
Next, to implement the loop indexing option, in the Texas Instruments Read/Write
Control panel, configure either a write trigger or enable the exception write.
The entries in the loop indexing Texas Instruments Read/Write Information panel
identify the analog loop index variables. The panel can include up to 16 loop index
variables. The value of each loop index variable specifies a different loop element
in the FactoryLink real-time database. Configure only one Texas Instruments
Read/Write Information panel to identify these loop index variables.
Specify the following information for each loop index variable:
Tag Name
(Optional) Enter a tag name for an analog element in which to
store communications error codes associated with this device
(logical station).
You can animate output-text objects to display the codes stored in
an Error/Status Tag Name element on a graphics screen. Refer to
the Application Editor for more information.
Valid Entry: standard element tag name
Valid Data Type: analog
574 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Loop Indexing
Logical Station
You will later enter this logical station number in a read or write
table to represent the device defined in this row. In a read or
write table, this number will identify the device to or from which
data is to be sent or received.
Valid Entry:
Data Type
0 - 999
Specify the type of data being read from or written to the device
for each element defined in the Tag Name field.
20
External Device
Interface
Enter a number to identify the logical station to which the
information in this row pertains. A logical station represents the
combination of a logical port with a physical station. Assign a
unique number to each device communicating through this
logical port.
Valid Entry: register, status
Address
For a read table, enter the address in the device’s memory where
the value to be stored in this element is located.
For a write table, enter the address in the device’s memory to
which the element value will be written.
Valid Entry: 1 - 8192
Loop Index
Enter an alphanumeric string representing a real-time database
analog element whose value determines the TI 545 or TI 565 loop
element. Loop index variable used only with TI 545 or TI 565
PLCs having s-memory.
Valid Entry: NONE, LOOP1, LOOP2, LOOP3, LOOP4,
LOOP5, LOOP6, LOOP7, LOOP8, LOOP9,
LOOP10, LOOP11, LOOP12, LOOP13, LOOP14,
LOOP15, LOOP16, (default=NONE)
Texas Instruments
FactoryLink 6.6.0 / Device Interface Guide / 575
•
TEXAS INSTRUMENTS
•
Loop Indexing
•
•
When all appropriate information has been specified, the panel should resemble
the following panel:
In this example, table FB references the 16 loop elements (listed in the Tag Name
field) previously defined in the Graphics Mode Input task. The entries in the Loop
Index field reference the loop elements in the Tag Name field that are used by the
loop indexing Read/Write tables. For example, if a loop indexing Read/Write table
needs to reference the analog value contained in the element LOOPNDX1, you
must enter LOOP1 in its Loop Index field.
When the Texas Instruments Read/Write table is complete, choose Enter to accept
the information.
Loop Indexing Read/Write Table
Next, configure one or more Read/Write tables for each loop index variable defined
in the initial Read/Write table.
The entries in the loop indexing Texas Instruments Read/Write Information panel
reference each loop index variable referenced in the initial Read/Write table and
the corresponding loop elements read by this variable. These entries also use the
loop index variable specified in the initial Read/Write table to identify loop
elements in the FactoryLink real-time database to be read or written to. The
panel can include up to 1,000 entries.
576 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Loop Indexing
Specify the following information for each loop element:
Tag Name
For a read table, specify a tag name for an element in which
FactoryLink will store the data read from the device.
Valid Entry: standard element tag name
Valid Data Type: digital, analog, floating-point
Logical Station
Enter the number representing the device from which the data is
to be read or to which the element’s value will be written. This
number was originally defined in the Logical Station Information
panel for the logical port through which communications with
this device occurs.
External Device
Interface
For a write table, specify a tag name for an element containing a
value to be written to the device.
20
Valid Entry: previously defined logical station number
Data Type
Specify the type of data being read from or written to the device
for each element defined in the Tag Name field.
For valid data types for each channel, refer to the TIWAY 1
UNILINK Host Adapter User’s Manual.
Valid Entry
Description
FactoryLink
Type
Variable memory
Analog
K
Constant memory
Analog
X
X input packed
Digital
Y
Y input packed
Digital
C
CR packed
Digital
WX
Word input
Analog
WY
Word output
Analog
TCP
Timer counter preset
Analog
TCC
Timer counter current
Analog
DSP
Drum step preset
Analog
FactoryLink 6.6.0 / Device Interface Guide / 577
Texas Instruments
V
•
TEXAS INSTRUMENTS
•
Loop Indexing
•
•
Valid Entry
FactoryLink
Type
Description
DSC
Drum step current
Analog
DCP3
Drum count preset
Analog
STW
Status word
Analog
TI 545 or TI 565 PLCs with s-memory (special-function memory)
can also use the following entries:
Valid Entry
Description
FactoryLink
Type
**
LVF
Loop V-flags
**
LRSF
Loop ramp/soak status Analog
***
AVF
Analog alarm V-flags
Analog
AACF
Analog alarm C-flags
Floating-point
LCF
Loop C-flags
Floating-point
LKC
Loop gain
Floating-point
LTI
Loop reset
Floating-point
LTD
Loop rate
Floating-point
LHA
Loop high alarm
Floating-point
LLA
Loop low alarm
Floating-point
LPV
Loop process variable
Floating-point
LPVH
Loop pv high limit
Floating-point
*
**
***
Analog
Read-only. For point-to-point protocol modules, use
AVF_ instead of AVF.
Read-only.
Exception write only.
578 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Loop Indexing
Valid Entry
**
***
LPVL
Loop pv low limit
Floating-point
LODA
Loop orange deviation
Floating-point
LYDA
Loop yellow deviation
Floating-point
LTS
Loop sample rate
Floating-point
LSP
Loop setpoint
Floating-point
LMN
Loop output
Floating-point
LERR
Loop error
Floating-point
LMX
Loop bias
Floating-point
LHHA
Loop high alarm limit
Floating-point
LLLA
Loop low alarm limit
Floating-point
LRCA
Loop rate of change
limit
Floating-point
LRDS
Loop ram dest.
setpoint
Floating-point
LRRC
Loop ramp rate of
change
Floating-point
LRST
Loop soak time
Floating-point
LSDB
Loop soak deadband
Floating-point
AHA
Analog alarm high
limit
Floating-point
Read-only. For point-to-point protocol modules, use
AVF_ instead of AVF.
Read-only.
Exception write only.
FactoryLink 6.6.0 / Device Interface Guide / 579
20
Texas Instruments
*
FactoryLink
Type
External Device
Interface
**
Description
•
TEXAS INSTRUMENTS
•
Loop Indexing
•
•
Valid Entry
**
*
**
***
Description
FactoryLink
Type
ALA
Analog alarm low
limit
Floating-point
APV
Analog alarm process
variable
Floating-point
APVH
Analog alarm PV high
limit
Floating-point
APVL
Analog alarm PV low
limit
Floating-point
AODA
Analog alarm orange
deviation
Floating-point
AYDA
Analog alarm yellow
deviation
Floating-point
ATS
Analog alarm sample
rate
Floating-point
ASP
Analog alarm setpoint
Floating-point
AERR
Analog alarm error
Floating-point
AHHA
Analog alarm high
limit
Floating-point
ALLA
Analog alarm low
limit
Floating-point
ARCA
Analog alarm rate of
change
Floating-point
LCFH
Loop C flags high
order
Analog
Read-only. For point-to-point protocol modules, use
AVF_ instead of AVF.
Read-only.
Exception write only.
580 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Loop Indexing
Valid Entry
Description
FactoryLink
Type
Loop C flags low order
Analog
ACFH
Analog C flags high
order
Analog
ACFL
Analog C flags low
order
Analog
***
PORT
Port ON/OFF digital
element
Digital
*
Read-only. For point-to-point protocol modules, use
AVF_ instead of AVF.
Read-only.
Exception write only.
**
***
External Device
Interface
LCFL
20
Note
Use the PORT data type only with an exception write element. A 1
(one) written to this element closes the port associated with the
logical station for this element. No further reads or writes occur. A
0 (zero) written to this element opens the port. Use of the TIWAY
Network reinitializes the Unlink Host Adapter before further
reads or writes occur. After the port is reopened, reads and writes
will operate normally.
Address
For a read table, enter the address in the device’s memory where
the value to be stored in this element is located.
If no loop index variables have yet been specified, when used with
the loop indexing feature, this field acts as a default address for
the real-time database to write to at startup.
FactoryLink 6.6.0 / Device Interface Guide / 581
Texas Instruments
For a write table, enter the address in the device’s memory to
which the element value will be written.
•
TEXAS INSTRUMENTS
•
Loop Indexing
•
•
DCP, LRDS, LRRC, LRST, and LSDB data types require you
employ additional parameters to determine the Address field
entry. For information about these parameters, see “Additional
Parameters for TI Data Types” on page 584.
Valid Entry: 1 - 32767, 1 - 64 (use with TI 545 or TI 565 PLCs
with s-memory; see additional data types listed
in the preceding table)
Loop Index
(Loop index variable used only with TI 545 or TI 565 PLCs having
s-memory) Alphanumeric string representing a real-time
database analog element whose value determines the TI 545 or TI
565 loop element. The system reads the PLC address specified in
the Logical Station and Data Type fields and writes the returned
data to the loop element specified by the value of the loop index
variable. The value of this loop index variable designates one of
the elements specified in the Tag Name field.
This entry must be the same as the loop index field entry in the
initial Read/Write table that corresponds to the loop element
being referenced. For example, if referencing the loop element
LOOPNDX1 specified in the Tag Name field in the initial
Read/Write table, then enter LOOP1 which is the corresponding
loop index variable specified in the Loop Index field in the initial
Read/Write table.
The loop index variable is valid only for s-memory data types
such as loop variable and analog alarms. For valid s-memory data
types, see the Data Type field description earlier in this section.
Valid Entry: NONE, LOOP1, LOOP2, LOOP3, LOOP4,
LOOP5, LOOP6, LOOP7, LOOP8, LOOP9,
LOOP10, LOOP11, LOOP12, LOOP13, LOOP14,
LOOP15, LOOP16, (default=NONE)
582 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Loop Indexing
When all appropriate information has been specified, the panel should resemble
the following sample panel:
20
External Device
Interface
In this example, the value of LOOP1 designates which loop element, defined in
the Tag Name field, is to be read or written to. The system reads the PLC address
specified in the Logical Station, Data Type, and Loop Index fields and writes the
returned data to the appropriate loop element.
When FactoryLink initializes the database at startup, all elements’ values are set
to 0 and address 1 acts as a default loop element number because the loop write
element’s values have not yet been written. The protocol module reads or writes to
address 1 only if the loop index variable is 0. This prevents a meaningless read of
loop element 0.
FactoryLink 6.6.0 / Device Interface Guide / 583
Texas Instruments
When the table is complete, click on Enter to validate the information. Click on Exit
to return to the Main Menu.
•
TEXAS INSTRUMENTS
•
Additional Parameters for TI Data Types
•
•
A DDITIONAL P ARAMETERS
FOR
TI D ATA TYPES
To use certain TI data types, you must enter a value in the Address field of the
Texas Instruments Read/Write information panel containing a drum and a step
number or a loop and a ramp number. The following is a list of TI data types
requiring these special parameters:
• DCP
• LRDS
• LRRC
• LRST
• LSDB
To determine the correct address field entry for each data type, follow the
corresponding procedure:
DCP
1 Determine which drum to use.
2 For information about drums, refer to the Programming Instruction Manual for
the appropriate TI PLC.
3 Convert the drum number to a two-digit hexadecimal value.
Determine which step to use.
For information about steps, refer to the Programming Instruction Manual for the
appropriate TI PLC.
4 Convert the step number to a two-digit hexadecimal value.
5 Append the converted drum and step numbers derived in Steps 2 and 5 to create a
four-digit hexadecimal value.
Note
In this four-digit number, the hexadecimal drum value must
precede the step value.
Example 1: drum 10 = 0A, step 11 = 0B = 0A0B
Example 2: drum 2 = 02, step 1 = 01 = 0201
584 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Additional Parameters for TI Data Types
6 Convert this hexadecimal value to decimal.
20
Example 1: 0A0B = 2571
Example 2: 0201 = 513
Example 1: Enter 2571 in the Address field in the Read/Write
tables.
Example 2: Enter 513 in the Address field in the Read/Write
tables.
LRDS, LRRC, LRST, and LSDB
External Device
Interface
7 Enter the decimal value in the Address field.
1 Determine which loop to use.
Use any of the loops configured in the Read/Write tables.
2 Convert the loop number to a two-digit hexadecimal value.
3 Determine which ramp to use.
For information about ramps, refer to the Programming Instruction Manual for
the appropriate TI PLC.
4 Convert the ramp number to a two-digit hexadecimal value.
5 Append the converted loop and ramp numbers derived in Steps 2 and 5 to create a
four-digit hexadecimal value.
Note
Example 1: loop 1 = 0,1 ramp 1 = 00 = 0100
Example 2: loop 10 = 0A, ramp 11 = 0A = 0A0A
FactoryLink 6.6.0 / Device Interface Guide / 585
Texas Instruments
In this four-digit number, the hexadecimal loop value must precede
the ramp value.
•
TEXAS INSTRUMENTS
•
Additional Parameters for TI Data Types
•
•
6 Convert this hexadecimal value to decimal.
Example 1: 0100 = 256
Example 2: 0A0A = 2570
7 Enter the decimal value in the Address field.
Example 1: Enter 256 in the Address field in the Read/Write
tables.
Example 2: Enter 2570 in the Address field in the Read/Write
tables.
586 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Computations for 5TI Sequencer Ladder Logic Code
C OMPUTATIONS
FOR
5TI S EQUENCER L ADDER L OGIC C ODE
20
Note
The 5TI Sequencer has a 16-bit word which represents the ladder logic code. In
the 1010 series sequencer, 14 of these 16 bits are available for use, and in the 1020
series, 15 bits are available. The construction of the 16-bit word is described in
Diagram A. The binary weights for each bit are described in Diagram B. Sample
computations are given in Diagram C.
External Device
Interface
This information was extracted from the 5TI2000 Programmer
Operator’s Manual.
Use the following steps to update the ladder logic in the 5TI Sequencer:
1 Define a FactoryLink analog element in the Read/Write Information table.
2 Enter an L in the Data Type field of the Texas Instruments Read/Write Information
panel.
3 Enter the ladder logic program address in the Address field.
4 Compute the 16-bit word representing the ladder logic.
5 Write IML logic to store computation into the analog element.
6 Use the element type LEDS, opcode LEDSD, and display digits on the 5TI
programmer to check the accuracy of the computation.
Diagram A: Bit Layout for 16-bit Sequencer Word
B15 B14 B13
<Opcode>
B9 B8 B7 B6 B5 B4 B3 B2 B1 B0
<—————-Digit Keys————->
FactoryLink 6.6.0 / Device Interface Guide / 587
Texas Instruments
<Element Type>
B11 B10
•
TEXAS INSTRUMENTS
•
Computations for 5TI Sequencer Ladder Logic Code
•
•
Diagram B: Binary Weight Tables for Bits 10-15
Element &
Opcode
B15
B14
16384
B13
8192
B12
4096
B11
2048
B10
1024
Binary
Value
X
0
0
0
0
0
1
1024
7
0
0
0
0
1
0
2048
CR
0
0
0
0
1
1
3072
STR
0
0
0
1
0
0
4096
CTR
0
0
1
0
0
0
8192
OUT
0
0
1
1
0
0
12288
MCAR
0
1
0
0
0
0
16384
S TR NOT
0
1
0
1
0
0
20480
TMR
0
1
1
0
0
0
24576
OUT NOT
0
1
1
1
0
0
28672
Diagram C: Sample Computations
STR
STR CR, 511
CR
511
4096+3072 +511 =7679
STR NOT
CR
511
STRNOT CR, 511
20480+ 3072+511 -24063
588 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Run-Time Application Messages
R UN -TIME A PPLICATION M ESSAGES
20
For information about the messages displayed for the EDI task and the format in
which protocol module messages are generated, see Chapter 10, “Messages and
Codes.”
The ER:xxxx string in a message can contain a single-digit or a double-digit error
code. In following descriptions, N represents significant digits and x represents
digits not significant to the error.
• Single-Digit Code Format
ER:xxxN is a single-digit format in which one digit represents a single error
condition. In some cases, two individual codes appear within a string to
indicate multiple error conditions.
• Double-Digit Code Format
ER:xxNN is a double-digit format in which two digits represent a single error
condition.
External Device
Interface
During EDI run time, FactoryLink generates and displays messages for the Texas
Instruments protocol module on the Run-Time Manager screen and, if so
configured, writes them to message or analog tags. For information about
configuring a message tag, see “Configuring the Logical Station Control Panel” on
page 554. For information about configuring an analog tag, see “Configuring the
Logical Station Information Panel” on page 557.
Decoding ER:
Decode the ER: string by interpreting the least significant digit (LSD—rightmost
integer) and the most significant digit (MSD—leftmost integer)
of NN. For example:
err0043
3 = LSD
If the MSD is less than eight, use Case 1 for decoding. If the MSD is eight or
higher, use Case 2 for decoding.
Case 1: EDI Task or Protocol Module Errors
The LSD of the xx in err 00xx identifies the error, and the MSD identifies its
cause. Decode the err 00xx code according to the following guidelines:
FactoryLink 6.6.0 / Device Interface Guide / 589
Texas Instruments
4 = MSD
•
TEXAS INSTRUMENTS
•
Run-Time Application Messages
•
•
MSD
The MSD of xx signifies one of the following conditions:
1
Cause:
Invalid data returned.
Action:
Verify device configuration and cabling. Check that FactoryLink
configuration tables contain the proper station addresses and
template parameters. Check that the Texas Instruments Logical
Station Control panel contains the proper baud rate, parity, and
data format parameters.
Cause:
Turnaround error / timeout error.
Action:
Refer to the action for Error Code 01.
Cause:
Buffer overflow.
Action:
Refer to the action for Error Code 01.
Cause:
Checksum error on return data.
Action:
Refer to the action for Error Code 01.
Cause:
Transmit error.
Action:
Refer to the action for Error Code 01.
2
3
4
5
LSD
The LSD of xx signifies one of the following conditions:
1
Cause:
Unknown error detected.
Action:
Use the action specified for the error code’s MSD.
590 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Run-Time Application Messages
2
20
Receiver error.
Action:
Use the action specified for the error code’s MSD.
Cause:
Receiver abort.
Action:
Use the action specified for the error code’s MSD.
Cause:
Receiver CPT translation error.
Action:
Use the action specified for the error code’s MSD.
Cause:
Texas Instruments exception error.
Action:
Use the action specified for the error code’s MSD.
Cause:
Receive invalid read length.
Action:
Use the action specified for the error code’s MSD.
Cause:
Receive DSF translate error.
Action:
Use the action specified for the error code’s MSD.
3
4
External Device
Interface
Cause:
5
6
7
Sample protocol module error
receiver abort (LSD)
timeout error (MSD)
This error indicates cabling problems, incorrect DIP switch settings, or other
hardware-related problems.
FactoryLink 6.6.0 / Device Interface Guide / 591
Texas Instruments
err 0023
0 0 2 3
•
TEXAS INSTRUMENTS
•
Run-Time Application Messages
•
•
Case 2: TIWAY Serial Unilink Network or Point-to-Point TI PLC Errors
Use the following error code for both TIWAY Serial Unilink or Point-to-Point:
err 0009
Cause:
Read or write has been issued when the port has been closed.
Action:
Force-write a 0 to the port on/off element defined to reopen the
port.
TIWAY Serial Unilink Network exception code errors are listed below.
For more information about TIWAY errors, locate the TI code in the list below and
refer to the TIWAY 1 UNILINK Host Adapter User’s Manual.
81 (TIWAY code: 0001)
Cause:
A command was timed out by the HIU function.
Action:
Consult page 6-1 in the TIWAY 1 UNILINK Host Adapter User’s
Manual.
82 (TIWAY code: 002)
Cause:
TIWAY 1 HDLC ERROR - RESET SECONDARY.
Action:
Reset the secondary device.
83 (TIWAY code: 0003)
84
Cause:
The wrong secondary address was returned.
Action:
Reissue the command. Reset the Network Manager if the error
continues.
(TIWAY code: 0006)
Cause:
The command cannot use secondary address 00.
Action:
Retransmit the command with the correct secondary address.
592 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Run-Time Application Messages
85 (TIWAY code: 0008)
The network manager can’t process secondary bits.
Action:
Reset the adapter with the NM function. Call the Texas
Instruments Technical Services Hotline at (615) 461-2501 if the
error continues.
86 (TIWAY code: 0009)
Cause:
There is an incorrect HDLC checksum.
Action:
Consult page 6-1 in the TIWAY 1 UNILINK Host Adapter User’s
Manual.
20
External Device
Interface
Cause:
87 (TIWAY code: 000A)
Cause:
A secondary timed out in the middle of a message.
Action:
Consult page 6-1 in the TIWAY 1 UNILINK Host Adapter User’s
Manual.
88 (TIWAY code: 000B)
Cause:
A secondary/max poll timeout occurred.
Action:
Adjust the maximum poll-time value. Refer to Chapter 5,
command code 30, in the TIWAY 1 UNILINK Host Adapter
User’s Manual for information about adjusting this value.
89 (TIWAY code: 000E)
Cause:
An uneven number of bytes was received from a secondary.
Action:
Consult page 6-2 in the TIWAY 1 UNILINK Host Adapter User’s
Manual.
Cause:
A Data-Carrier-Detect was lost.
Action:
Consult page 6-2 in the TIWAY 1 UNILINK Host Adapter User’s
Manual.
FactoryLink 6.6.0 / Device Interface Guide / 593
Texas Instruments
8A (TIWAY code: 0010)
•
TEXAS INSTRUMENTS
•
Run-Time Application Messages
•
•
8B (TIWAY code: 0011)
Cause:
A Clear-to-Send was lost.
Action:
Consult page 6-2 in the TIWAY 1 UNILINK Host Adapter User’s
Manual.
8C (TIWAY code: 0084)
Cause:
The command processor found an unrecognized command code
in a command string.
Action:
Reconfigure the Host Adapter.
8D (TIWAY code: 0085)
Cause:
An invalid field was received with the command.
Action:
Consult Chapter 5, command code 30, in the TIWAY 1 UNILINK
Host Adapter User’s Manual.
8E (TIWAY code: 0086)
Cause:
The command is too long for the command code.
Action:
Consult page 6-2 in the TIWAY 1 UNILINK Host Adapter User’s
Manual.
e8F (TIWAY code: 0087)
Cause:
The command frame is too short.
Action:
Consult page 6-2 in the TIWAY 1 UNILINK Host Adapter User’s
Manual.
90 (TIWAY code: 0088)
Cause:
A secondary device is not connected.
Action:
Check the address in the command string and the addresses of
the secondary devices. Then, issue a connect secondary
command or enable a macro that was previously defined to
connect that secondary.
594 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Run-Time Application Messages
91 (TIWAY code: 0089)
A colon (:) is missing from the beginning of an NITP message
frame.
Action:
Add a colon to the frame and retransmit it.
92 (TIWAY code: 008B)
Cause:
The char count field value doesn’t match the received count.
Action:
Contact Customer Support.
93 (TIWAY code: 008C)
Cause:
A checksum mismatch has occurred.
Action:
Contact Customer Support.
20
External Device
Interface
Cause:
94 (TIWAY code: 008D)
Cause:
An invalid character has been detected.
Action:
Check for faulty ports and cable connections.
95 (TIWAY code: 100B)
Cause:
The HIU is not initialized.
Action:
Reset the Host Adapter and restart the protocol module.
96 (TIWAY code: 100C)
Not enough memory for the requested secondary.
Action:
To gain enough memory for the secondary status information,
de-allocate resources for a source ID. Refer to “Allocate Source
ID,” command code 10, in the TIWAY 1 UNILINK Host Adapter
User’s Manual for information about de-allocating resources.
97 (TIWAY code: 100D)
Cause:
Not enough memory for another source ID.
Action:
To gain enough memory for the secondary status information,
de-allocate resources for a source ID. Refer to “Allocate Source
ID,” command code 10, in the TIWAY 1 UNILINK Host Adapter
User’s Manual for information about de-allocating resources.
FactoryLink 6.6.0 / Device Interface Guide / 595
Texas Instruments
Cause:
•
TEXAS INSTRUMENTS
•
Run-Time Application Messages
•
•
98 (TIWAY code: 100E)
Cause:
The HIU is not initialized for bandwidth statistics.
Action:
Consult page 6-3 in the TIWAY 1 UNILINK Host Adapter User’s
Manual.
99 (TIWAY code: 100F)
Cause:
You requested an illegal auto redundant mode command.
Action:
Consult page 6-3 in the TIWAY 1 UNILINK Host Adapter User’s
Manual.
AA (TIWAY code: 2002)
Cause:
The HIU is not configured for MHIU.
Action:
Issue command code 30 to configure the network manager and
command code 11 to configure the HIU.
AB (TIWAY code: 2003)
Cause:
The network manager is not configured.
Action:
Issue command code 30.
AC (TIWAY code: 2004)
Cause:
The HIU of MHIU is not configured.
Action:
Issue command code 11.
AD (TIWAY code: 2006)
Cause:
A command contains the same option code twice.
Action:
Correct and reissue the command.
AE (TIWAY code: 2007)
Cause:
The HIU has already been configured.
Action:
Consult page 6-3 in the TIWAY 1 UNILINK Host Adapter User’s
Manual.
596 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Run-Time Application Messages
AF (TIWAY code: 2008)
There is a TIWAY I Ports RS232/Local Line mismatch.
Action:
Consult page 6-3 in the TIWAY 1 UNILINK Host Adapter User’s
Manual.
TI PLC Point-to-Point errors are as follows:
Note
For developer actions for each error, refer to the documentation for
the appropriate Texas Instruments PLC.
20
External Device
Interface
Cause:
B1
Cause:
Reset current transaction.
Cause:
Address out of range.
Action:
Correct the address entered in the Read or Write table.
Cause:
Requested data not found.
Cause:
Illegal task code request.
Cause:
Request exceeds program memory size.
Cause:
Diagnostic fail upon power up.
Cause:
Fatal error detected.
B2
B3
B4
B5
B7
FactoryLink 6.6.0 / Device Interface Guide / 597
Texas Instruments
B6
•
TEXAS INSTRUMENTS
•
Run-Time Application Messages
•
•
B8
Cause:
Keylock protect error.
Cause:
Incorrect amount of data with command.
Cause:
Illegal request in operational mode.
Cause:
Network not deleted.
Cause:
Write operation did not verify.
Cause:
Illegal number of ASCII characters received.
Cause:
Illegal write to program memory.
Cause:
Data not inserted.
Cause:
Data not written.
Cause:
Invalid data sent with command.
Cause:
Invalid op with NIM Local/Remote mode.
Cause:
Store and forward buffer is busy.
B9
BA
BB
BC
BD
BE
BF
C0
C1
C2
C3
598 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Run-Time Application Messages
C4
No response from special function mode.
Cause:
Illegal instruction in program mem.
Cause:
Attempted write to protected variable.
Cause:
No response from Programmable Controller.
Cause:
Requested memory size exceeds total memory.
Cause:
Req. memory is not mult. of block sz.
Cause:
Req. memory < minimum defined value.
Cause:
Req. memory < maximum defined value.
Cause:
PLC busy - cannot perform operation.
Cause:
Comm error in HOLD mode.
Cause:
Port lockout is active.
Cause:
I/O configuration error.
C5
C6
C7
20
External Device
Interface
Cause:
C8
C9
CA
CB
CC
CE
D1
FactoryLink 6.6.0 / Device Interface Guide / 599
Texas Instruments
CD
•
TEXAS INSTRUMENTS
•
Run-Time Application Messages
•
•
Sample Point-to-Point error
err 00B2
0 0 B 2
Address out of range
This error indicates the address specified in the Read/Write table is out of range.
Texas Instruments Message Strings
Error messages generated by the EDI task, the protocol module, and all TI PLCs
on the system can be written to a real-time database message element for display
as message strings on a developer-defined graphic screen.
Locate the error code next to the message string to determine the cause and
appropriate action for each message string. Then, use that code to refer to the
Case 1 or Case 2 Errors in this chapter.
Error message strings and their corresponding codes appear alphabetically, below:
Table 20-0 Error Message Strings
Code
Message String
B2
Address out of range
C6
Attempted write to protected variable
8C
Bad command in string
3 (MSD)
Buffer overflow
84
Cannot use secondary address 00
92
Char count field doesn’t match received count
4 (MSD)
Checksum error on return data
93
Checksum mismatch
8B
Clear to Send lost
600 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Run-Time Application Messages
Table 20-0 Error Message Strings (Continued)
20
Code
Message String
CD
Comm error in HOLD mode
8F
Command frame too short
AD
Command has option code twice
81
Command timed out by HIU function
8E
Command too long for command code
8A
Data Carrier Detect lost
BF
Data not inserted
C0
Data not written
B6
Diagnostic fail upon power up
B7
Fatal error detected
AE
HIU already configured
95
HIU not initialized
98
HIU not initialized for bandwidth statistics
AA
HIU not yet configured for MHIU
AC
HIU of MHIU not configured
D1
I/O configuration error
99
Illegal auto redundant mode command
C5
Illegal instruction in program mem
BD
Illegal number of ASCII characters received
BA
Illegal request in operational mode
B4
Illegal task code request
FactoryLink 6.6.0 / Device Interface Guide / 601
Texas Instruments
Colon (:) missing from start
External Device
Interface
91
•
TEXAS INSTRUMENTS
•
Run-Time Application Messages
•
•
Table 20-0 Error Message Strings (Continued)
Code
Message String
BE
Illegal write to program memory
B9
Incorrect amount of data with command
86
Incorrect HDLC checksum
94
Invalid character detected
1 (MSD)
Invalid data returned
C1
Invalid data sent with command
8D
Invalid field with command
C2
Invalid op with NIM Local/Remote mode
B8
Keylock protect error
BB
Network was not deleted
85
NM can’t process secondary bits
AB
NM is not configured
C7
No response from Programmable Controller
C4
No response from special function module
97
Not enough memory for another source ID
96
Not enough memory for requested secondary
CC
PLC busy - cannot perform operation
CE
Port Lockout is active
7 (LSD)
Receive DSF translate error
6 (LSD)
Receive invalid read length
3 (LSD)
Receiver abort
4 (LSD)
Receiver CPT translation error
602 / FactoryLink 6.6.0 / Device Interface Guide
TEXAS INSTRUMENTS
Run-Time Application Messages
Table 20-0 Error Message Strings (Continued)
20
Code
Message String
CA
Req. memory < minimum defined value
C9
Req. memory is not mult. of block sz
CB
Req. memory > maximum defined value
B5
Request exceeds program memory size
B3
Requested data not found
C8
Requested memory size exceeds total memory
B1
Reset current transaction
90
Secondary device not connected
87
Secondary timed out in message
88
Secondary/max poll timeout
C3
Store and forward buffer is busy
5 (LSD)
Texas Instruments exception error
0009
ti__dsf dsf_read( ) error return - PORT CLOSED
0009
ti__dsf dsf_write ( ) error return - PORT CLOSED
82
TIWAY 1 HDLC ERROR - RESET SECONDARY
AF
TIWAY 1 Ports RS232/Local Line mismatch
5 (MSD)
Transmit error
2 (MSD)
Turnaround error / timeout error
89
Uneven # bytes from secondary
1 (LSD)
Unknown error detected
BC
Write operation did not verify
FactoryLink 6.6.0 / Device Interface Guide / 603
Texas Instruments
Receiver error
External Device
Interface
2 (LSD)
•
TEXAS INSTRUMENTS
•
Run-Time Application Messages
•
•
Table 20-0 Error Message Strings (Continued)
Code
83
Message String
Wrong secondary address returned
604 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
•
KTDTL and NetDTL
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Part III
•
KDTDL and NetDTL in this book
•
•
•
Table of Contents
•
Device Interface Guide
KDTDL and NetDTL
Part II
KTDTL and NetDTL
KTDTL and NetDTL at a Glance . . . . . . . . . . . . . . . . . . . . . . . . . . . 609
21
KTDTL and NetDTL Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611
Offlink Addressing Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614
KTDTL Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617
NetDTL Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620
22
Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623
Configuring the System Configuration Table . . . . . . . . . . . . . . . . . . . . . . . 624
Optimizing Task Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629
23
Configuring Communication Paths . . . . . . . . . . . . . . . . . . . . . . . . . 631
Logical Station Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating Logical Station Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Logical Station Table Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Logical Station Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Logical Station Information Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Path and Address Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Logical Station Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24
632
634
645
645
646
646
652
Reading and Writing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657
Reading Data from a Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Writing Data to a Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuration Tips and Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Verifying Proper Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Choosing Operation Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Choosing Effective Triggering Schemes . . . . . . . . . . . . . . . . . . . . . . . .
Configuring Read and Write Tables . . . . . . . . . . . . . . . . . . . . . . . . . . .
658
661
664
664
666
668
668
FactoryLink 6.6.0 / Device Interface Guide / 607
•
•
KDTDL and NetDTL
•
•
Configuring Triggered Read, Block Write, or Exception Write . . . . . . . . . .
Filling Out the Read/Write Control Panel . . . . . . . . . . . . . . . . . . . . . .
Filling Out the Read/Write Information Panel . . . . . . . . . . . . . . . . . .
Configuring an Unsolicited Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Unsolicited Read Operation Concepts . . . . . . . . . . . . . . . . . . . . . . . . .
Filling Out the Unsolicited Read Control Panel . . . . . . . . . . . . . . . . . .
Filling Out the Unsolicited Read Information Panel . . . . . . . . . . . . . .
Sample Read and Write Table Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Triggered Read Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Unsolicited Read Request . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Block Write Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Exception Write Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Techniques for Improving Communication Performance . . . . . . . . . . . . . . .
Specifying Priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Overtriggering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Efficient Triggering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25
671
671
680
682
682
689
690
692
692
694
695
698
700
700
701
701
Allen-Bradley Data Types and Addresses . . . . . . . . . . . . . . . . . . . 707
Supported Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Address Specification Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PLC-2 Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PLC-3, PLC-5, and PLC-5/250 Format . . . . . . . . . . . . . . . . . . . . . . . .
PLC-3 File Type Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
File Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Subelements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PLC-5 File Type Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
File Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Subelements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PLC-5/250 File Type Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
File Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Subelements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SLC 500 File Type Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
File Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Subelements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
608 / FactoryLink 6.6.0 / Device Interface Guide
708
711
711
712
713
713
714
715
715
716
722
722
723
729
729
730
Device Interface Guide
26
Messages and Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733
Status Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Allen-Bradley Return Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
734
734
734
735
735
736
737
738
FactoryLink 6.6.0 / Device Interface Guide / 609
•
•
KDTDL and NetDTL
•
•
610 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
KTDTL and NetDTL
at a Glance
Configuring KTDTL and NetDTL
For details on performing the following steps...
Go to...
1. Read about the concepts you will need to understand
to configure device communications with FactoryLink
using the KTDTL and NetDTL tasks.
Chapter 21, “KTDTL
and NetDTL
Overview”
2. NetDTL Only—Install the Ethernet card and adapter if
they are not already installed.
Manufacturer’s
documentation
3. Install the Allen-Bradley INTERCHANGE or RSLinx
software if it is not already installed.
Allen-Bradley’s
documentation
4. NetDTL Only—If you are using the RSLinx interface,
define the devices directly connected to Ethernet. In
the RSLinx Ethernet driver configuration, specify the
TCP/IP address of each Pyramid Integrator serving as
an Ethernet interface and each PLC-5/xxE device.
Allen-Bradley’s
documentation
5. KTDTL Only—Define the KT card address parameters
in the RSLinx 1784-KT/KTX/PCMK driver
configuration to match the settings that were specified
for the card.
Allen-Bradley’s
documentation
6. Install the FactoryLink ECS software and the KTDTL
or NetDTL device interface software if they are not
already installed.
Installation Guide
7. Connect one programmed device to the FactoryLink
station.
Allen-Bradley’s
documentation
8. KTDTL Only—Configure the network address of the
card or the serial port through which this device will
communicate with FactoryLink.
Allen-Bradley’s
documentation
Device Interface Guide / 611
•
KTDTL AND NETDTL AT A GLANCE
•
•
•
Configuring KTDTL and NetDTL
For details on performing the following steps...
9. Use the Allen-Bradley SuperWho™ utility for RSLinx,
or the command line utilities for INTERCHANGE, to
verify the RSLinx or INTERCHANGE software
communicates with the device and test and
troubleshoot (if necessary) the communication path to
the device. Test the path until you are satisfied the
device is correctly connected and communicating with
the computer system.
Go to...
Allen-Bradley’s
documentation
10. In the Configuration Manager, set up FactoryLink to
recognize the KTDTL or NetDTL task and define
information that optimizes the performance of the
task.
Chapter 22, “Getting
Started”
11. Define the communication path to this device in the
Logical Station table.
Chapter 23,
“Configuring
Communication
Paths”
12. Test the communication path by defining a triggered
read request and an exception write request that can
be manually triggered and monitored through the
Real-time Monitor, RTMON.
“Verifying Proper
Communications” on
page 676
13. Check the Run-Time Manager or any configured error
tags (specified in the Logical Station table) for
messages indicating problems with the connection. If
errors are reported, troubleshoot the connection.
Chapter 26,
“Messages and
Codes”
14. Once communications are successful on this single
communication path, define a communication path for
each additional device in your configuration.
Steps 11 through 13
15. Configure the read and write operations the
application will execute across these communication
paths.
Chapter 24,
“Reading and
Writing Data”
612 / Device Interface Guide
•
•
•
•
Chapter 21
KTDTL and NetDTL
Overview
The FactoryLink ECS Allen-Bradley RSLinx™ and INTERCHANGE™ tasks,
KTDTL and NetDTL, provide a device interface for programmable logic controller
(PLC) and small logic controller (SLC) communications with FactoryLink across
one or more Allen-Bradley proprietary networks.
Note
The KTDTL and NetDTL tasks can communicate with the following types of
Allen-Bradley devices: PLC-2™, PLC-3™, PLC-5™, PLC-5/250 (Pyramid
Integrator), PLC-5/xxE (NetDTL direct Ethernet link only), and SLC-500™ series
01, 02, 03, and 04 processors. (SLC-5/01, SLC-5/02, and SLC-5/03 processors
require an interface module. SLC-5/04 processors connect directly to a Data
Highway Plus™).
Additionally, the tasks can run concurrently with software other than
FactoryLink that is also using INTERCHANGE or RSLinx.
KTDTL—Data Highway Plus (DH+) communications can be established through
an Allen-Bradley KT, KTX, 1784-KT, 1784-KT2, or 1784-PCMK card port. The
DH+ can link with other networks, including another DH+, a Data Highway 485
(DH-485), or a Data Highway™ (DH) via a compatible Allen-Bradley network
interface module.
FactoryLink 6.6.0 / Device Interface Guide / 613
21
KTDTL and NetDTL
The KTDTL task and the Windows NT and 95 versions of the
NetDTL task use Allen-Bradley’s RSLinx communications
software. Other operating system versions of NetDTL use
INTERCHANGE.
•
KTDTL AND NETDTL OVERVIEW
•
•
•
NetDTL—NetDTL communicates through an Ethernet™ card port using the
TCP/IP network protocol. Communications with Allen-Bradley devices occurs
through either a PLC-5/250 with an Ethernet interface module providing a
bridge to a DH+ network, or through a direct Ethernet link to a device from the
PLC-5/xxE family. Through the Pyramid Integrator, the NetDTL task can
communicate with stations on the local DH+ link as well as with stations on
other networks, including DH-485, DH, and DH+.
A Pyramid Integrator with an Ethernet interface module serving other devices
can have multiple clients (FactoryLink NetDTL tasks) as shown in the
following diagram. Likewise, a FactoryLink NetDTL task can connect to
multiple servers as shown in Figure 21-1. To prevent excessive network traffic,
do not use more than eight Pyramid Integrators as DH+ gateways in your
application.
Figure 21-1 Server with Multiple Clients
Allen-Bradley
RSLinx or
INTERCHANGE
PLC 5/250 with
Ethernet Interface
FactoryLink
Real-Time
Database
Allen-Bradley
RSLinx or
INTERCHANGE FactoryLink
Real-Time
Database
NetDTL
Task
NetDTL
Task
Allen-Bradley
RSLinx or
INTERCHANGE FactoryLink
Real-Time
Database
NetDTL
Task
614 / FactoryLink 6.6.0 / Device Interface Guide
KTDTL AND NETDTL OVERVIEW
Figure 21-1 Client with Multiple Servers
PLC 5/250 with
Ethernet Interface
PLC 5/250 with
Ethernet Interface
PLC 5/250 with
Ethernet Interface
Allen-Bradley
RSLinx or
INTERCHANGE FactoryLink
Real-Time
Database
NetDTL
Task
21
KTDTL and NetDTL
FactoryLink 6.6.0 / Device Interface Guide / 615
•
KTDTL AND NETDTL OVERVIEW
•
Offlink Addressing Overview
•
•
O FFLINK A DDRESSING O VERVIEW
The KTDTL and NetDTL tasks can communicate with devices off the local
network link (offlink) across one, two, or several Allen-Bradley networks.
Networks can be split for various reasons, including physical media limitations
and functional splits. For example, all the devices for a particular conveyor might
be connected to one network while the devices for another conveyor are connected
to a different network. Consult the appropriate Allen-Bradley documentation to
verify you are using the correct media for connecting with networks and devices.
The diagrams in this section illustrate offlink connections by comparing them to a
physical highway system.
• The Data Highway Plus directly connected to the FactoryLink station or, for
NetDTL, to the Ethernet interface, is the main thoroughfare. Using an
appropriate Allen-Bradley interface module, you can “exit” to other networks,
or “highways.”
• An offlink address node you specify in the configuration tables identifies the
route from the FactoryLink station to the offlink device. In the diagrams, this
address is depicted as a road sign alongside a highway giving directions to a
destination.
• An interface module that links networks together (such as 1785-KA5 or
1785-KA) is shown as an interchange on a highway between different types of
roads.
• An interface module that links devices to a network (such as 1775-KA or
1785-KA3) is shown as an exit to a highway’s access road.
616 / FactoryLink 6.6.0 / Device Interface Guide
KTDTL AND NETDTL OVERVIEW
Offlink Addressing Overview
Figure 21-1 KTDTL Offlink Addressing Example
D
at
a
H
ig
h
w
ay
Pl
us
PLC-2
hw
ay
w
ay
Pl
3
-KA
H
ig
h
H
ig
5
-KA
a
5
178
D
at
5
178
57
D
at
a
To the right of the main Data Highway
Plus, a 1785-KA5 interface module
connects to a DH-485, which connects
to another 1785-KA5 interface module
and a Data Highway Plus.
46
PLC 5/40
us
13
178
PLC-2
177
5-K
A2
177
5-K
A
M
To the left of the main Data
Highway Plus, a 1785-KA
interface module connects to
a Data Highway.
26
ai
n
D
at
a
178
5-K
Devices on each network are
indicated by “road signs” that
display the device node
addresses.
SLC 5/03
D
at
a
H
ig
48
PLC-2
SLC 5/02
hw
ay
Pl
us
to
A3
Fa
H
ig
hw
ct
o
ay
48
5
ry
L
in
k
PC
42
FactoryLink Station
FactoryLink 6.6.0 / Device Interface Guide / 617
KTDTL and NetDTL
22
A5
5-K
11
PLC-3
21
A
178
1-K
•
KTDTL AND NETDTL OVERVIEW
•
Offlink Addressing Overview
•
•
Figure 21-1 NetDTL Offlink Addressing Example
D
H
ig
hw
at
a
ay
13
PLC-2
H
ig
hw
ay
177
Pl
us
Pl
us
To the right of the main Data Highway
Plus, a 1785-KA5 interface module
connects to a DH-485, which connects
to another 1785-KA5 interface module
and a Data Highway Plus.
PLC-2
57
A3
5-K
178
D
at
a
H
ig
hw
ay
A5
5-K
178
D
at
a
46
PLC 5/40
Devices on each network are
indicated by “road signs” that
display the device node
addresses.
178
5-K
A
A2
SLC 5/02
5
-KA
11
PLC-3
22
5
178
1-K
177
5-K
A
26
D
at
a
To the left of the main Data
Highway Plus, a 1785-KA
interface module connects to
a Data Highway.
48
PLC-2
178
5
D
at
a
H
ig
hw
ay
Pl
SLC 5/03
H
ig
hw
ay
48
5
us
-KA
3
A Pyramid Integrator with an
Ethernet interface connects
the FactoryLink station to a
Data Highway Plus network.
PLC 5/250
Et
he
rn
et
TC
P/
IP
FactoryLink Station
618 / FactoryLink 6.6.0 / Device Interface Guide
KTDTL AND NETDTL OVERVIEW
KTDTL Topology
KTDTL TOPOLOGY
The diagrams in this section provide examples of possible topologies for a KTDTL
task configuration.
Figure 21-1 illustrates simultaneous communications through two Allen-Bradley
KT card ports.
Figure 21-1 Example of KTDTL Communications
Allen-Bradley
FactoryLink
RSLinx
Real-Time
Database
Communications through
two KT cards directly
connected to DH+ networks.
21
SLC 5/04
Hi
gh
wa
y
Pl
us
PLC-2
Da
ta
PLC-5
PLC-5/250
PLC-5 with
1785-KA5
1785-KA5 module in a
PLC-5 I/O rack provides the
link from DH+ to DH-485
wa
y4
85
SLC-5/03
SLC-5/01
Da
ta
Hi
gh
SLC-5/02
FactoryLink 6.6.0 / Device Interface Guide / 619
KTDTL and NetDTL
DH
+
KTDTL
Task
•
KTDTL AND NETDTL OVERVIEW
•
KTDTL Topology
•
•
The following diagrams illustrate ways communications can occur between the
FactoryLink station and various types of Allen-Bradley devices through an
Allen-Bradley card port.
Figure 21-1 KTDTL Communications Options
Using a KTX card, a direct link to a DH+ or a
DH-485 network can be achieved.
Using a KT card, a direct link
to a DH+ can be achieved.
FactoryLink
Station
1784-KTX
Card
1784-KT
Card
PLC 5
DH+
SLC 5/04
1785-KA5
DH-485
1747-AIC
1747-AIC
1747-C11
SLC 5/02
620 / FactoryLink 6.6.0 / Device Interface Guide
SLC 5/03
KTDTL AND NETDTL OVERVIEW
KTDTL Topology
Figure 21-1 Typical Link Between the FactoryLink Station and Various Devices
Data Highway Offlink
D
at
a
H
ig
h
w
ay
With the 1785-KA module serving as a bridge between a Data
PLC-2 Highway Plus and a Data Highway, controllers in the PLC-2, PLC-3,
and PLC-5 families residing at offlink addresses can communicate
with the computer running the device interface software using
appropriate interface modules (1771-KA2 and 1775-KA, for example).
1771-KA2
PLC-3
1775-KA
1785-KA
D
21
SLC 5/02
at
a
H
SLC 5/03
ig
h
w
ay
Pl
us
1785-KA5
D
at
a
H
ig
h
w
ay
48
5
Data Highway Plus Local Link
The Data Highway Plus links the PLCs
to the computer running the device
interface software through a KT card.
1785-KA3
KT Card
PLC-2
PLC-5/250
FactoryLink 6.6.0 / Device Interface Guide / 621
KTDTL and NetDTL
SLC 5/04
Data Highway 485 Offlink
The 1785-KA5 module serves as a bridge to let devices
residing at offlink addresses communicate with the
computer running the device interface software.
•
KTDTL AND NETDTL OVERVIEW
•
NetDTL Topology
•
•
N ET DTL TOPOLOGY
The diagrams in this section provide examples of possible topologies for a NetDTL
task configuration.
Figure 21-1 shows a basic physical link between the FactoryLink station and
devices on the Ethernet and DH+ networks communicating through a Pyramid
Integrator with an Ethernet interface module.
Figure 21-1 Typical Physical Link to Local Addresses
PLC 5/250 with
Ethernet Interface
PLC-5
DH+ Link
PLC-3
Ethernet Link
PLC-5/xxE
PLC-5/xxE
Ethernet Card
FactoryLink Station
Figure 21-1 shows a typical physical link between the FactoryLink station and
devices at offlink addresses.
622 / FactoryLink 6.6.0 / Device Interface Guide
KTDTL AND NETDTL OVERVIEW
NetDTL Topology
Figure 21-1 Typical Physical Link to Offlink Addresses
Data Highway Offlink
D
at
a
H
PLC-2 With the 1785-KA module serving as a bridge between a Data
Highway Plus and a Data Highway, controllers in the PLC-2, PLC-3,
and PLC-5 families residing at offlink addresses can communicate
with the computer running the device interface software using
appropriate interface modules (1771-KA2 and 1775-KA, for example).
1771-KA2
ig
h
w
ay
PLC-3
1775-KA
Data Highway 485 Offlink
The 1785-KA5 module serves as a bridge to let devices
residing at offlink addresses communicate with the
computer running the device interface software.
1785-KA
21
SLC 5/02
a
H
ig
hw
ay
Pl
SLC 5/03
us
1785-KA5
D
at
a
H
ig
hw
ay
48
5
Ethernet Communications
D
at
a
The NetDTL task can
communicate directly to a device in
the PLC-5/xxE family over TCP/IP.
PLC-5/xxE
H
ig
h
w
ay
Data Highway Plus Ethernet Link
Pl
us
PI
Et
he
rn
et
The PLCs on the Data Highway Plus are
linked to the computer running the
device interface software through a
PLC-2/250 Pyramid Integrator with an
Ethernet interface module.
FactoryLink 6.6.0 / Device Interface Guide / 623
KTDTL and NetDTL
D
at
•
KTDTL AND NETDTL OVERVIEW
•
NetDTL Topology
•
•
To further illustrate NetDTL communications, Figure 21-1 shows: point-to-point
Ethernet TCP/IP communications, DH+ network communications via an Ethernet
interface module, and DH-485 network communications via a 1785-KA5 module.
Figure 21-1 Example of NetDTL Communications
PLC-5 with
1785-KA5
1785-KA5 module in a
PLC-5 I/O rack provides the
link from DH+ to DH-485
48
5
SLC-5/03
lu
s
wa
yP
SLC-5/04
Da
ta
H
ig
h
Da
ta
SLC-5/01
Hi
gh
wa
y
SLC-5/02
PLC-5/250
Allen-Bradley
RSLinx or
INTERCHANGE FactoryLink
Real-Time
Database
PLC-5
NetDTL
Task
624 / FactoryLink 6.6.0 / Device Interface Guide
P/
PLC 5/250
with Ethernet
Interface
TC
PLC-5/250 with an
Ethernet interface
module provides the link
from Ethernet to DH+
IP
Communications through
an Ethernet card
PLC-5/xxE
Point-to-point
Ethernet
communications
with a PLC-5/xxE
•
•
•
•
Chapter 22
Getting Started
Before defining the communication paths and the read and write operations, you
must set up FactoryLink to recognize the KTDTL or NetDTL task and define
information that optimizes the performance of the task.
This chapter describes how to set up and optimize FactoryLink for KTDTL or
NetDTL task communications by filling out a row for the task in the FactoryLink
System Configuration table.
22
KTDTL and NetDTL
FactoryLink 6.6.0 / Device Interface Guide / 625
•
GETTING STARTED
•
Configuring the System Configuration Table
•
•
C ONFIGURING
THE
S YSTEM C ONFIGURATION TABLE
To configure the System Configuration table, perform the following steps:
1 Open the FactoryLink Configuration Manager.
2 Ensure the current domain selected is SHARED in the Configuration Manager
Domain Selection box.
3 Choose System Configuration from the Main Menu. The System Configuration
Information panel is displayed:
4 Copy and paste the last row of the System Configuration Information panel into
the empty row just below it. (In the previous panel, you would copy the row for the
Real-time Monitor, RTMON.)
5 Edit the new row you just created as follows to identify the KTDTL or NetDTL
task to the system:
1. Enter FR in the Flags column to instruct the task to start automatically at run
time.
Enter FRS in the Flags column to instruct the task to start automatically and to
open a status window at run time where system messages from the KTDTL or
NetDTL task and the RSLinx or INTERCHANGE software will appear.
2. Enter either KTDTL or NetDTL in the Task Name column to identify the task to
the system.
626 / FactoryLink 6.6.0 / Device Interface Guide
GETTING STARTED
Configuring the System Configuration Table
3. Enter either Allen-Bradley KTDTL or Allen-Bradley NetDTL in the
Description column to further describe the task.
4. Edit the columns beginning with Start Trigger and ending with Display
Description to identify specific information about the task at run time. Press
End on the keyboard at each of these columns to move the cursor to the end of
the entry. Edit the number to increase its value by one.
For example, in the sample panel, the complete entry in the Start Trigger
column in the row for RTMON is TASKSTART_S[15]. (The start trigger defined
for the first task listed, Interval and Event Timer, is TASKSTART_S[0] and the
row for RTMON is 15 rows below that.) In the Start Trigger column in the row
below RTMON, you would move the cursor over to [15] and change the 5 to 6.
5. Enter 1 in the Start Order column to ensure the task starts up appropriately at
run time.
6. Enter either bin/ktdtl or bin/netdtl in the Executable File column to specify
the location of the executable file.
One of these rows
must appear in the
panel to identify the
task to FactoryLink
6 Select the row for KTDTL or NetDTL to enter program arguments that will
improve system performance.
FactoryLink 6.6.0 / Device Interface Guide / 627
KTDTL and NetDTL
The panel must now contain one of the following rows:
22
•
GETTING STARTED
•
Configuring the System Configuration Table
•
•
7 Press the Tab key several times to advance to the Program Arguments column.
Enter the
program
arguments
here
8 Enter the program parameter for the specific override, followed by the override
value, in the Program Arguments column using the list of IDs in the table on the
following pages.
Use the following format when entering a program parameter:
-argumentvalue
where
argument
value
is the required prefix for any program parameter.
is the parameter ID chosen from the following table.
is the override value for the parameter.
For example: -F12 where F is the ID of the major program control loop and 12
indicates the number of times the task passes through the loop before sleeping.
Note
Either enter all parameters in upper-case alphabetical characters
or enter them all in lower case.
628 / FactoryLink 6.6.0 / Device Interface Guide
GETTING STARTED
Configuring the System Configuration Table
Table 22-1 Program Parameters and Override Values
ID
Override Value
Description
-A
pathname
To specify a new FactoryLink application directory to
override the default application directory, enter the ID
followed by the full path name identifying the location
of the new directory.
Example:
-AC:\FLECS\FLAPP or -A/usr/users/flapp
-B
1 through 40
(Default is 5)
To specify a value for the unsolicited message backlog
queue in the Allen-Bradley interface, enter the ID
followed by the appropriate value. For inputs less than
1, enter 1. For inputs greater than 40, enter 40.
Example: -B1
0 through 32767
(Default is 30)
To specify the number of seconds the task waits before
it attempts to reconnect to a disconnected RSLinx or
INTERCHANGE software interface, enter the ID
followed by the number of seconds. If you do not want
the task to attempt reconnection, enter 0.
Example: -C30
-F
1 through 32767
(Default is 10)
To specify the number of times the task is to pass
through its major program control loop before
“sleeping,” enter the ID followed by the number of
passes. Use this parameter in conjunction with the
sleep period parameter, S, to optimize the performance
of the task and to minimize its CPU use. For more
information about control loop passes and sleep period
parameters, see “Optimizing Task Performance” on
page 631.
Example: -F12
-L
pathname
(Default is
stdout)
To specify a directory and path for an error log file,
enter the ID followed by the full path name identifying
the location of the file.
Example:
-LC:\FLECS\ERRLOG or -L/usr/users/errlog.txt
FactoryLink 6.6.0 / Device Interface Guide / 629
KTDTL and NetDTL
-C
22
•
GETTING STARTED
•
Configuring the System Configuration Table
•
•
Table 22-1 Program Parameters and Override Values (Continued)
ID
Override Value
Description
-N
1 through 39
(Default is 39)
To specify a maximum number of solicited requests
that can be pending at any given time within the
RSLinx or INTERCHANGE software library, enter the
ID followed by the number of requests.
Example: -N4
-P
pathname
To specify a new FactoryLink program directory to
override the default program directory, enter the ID
followed by the full path name identifying the location
of the new directory.
Example:
-PC:\FLECS\FLINK or -P/usr/users/flink
-R
0 through 32767
(Default is 10)
To specify the number of seconds an error message is
displayed on the KTDTL or NetDTL task line on the
Run-Time Manager screen after the error is detected,
enter the ID followed by the number of seconds.
Example: -R300
-S
0 through 32767
(Default is 10)
To specify the number of milliseconds the task will
“sleep” after completing the specified number of control
loop passes (-F parameter), enter the ID followed by the
number of milliseconds. To specify no sleep period after
the passes, enter 0.
Example: -S1000
-U
1 through 32767
(Default is 1)
To specify the number of unsolicited messages the task
can process before releasing the CPU for other
operations, enter the ID followed by the number of
messages. When the task processes the specified
number of unsolicited messages, or when no unsolicited
messages are pending, the task continues with solicited
operations.
Example: -U30
630 / FactoryLink 6.6.0 / Device Interface Guide
GETTING STARTED
Optimizing Task Performance
Table 22-1 Program Parameters and Override Values (Continued)
ID
-Z
Override Value
Leave blank
Description
To clear the change-status indicators in the
FactoryLink elements written to the FactoryLink
database for the KTDTL or NetDTL task, enter just the
ID.
Example: -Z
9 Click on Enter to validate the information. Next, click on Exit to return to the Main
Menu after the System Configuration panel is complete.
O PTIMIZING TASK P ERFORMANCE
The following information is important to remember about the override values in
optimizing performance:
• The higher in value the control loop setting, the greater the amount of CPU
used. Because the termination flag is checked only on the first pass, the task
will then be slower after a normal termination request.
• The smaller in value the control loop setting, the smaller the amount of CPU
space used and the less reliable the task is in detecting changed data.
While there are no standard guidelines for setting the control loop and sleep
period parameters, one of the following procedures might help you obtain the
desired results:
• Decrease the number of control loop passes and increase the sleep period until
task performance drops below an acceptable level.
or
• Increase the number of control loop passes and decrease the sleep period until
task performance reaches an acceptable level.
FactoryLink 6.6.0 / Device Interface Guide / 631
22
KTDTL and NetDTL
To optimize performance of the KTDTL or NetDTL task and use of the CPU, set
up the override values for the major program control loop passes and sleep period
parameters according to the table described in the previous section. One control
loop “pass” is defined as a single completion of a list of developer-defined
operations performed by the task. After the task completes the specified number
of control loop passes, it then “sleeps” for the specified sleep period.
•
GETTING STARTED
•
Optimizing Task Performance
•
•
632 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 23
Configuring
Communication Paths
To configure the paths over which FactoryLink will communicate with the devices,
you create logical station definitions in which you identify sources and
destinations for read and write requests and define FactoryLink elements to
which system messages from the KTDTL or NetDTL task and the RSLinx
software will be written.
23
KTDTL and NetDTL
FactoryLink ECS / Device Interface Guide / 633
•
CONFIGURING COMMUNICATION PATHS
•
•
•
These definitions should be created in the Logical Station tables shown below.
KTDTL
NetDTL
634 / FactoryLink ECS / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Logical Station Concepts
L OGICAL STATION C ONCEPTS
Setting parameters for a communication path between the source and destination
of a read or write request involves defining two basic components: the
communications port through which data will travel and a physical station
(Allen-Bradley device) that will send or receive data. The following diagram
illustrates the components of a communication path.
KTDTL—For KTDTL, the communications port is an Allen-Bradley card port.
NetDTL—For NetDTL, the communications port is an Ethernet card port.
Figure 23-1 Components of a Communication Path
23
Since an application can be linked to multiple devices, define a unique
communication path to each device so the application can distinguish one device
from another. This is done by assigning specific numbers to represent physical
aspects of your particular configuration. The first number you assign, “logical
port,” is common to all devices that will communicate with the task and is
typically defined only once per task, regardless of the number of cards to be used.
KTDTL—For KTDTL, in addition to defining each logical port in the Logical
Station table, you must also edit specific system files to identify each port. If more
than one card is being used, instruct the task to differentiate between them by
identifying the port numbers that represent each card in the Logical Station table.
Refer to “Creating Logical Station Definitions” on page 637 for more information.
To identify a particular device communicating through the logical port, define a
“logical station” number for the device. The logical station number represents a
combination of the logical port and the physical address of the device. Assign each
FactoryLink ECS / Device Interface Guide / 635
KTDTL and NetDTL
Device connected to FactoryLink
station through an Allen-Bradley
card or an Ethernet card
•
CONFIGURING COMMUNICATION PATHS
•
Logical Station Concepts
•
•
device a logical station number. Figure 23-2 provides examples of logical ports and
logical stations.
NetDTL—The card in Figure 23-2 is an Ethernet card and a link from Ethernet to
DH+ is provided by an Ethernet Interface module in a PLC-5/250 I/O rack.
KTDTL—The card in Figure 23-2 is a KT card. A 1785-KA5 module in a PLC-5/250
I/O rack is located at address #4. Two devices are located at address #10: one is a
PLC-5/250 on a DH+ network and the other is a SLC 5/03 on a DH-485 network.
To enable the KTDTL or NetDTL task to differentiate between the two devices
that have an address of 10, give each device its own logical station number.
Consequently, when an application is being run and the task receives a request to
write a value to a register in a device at address #10, the logical station number
provides the unique communication path that tells the task to which address #10
the value should be written.
Figure 23-2 Logical Port and Logical Station
KT or Ethernet
Card Port
Logical Port 1
1785-KA5 Module
in a PLC-5
I/O Rack at
DH-485
Address #4
FactoryLink Station
NetDTL—Ethernet interface
module in a PLC-5/250 I/O
rack provides the DH+ link
DH+
PLC-5/250 at
Address #10
Logical Station 1 consists of Logical Port 1
and a PLC-5/250 at DH+address #10.
Logical Station 2 consists of Logical Port 1
and a PLC-5 at DH+ address #4.
Logical Station 3 consists of Logical Port 1
and a SLC 5/03 at DH-485 address #10.
636 / FactoryLink ECS / Device Interface Guide
SLC 5/03 at
Address #10
CONFIGURING COMMUNICATION PATHS
Creating Logical Station Definitions
C REATING L OGICAL S TATION D EFINITIONS
A-B NetDTL Driver:
The following steps describe how to create logical station definitions in A-B
NetDTL driver for each device that communicates with FactoryLink.
1 Ensure the current domain selected is SHARED in the Configuration Manager
Domain Selection box.
2 Choose the Allen-Bradley NetDTL option from the Main Menu:
3 Display the Logical Station Control panel by clicking on its title bar in the display
of all panels..
NetDTL
23
KTDTL and NetDTL
On the Logical Station Control panel, define the following information:
• Each logical port
• The amount of time the protocol module waits to receive a device response to a
read or write request before timing out
• Message elements to which values can be written to indicate communications
errors associated with each logical port number
4 Using the following field descriptions, complete a row in the panel for each logical
port to be included in the communication path. Sample entries are provided in
“Sample Logical Station Table Entries” on page 655.
Logical Port
Enter a number to represent the communications path. Since the
task uses only one logical port, define only one port in this panel.
FactoryLink ECS / Device Interface Guide / 637
•
CONFIGURING COMMUNICATION PATHS
•
Creating Logical Station Definitions
•
•
Valid Entry: numeric value from 0 - 999
Response
Timeout
0.1 Sec
Enter the length of time, in tenths of a second, the task will wait
to receive a response to a read or write command before timing
out. Be sure to enter a value greater than zero; otherwise, the
task immediately times out without waiting for a response. The
default is 55, or 5.5 seconds.
Valid Entry: numeric value from 0 - 99999
Status
Msg Tag
Optionally, enter a tag name for a message element to which a
text string will be written to indicate a communications error
associated with this logical port.
Valid Entry: standard element tag name
Valid Data Type: message
5 Click on Enter to validate the data when the Logical Station Control panel is
complete.
6 If the tag names you defined on this panel are not defined elsewhere in
FactoryLink, a dialog for defining each tag is displayed. Choose MESSAGE for
Type and accept the default of SHARED for Domain for each tag name.
7 Select the row for the logical port you are configuring. Click on Next to display the
Logical Station Information panel. The logical port number is displayed in the
Logical Port field on the lower left side of the panel.
638 / FactoryLink ECS / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Creating Logical Station Definitions
23
KTDTL and NetDTL
FactoryLink ECS / Device Interface Guide / 639
•
CONFIGURING COMMUNICATION PATHS
•
Creating Logical Station Definitions
•
•
RSLINX Configuration: The picture above shows the RSLINX Ethernet to PLC-5
driver configuration (AB_ETH-1 Driver Configuration).
Define the following information on the A-B Ethernet Address Information panel:
• Ethernet Address of a Pyramid Integrator or PLC-5/xxE that will process
read/write requests.
• Ethernet Interface number of the Pyramid Integrator or PLC-5/xxE as defined
in RSLINX Software.
8 Using the following field descriptions, complete a row in the panel for each device
(Pyramid Integrator or PLC-5/xxE) that will have a direct Ethernet connection
from the FactoryLink Station (i.e., each device that has a separate TCP/IP
address).
TCP/IP Address
Ethernet Interface
(ASCII)
Enter each Ethernet TCP/IP address of a Pyramid Integrator or
PLC-5/xxE that will process read or write requests.
Valid Entry: numeric string of up to 21 numbers and decimal
points in the format xxx.xxx.xxx.xxx
Note: To keep network traffic manageable, do not connect to
more than eight Pyramid Integrators serving as routers.
Ethernet Interface
Number
Enter the station number to which the Pyramid Integrator or
PLC-5/xxE is mapped in the RSLinx Ethernet-to-AB
communications configuration. For example, if the IP address of a
Pyramid Integrator has been mapped to station number 7, then
the Ethernet interface number for that station will be 7.
Valid Entry: numeric value.
Comment
(Optional) Enter reference information about this Ethernet
device.
Valid Entry: alphanumeric string of up to 21 characters.
Note: This panel is new to this version of the NetDTL driver.
The previous version of the NetDTL driver limited the
maximum number of IP address usages to 40. The new format
removes this restriction from the FactoryLink side. The
maximum number of IP address usages is bound by whatever
the RSLinx is capable of supporting. Refer to the RSLinx
documentation for this information. If you are upgrading a
FactoryLink application that uses the old style NetDTL
configuration panel layout, use the following procedures:
640 / FactoryLink ECS / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Creating Logical Station Definitions
Perform the following steps to run the new NetDTL:
1. Run FLSAVE to save an existing NetDTL application to an .mps file.
2. Install the new version of NetDTL driver.
3. Run FLREST to restore the .mps file to the application.
4. Run FLCM to modify the application with the proper data.
5. Run FLRUN to use the new NetDTL driver.
9 Click Enter to validate the data.
10 Select the row for the TCP/IP address of the device you are configuring. Click Next
to display A-B NetDTL Logical Station Information Panel. The TCP/IP address is
displayed in the TCP/IP Address field on the lower left side of the panel.
23
KTDTL and NetDTL
FactoryLink ECS / Device Interface Guide / 641
•
CONFIGURING COMMUNICATION PATHS
•
Creating Logical Station Definitions
•
•
642 / FactoryLink ECS / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Creating Logical Station Definitions
23
• Long analog elements to which error codes for devices (logical stations) will be
written.
• The communications port to which each logical station is connected, and for
off-link addresses, the path to the off-link station.
• For each TCP/IP Address, define logical station numbers which identify the
address and device type for each device in the configuration.
11 Using the following field descriptions, complete a row in the panel for each device
to communicate through this logical port. Sample entries are provided in the next
section titled “Sample Logical Station Table Entries”.
Err/Status Tag
Name:
Optionally, enter a tag name for a long analog element to receive
communication error codes associated with this device (logical
station). The high word value written to this element indicates
the type of error received. The low word value written to this
element is the specific error code. The high word values written to
this tag and the meaning of the error code in the low word are:
0 NetDTL return code
1 Internal RSLinx code
2 Operating system error code
Valid Entry: standard element tag name
FactoryLink ECS / Device Interface Guide / 643
KTDTL and NetDTL
Define the following information on the Logical Station Information panel:
•
CONFIGURING COMMUNICATION PATHS
•
Creating Logical Station Definitions
•
•
Valid Data Type: longana
Tip
To display the codes stored in an Err/Status Tag Name element for
an operator running the application to view, use the Application
Editor to animate an output-text object associated with the tag
name and display this object on a graphic screen.
Logical Station
(Decimal):
Enter a number to identify the logical station to which the
information in this row pertains. A logical station represents the
combination of a Logical Port, and TCP/IP Address with a
physical station. Assign a unique number to each device
communicating through this logical port. You will enter this
logical station number later in a read or write table to represent
the device defined in his row. In a read or write table, this number
will identify the device to or from which data is to be sent or
received.
Valid Entry: unique numeric value from 0 - 999
PYRAMID
CHANNEL ID
(ASCII):
NetDTL—Define the communications port in the Pyramid
Integrator module providing the Ethernet link to this logical
station, and for offlink addresses, define the path to the offlink
station. The port entry must precede the path to an offlink
address. If you are defining the Pyramid Integrator (PLC5/250)
itself, leave this field blank. If you are defining a PLC-5/xxE
connected directly to Ethernet, leave this field blank.
Syntax for Port Entry:
ORM:n
where
0 is the RM pushwheel number
RM: is the module type, Resource Manager
n is either channel 2 or 3
Example: Enter 0RM:2 for RM channel 2
pKA:n
where
644 / FactoryLink ECS / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Creating Logical Station Definitions
p is a pushwheel number from 1-4
KA: is the module type
n is either channel 2 or 3
Example: Enter 1KA:3 for KA channel 3 configured as
pushwheel 1
The following diagram illustrates some typical port entries:
When defining the Pyramid Integrator (PLC-5/250)
as the target device, leave the field blank
23
0RM:2
1KA:2
2KA:2
1KA:3
2KA:3
Syntax for Path to Offlink Address:
/B:b Use the bridge or router identifier /B: to route to a
remote network at a particular link. Follow the
identifier with the bridge address b, an octal value
from 1 through 377.
/G:g Use the gateway identifier /G: with 5/01 and 5/02
processors to link to an adjacent DH-485 network
and to convert the 5/01 and 5/02 protocol for
DH-485 compatibility. Follow the identifier with
the network address g, an octal value from 1
through 377. The gateway identifier is not
supported in unsolicited operations.
FactoryLink ECS / Device Interface Guide / 645
KTDTL and NetDTL
0RM:3
•
CONFIGURING COMMUNICATION PATHS
•
Creating Logical Station Definitions
•
•
/L:l The link identifier /L: is followed by the
destination link ID l which is either: a decimal
value from 1 through 65,535, or 0 for single hop
mode. For bridges, enter the link ID for the
offlinked network. For gateways, enter the link ID
for the local DH+ or DH-485 network.
/KA The 1785-KA addressing mode identifier is
required when communicating through a 1785-KA
module from DH+ to DH. The /KA identifier is not
supported in unsolicited operations.
Example: 0RM:2/B:42/L:2 indicates that for channel 2 of the
Resource Manager module, the address of the bridge to the
network where the offlink station resides is 42 and the
destination link ID is 2.
Refer to “Sample Logical Station Table Entries” on page 655 for
other examples of offlink address entries and diagrams of
corresponding sample network configuration.
Station
Address
(Octal)
Enter the physical DH+, DH, or DH-485 network address of the
Allen-Bradley device. For each device address you enter, make a
corresponding entry identifying the path to the device; otherwise,
the task ignores this address entry.
Note: The path is entered in the PYRAMID CHANNEL ID (ASCII)
field. If you are defining the Pyramid Integrator (PLC5/250)
itself or a PLC-5/xxE connected directly to Ethernet, you do not
need to define a path. Refer to “Path and Address Entries” on
page 658 for examples of how this address corresponds to the
path entry for this logical station when you are configuring an
offlink address.
The following valid entries are octal values:
DH+: numeric value from 0 - 77
DH: numeric value from 0 - 377
DH-485: numeric value from 0 - 37
646 / FactoryLink ECS / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Creating Logical Station Definitions
Station
Type
Enter the type of Allen-Bradley device from which data is to be
read or to which data is to be written. Descriptions of the valid
entries are:
PLC Same as PLC-2U
PLC-2 Same as PLC-2U
PLC-2P PLC that will be accessed using basic (PLC-2)
unprotected-read and protected-write commands
PLC-2U PLC that will be accessed using basic (PLC-2)
unprotected-read and unprotected-write
commands
PLC-3 PLC-3; same as PLC3-KA
PLC-3KA PLC-3 that is not a PLC-3SR
PLC-4 Same as PLC-2U
PLC-5 PLC-5 new or old generation
PLC-250 PLC5/250 Pyramid Integrator
SLC-500 SLC 500 series processor
Valid Entry: To display valid entry, use the Ctrl+K keys.
Comment
(Optional) Enter reference information about this logical station.
Valid Entry: alphanumeric string of up to 21 characters
12 Click on Enter to validate the data.
13 If the tag names you defined on this panel are not defined elsewhere in
FactoryLink, a dialog box for defining each tag is displayed. Choose LONGANA for
Type and accept the default of SHARED for Domain for each tag name.
14 Click on Prev to return to the Logical Station Control panel and return to step 7 to
configure another logical port.
15 Refer to Chapter 24, “Reading and Writing Data” when you are ready to define the
read and write operations expected to occur between this logical port and the
devices configured as logical stations.
FactoryLink ECS / Device Interface Guide / 647
23
KTDTL and NetDTL
PLC-3SR PLC-3 that uses a 1775-S5 or 1775-SR5 scanner
for DH+ communications, allowing faster bit write
operations
•
CONFIGURING COMMUNICATION PATHS
•
Creating Logical Station Definitions
•
•
A-B KTDTL Driver:
The following steps describe how to create logical station definitions in A-B
KTDTL driver for each device that communicates with FactoryLink.
1 Ensure the current domain selected is SHARED in the Configuration Manager
Domain Selection box.
2 Choose the Allen-Bradley KTDTL option from the Main Menu.
3 Display the Logical Station Control panel by clicking on its title bar in the display
of all panels.
On the Logical Station Control Panel, define the following information:
• ¨Each logical port
• The amount of time the protocol module waits to receive a device response to
read or write request before timing out
• Message elements to which values can be written to indicate communications
errors associated with each logical port number
4 Using the following field descriptions, complete a row in the panel for each device
to communicate through this logical port. Sample entries are provided in “Sample
Logical Station Table Entries” on page 655.
Logical Port
Enter a number to represent the communications path. Since the
task uses only one logical port, define only one port in this panel.
Valid Entry: numeric value from 0 - 999
648 / FactoryLink ECS / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Creating Logical Station Definitions
Response Timeout
(0.1 Sec)
Enter the length of time, in tenths of a second, the task will wait
to receive a response to a read or write command before timing
out. Be sure to enter a value greater than zero; otherwise, the
task immediately times out without waiting for a response. The
default is 55, or 5.5 seconds.
Valid Entry: numeric value from 0 - 99999
Status Msg Tag
Optionally, enter a tag name for a message element to which a
text string will be written to indicate a communications error
associated with this logical port.
Valid Entry: standard element tag name
Valid Data Type: message
5 Click on Enter to validate the data when the Logical Station Control panel is
complete.
6 6. If the tag names you defined on this panel are not defined elsewhere in
7 Select the row for the logical port you are configuring. Click on Next to display
A-B KTDTL Logical Station Information panel. The logical port number is
displayed in the Logical Port field on the lower left side of the panel.
FactoryLink ECS / Device Interface Guide / 649
KTDTL and NetDTL
FactoryLink, a dialog for defining each tag is displayed. Choose MESSAGE for
Type and accept the default of SHARED for Domain for each tag name.
23
•
CONFIGURING COMMUNICATION PATHS
•
Creating Logical Station Definitions
•
•
Define the following information on the Logical Station Information panel:
• Long analog elements to which error codes for devices (logical stations) will be
written.
• The communications port to which each logical station is connected, and for
off-link addresses, the path to the off-link station.
• For each logical port, logical station numbers which identify the address and
device type for each device in the configuration.
8 Using the following field descriptions, complete a row in the panel for each device
to communicate through this logical port. Sample entries are provided in the next
section titled “Sample Logical Station Table Entries”.
Err/Status
Tag Name
Optionally, enter a tag name for a long analog element to receive
communication error codes associated with this device (logical
station). The high word value written to this element indicates
the type of error received. The low word value written to this
element is the specific error code. The high word values written to
this tag and the meaning of the error code in the low word are:
0 KTDTL return code
1 Internal RSLinx code
650 / FactoryLink ECS / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Creating Logical Station Definitions
2 Operating system error code
Valid Entry: standard element tag name
Valid Data Type: longana
Tip
To display the codes stored in an Err/Status Tag Name element for
an operator running the application to view, use the Application
Editor to animate an output-text object associated with the tag
name and display this object on a graphics screen.
Logical
Station
(Decimal)
Enter a number to identify the logical station to which the
information in this row pertains. A logical station represents the
combination of a logical port with a physical station. Assign a
unique number to each device communicating through this
logical port.
Valid Entry: unique numeric value from 0 - 999
A-B KT
Card ID
(ASCII)
Define the communications port in the Allen-Bradley card to which
this logical station is connected, and for offlink addresses, define
the path to the offlink station. The port entry must precede the
path to an offlink address.
Syntax for Port Entry:
pKT:0
where
p is the pushwheel or card number from 1 through 8
that corresponds to the pushwheel configured in
the RSLinx Client Application Configuration
dialog box. For details, see Allen-Bradley’s RSLinx
documentation.
KT: is the module type.
0 is the channel number.
FactoryLink ECS / Device Interface Guide / 651
KTDTL and NetDTL
You will enter this logical station number later in a read or write
table to represent the device defined in this row. In a read or
write table, this number will identify the device to or from which
data is to be sent or received.
23
•
CONFIGURING COMMUNICATION PATHS
•
Creating Logical Station Definitions
•
•
Example: Enter 5KT:0 if the InterChange port is mapped to
port 5 in the RSLinx Client Application
Configuration dialog.
The following diagram illustrates some typical port entries.
To specify the
first KT card,
enter 1KT:0
To specify the
fourth KT card,
enter 4KT:0
KT Card 4
KT Card 1
FactoryLink Station
Syntax for Path to Offlink Address:
/B:b Use the bridge or router identifier /B: to route to a
remote network at a particular link. Follow the
identifier with the bridge address b, an octal value
from 1 through 377.
/G:g Use the gateway identifier /G: with 5/01 and 5/02
processors to link to an adjacent DH-485 network
and to convert the 5/01 and 5/02 protocol for
DH-485 compatibility. Follow the identifier with
the network address g, an octal value from 1
through 377. The gateway identifier is not
supported in unsolicited operations.
/L:l The link identifier /L: is followed by the
destination link ID l which is either: a decimal
value from 1 through 65,535, or 0 for single hop
mode. For bridges, enter the link ID for the
offlinked network. For gateways, enter the link ID
for the local DH+ or DH-485 network.
/KA The 1785-KA addressing mode identifier is
required when communicating through a 1785-KA
652 / FactoryLink ECS / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Creating Logical Station Definitions
module from DH+ to DH. The /KA identifier is not
supported in unsolicited operations.
Example: 1KT:0/B:42/L:2 indicates that for the first KT card,
the address of the bridge to the network where the offlink station
resides is 42 and the destination link ID is 2.
Refer to “Sample Logical Station Table Entries” on page 655 for
other examples of offlink address entries and diagrams of
corresponding sample network configurations.
Station
Address
(Octal)
Enter the physical DH+, DH, or DH-485 network address of the
Allen-Bradley device. For each device address you enter, make a
corresponding entry identifying the path to the device; otherwise,
the task ignores this address entry.
The following valid entries are octal values:
DH+: numeric value from 0 - 77
DH: numeric value from 0 - 377
DH-485: numeric value from 0 - 37
Station
Type
Enter the type of Allen-Bradley device from which data is to be
read or to which data is to be written. Descriptions of the valid
entries are:
PLC Same as PLC-2U
PLC-2 Same as PLC-2U
PLC-2P PLC that will be accessed using basic (PLC-2)
unprotected-read and protected-write commands
PLC-2U PLC that will be accessed using basic (PLC-2)
unprotected-read and unprotected-write
commands
PLC-3 PLC-3; same as PLC3-KA
PLC-3KA PLC-3 that is not a PLC-3SR
PLC-3SR PLC-3 that uses a 1775-S5 or 1775-SR5 scanner
for DH+ communications, allowing faster bit write
operations
FactoryLink ECS / Device Interface Guide / 653
23
KTDTL and NetDTL
Note: This path is entered in the A-B KT Card ID (ASCII) field.
Refer to “Path and Address Entries” on page 658 for examples
of how this address corresponds to the path entry for this logical
station when you are configuring an offlink address.
•
CONFIGURING COMMUNICATION PATHS
•
Creating Logical Station Definitions
•
•
PLC-4 Same as PLC-2U
PLC-5 PLC-5 new or old generation
PLC-250 PLC5/250 Pyramid Integrator
SLC-500 SLC 500 series processor
Valid Entry: Ctrl+K
Comment
(Optional) Enter reference information about this logical station.
Valid Entry: alphanumeric string of up to 21 characters
9 Click on Enter to validate the data.
10 If the tag names you defined on this panel are not defined elsewhere in
FactoryLink, a dialog box for defining each tag is displayed. Choose LONGANA for
Type and accept the default of SHARED for Domain for each tag name.
11 Click on Prev to return to the Logical Station Control panel and return to step 7 to
configure another logical port.
12 Refer to Chapter 24, “Reading and Writing Data” when you are ready to define the
read and write operations expected to occur between this logical port and the
devices configured as logical stations.
654 / FactoryLink ECS / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Sample Logical Station Table Entries
S AMPLE L OGICAL STATION TABLE E NTRIES
This section contains the following information:
• Typical Logical Station configuration panel entries and descriptions that tell
how FactoryLink interprets these entries
• Topology diagrams illustrating how to enter local network and offlink addresses
(page 658)
• Flowcharts depicting configurations containing devices communicating across
multiple networks and corresponding Logical Station table entries (page 664)
Logical Station Control Panel
When all information on the Logical Station Control panel has been specified, the
panel should resemble one of the sample panels shown in Figure 23-3.
Figure 23-3 Sample Logical Station Control Panel
KTDTL and NetDTL
KTDTL
23
In this example, Logical Port 0 is configured to communicate with a response
timeout of 5.5 seconds. The KTDTL task will write communications error
messages associated with this logical port to a message element, KT_MSG.
FactoryLink ECS / Device Interface Guide / 655
•
CONFIGURING COMMUNICATION PATHS
•
Sample Logical Station Table Entries
•
•
NetDTL
In this example, Logical Port 0 is configured to communicate with a response
timeout of 5.5 seconds.
Logical Station Information Panel
When all information on the Logical Station Information panel has been specified,
the panel should resemble the sample panel shown in Figure 23-4.
656 / FactoryLink ECS / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Sample Logical Station Table Entries
KTDTL
23
NetDTL
In this example, the element NDTL_ERR is configured to hold port errors for
logical station 0, which communicates with a SLC 5/03 device at DH-485 address
FactoryLink ECS / Device Interface Guide / 657
KTDTL and NetDTL
In this example, the element KT_ERR is configured to hold port errors for logical
station 0, which communicates with a SLC 5/03 device at DH-485 address 3. The
path from the FactoryLink station to the SLC 5/03 device is as follows: The first
KT card communications port is used. The DH+ address of the bridge to the
DH-485 network where the offlink station resides is 42 , and the destination link
ID of the DH-485 network is 2.
•
CONFIGURING COMMUNICATION PATHS
•
Sample Logical Station Table Entries
•
•
3. A Pyramid Integrator at 192.1.1.21 (TCP/IP Address Pyramid El #1 in the
Logical Station Control panel) provides the Ethernet link. The path from this
Pyramid Integrator to the SLC 5/03 device is as follows: Channel 2 of the Resource
Manager module in this Pyramid Integrator is used. The DH+ address of the
bridge to the DY-485 network where the offlink station resides is 42 and the
destination link ID of the DY-485 network is 2.
Path and Address Entries
The following topology diagrams illustrate how to enter local network and offlink
addresses in the Logical Station Information panel.
KTDTL—Refer to page 659 through page 661.
NetDTL—Refer to page 662 through page 664.
For practical purposes, the initial entry in the A-B KT Card ID (ASCII) field is 1KT:0
throughout the following examples.
658 / FactoryLink ECS / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Sample Logical Station Table Entries
Figure 23-4 KTDTL Network Topology 1
The local network has a link identifier of 1. Networks off of the local link have link identifiers of 2 and 3, respectively. The
1785-KA5 interface module that provides a network bridge is indicated by a box between the network circles. The
Allen-Bradley PLCs and SLC-500 family processors that are connected to the networks are indicated by boxes to the left
and right of the circle representing each network. The number beside each device box, just inside the network circle,
indicates the device address. The numbers above and below each KA5 box, just inside the network circles, indicate the
module’s address on the two networks to which it is connected.
To communicate with Device
A, you would make the
following field entries:
A-B KT Card ID
(ASCII)
1KT:0
Station
Address
(Octal)
43
To communicate with Device B,
you would make the following
field entries:
A-B KT Card ID
(ASCII)
1KT:0
FactoryLink Station
Link 1
Device A
Device B
To communicate with Device D,
you would make the following
field entries:
A-B KT Card ID
(ASCII)
A-B KT Card ID
(ASCII)
1KT:0/B:42/L:2
(triggered or unsolicited)
1KT:0/G:42/L:1
(triggered only)
1KT:0/G:42/L:1
(triggered only)
Station
Address
(Octal)
18
To communicate with Device E,
you would make the following
field entries:
A-B KT Card ID
(ASCII)
1KT:0/B:42/L:3
Station
Address
(Octal)
36
Station
Address
(Octal)
Link 2
Device C
Device D
To communicate with Device F,
you would make the following
field entries:
A-B KT Card ID
(ASCII)
1KT:0/B:42/L:3
Link 3
Device E
14
Device F
Station
Address
(Octal)
41
Unless otherwise indicated, all entries can be used for triggered and unsolicited operations.
FactoryLink ECS / Device Interface Guide / 659
23
KTDTL and NetDTL
To communicate with Device C,
depending upon the type of
operation to be performed, you
would make the following field
entries:
Station
Address
(Octal)
56
•
CONFIGURING COMMUNICATION PATHS
•
Sample Logical Station Table Entries
•
•
Figure 23-5 KTDTL Network Topology 2
In this example, three networks are connected to the FactoryLink station. The local network has a link identifier of 1.
Networks off of the local link have link identifiers of 2 and 3, respectively. The PLC-5/250 that provides a network bridge
is indicated by a box between the network circles. The Allen-Bradley PLCs connected to each network are indicated by
boxes to the left and right of the circle representing each network. The number beside each device box, just inside the
network circle, indicates the device address. The numbers above and below each PLC-5/250 box, just inside the network
circles, indicate the module’s address on the two networks to which it is connected.
FactoryLink Station
To communicate with Device B,
you would make the following
field entries:
A-B KT Card ID
(ASCII)
1KT:0
To communicate with Device A,
you would make the following
field entries:
A-B KT Card ID
(ASCII)
1KT:0
Station
Address
(Octal)
43
Link 1
Device A
Device B
To communicate with Device D,
you would make the following
field entries:
A-B KT Card ID
(ASCII)
1KT:0/B:42/L:2
To communicate with Device C,
you would make the following
field entries:
A-B KT Card ID
(ASCII)
1KT:0/B:42/L:2
Station
Address
(Octal)
34
Link 2
Device C
Device D
Station
Address
(Octal)
26
To communicate with Device F,
you would make the following
field entries:
A-B KT Card ID
(ASCII)
1KT:0/B:42/L:3
To communicate with Device E,
you would make the following
field entries:
A-B KT Card ID
(ASCII)
1KT:0/B:42/L:3
Station
Address
(Octal)
36
Station
Address
(Octal)
56
Link 3
Device E
Device F
Station
Address
(Octal)
41
All of these entries can be used for triggered and unsolicited operations.
660 / FactoryLink ECS / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Sample Logical Station Table Entries
Figure 23-6 KTDTL Network Topology 3
In this example, two networks are connected to the FactoryLink station. The local network has a link identifier of 1 and the
network off of the local link has a link identifier of 2. The 17xx-KA interface module that provides a network bridge is
indicated by a box between the network circles. The Allen-Bradley PLCs connected to each network are indicated by boxes
to the left and right of the circle representing each network. The number beside each device box, just inside the network
circle, indicates the device address. The numbers above and below each KA box, just inside the network circles, indicate
the module’s address on the two networks to which it is connected.
FactoryLink Station
To communicate with Device B,
you would make the following
field entries:
A-B KT Card ID
(ASCII)
To communicate with Device A,
you would make the following
field entries:
A-B KT Card ID
(ASCII)
1KT:0
Station
Address
(Octal)
43
Link 1
Device A
Device B
1KT:0/B:42/KA
(triggered only)
1KT:0/B:42/KA
(triggered only)
Link 2
Device C
Device D
Station
Address
(Octal)
41
Unless otherwise indicated, all entries can be used for triggered and unsolicited operations.
FactoryLink ECS / Device Interface Guide / 661
23
KTDTL and NetDTL
A-B KT Card ID
(ASCII)
A-B KT Card ID
(ASCII)
36
56
To communicate with Device
D, you would make the
following field entries:
To communicate with Device C,
you would make the following
field entries:
Station
Address
(Octal)
1KT:0
Station
Address
(Octal)
•
CONFIGURING COMMUNICATION PATHS
•
Sample Logical Station Table Entries
•
•
For practical purposes, the initial entry in the PYRAMID CHANNEL ID (ASCII) field is
0RM:2 throughout the following examples.
Figure 23-7 NetDTL Network Topology 1
The local network has a link identifier of 1. Networks off of the local link have link identifiers of 2 and 3, respectively. The
1785-KA5 interface module that provides a network bridge is indicated by a box between the network circles. The
Allen-Bradley PLCs and SLC-500 family processors that are connected to the networks are indicated by boxes to the left
and right of the circle representing each network. The number beside each device box, just inside the network circle,
indicates the device address. The numbers above and below each KA5 box, just inside the network circles, indicate the
module’s address on the two networks to which it is connected.
FactoryLink Station
To communicate with Device A,
you would make the following
field entries:
PYRAMID
CHANNEL ID
0RM:2
Station
Address
(Octal)
43
0RM:2
13
PLC
43
0RM:2/G:42/L:1
(triggered only)
56
PLC
Device B
0RM:2
Station
Address
(Octal)
56
To communicate with Device D,
you would make the following
field entries:
42
KA5
PYRAMID
CHANNEL ID
29
0RM:2/G:42/L:1
(triggered only)
SLC
5/03
18
DH-485
Link 2
Station
14
Device C
SLC 5/01,
Address
5/02
Device D
(Octal)
14
Station
Address
(Octal)
18
22
KA5
To communicate with Device E,
you would make the following
field entries:
PYRAMID
CHANNEL ID
0RM:2/B:42/L:3
Station
Address
(Octal)
DH+
Link 1
Device A
To communicate with
Device C, depending upon
the type of operation to be
performed, you would make
the following field entries:
PYRAMID
CHANNEL ID
0RM:2/B:42/L:2
(triggered or unsolicited)
To communicate with Device B,
you would make the following
field entries:
PYRAMID
CHANNEL ID
To communicate with Device F,
you would make the following
field entries:
PYRAMID
CHANNEL ID
25
PLC
Device E
36
36
DH+
Link 3
41
PLC
Device F
0RM:2/B:42/L:3
Station
Address
(Octal)
41
Unless otherwise indicated, all entries can be used for triggered and unsolicited operations.
662 / FactoryLink ECS / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Sample Logical Station Table Entries
Figure 23-8 NetDTL Network Topology 2
In this example, three networks are connected to the FactoryLink station. The local network has a link identifier of 1.
Networks off of the local link have link identifiers of 2 and 3, respectively. The PLC-5/250 that provides a network bridge
is indicated by a box between the network circles. The Allen-Bradley PLCs connected to each network are indicated by
boxes to the left and right of the circle representing each network. The number beside each device box, just inside the
network circle, indicates the device address. The numbers above and below each PLC-5/250 box, just inside the network
circles, indicate the module’s address on the two networks to which it is connected.
FactoryLink Station
To communicate with Device A,
you would make the following
field entries:
PYRAMID
CHANNEL ID
To communicate with Device B,
you would make the following
field entries:
PYRAMID
CHANNEL ID
0RM:2
13
0RM:2
Station
Address
(Octal)
PLC
43
Device A
43
DH+
Link 1
56
PLC
Device B
0RM:2
Station
Address
(Octal)
56
0RM:2/B:42/L:2
Station
Address
(Octal)
To communicate with Device D,
you would make the following
field entries:
PYRAMID
CHANNEL ID
PLC
5/250
52
PLC
34
DH+
Link 2
Device C
34
0RM:2/B:42/L:2
Station
26
PLC
Address
Device D (Octal)
26
47
To communicate with Device E,
you would make the following
field entries:
PYRAMID
CHANNEL ID
0RM:2/B:42/L:3
Station
Address
(Octal)
36
To communicate with Device F,
you would make the following
field entries:
PYRAMID
CHANNEL ID
PLC
5/250
25
PLC
Device E
36
DH+
Link 3
41
0RM:2/B:42/L:3
Station
Address
Device F (Octal)
41
PLC
All of these entries can be used for triggered and unsolicited operations.
FactoryLink ECS / Device Interface Guide / 663
KTDTL and NetDTL
42
To communicate with Device C,
you would make the following
field entries:
PYRAMID
CHANNEL ID
23
•
CONFIGURING COMMUNICATION PATHS
•
Sample Logical Station Table Entries
•
•
Figure 23-9 NetDTL Network Topology 3
In this example, two networks are connected to the FactoryLink station. The local network has a link identifier of 1 and the
network off of the local link has a link identifier of 2. The 17xx-KA interface module that provides a network bridge is
indicated by a box between the network circles. The Allen-Bradley PLCs connected to each network are indicated by boxes
to the left and right of the circle representing each network. The number beside each device box, just inside the network
circle, indicates the device address. The numbers above and below each KA box, just inside the network circles, indicate
the module’s address on the two networks to which it is connected.
To communicate with Device A,
you would make the following
field entries:
PYRAMID
CHANNEL ID
0RM:2
Station
Address
(Octal)
43
FactoryLink Station
0RM:2
13
PLC
43
DH+
Link 1
56
Device A
PLC
Device B
KA
PYRAMID
CHANNEL ID
PYRAMID
CHANNEL ID
0RM:2/B:42/KA
(triggered only)
0RM:2/B:42/KA
(triggered only)
Station
Address
(Octal)
56
To communicate with Device D,
you would make the following
field entries:
42
To communicate with Device C,
you would make the following
field entries:
To communicate with Device B,
you would make the following
field entries:
PYRAMID
CHANNEL ID
0RM:2
Station
Address
(Octal)
PLC
36
DH
Link 2
41
Device C
36
PLC
Station
Device D Address
(Octal)
41
Unless otherwise indicated, all entries can be used for triggered and unsolicited operations.
Logical Station Entries
The configurations represented in the following topology flowcharts are defined in
a Logical Station table that appears after each chart.
KTDTL—Refer to page 665 and page 666.
NetDTL—Refer to page 667 and page 668.
664 / FactoryLink ECS / Device Interface Guide
CONFIGURING COMMUNICATION PATHS
Sample Logical Station Table Entries
Figure 23-10 KTDTL Configuration 1
FactoryLink
Station
1KT:0
DH+ 036
Data Highway + Link 1
DH+ 010
Log. Sta. 0
PLC-5
DH+ 013
Log. Sta. 1
PLC-3
DH+ 023
DH+ 035
KA5
Log. Sta. 2
DH-485 002
PLC-5/250
DH-485 Link 2
DH+ 045
Log. Sta. 3
PLC-5
DH-485 003
Log. Sta. 4
SLC-5/03
DH-485 011
Log. Sta. 5
SLC-5/03
DH-485 012
KA5
DH+ 056
DH-485 031
Log. Sta. 7
SLC-5/03
DH-485 022
Log. Sta. 6
SLC-5/02
Data Highway + Link 3
0
DH+ 034
Log. Sta. 9
PLC-3
55
DH+ 046
Log. Sta. 10
PLC-5
DH+ 057
Log. Sta. 11
PLC-5
lprt0_msg
lsta0_lana
lsta1_lana
lsta2_lana
lsta3_lana
lsta4_lana
lsta5_lana
lsta6_lana
lsta7_lana
lsta8_lana
lsta9_lana
lsta10_lana
lsta11_lana
0
1
2
3
4
5
6
7
8
9
10
11
1KT:0
1KT:0
1KT:0
1KT:0
1KT:0/G:23/L2
1KT:0/B:23/L2
1KT:0/G:23/L2
1KT:0/G:23/L2
1KT:0/B:23/L3
1KT:0/B:23/L3
1KT:0/B:23/L3
1KT:0/B:23/L3
10
13
35
45
3
11
22
31
11
34
46
57
PLC-5
PLC-3
PLC-250
PLC-5
SLC-500
SLC-500
SLC-500
SLC-500
PLC-5
PLC-3
PLC-5
PLC-5
0
FactoryLink ECS / Device Interface Guide / 665
23
KTDTL and NetDTL
DH+ 011
Log. Sta. 8
PLC-5
•
CONFIGURING COMMUNICATION PATHS
•
Sample Logical Station Table Entries
•
•
Figure 23-11 KTDTL Configuration 2
FactoryLink
Station
1KT:0
DH+ 036
Data Highway + Link 1
DH+ 010
Log. Sta. 0
PLC-5
DH+ 013
Log. Sta. 1
PLC-3
DH+ 023
KA
DH+ 035
Log. Sta. 2
PLC-5/250
Data Highway
DH 013
Log. Sta. 5
PLC-3
DH 011
Log. Sta. 4
PLC-3
0
55
lprt0_msg
lsta0_lana
lsta1_lana
lsta2_lana
lsta3_lana
lsta4_lana
lsta5_lana
0
1
2
3
4
5
0
666 / FactoryLink ECS / Device Interface Guide
DH+ 045
Log. Sta. 3
PLC-5
1KT:0
1KT:0
1KT:0
1KT:0
1KT:0/B:23/KA
1KT:0/B:23/KA
10
13
35
45
11
13
PLC-5
PLC-3
PLC-250
PLC-5
PLC-3
PLC-3
CONFIGURING COMMUNICATION PATHS
Sample Logical Station Table Entries
Figure 23-12 NetDTL Configuration 1
FactoryLink
Station
Ethernet TCP/IP
TCP/IP: abplc1
PLC 5/250
Log. Sta. 0
ORM:2
DH+ 015/016
TCP/IP: abplc2
PLC-5/40E
Log. Sta. 1
Data Highway + Link 1
DH+ 013
Log. Sta. 3
PLC-3
DH-485 003
Log. Sta. 6
SLC-5/03
DH-485 011
Log. Sta. 7
SLC-5/03
DH+ 011
Log. Sta. 10
PLC-5
DH+ 034
Log. Sta. 11
PLC-3
DH+ 035
DH+ 023
Log. Sta. 4
KA5
PLC-5/250
DH-485 002
DH-485 Link 2
DH+ 045
Log. Sta. 5
PLC-5
DH-485 012
DH-485 022
KA5
Log. Sta. 8
DH+ 056
SLC-5/02
Data Highway + Link 3
DH-485 031
Log. Sta. 9
SLC-5/03
DH+ 046
Log. Sta. 12
PLC-5
DH+ 057
Log. Sta. 13
PLC-5
0
FactoryLink ECS / Device Interface Guide / 667
23
KTDTL and NetDTL
DH+ 010
Log. Sta. 2
PLC-5
•
CONFIGURING COMMUNICATION PATHS
•
Sample Logical Station Table Entries
•
•
Figure 23-13 NetDTL Configuration 2
TCP/IP: abplc3
PLC 5/250
Log. Sta. 0
ORM:2
DH+ 015/016
Data Highway + Link 1
DH+ 010
Log. Sta. 1
PLC-5
DH+ 013
Log. Sta. 2
PLC-3
DH+ 023
KA
DH+ 035
Log. Sta. 3
PLC-5/250
Data Highway
DH 011
Log. Sta. 5
PLC-3
668 / FactoryLink ECS / Device Interface Guide
DH 013
Log. Sta. 6
PLC-3
DH+ 045
Log. Sta. 4
PLC-5
•
•
•
•
Chapter 24
Reading and Writing
Data
After setting up the communication paths, define requests that contain
information about the data to be read from and written to the devices. A read
request instructs FactoryLink to read data from specified locations in a device and
store it in real-time database elements. A write request instructs FactoryLink to
write the values of real-time database elements to specified locations in a device.
Define read requests in either the Read/Write table or the Unsolicited Read table,
and write requests in the Read/Write table. Each table consists of two panels: a
control panel and an information panel.
FactoryLink 6.6.0 / Device Interface Guide / 669
24
KTDTL and NetDTL
Note: The data entry columns in the
KTDTL Read/Write table and the
NetDTL Read/Write table are
identical. The only difference in the
tables is the panel names. Likewise,
the data entry columns in the
Unsolicited Read table for KTDTL and
NetDTL are the same. For practical
purposes, therefore, KTDTL and
NetDTL Read/Write and Unsolicited
Read tables are used interchangeably
in this chapter.
•
READING AND WRITING DATA
•
Reading Data from a Device
•
•
R EADING D ATA
FROM A
D EVICE
You can define two types of read operations: triggered and unsolicited.
Triggered—In a triggered read operation, data is retrieved from a device and
transferred to the real-time database. First, FactoryLink requests data from
specific locations (addresses) in a device. Next, the data is read then stored in
FactoryLink as database elements.
Figure 24-1 Triggered Read Operation
í
ô
FactoryLink requests data from a device.
ô
The device returns the requested data to FactoryLink.
í
FactoryLink stores the data as elements
in the real-time database.
FactoryLink Station
Triggered read operations occur based on either timed intervals or events. In both
types of operations, a change in value of a trigger element prompts FactoryLink to
read data in specific locations in a device.
• Timed-Interval Reads—A read operation based on a timed interval instructs
FactoryLink to collect data at defined intervals, such as several times a minute
or at a given time each day.
• Event-Driven Reads—A read operation based on an event instructs FactoryLink
to collect data only when a defined event occurs, such as when an operator
selects a new graphic window or when an alarm condition occurs.
Unsolicited—In an unsolicited read operation, FactoryLink does not initiate the
reading of data. Instead, it accepts certain types of data from specified locations in
a device, then stores the data in the real-time database. FactoryLink recognizes
the device data because its starting address and length match an identical
address and expected data length configured in FactoryLink.
Figure 24-1 Unsolicited Read Operation
ô
í
The device sends data to FactoryLink.
ô FactoryLink ensures the incoming data
matches configuration parameters.
í FactoryLink stores the data in the
real-time database.
FactoryLink Station
670 / FactoryLink 6.6.0 / Device Interface Guide
READING AND WRITING DATA
Reading Data from a Device
When filling out a request for a read operation, you specify in which elements the
data read from the device during the operation will be stored. Among other things,
you specify: the tag name assigned to the FactoryLink database element storing
the data, the logical station from which the data will be read, and the address
containing the data to be read.
Triggered Read Request—In a triggered read request table, a digital element you
configure in the Read/Write Control panel as a trigger to initiate a block read
operation causes FactoryLink to read each device address specified in the
Read/Write Information panel whenever the value of the trigger element is forced
to 1 (ON). FactoryLink stores the value read from each address in a real-time
database element (digital, analog, long analog, floating-point, or message).
Figure 24-1 How a Triggered Read Operation Works
When the block
read trigger is
forced on,...
KTDTL and NetDTL
The table name
indicates which
request is being
defined.
24
P240000
0
B3:1/12
DIG
...FactoryLink reads each
defined address...
READ
...then stores the
value read in the
element specified to
receive the value.
FactoryLink 6.6.0 / Device Interface Guide / 671
•
READING AND WRITING DATA
•
Reading Data from a Device
•
•
Unsolicited Read Request—In an unsolicited read request table, configure
FactoryLink to recognize and accept data of a particular structure. In the
Unsolicited Read Control panel, give the request a name and indicate this is an
unsolicited read request. In the Unsolicited Read Information panel, specify the
addresses from which data is expected, the type of data expected, and tag names
for real-time database elements (digital, analog, long analog, floating-point, or
message) in which the data will be stored when FactoryLink receives data that
matches the specified criteria.
Figure 24-1 How an Unsolicited Read Operation Works
ANA_15
0
34
UNSOL_READ
672 / FactoryLink 6.6.0 / Device Interface Guide
INT2
When you configure an
Unsolicited Read table,
FactoryLink is prepared to
recognize the data structure of the
value at each defined address
according to its data type.
When FactoryLink receives a value
that matches the criteria, it stores
the value in the element specified
to receive it.
READING AND WRITING DATA
Writing Data to a Device
W RITING D ATA
TO A
D EVICE
In a write operation, data is retrieved from the real-time database and transferred
to a device. FactoryLink reads the values of real-time database elements then
writes them to specific locations in a device.
Figure 24-1 Write Operation
ô
FactoryLink reads database elements
and sends their values to a device.
ô The device stores the values.
FactoryLink Station
You can define two types of write operations: block and exception.
Exception—In an exception write operation, a change in the value of an element
prompts FactoryLink to write that value to a specific device location. When an
element’s value changes, an internal change-status indicator within the element
also changes. If an element is configured for an exception write and this indicator
has been set since the last scan of the real-time database (indicating the value of
the element has changed), FactoryLink writes this element’s value to the device.
The difference in these two operations is the way in which each is triggered. Both
operations write data from FactoryLink to the device when a trigger is activated.
For a block write, the trigger is an element defined specifically for prompting a
write operation. For an exception write, the trigger is the change in status of the
element to be written.
FactoryLink 6.6.0 / Device Interface Guide / 673
KTDTL and NetDTL
Block—In a block write operation, a change in value of a trigger element prompts
FactoryLink to write one or more database element values to specific device
locations.
24
•
READING AND WRITING DATA
•
Writing Data to a Device
•
•
When filling out a request for a write operation, specify the following basic
information: the tag name assigned to the FactoryLink database element
containing the data to be written, the logical station to which the data will be
written, and the address to which the data will be written.
Block Write Request—In a block write request table, a digital element you
configure in the Read/Write Control panel as a trigger to initiate a block write
operation causes the task to write element values specified in the Read/Write
Information panel to their associated device addresses each time the value of the
element is forced to 1 (ON).
Figure 24-1 How a Block Write Operation Works
Continued
Continued
When the block write
trigger is forced on,...
...FactoryLink writes the value of each
element defined for this table...
P240000
0
...into the specified address.
The table name indicates which
request is being defined.
674 / FactoryLink 6.6.0 / Device Interface Guide
WRITE
B3:1/12
DIG
READING AND WRITING DATA
Writing Data to a Device
Exception Write Request—When any of the values of the elements defined in the
Read/Write Information panel change in an exception write request table, the task
writes those values to the defined device addresses. Optionally, define a digital
element to disable and re-enable an exception write table and a trigger element to
update the equipment once the table is re-enabled. Each defined exception write
results in a separate write command.
Figure 24-1 How an Exception Write Operation Works
Continued
When the Exception Write field is YES,
FactoryLink writes the values of the
elements associated with this table
only when they change.
24
When the value of each defined element
changes, FactoryLink writes it...
KTDTL and NetDTL
A disable trigger allows you to disable
and re-enable an exception write table.
Once a table is re-enabled, you can use
a block write trigger to update any
values in the device that changed while
the table was disabled. Neither trigger is
required unless you plan to periodically
disable the table, but both are required if
you do plan to disable the table.
Continued
P240000
0
B3:1/12
DIG
...to the specified device address.
EXCEPTION
FactoryLink 6.6.0 / Device Interface Guide / 675
•
READING AND WRITING DATA
•
Configuration Tips and Techniques
•
•
C ONFIGURATION T IPS
AND
TECHNIQUES
This section contains recommendations and considerations for configuring read
and write operations.
Verifying Proper Communications
While not required, it is recommended you configure two simple tables to test the
communication path before you define the read and write operations the
application needs. Perform the following steps to ensure the device can properly
communicate with FactoryLink:
1 Configure two tables: a triggered read table and an exception write table. These
should look similar to the following ones.
TESTREAD
TESTWRITE
value1
NO
YES
1
1
0
test_rtrig
B3:1/12
value2
DIG
0
B3:1/12
DIG
TESTREAD
TESTWRITE
In the read table, define:
• A trigger element (in the sample panel, test_rtrig) you will manually force to 1
(ON), using the FactoryLink Real-Time Monitor, RTMON.
676 / FactoryLink 6.6.0 / Device Interface Guide
READING AND WRITING DATA
Configuration Tips and Techniques
• An element (in the sample panel, value1) to hold the value read from a known
address in one of the devices in your configuration (in the sample panel, address
140 in the device configured as logical station 1). You will watch the activity of
this element in RTMON to verify it is being updated.
Define an element (in the sample panel, value2) in the write table to hold a value
that will be written to the same address configured in the read table. Change this
element’s value in RTMON to prompt the processing of this table.
Note
The next steps in the procedure involve the use of the FactoryLink
Real-Time Monitor. For detailed instructions on using RTMON,
refer to FactoryLink Fundamentals.
3 Prompt the processing of the triggered read table by forcing a 1 to the read trigger
using the Tag Input option on the RTMON Options menu. You can watch the value
of the trigger change in the watch list.
test_rtrig
1
When you force the read trigger to 1,...
test_rtrig
value1
value2
ON
OFF
OFF
...its value in the
watch list changes
from OFF to ON.
When the read table is
triggered, the value of
value1 is updated. If the
value read differs from
the element’s current
value, you will see it
change in the watch list.
FactoryLink 6.6.0 / Device Interface Guide / 677
24
KTDTL and NetDTL
2 Create a watch list in RTMON containing the elements defined in the two tables
(test_rtrig, value1, and value2 in the sample panels). Use the Watch option on the
RTMON Options menu to create a watch list.
•
READING AND WRITING DATA
•
Configuration Tips and Techniques
•
•
When the triggered read table is processed, the element defined to hold the value
read (value1 in the sample panel) is updated with the current value of the
specified register address.
4 Use RTMON to prompt FactoryLink to process the exception write table. Change
the value of the element to be written (value2 in the sample panel) using the same
option you used to trigger the read table, Tag Input. When you change the
element’s value in this way, the exception write table is processed and the value is
written to the specified register address.
value2
1
Choosing Operation Type
Following are some guidelines and examples to help you determine which types of
read and write operations work best for specific situations and how to configure
these operations to optimize FactoryLink’s performance.
Triggered Read Operations
A triggered read operation is the best choice for reading data that changes
frequently and at regular intervals. Use the following types of triggered read
operations under the described circumstances.
Interval
Event
If an application does not require all data to be collected at the
same time, you can increase FactoryLink’s efficiency by
configuring several read tables, each reading at a different
interval and only as often as necessary. For example, configure a
table with timed reads that occur every five seconds for elements
with values that change frequently, and every thirty seconds for
elements with values that change less frequently.
If events occur infrequently, you can reduce the number of
requests sent between FactoryLink and the device and increase
overall efficiency by configuring several read tables, each
triggered by a different event. For example, if a graphic screen
contains a large number of variables useful only on that screen
(that is, they are not alarm points and are not being trended),
configure a separate read table containing only these variables.
678 / FactoryLink 6.6.0 / Device Interface Guide
READING AND WRITING DATA
Configuration Tips and Techniques
FactoryLink will only read the elements on that screen when the
operator triggers this read table by selecting the graphic screen
for viewing. Using this technique can reduce traffic between
FactoryLink and the device when an application has a large
number of graphic screens.
As another example of an event-driven read operation, configure
FactoryLink to trigger a particular read table only if an alarm
condition occurs. The element that detects the alarm condition
can trigger FactoryLink to collect additional information from the
device about the status of related processes.
Unsolicited Read Operations
Use an unsolicited read operation if values to be read change infrequently and at
unspecified intervals. For example, you might design an application to notify
FactoryLink whenever an unexpected event occurs, such as an electrical unit
power surge of a specified magnitude.
Write Operations
Use the following types of write operations under the described circumstances.
Block
If an application writes values of real-time database elements
that change frequently to the device, use a block write operation
because FactoryLink sends the minimum number of write
commands necessary to write the specified data. A block write is
most efficient when your application writes a group of elements
at one time to the device (for example, when your application
requires a new recipe).
Exception
If an application writes values of real-time database elements
that change infrequently to the device, or if the application only
needs to change one value at a time (for example, a new
user-entered setpoint), use an exception write operation. For each
exception write, one packet of data per tag is sent to a device.
FactoryLink 6.6.0 / Device Interface Guide / 679
KTDTL and NetDTL
Consider the frequency in which unsolicited read operations are expected to
execute. Unsolicited reads occurring too frequently and at irregular intervals can
cause excessive traffic leading to a jam on the communication link and poor
system performance.
24
•
READING AND WRITING DATA
•
Configuration Tips and Techniques
•
•
Choosing Effective Triggering Schemes
Consider the following triggering guidelines based on the read and write
operation recommendations described in “Choosing Operation Type” on page 678:
• Only Trigger When Data is Needed—How often you choose to trigger data to be
read or written can depend on several factors, including how often the data
changes and whether the changes occur regularly, the timing of the events in
the application, and the types of read and write operations the device supports.
• Only Trigger When on Specific Screens—Trigger data needed more often at
faster rates while slowing down other requests.
• Daisy Chain Tables—Link or daisy chain tables together in several loops by
defining elements in such a way that the completion of one operation triggers
the beginning of another. Refer to page 714 for details.
Refer to “Techniques for Improving Communication Performance” on page 712 for
detailed descriptions of specific techniques you can use to enhance the
performance of your application.
Configuring Read and Write Tables
Consider the following recommendations when filling out a request for a read or
write operation. Refer to “Unsolicited Read Operation Concepts” on page 694 for
additional recommendations pertaining to unsolicited read operations only.
• Logically Group Table Entries—FactoryLink creates messages to send to a
device based on entries in a read or write table. Table entries are grouped
according to the following criteria: logical station number, FactoryLink data
type, Allen-Bradley data type, and address. The messages FactoryLink creates
are based on the results of the grouped table entries; therefore, for maximum
efficiency, you should attempt to group read and write table entries the same
way in which FactoryLink internally groups them.
Another benefit of organizing table entries as FactoryLink does is debugging
your application is easier. If an error occurs in table processing, you can readily
identify the source of the error.
• Keep Addresses Contiguous—Whenever possible, keep addresses contiguous to
reduce the number of messages FactoryLink must generate to process a table.
If you define a table full of data of the same FactoryLink and Allen-Bradley
data type that will be read from or written to contiguous addresses, chances are
FactoryLink will be able to read or write the data in one transaction (provided
the size of the data does not exceed the maximum size the device can handle for
one transmission). If this data is of a different type, however, FactoryLink must
send more than one message to complete the operation.
680 / FactoryLink 6.6.0 / Device Interface Guide
READING AND WRITING DATA
Configuration Tips and Techniques
Figure 24-1 illustrates how FactoryLink groups data being read from or written
to contiguous addresses into messages based on the data’s type. (This example
is for a read table but could also apply to a table for a write operation.)
Figure 24-1 Read Table Containing Two Different Allen-Bradley Data Types
ana_2
ana_2
ana_2
ana_2
ana_2
ana_4
ana_4
ana_4
ana_4
ana_4
0
0
0
0
0
0
0
0
0
0
N7:32
N7:33
N7:34
N7:35
N7:36
N7:37
N7:38
N7:39
N7:40
N7:41
FactoryLink would
need to generate
two messages to
process this table:
one to read INT2
data and another
to read INT4 data.
INT2
INT2
INT2
INT2
INT2
INT4
INT4
INT4
INT4
INT4
READ_ANA
24
processes data being read differently than it processes data being written. All
addresses defined in a read table are read based on the specified range. Using
Figure 24-1 as an example, you could get the same result (reading addresses 32
through 41) by defining only four rows as shown in Figure 24-1:
Figure 24-1 Table Defined to Read a Range of Addresses
ana_2
ana_2
ana_4
ana_4
0
0
0
0
32
36
37
41
INT2
INT2
INT4
INT4
FactoryLink will
still generate two
messages to
process this
revised table. All
addresses in the
range of 32 to 41
will be read.
READ_ANA
FactoryLink 6.6.0 / Device Interface Guide / 681
KTDTL and NetDTL
• Recognize Processing Differences in Read and Write Operations—FactoryLink
•
READING AND WRITING DATA
•
Configuration Tips and Techniques
•
•
If you define a write table as shown in Figure 24-1, however, each row will
generate a separate message and data will only be written to the four addresses
specified. To send a single message to write to addresses 32 through 41, you
would need to define each address separately as shown in Figure 24-1. Only
contiguous groups of data (up to the maximum allowed by the device) would be
put in one message for a write operation.
• Define Multiple Operations in a Single Table—Because the KTDTL and NetDTL
tasks can process multiple messages destined for a single device
simultaneously, you can define several read or write operations (within reason
and based on the architecture of the application) in a single table for maximum
throughput. Each additional table you define results in more messages the task
must generate thus reducing the efficiency of your application.
• Keep Disabled Messages Together—Put entries that might need to be disabled
periodically in their own table, separate from entries that will not be disabled.
• Prioritize Read and Write Operations—The priority of read and write operations
can affect the speed and performance of an application. Assign a priority to give
preference to the most critical data to be read or written should FactoryLink
receive more than one request to execute a read or write operation at a time.
682 / FactoryLink 6.6.0 / Device Interface Guide
READING AND WRITING DATA
Configuring Triggered Read, Block Write, or Exception Write
C ONFIGURING TRIGGERED R EAD , B LOCK WRITE ,
OR
E XCEPTION W RITE
This section describes how to configure a triggered read, a block write, or an
exception write request table.
Filling Out the Read/Write Control Panel
The following steps describe how to fill out the Read/Write Control panel.
1 Ensure the current domain selected is SHARED in the Configuration Manager
Domain Selection box.
2 If the Logical Station Information panel is currently displayed, click on Next and
go to step 5. If another KTDTL or NetDTL panel is displayed, go to step 4.
3 Choose the appropriate option from the Main Menu. A cascaded view of all the
configuration panels is displayed.
24
KTDTL—For KTDTL, choose Allen-Bradley KTDTL.
4 Display the Read/Write Control panel by clicking on its title bar.
5 Add a panel entry for each read or write request you want transmitted over a
communication path to a device. The information you provide depends on the type
of request you are defining. Refer to the appropriate section:
• “Triggered Read” on page 684
• “Block Write” on page 687
• “Exception Write” on page 690
FactoryLink 6.6.0 / Device Interface Guide / 683
KTDTL and NetDTL
NetDTL—For NetDTL, choose Allen-Bradley NetDTL.
•
READING AND WRITING DATA
•
Configuring Triggered Read, Block Write, or Exception Write
•
•
Triggered Read
The following steps describe how to fill out a Read/Write Control panel for a
triggered read table.
1 Using the following field descriptions, add a panel entry for each triggered read
request you want to define. Leave all other fields blank. Sample entries are
provided in “Sample Triggered Read Request” on page 704.
Table Name
Give this read request table a name. Define one table per line and
do not include spaces in the name. Define as many request tables
in this panel as available memory allows. Try to make the table
name reflective of the operation it represents.
When the Block Read Trigger element defined for this table is
forced on, the element prompts FactoryLink to process this read
table and any other read table with a Table Name entry associated
with the same trigger.
Valid Entry: alphanumeric string of up to 16 characters
Exception Write
Accept the default of NO to indicate this is not an exception write.
Valid Entry: no
Block Read Priority
Enter a number to indicate the priority of this table, relative to
other read operations. The highest priority is 1. This number
influences the order in which the KTDTL or NetDTL task
handles the queuing of block read requests. If the task receives
two requests at the same time, it processes the request with the
highest priority first.
Valid Entry: 1, 2, 3, 4 (default=1)
Block Read Trigger
Enter a tag name for a digital element to initiate a block read of
the addresses specified in the associated Read/Write Information
panel. When this element’s value is forced to 1 (ON), the
addresses are read.
Note
A Block Read Trigger is required to prompt FactoryLink to process a
table for a triggered read operation.
684 / FactoryLink 6.6.0 / Device Interface Guide
READING AND WRITING DATA
Configuring Triggered Read, Block Write, or Exception Write
The element you use for the Block Read Trigger can also be defined
in another FactoryLink task. For example, you could define a
digital element in the Event or Interval Timer, Math and Logic,
or the Application Editor, and assign the same tag name to a
Block Read Trigger element. When the element’s value changes to
1 (as the result of a math operation or a defined event taking
place, for example), it prompts a read operation.
Tip
Refer to triggering data effectively in “Choosing Effective
Triggering Schemes” on page 680 for additional information
about triggers and using tags as triggers in FactoryLink
Fundamentals.
Valid Entry: standard element tag name
Valid Data Type: digital
FactoryLink 6.6.0 / Device Interface Guide / 685
24
KTDTL and NetDTL
For efficient performance, define a Block Read Trigger element as a
Block Read State element in one table, creating a self-triggered
table, or define tag names for elements across several tables in
such a way to create a cascaded loop (or daisy-chain effect). When
you give identical names to a Block Read State and a Block Read
Trigger element, the completion of one read operation triggers the
start of another. Refer to “Techniques for Improving
Communication Performance” on page 712 for a description and
examples of how to create a self-triggered table or a cascaded loop.
•
READING AND WRITING DATA
•
Configuring Triggered Read, Block Write, or Exception Write
•
•
Block Read Disable
(Optional) Enter a tag name for a digital element to disable a
block read of the elements specified in this table. When this tag’s
value is forced to 1, the read operation is not executed, even when
the block read trigger is set. Set this element back to 0 (OFF) to
re-enable a block read table that has been disabled.
Tip
The Block Read Disable element can be used to disable a block read
operation that is either part of a cascaded loop or is self-triggered.
The triggering cycle will cease upon disabling, however. To
re-enable a cascaded loop or a self-triggered read table, the Block
Read Trigger element must be toggled or forced to 1. Refer to
“Techniques for Improving Communication Performance” on page
712 for further details.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Read
Complete
(Optional) Enter a tag name for a digital element to indicate
when this operation is complete. This element is forced to 1 at
startup. After the elements defined in the associated Read/Write
Information panel have been updated in the FactoryLink
database, the complete element is forced to 1 again.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Read State
(Optional) Enter a tag name for a digital element to indicate the
state of this operation: in progress or complete. This element is
forced to 1 at startup. While the table is being processed, the
element is set to 0. After the elements defined in the associated
Read/Write Information panel have been updated in the
FactoryLink database, the state element is forced back to 1.
Valid Entry: standard element tag name
Valid Data Type: digital
2 Click on Enter when you have finished filling out the information on this panel.
3 If the tag names you defined on this panel are not defined elsewhere in
FactoryLink, a dialog for defining each tag is displayed. Choose DIGITAL for Type
and accept the default of SHARED for Domain for each tag name.
686 / FactoryLink 6.6.0 / Device Interface Guide
READING AND WRITING DATA
Configuring Triggered Read, Block Write, or Exception Write
4 Define the data to be read and the target addresses in the Read/Write Information
panel. Refer to “Filling Out the Read/Write Information Panel” on page 692 for
details.
Block Write
The following steps describe how to fill out a Read/Write Control panel for a block
write table.
1 Add a panel entry using the following field descriptions, for each block write
request you want to define. Leave all other fields blank. Sample entries are
provided in “Sample Block Write Request” on page 707.
Table Name
Give this write request table a name. Define one table per line
and do not include spaces in the name. Define as many request
tables in this panel as available memory allows. Try to make the
table name reflective of the operation it represents.
Valid Entry: alphanumeric string of up to 16 characters
Exception Write
Accept the default of NO to indicate this is not an exception write.
Valid Entry: no
Block Write Priority
Enter a number to indicate the priority of this table, relative to
other write operations. The highest priority is 1. This number
influences the order in which the KTDTL or NetDTL task
handles the queuing of this write request. If the task receives two
requests at the same time, it processes the request with the
highest priority first.
Valid Entry: 1, 2, 3, 4 (default=1)
FactoryLink 6.6.0 / Device Interface Guide / 687
24
KTDTL and NetDTL
When the Block Write Trigger element defined for this table is
forced on, the element prompts FactoryLink to process this write
table and any other write table with a Table Name entry
associated with the same trigger.
•
READING AND WRITING DATA
•
Configuring Triggered Read, Block Write, or Exception Write
•
•
Block Write Trigger
Enter a tag name for a digital element to initiate a block write of
the element values specified in the associated Read/Write
Information panel to the addresses defined to receive the values.
FactoryLink writes the values when this element’s value is forced
to 1 (ON).
Note
A Block Write Trigger is required to prompt FactoryLink to process
this table for a write operation.
The element you use for the Block Write Trigger can also be defined
in another FactoryLink task. For example, you could define a
digital element in the Event or Interval Timer, Math and Logic,
or the Application Editor and assign the same tag name to a Block
Write Trigger element. When the element’s value changes to 1 (as
the result of a math operation or a defined event taking place, for
example), it prompts a write operation.
Tip
For efficient performance, you can define a Block Write Trigger
element as a Block Write State element in one table, creating a
self-triggered table; or you can define tag names for elements
across several tables in such a way to create a cascaded loop (or
daisy-chain effect). When you give identical names to a Block Write
State and a Block Write Trigger element, the completion of one write
operation triggers the start of another. Refer to “Techniques for
Improving Communication Performance” on page 712 for a
description and examples of how to create a self-triggered table or
a cascaded loop.
Refer to triggering data effectively in “Choosing Effective
Triggering Schemes” on page 680 for additional information
about triggers, and using tags as triggers in FactoryLink
Fundamentals.
Valid Entry: standard element tag name
Valid Data Type: digital
688 / FactoryLink 6.6.0 / Device Interface Guide
READING AND WRITING DATA
Configuring Triggered Read, Block Write, or Exception Write
Block Write Disable
(Optional) Enter a tag name for a digital element to disable a
block write to the addresses specified in this table. When this
tag’s value is forced to 1, the write operation is not executed, even
when the block write trigger is set. To re-enable a block write
table that has been disabled, set this element back to 0 (OFF).
Tip
The Block Write Disable element can be used to disable a block write
operation that is either part of a cascaded loop or is self-triggered.
The triggering cycle will cease upon disabling, however. To
re-enable a cascaded loop or a self-triggered write table, the Block
Write Trigger element must be toggled or forced to 1. For further
details, see “Techniques for Improving Communication
Performance” on page 712.
24
Block Write
Complete
(Optional) Enter a tag name for a digital element to indicate
when this operation is complete. This element is forced to 1 at
startup. After the data defined in this table’s Read/Write
Information panel has been written to the device, the complete
element is forced to 1 again.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write State
(Optional) Enter a tag name for a digital element to indicate the
state of this operation: in progress or complete. This element is
forced to 1 at startup. While the table is being processed, the
element is set to 0. After the data defined in this table’s
Read/Write Information panel has been written to the device, the
state element is forced back to 1.
Valid Entry: standard element tag name
Valid Data Type: digital
2 Click on Enter when you have finished filling out the information on this panel.
3 If the tag names you defined on this panel are not defined elsewhere in
FactoryLink, a dialog for defining each tag is displayed. Choose DIGITAL for Type
and accept the default of SHARED for Domain for each tag name.
FactoryLink 6.6.0 / Device Interface Guide / 689
KTDTL and NetDTL
Valid Entry: standard element tag name
Valid Data Type: digital
•
READING AND WRITING DATA
•
Configuring Triggered Read, Block Write, or Exception Write
•
•
4 Define the data to be written and the target addresses in the Read/Write
Information panel. Refer to “Filling Out the Read/Write Information Panel” on
page 692 for details.
Exception Write
The following steps describe how to fill out a Read/Write Control panel for an
exception write table.
1 Add a panel entry using the following field descriptions, for each exception write
request you want to define. Leave all other fields blank. Sample entries are
provided in “Sample Exception Write Request” on page 710.
Table Name
Give this write request table a name. Define one table per line
and do not include spaces in the name. Define as many request
tables in this panel as available memory allows. Try to make the
table name reflective of the operation it represents.
When the values of the elements you define in this table’s
Read/Write Information panel change, FactoryLink processes this
exception write table and any other exception write table with a
Table Name entry associated with the same elements.
Valid Entry: alphanumeric string of up to 16 characters
Exception Write
Enter YES for the task to write element values only when those
values change.
Tip
Do not specify elements expected to change at frequent and
unpredictable intervals in an exception write table. Any element
specified will be written to the device in its own packet (message)
each time it changes. Defining elements that change value
frequently as exception writes can slow down communications or
result in an error message.
Valid Entry: Ctrl+K
690 / FactoryLink 6.6.0 / Device Interface Guide
READING AND WRITING DATA
Configuring Triggered Read, Block Write, or Exception Write
Block Write Priority
Enter a number to indicate the priority of this table, relative to
other write operations. The highest priority is 1. This number
influences the order in which the KTDTL or NetDTL task
handles the queuing of this write request. If the task receives two
requests at the same time, it processes the request with the
highest priority first.
Valid Entry: 1, 2, 3, 4 (default=1)
Note
If you plan to periodically disable a table, both a Block Write Trigger
and a Block Write Disable element are required. Refer to the
following field descriptions. If you do not plan to disable a table, do
not define either of these elements.
Block Write Trigger
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write Disable
Enter a tag name for a digital element to temporarily disable this
table. When the value of this element is 1, it disables an exception
write of the defined elements to the device addresses specified in
the Read/Write Information panel. When the tag’s value is set to
0 again, the table is re-enabled.
Once a table has been re-enabled, a Block Write Trigger element
can be used to write any values that changed while the table was
disabled.
Valid Entry: standard element tag name
Valid Data Type: digital
2 Click on Enter when you have finished filling out the information on this panel.
3 If the tag names for the elements you defined on this panel are not defined
elsewhere in FactoryLink, a dialog for defining each one is displayed. Choose
DIGITAL for Type and accept the default of SHARED for Domain for each tag name.
4 Define the data to be written and the target addresses in the Read/Write
Information panel. Refer to “Filling Out the Read/Write Information Panel” on
page 692 for details.
FactoryLink 6.6.0 / Device Interface Guide / 691
24
KTDTL and NetDTL
Enter a tag name for a digital element to trigger the table once it
has been disabled then subsequently re-enabled by a Block Write
Disable element. When the table is triggered, any data that
changed while this table was disabled is written to the device.
•
READING AND WRITING DATA
•
Configuring Triggered Read, Block Write, or Exception Write
•
•
Filling Out the Read/Write Information Panel
The following steps describe how to fill out the Read/Write Information panel.
1 On the Read/Write Control panel, select the row for the table you are defining.
Click on Next to display the Read/Write Information panel. The table name is
displayed in the Table Name field on the lower left side of the panel.
2 Define information using the following field descriptions, for each address to be
read or to which information is to be written:
• For a Read Table—Add a panel entry for each FactoryLink database element in
which data read from the device will be stored when the operation executes.
• For a Write Table—Add a panel entry for each element to be written when the
operation executes.
Tip
Alternatively, the elements you define in the Read/Write
Information panel can be configured in the Tag Definition dialog
box in the Application Editor. Refer to the section on working with
tags in the Application Editor for details.
Sample entries are provided in “Sample Read and Write Table Entries” on page
704.
Tag Name
For a Read Table—Specify a tag name for an element in which
FactoryLink will store the data read from the device.
For a Write Table—Specify a tag name for an element containing a
value to be written to the device.
Define a digital element and a corresponding Allen-Bradley data
type of BIN or DIG in the Data Type field to read or write to
bit-level addresses (B3:0/4 or N7:3/11, for example).
Valid Entry: standard element tag name
Valid Data Type: digital, analog, float, message, longana
Logical Station
Enter the number representing the device from which the data is
to be read or to which the element’s value will be written. This
number was originally defined in the Logical Station Information
panel for the logical port through which communications with
this device occurs.
Valid Entry: previously defined logical station number
692 / FactoryLink 6.6.0 / Device Interface Guide
READING AND WRITING DATA
Configuring Triggered Read, Block Write, or Exception Write
Address
For a Read Table—Enter the address in the device’s memory
where the value to be stored in this element is located.
For a Write Table—Enter the address in the device’s memory to
which the element value will be written.
The amount of memory assigned to each Allen-Bradley data type
depends on several factors, including the PLC or SLC model
number and the amount of memory installed in the system. Refer
to Chapter 25, “Allen-Bradley Data Types and Addresses” for
address specification formats and valid device file types and
sub-elements.
Valid Entry: numeric value from 1 - 65535
Data Type
Specify the type of data being read from or written to the device
for each element defined in the Tag Name field. Refer to Chapter
25, “Allen-Bradley Data Types and Addresses” for descriptions of
the supported Allen-Bradley PLC and SLC data types and their
corresponding FactoryLink data types.
Valid Entry: Ctrl+K
3 For a Read Table—Click on Enter to validate the data when you have finished
defining all the addresses to be read and all the elements to which the data is to
be written.
For a Write Table—Click on Enter to validate the data when you have finished
defining all the tag names for FactoryLink database elements and the addresses
to which their contents are to be written.
4 If the tag names for the elements you defined are not defined elsewhere in
FactoryLink, a dialog for defining each one is displayed. Choose the type of data to
be stored in the element for Type and accept the default of SHARED for Domain for
each tag name. Refer to the tag’s field description for the valid data types.
5 Click on Prev to return to the Read/Write Control panel and refer to step 5 on page
683 to configure another read or write request table.
6 Click on Exit to return to the Main Menu when all read and write tables are
complete.
FactoryLink 6.6.0 / Device Interface Guide / 693
KTDTL and NetDTL
If you enter the data type BIN, the task automatically chooses an
Allen-Bradley data type compatible with the FactoryLink data
type of the Tag Name element. For example, if you enter BIN as
the data type for an analog element, the task interprets BIN as
INT2 and reads or writes to the element as if the data type had
been entered as INT2.
24
•
READING AND WRITING DATA
•
Configuring an Unsolicited Read
•
•
C ONFIGURING
AN
U NSOLICITED R EAD
This section provides information you should understand before configuring a
request for an unsolicited read operation and procedures describing how to
configure an unsolicited read request table.
Unsolicited Read Operation Concepts
When the KTDTL or NetDTL task receives unsolicited data from a device, the
task updates elements for which tag names have been assigned in an Unsolicited
Read table. Configure an Unsolicited Read table with a specific amount (length) of
data and a specific starting address from which data is expected to be sent by the
device. The task then builds the appropriate table structure for receiving the data
according to the data length and expected starting address.
After the task starts up, it processes block read and write and exception write
operations based on triggers and state changes configured as elements that have
been assigned tag names in read and write tables. As the task goes about its
normal operations, it is always ready to accept unsolicited data it is configured (in
an Unsolicited Read table) to receive.
The MSG instruction (or statement) in the PLC or SLC ladder logic, depending
upon how it has been programmed, sends a user-defined block of data based on a
particular time or event. If this block of data and the Unsolicited Read table
structure that was built do not match exactly in length and offset (starting
address), then the task will not receive the data.
Before configuring the Unsolicited Read table, you should be familiar with the
concepts discussed in the following pages related to data flow, data packet
processing, address range limitations, and (if SLC 5/03 and 5/04 devices are being
used) SLC 5/03 and 5/04 MSG instructions.
Refer to “Choosing Operation Type” on page 678 if you are not sure of when to use
an unsolicited read operation.
Note
NetDTL—The RSLinx Ethernet interface only accepts unsolicited
data from devices connected directly to Ethernet. For details on
configuring the NetDTL task to receive unsolicited data from
devices on DH+, DH, or DH 485 that communicate through a
Pyramid Integrator, see “Pyramid Integrator as Data
Concentrator” on page 696.
694 / FactoryLink 6.6.0 / Device Interface Guide
READING AND WRITING DATA
Configuring an Unsolicited Read
Data Flow
KTDTL—In unsolicited read operations, Allen-Bradley devices send PLC-2 format
unprotected write command packets over each configured network to the
communications port in the FactoryLink computer. The card port, in turn, passes
these command packets to FactoryLink and the KTDTL task.
NetDTL—Unsolicited data flows from the devices in your configuration to
FactoryLink and NetDTL either directly, if the devices are PLC 5/xxEs, or
through a PLC 5/250 Pyramid Integrator (PI), in which case the data is first
sent to an alternate address in the PI and then to FactoryLink and NetDTL.
PLC 5/xxE devices are equipped with a built-in Ethernet interface and,
therefore, do not require a PLC 5/250 PI. In unsolicited read operations, data
flows from addresses in the specified PLC 5/xxE device as PLC-2 format
unprotected write command packets. These packets are sent directly to
FactoryLink and NetDTL.
The MSG instruction in the ladder logic for each PLC or SLC device in your
configuration directs data to a particular device port. Each port connects
directly to either Ethernet, a DH+, or a DH-485. Refer to the appropriate
Allen-Bradley documentation for more information about the MSG instruction.
Alternate Address Definitions in the Pyramid Integrator
NetDTL using INTERCHANGE—At startup, the Ethernet interface assigns itself
an alternate address on the Data Highway+ that is one value higher than the
configured address for each DH+ port on the Pyramid Integrator. (DH+
addresses are specified in octal format; that is, 108 is equal to 8.) The Pyramid
Integrator uses this alternate address to process unsolicited data. To
distinguish data sent to a Pyramid Integrator Ethernet interface client from
normal PLC-to-PLC data sent to the PLC-5/250, the PLC writes unsolicited
data to the alternate address. For example, if the Resource Manager PLC-5/250
address is 10, for unsolicited data, its alternate address is 11.
FactoryLink 6.6.0 / Device Interface Guide / 695
24
KTDTL and NetDTL
For PLC and SLC devices connected to FactoryLink and NetDTL through a
PLC 5/250 PI, the devices send PLC-2 format unprotected write command
packets over each configured network to an alternate address in the PI
(described in the following section). The PI, in turn, passes these command
packets through the Ethernet Interface module and over the Ethernet TCP/IP
network to FactoryLink and the NetDTL task.
•
READING AND WRITING DATA
•
Configuring an Unsolicited Read
•
•
Pyramid Integrator as Data Concentrator
NetDTL using RSLinx—The alternate address applies to INTERCHANGE only.
The RSLinx Ethernet interface only accepts unsolicited data from devices
connected directly to Ethernet. To receive data from devices on DH+, DH, or DH
485, use the Pyramid Integrator as a data concentrator; that is, send unsolicited
messages to the Pyramid Integrator first as if it were another PLC, then
transmit the data from the Pyramid Integrator to the RSLinx Ethernet
interface.
Unsolicited Read Data Packets
A data packet is an unprotected write command for unsolicited reads. The KTDTL
and NetDTL tasks process data elements as packets of data rather than as
individual addresses. Each packet has a unique definition that includes the
following information: path to the originating station, command length (number of
tags written), and the starting address (lowest address defined for a particular
logical station).
NetDTL—For NetDTL, the path to the originating station includes the PI DH+
port and the device’s network address on that port, or the Ethernet address of a
PLC 5/xxE device.
KTDTL—For KTDTL, the path to the originating station includes the
Allen-Bradley PC card port and the device’s network address.
The starting address of a data packet is flexible and can be assigned any value
ranging from 0 to 7777 (octal). The address of the originating station and the
command length, however, are less flexible. They define similar packets of data
from similar locations.
For unsolicited reads, it is only necessary to define the first and last addresses in
a packet. You can leave the middle addresses (everything other than the low and
high addresses) undefined or, most likely, assign them to single or multiple
FactoryLink tags as described in the following section.
FactoryLink Application Data Packets
When the KTDTL or NetDTL task maps unsolicited data to elements, it sorts the
data into packets based on the structure of PLC-2 write commands:
• For each defined Unsolicited Read table, the task sorts the entries in ascending
order by logical station and address. The lowest address for each logical station
determines the starting address of the packet.
• The task then determines the command length by first subtracting the starting
address from the highest referenced address, then by adding one. The highest
referenced address is the highest address plus the PLC-type length.
696 / FactoryLink 6.6.0 / Device Interface Guide
READING AND WRITING DATA
Configuring an Unsolicited Read
To Determine the PLC-Type Length—For the data types listed, add the specified
value:
INT2
Add 0.
INT4, FLT
Add 1.
STRUC, ASC
Add the length specifier (value of the Address field in the
Unsolicited Read Information panel) minus one.
Data Packet Processing
When the KTDTL or NetDTL task receives a data packet, it searches its list of
defined packets for definitions that match the originating station, starting
address, and number of Allen-Bradley elements of the received packet. When it
finds matching definitions, the task reads the received information and writes all
of the data elements described in the definitions to the real-time database
according to the values of the data in the received packet. Any specific data tag
that is mapped to an address is only processed if that data tag and address are
present in the definition of the received packet.
Defining Multiple Data Packets
If one client (FactoryLink KTDTL or NetDTL task) requires multiple definitions
of the same data packet, the client itself handles the sorting of these packets using
the criteria described in “Data Packet Processing” on page 697. If multiple clients
define identical data packets, however, the server (Allen-Bradley
INTERCHANGE or RSLinx) cannot differentiate between these packets and it
loses data; therefore, to avoid data loss, do not define identical data packets from
multiple clients of the same server.
If you need multiple definitions of the same data packet, define one packet in one
panel with multiple elements per address. Alternatively, you could define two
identical packets in two separate Unsolicited Read Information panels.
FactoryLink 6.6.0 / Device Interface Guide / 697
KTDTL and NetDTL
Two individual packet definitions with overlapping device addresses that differ in
originating station, starting address, or length are separate and unique. For
example, a packet that starts at address 0100 (octal) and writes ten elements
(words) is not part of a definition for a packet from the same station that also
starts at address 0100 (octal) but writes eleven elements (words). Because the
length of the packets is different, the two are unique. Furthermore, if two
identical packets starting at address 0200 (octal) and comprising seven identical
elements are received from different originating stations, they are also unique.
24
•
READING AND WRITING DATA
•
Configuring an Unsolicited Read
•
•
Maximum Command Length of Data Packets
KTDTL—For devices communicating through an Allen-Bradley card over a DH+,
the maximum command length for individual packets in unsolicited reads is
120 words (240 bytes).
NetDTL—For devices communicating through a Pyramid Integrator with the
Ethernet Interface module over a DH+, the maximum command length for
individual packets in unsolicited reads is 120 words (240 bytes).
For SLC 5/03 and 5/04 processors, the maximum length is 41 elements (words).
If the range of addresses defined for a particular logical station exceeds this
maximum command length, send a second packet of addresses from the
Allen-Bradley device for this logical station. If FactoryLink elements are defined
for appropriate (border) addresses, then these packets will occupy contiguous
space.
Number of Data Packets
For the most efficient performance of an unsolicited read operation, define only
one packet per logical station in a single configuration table. If you need to define
more than one packet per logical station, however, make the starting address
number of each subsequent packet greater than the highest address in the
address range of the previous packet.
Address Range Limitations
All Allen-Bradley PLCs support the PLC-2 write command; however, some PLCs
limit the address ranges and data types that can be specified. Consult the
appropriate PLC programming guide for these restrictions.
Since unsolicited messages must be PLC-2-type unprotected writes, the
destination station type in the PLC ladder logic MSG instruction must be PLC-2.
For most PLCs, the ladder logic MSG instruction does not allow the source
address to be an F, H, L, ... file type if the destination PLC is a PLC-2. The
communication binary format for INT4, FLT, and others depends on the actual
PLC type.
In standard Allen-Bradley PLCs, certain Allen-Bradley PLC data types (FLT and
INT4, to name a few) cannot be sent in a PLC-2 unprotected write command. To
instruct the PLC to send such data types to FactoryLink:
1 Define the PLC type. For the task to convert the PLC type for the originating
logical station in the definition of the logical station number, specify the actual
PLC type (PLC-3, PLC-5, PLC-250) in the Station Type field of the Logical Station
698 / FactoryLink 6.6.0 / Device Interface Guide
READING AND WRITING DATA
Configuring an Unsolicited Read
Information panel for the logical station referenced in the Unsolicited Read
Information panel. The PLC type you enter in the Station Type field corresponds to
the PLC binary format for the data you specify in the Data Type field on the
Unsolicited Read Information panel.
2 Copy the data to a binary or integer file. Build the PLC-2 write data from the
PLC, sending the data in a binary or integer file by copying the long integer,
floating-point, or other data to the binary or integer file.
3 Trigger a MSG instruction to send the data to the appropriate address:
KTDTL—The MSG instruction should send the data from the file to the DH+ or
DH-485 address of the PC card port.
NetDTL—For a PI connected to a DH+, the MSG instruction should send the
data from the file to the PI’s alternate address. For a device with a built-in
Ethernet interface, the MSG instruction should send the data from the file to the
IP address labeled CLIENT for INTERCHANGE. For RSLinx, use the TCP/IP
dot notation address (nnn.nnn.nnn.nnn) of the FactoryLink client.
The SLC 5/03 and 5/04 processors, using the MSG instruction, can read and write
data to and from data table memory. To send and receive data from a user-defined
data table memory location, you specify information associated with the data for
the Target Node, Target Offset, and Message Length MSG instruction functions.
Note the following considerations when configuring the MSG instruction:
• When using the MSG instruction to send data to the KTDTL task, the SLC 5/03
or 5/04 must use the 485CIF as the target device.
• When a SLC 5/03 processor writes to a DH+ station address across a 1785 KA5
module, or when a SLC 5/04 processor writes directly to another DH+ address,
be sure to adhere to the following limits for each function:
Target Node
The Target Node (target network station address) must be
between 0 and 31 (octal). Although the DH+ network range is 0 to
77 (octal), any address you enter in an Unsolicited Read
Information panel above 31 will result in an error.
Target Offset
For an unsolicited read table entry, divide the Target Offset
(target memory) value, which is entered in word elements, by
two. For example, a Target Offset field entry of 22 (decimal) in a
MSG instruction translates to an Address field entry of 13 (octal)
in the Unsolicited Read Information panel.
FactoryLink 6.6.0 / Device Interface Guide / 699
KTDTL and NetDTL
SLC 5/03 and 5/04 MSG Instruction Considerations
24
•
READING AND WRITING DATA
•
Configuring an Unsolicited Read
•
•
Message Length
The Message Length determines the total word length of
FactoryLink tags you can configure in an unsolicited read table.
For example, a Message Length of 10 would be sufficient for
defining ten FactoryLink tags for Allen-Bradley data type INT2,
or eight tags for data type INT2 and one tag for data type INT4.
The Message Length in words must be between 0 and 41 (octal).
Although the DH-485 network allows up to 112 one-word
elements, if the total word length of the FactoryLink tags you
configure in an unsolicited read table is over 41, an error occurs.
Note
If the entries in the Unsolicited Read Information panel do not
exactly match the values for these functions in the MSG
instruction, the SLC 5/03 or 5/04 processor displays an error.
• The entry fields for the SLC 5/03 and 5/04 MSG instruction only accept data in
decimal notation. Be sure to enter their octal equivalents into an unsolicited
read table.
• For the SLC 5/03 processor, when the target node is a DH+ network address
connected to the NetDTL task through a 1785-KA5 module, configure the
processor for remote communications. If the target node is another DH-485
network address, configure the processor for local communications.
• For the SLC 5/04 processor, when the target node is another DH+ network
address, configure the processor for local communications.
Refer to Allen-Bradley’s reference manual for SLC 500 advanced programming
software for more information on SLC 5/03 and 5/04 MSG instructions.
700 / FactoryLink 6.6.0 / Device Interface Guide
READING AND WRITING DATA
Configuring an Unsolicited Read
Filling Out the Unsolicited Read Control Panel
The following steps describe how to fill out the Unsolicited Read Control panel.
1 Ensure the current domain selected is SHARED in the Configuration Manager
Domain Selection box.
2 Click on Next and go to step 5 if the Logical Station Information panel is currently
displayed. Go to step 4 if another KTDTL or NetDTL panel is displayed.
3 Choose the appropriate option from the Main Menu. A cascaded view of all the
configuration panels is displayed.
KTDTL—For KTDTL, choose Allen-Bradley KTDTL.
NetDTL—For NetDTL, choose Allen-Bradley NetDTL.
4 Display the Unsolicited Read Control panel by clicking on its title bar.
5 add a panel entry using the following field descriptions, for each unsolicited read
Table Name
Give this unsolicited read request table a name. Define one table
per line and do not include spaces in the name. You can define as
many tables in this panel as available memory allows. Try to
make the table name reflective of the operation it represents.
Valid Entry: alphanumeric string of up to 16 characters
Unsolicited Read
Enter YES or FORCE. The task will interpret this operation as
an unsolicited read and emulate the device’s addressing structure
based on entries you make in the Unsolicited Read Information
panel. The incoming data will be written to the real-time
database as specified in this field.
If you enter YES, the data is written to the element represented
by the tag name specified in the Unsolicited Read Information
panel. If the current value of the element is equal to the value
being written, the change-status indicator is unaffected. If a
different value is being written to the element, however, it will
overwrite the current value and the element’s change-status
indicator will be set to 1 (ON).
If you enter FORCE, the data is written and the change-status
flag is automatically set to 1, regardless of whether the element’s
value has changed since the last write.
Valid Entry: Ctrl+K
FactoryLink 6.6.0 / Device Interface Guide / 701
KTDTL and NetDTL
request you want to define. Sample entries are provided in “Sample Unsolicited
Read Request” on page 706.
24
•
READING AND WRITING DATA
•
Configuring an Unsolicited Read
•
•
6 Click on Enter when you have finished filling out the information on this panel.
7 Define the data to be read and the target addresses in the Unsolicited Read
Information panel. Refer to “Filling Out the Unsolicited Read Information Panel”
for details.
Filling Out the Unsolicited Read Information Panel
The following steps describe how to fill out the Unsolicited Read Information
panel.
1 On the Unsolicited Read Control panel, select the row for the table you are
defining. Click on Next to display the Unsolicited Read Information panel. The
table name is displayed in the Table Name field on the lower left side of the panel.
2 Using the following field descriptions, add a panel entry for each FactoryLink
database element in which data read from the device will be stored when
FactoryLink receives the data. Sample entries are provided in “Sample
Unsolicited Read Request” on page 706.
Tip
Alternatively, the elements you define in the Unsolicited Read
Information panel can be configured in the Tag Definition dialog
box in the Application Editor. Refer to the section on working with
tags in the Application Editor for details.
Tag Name
Specify a tag name for an element in which FactoryLink will store
the data read from the device. Be sure the message length defined
in the PLC or SLC MSG instruction is sufficient to handle the
number and types of elements you define in this table. Refer to “SLC
5/03 and 5/04 MSG Instruction Considerations” on page 699 for
more information.
For data expected from bit-level addresses (B3:0/4 or N7:3/11, for
example), define a digital element and a corresponding
Allen-Bradley data type of BIN or DIG in the Data Type field.
Valid Entry: standard element tag name
Valid Data Type: digital, analog, float, message, longana
702 / FactoryLink 6.6.0 / Device Interface Guide
READING AND WRITING DATA
Configuring an Unsolicited Read
Logical Station
Enter the number representing the device from which the
expected data is to be read. This number was originally defined in
the Logical Station Information panel for the logical port through
which communications with this device occurs.
Valid Entry: previously defined logical station number
Address
Enter the address in the device’s memory where the value to be
stored in this element is located. You must use the PLC-2 format.
Refer to Chapter 25, “Allen-Bradley Data Types and Addresses”
for address specification formats.
Refer to “Unsolicited Read Operation Concepts” on page 694 for
special addressing requirements pertinent to unsolicited reads.
Refer to “SLC 5/03 and 5/04 MSG Instruction Considerations” on
page 699 for offlink addressing considerations pertinent to SLC
5/03 and 5/04 processors.
Valid Entry: numeric value from 1 - 65535
Data Type
If you enter the data type BIN, the task automatically selects an
Allen-Bradley data type compatible with the FactoryLink data
type of the Tag Name element. For example, if you enter BIN as
the data type for an analog element, the task interprets BIN as
INT2 and reads or writes to the element as if the data type had
been entered as INT2.
Valid Entry: Ctrl+K
3 Click on Enter to validate the data when you have finished defining all the
addresses from which the expected data is to be read and all the elements to
which the data will be written.
4 If the tag names for the elements you defined are not defined elsewhere in
FactoryLink, a dialog for defining each one is displayed. Choose the type of data to
be stored in the element for Type and accept the default of SHARED for Domain for
each tag name. Refer to the tag’s field description for the valid data types.
5 Click on Prev to return to the Unsolicited Read Control panel and refer to step 5 on
page 701 to configure another unsolicited read request table.
6 Click on Exit when all unsolicited read operations are defined.
FactoryLink 6.6.0 / Device Interface Guide / 703
KTDTL and NetDTL
Specify the type of data expected from the device for each element
defined in the Tag Name field. Refer to Chapter 25, “Allen-Bradley
Data Types and Addresses” for descriptions of the supported
Allen-Bradley PLC and SLC data types and their corresponding
FactoryLink data types.
24
•
READING AND WRITING DATA
•
Sample Read and Write Table Entries
•
•
S AMPLE R EAD
AND
W RITE TABLE E NTRIES
This section provides descriptions of some possible configuration panel entries for
a triggered read, an unsolicited read, a block write, and an exception write request
table. The panel entries provided in the following pages illustrate the way in
which FactoryLink processes these requests.
Sample Triggered Read Request
In Figure 24-1, the READ table is configured as follows:
• When the value of KTDTL_READ_TRIGGER (Block Read Trigger) is 1,
FactoryLink reads the configured address and writes its value to the element
configured for this table (in the Read/Write Information panel). The block read
priority, which is set automatically if you do not enter a value, is set to the
default of 1, the highest priority.
• When the value of KTDTL_READ_DISABLE (Block Read Disable) is 1,
FactoryLink disregards the trigger element, KTDTL_READ_TRIGGER, and
does not process the READ table.
• Once the data is read and stored in the database element defined (in the
Read/Write Information panel) to receive it, FactoryLink forces a value of 1 to
KTDTL_READ_STATE (Block Read State) and to KTDTL_READ_COMPLETE
(Block Read Complete). During the read operation, KTDTL_READ_STATE is set
to 0.
Figure 24-1 Read/Write Control Panel for a Triggered Read
Continued
Continued
READ is
illustrated in
this example.
704 / FactoryLink 6.6.0 / Device Interface Guide
READING AND WRITING DATA
Sample Read and Write Table Entries
As shown in Figure 24-1, when the READ table is triggered by
KTDTL_READ_TRIGGER, FactoryLink reads the value of bit 12 in file type B,
file number 3, element 1 in the device configured as logical station 0 and stores
the value in a digital FactoryLink element, P240000.
Figure 24-1 Read/Write Information Panel for a Triggered Read
P240000
0
B3:1/12
DIG
24
READ
Figure 24-1 How This Triggered Read Operation Works
When the value of
KTDTL_READ_TRIGGER is
1, FactoryLink processes the
table, READ.
P240000
0
B3:1/12
DIG
FactoryLink reads the value
of bit 12 in file type B, file
number 3, element 1...
...then stores the value
read in P240000.
READ
FactoryLink 6.6.0 / Device Interface Guide / 705
KTDTL and NetDTL
Figure 24-1 illustrates how this triggered read operation works.
•
READING AND WRITING DATA
•
Sample Read and Write Table Entries
•
•
Sample Unsolicited Read Request
In Figure 24-1, the UNSOL_READ table is configured to accept unsolicited data of
the type specified on the corresponding Read/Write Information panel from the
address specified for this data type.
Figure 24-1 Unsolicited Read Control Panel
UNSOL_READ is illustrated
in this example.
As shown in Figure 24-1, when FactoryLink receives a 16-bit, signed analog
integer from octal address 34 in the device configured as logical station 0, it reads
the value then stores it in an analog FactoryLink element, ANA_15.
Figure 24-1 Unsolicited Read Information Panel
ANA_15
0
34
UNSOL_READ
706 / FactoryLink 6.6.0 / Device Interface Guide
INT2
READING AND WRITING DATA
Sample Read and Write Table Entries
Figure 24-1 illustrates how this unsolicited read operation works.
Figure 24-1 How This Unsolicited Read Operation Works
When FactoryLink receives
INT2 data from address 34,
it processes the table,
UNSOL_READ.
ANA_15
0
34
INT2
FactoryLink reads the data
then stores it in the analog
element, ANA_15.
24
UNSOL_READ
In Figure 24-1, the WRITE table is configured as follows:
• When the value of KTDTL_WRITE_TRIGGER (Block Write Trigger) is 1,
FactoryLink reads the element configured for this table (in the Read/Write
Information panel) and writes its value to the configured register address. The
block write priority, which is set automatically if you do not enter a value, is set
to the default of 1, the highest priority.
• When the value of KTDTL_WRITE_DISABLE (Block Write Disable) is 1,
FactoryLink disregards the trigger element, KTDTL_WRITE_TRIGGER, and
does not process the WRITE table.
• Once FactoryLink writes the element values, it forces a value of 1 to
KTDTL_WRITE_STATE (Block Write State), and to
KTDTL_WRITE_COMPLETE (Block Write Complete). During the write
operation, KTDTL_WRITE_STATE is set to 0.
FactoryLink 6.6.0 / Device Interface Guide / 707
KTDTL and NetDTL
Sample Block Write Request
•
READING AND WRITING DATA
•
Sample Read and Write Table Entries
•
•
Figure 24-1 Read/Write Control Panel for a Block Write
Continued
Continued
Continued
WRITE is
illustrated in
this example.
As shown in Figure 24-1, when the WRITE table is triggered by
KTDTL_WRITE_TRIGGER, FactoryLink writes the value of a digital
FactoryLink element, P240000, to bit 12 in file type B, file number 3, element 1 in
the device configured as logical station 0.
708 / FactoryLink 6.6.0 / Device Interface Guide
READING AND WRITING DATA
Sample Read and Write Table Entries
Figure 24-1 Read/Write Information Panel for a Block Write
P240000
0
B3:1/12
DIG
WRITE
24
Figure 24-1 How This Block Write Operation Works
Continued
When the value of
KTDTL_WRITE_TRIGGER is
1, FactoryLink processes the
table, WRITE.
Continued
P240000
0
B3:1/12
DIG
FactoryLink writes the
value of P240000...
...into bit 12 in file type B,
file number 3, element 1.
WRITE
FactoryLink 6.6.0 / Device Interface Guide / 709
KTDTL and NetDTL
Figure 24-1 illustrates how this block write operation works.
•
READING AND WRITING DATA
•
Sample Read and Write Table Entries
•
•
Sample Exception Write Request
In Figure 24-1, the EXCEPTION table is configured to read the element
configured for this table (in the Read/Write Information panel) and write its value
to the configured address. FactoryLink, however, will only perform this operation
when the element’s value changes. The table is disabled when
NDTL_EXCEPTION_DISABLE (Block Write Disable) is set to 1, and re-enabled
when NDTL_EXCEPTION_DISABLE is set to 0.
Figure 24-1 Read/Write Control Panel for an Exception Write
Continued
Continued
EXCEPTION is
illustrated in
this example.
As shown in Figure 24-1, whenever the value of the digital element P240000
changes, FactoryLink processes the EXCEPTION table. This table writes the
value of P240000 to bit 12 in file type B, file number 3, element 1 in the device
configured as logical station 0. If the table is disabled then subsequently
re-enabled and NDTL_EXCEPTION_TRIGGER (Block Write Trigger) is set to 1, bit
12 is updated with the value of P240000 if the value has changed since the table
was disabled.
710 / FactoryLink 6.6.0 / Device Interface Guide
READING AND WRITING DATA
Sample Read and Write Table Entries
Figure 24-1 Read/Write Information Panel for an Exception Write
P240000
0
B3:1/12
DIG
EXCEPTION
24
Figure 24-1 How This Exception Write Operation Works
When the value of
NDTL_EXCEPTION_DISABLE
is 1, FactoryLink does not
process the table, EXEPTION.
Continued
Continued
When the value of
NDTL_EXCEPTION_TRIGGER is
1 and the table has been disabled,
FactoryLink writes the value of
P240000 if it has changed since
the table was disabled.
Because this is an
exception write table,...
...when the value of
P240000 changes,
FactoryLink writes its
value into bit 12 of file
type B, file number 3,
element 1.
P240000
0
B3:1/12
DIG
EXCEPTION
FactoryLink 6.6.0 / Device Interface Guide / 711
KTDTL and NetDTL
Figure 24-1 illustrates how this exception write operation works.
•
READING AND WRITING DATA
•
Techniques for Improving Communication Performance
•
•
TECHNIQUES
FOR I MPROVING
C OMMUNICATION P ERFORMANCE
This section describes application techniques that can improve the throughput
and efficiency of data communications between the KTDTL or NetDTL task and
Allen-Bradley devices. These techniques involve the specification of the priority in
which the task processes read and write operations and various methods of
triggering the tables and tags defined in the Read/Write Control panel.
Specifying Priority
The Read/Write Control panel contains two columns for specifying the priority of
block reads and block or exception writes: Block Read Priority and Block Write Priority.
The priority of an operation can range from 1 to 4. These values correspond to four
first-in/first-out (FIFO) priority queues which are set up in order of importance.
Priority queue 1 has the highest priority.
When the Block Read Trigger or Block Write Trigger element for a table changes from
0 or is forced to 1, or when an element in an exception write table changes, that
table or exception element is placed into one of the four queues for processing by
the INTERCHANGE or RSLinx software. This queue placement depends on the
value specified in the Block Read Priority or Block Write Priority column for the table.
Each queue can hold up to 256 pending tables. When a table is triggered and the
priority queue to which it has been assigned is not full, the table is placed in that
queue. The Block Read State or Block Write State element for the table is reset to 1.
The queues are polled for tables (during each pass of the main loop of the KTDTL
or NetDTL task) according to the order of importance of the priority. The priority 1
queue is polled the most frequently and the priority 4 queue is polled the least
frequently. Every table is eventually processed but the ones in the priority 4 queue
can take more time to process.
After the INTERCHANGE or RSLinx software processes a pending table, the
table is removed from the queue. If the communication was successful, the
elements defined in the processed table are updated in the FactoryLink real-time
database and the Block Read Complete or Block Write Complete element for the table
is reset to 1.
712 / FactoryLink 6.6.0 / Device Interface Guide
READING AND WRITING DATA
Techniques for Improving Communication Performance
Overtriggering
All tables are placed by default in the priority 1 queue, which is appropriate in
most cases. When an application contains a large number of tables, however, or
when an exception write table contains tag names for rapidly changing elements,
an overtriggering situation can arise with all tables going into the same queue.
Overtriggering occurs when tables are being placed in a priority queue faster than
the INTERCHANGE or RSLinx software can pull the tables out and process them.
When a queue is full, an additional request to place a table in it results in the
generation of an error message which is displayed on the Run-Time Manager
screen: (KTDTL/NetDTL) in Overtriggered State: Reduce Trigger Rate.
Using this logic, you would assign a high priority to an exception write table for an
operation that acknowledges a loud annoying alarm and a low priority to a block
write table that downloads a batch recipe once a day.
Efficient Triggering
This section discusses triggering techniques to consider for optimum performance
of your application.
Timed
The easiest and most basic way to trigger a block read or write operation is with a
timed element. To define a timed trigger element, enter a tag name for a Block
Read Trigger or Block Write Trigger element in the Read/Write Control panel that
matches the tag name of an interval timer element (defined in the Interval Timer
Information panel). If you define this element to change once per second, the table
is placed in its assigned queue once every second.
Using timed elements as triggers is acceptable in most cases. An overtriggering
situation can occur, however, if the trigger rate causes tables to be placed into a
queue faster than the INTERCHANGE or RSLinx software can process them.
FactoryLink 6.6.0 / Device Interface Guide / 713
24
KTDTL and NetDTL
Since the maximum number of pending tables a queue can hold is 256, the
maximum number of total pending tables is 1024 (256 · 4 queues = 1024). If you
accept the priority default of 1 for all tables, the total allowable number of pending
I/O transactions is only 256. To more evenly distribute tables across the four
priority queues (thus reducing the priority 1 queue’s burden of handling all the
pending I/O requests), you could assign priority 1 or 2 to tables containing more
important data and priority 3 or 4 to tables containing less important data.
•
READING AND WRITING DATA
•
Techniques for Improving Communication Performance
•
•
A situation in which triggers overlap can occur as well. To illustrate, suppose a
5-second, a 15-second, and a 30-second timed element are used to trigger various
tables. Each table is placed in its designated queue every 30 seconds when the
various triggers line up. The use of prime numbers quickly solves this problem,
but a more effective method follows.
Note
The next two triggering methods, cascaded and self-triggered, can
solve potential overtriggering situations in many cases. These
methods, however, might not be appropriate for every read or write
table you define. For instance, the timed method works best for
tables that do not need to be updated at the highest possible rate.
Cascaded
The cascading of tables is an alternative to using timed triggers. As mentioned
previously, the Block Read State or Block Write State element is reset to 1 after a
table is placed into a priority queue. Similarly, the Block Read Complete or Block
Write Complete element is reset to 1 after the INTERCHANGE or RSLinx software
processes the table.
In the Read/Write Control panel, if either the complete or state element is defined
as the trigger element for the table in the row below the current table, that table
will not be triggered and placed into a queue until the preceding table is either
successfully placed in a queue or processed. If the table defined in the final row of
the Read/Write Control panel contains a tag name for a complete or state element
that matches the tag name of the trigger element for the table defined in the first
row, the completion of the final table triggers the first table. This endless loop
results in the sequential processing of tables at the fastest possible rate.
Figure 24-1 illustrates a series of read tables created using the cascading
technique. This type of table setup is also referred to as a daisy chain of tables.
714 / FactoryLink 6.6.0 / Device Interface Guide
READING AND WRITING DATA
Techniques for Improving Communication Performance
Figure 24-1 Cascaded Read Tables
Continued
READ1
READ2
READ3
READ4
READ5
When the READ1 table
has been processed, its
state tag, r1_state, is
forced back to 1.
NO
NO
NO
NO
NO
1
1
1
1
1
r5_state
r1_state
r2_state
r3_state
r4_state
Continued
r1_state
r2_state
r3_state
r4_state
r5_state
Since r1_state is defined as
the read trigger for the
READ2 table, READ2 is the
next table triggered.
24
If a table is to be placed into a queue that has become full, the value of the state
element for that table will not change. Consequently, the next table will not be
triggered until room is available in the queue for the current table.
If you use the Block Read Complete or Block Write Complete element to perform the
cascade, the next table in the loop is placed into its queue after the previous table
is successfully communicated through the INTERCHANGE or RSLinx software.
In this case, successful processing of the transaction is guaranteed. (A timeout
error occurring somewhere in the loop will slow the performance of the cascade.)
A parallel between timed and cascaded triggering further illustrates this method’s
effectiveness. When the same timed trigger element is used to trigger each of
several tables defined in the Read/Write Control panel, the tables are processed
sequentially (starting with the beginning row of the panel) on each occurrence of
the trigger. Essentially, this scenario represents a timer-initiated cascade. If each
instance of the timed element is replaced by an element that, when combined with
other elements, creates the cascaded triggering effect, the fastest rate at which
the tables can be placed into queues is naturally set by the tables themselves.
FactoryLink 6.6.0 / Device Interface Guide / 715
KTDTL and NetDTL
A table is only placed in a queue after the previous table has been placed or
processed. If you use the Block Read State or Block Write State element to perform
the cascade, the successful processing of a table prior to the next table in the loop
being triggered is not guaranteed; but overtriggering is prevented. Regardless of
communications, the loop will continue to process.
•
READING AND WRITING DATA
•
Techniques for Improving Communication Performance
•
•
For example, experimentation determines that when one 3.2-second timed digital
element is used as the same trigger element for a number of tables, the
application can trigger the tables without the overtrigger message appearing.
(Tests performed with a 3.1-second element resulted in the message appearing
and 3.2 was found to be the limit.) When the triggering method for these tables is
changed from timed to cascaded, the frequency at which the tables update
themselves in the loop is exactly 3.2 seconds.
Self-Triggered
NetDTL—For communications with PLC-5/xxE devices and PLC-5/250 devices
with an Ethernet interface module, the use of self-triggered tables can increase
the throughput and efficiency of read and write operations.
FactoryLink can process tables for read and write operations to Ethernet devices
more quickly than it can process tables going to devices not connected directly to
Ethernet. (The Ethernet connection and the I/O time for the NetDTL interface are
faster.) If you use the cascaded method for triggering tables going to devices that
will process the tables at different speeds, tables to the devices that process more
quickly (Ethernet devices) will idle in the loop waiting for the tables going to the
other devices that occur earlier in the cascade to finish processing.
In a self-triggered table, instead of a state or complete element serving as a
trigger for the next table in a cascaded loop, a state or complete element serves as
a Block Read Trigger or Block Write Trigger element for the table in which it is
defined. In other words, one tag name is defined for both the trigger element and
the complete or state element in a single table:
Figure 24-1 Self-Triggered Read Table
Continued
R_AGAIN
NO
1
Continued
selftrig
716 / FactoryLink 6.6.0 / Device Interface Guide
selftrig
READING AND WRITING DATA
Techniques for Improving Communication Performance
When FactoryLink starts up, the complete or state element is automatically set
to 1. If you have defined this same element as the trigger element, the table is also
placed in its priority queue at startup. When the complete or state element is set
again as a result of the operation, the cycle starts over and the table is placed in
its priority queue again (because the complete or state element is also the trigger).
Overtriggering does not occur with a self-triggered table because a table destined
for a device is only placed into a queue or processed after the successful previous
processing or queue placement of the table.
Note
The continuation of a cascaded loop or self-triggered table will
cease if the Block Read Disable or Block Write Disable element is set
to 1. To restart after the disable element is set to 0 again, the Block
Read Trigger or Block Write Trigger element must be reset to 1.
24
Figure 24-1 Self-Triggered Read Table
At FactoryLink startup, selftrig (as a
state element) is set to 1.
ô
As a trigger element, selftrig also places the
R_AGAIN table into queue 1 at startup.
Continued
R_AGAIN
NO
1
í During processing of the R_AGAIN table,
selftrig
ôû
selftrig (as a state element) is set to 0.
÷
If the table completes successfully (the data
is read then stored in the elements defined in
the Read/Write Information panel), selftrig
(as a state element) is set to 1.
Continued
selftrig
í÷
û When the state element, selftrig, is set to 1, the
table is placed into its queue again because selftrig
is also the trigger element. If selftrig (as a state
element) remains 0 because the table does not
complete successfully, selftrig (as a trigger
element) never gets set for queuing the table again.
FactoryLink 6.6.0 / Device Interface Guide / 717
KTDTL and NetDTL
Figure 24-1 illustrates the methodology of a self-triggered read table that uses the
state element to self trigger.
•
READING AND WRITING DATA
•
Techniques for Improving Communication Performance
•
•
718 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 25
Allen-Bradley Data
Types and Addresses
This chapter provides information about: the conversion of Allen-Bradley data
types to FactoryLink data types, formats for entering addresses, and valid
device-specific file types and subelements you can specify in addresses.
Data Types—The KTDTL and NetDTL tasks can convert numerous Allen-Bradley
data types into compatible FactoryLink data types. “Supported Data Types” on
page 720 provides a cross reference list of each supported Allen-Bradley data type
and its FactoryLink data type after conversion.
Refer to the appropriate section for information about valid file types and
subelements for specific device types:
• “PLC-3 File Type Reference” on page 725
• “PLC-5 File Type Reference” on page 727
• “PLC-5/250 File Type Reference” on page 734
• “SLC 500 File Type Reference” on page 741
FactoryLink 6.6.0 / Device Interface Guide / 719
25
KTDTL and NetDTL
Addresses—Enter the addresses of the PLC and SLC memory locations being
accessed in the Address field on the Read/Write Information and Unsolicited Read
Information panels. Refer to “Address Specification Formats” on page 723 for
information about valid address formats.
•
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
•
Supported Data Types
•
•
S UPPORTED D ATA TYPES
The following table provides descriptions of the supported Allen-Bradley PLC and
SLC data types and their corresponding FactoryLink data types.
Table 25-1 Data Type Cross Reference
FactoryLink
Data Type
Digital
Analog
Allen-Bradley
Data Type
Description/Conversion
BIN
Automatic conversion to DIG
DIG
Individual bit in a PLC file element
BIN
Automatic conversion to INT2
INT2
16-bit signed integer
INT4
32-bit signed integer
BCD3
16-bit binary-coded decimal 3 digits;
most-significant nibble zeroed/ignored
BCD4
16-bit binary-coded decimal 4 digits
UBCD
16-bit binary-coded decimal 3 digits;
most-significant nibble zeroed/ignored
FLT
32-bit floating-point value; the specific
format depends on the PLC type
720 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
Supported Data Types
Table 25-1 Data Type Cross Reference (Continued)
FactoryLink
Data Type
Long analog
Description/Conversion
BIN
Automatic conversion to INT4
INT2
16-bit signed integer
INT4
32-bit signed integer
BCD3
16-bit binary-coded decimal 3 digits;
most-significant nibble zeroed/ignored
BCD4
16-bit binary-coded decimal 4 digits
UBCD
16-bit binary-coded decimal 3 digits;
most-significant nibble zeroed/ignored
FLT
32-bit floating-point value; the specific
format depends on the PLC type
BIN
Automatic conversion to FLT
INT2
16-bit signed integer
INT4
32-bit signed integer
BCD3
16-bit binary-coded decimal 3 digits;
most-significant nibble zeroed/ignored
BCD4
16-bit binary-coded decimal 4 digits
UBCD
16-bit binary-coded decimal 3 digits;
most-significant nibble zeroed/ignored
FLT
32-bit floating-point value; the specific
format depends on the PLC type
FactoryLink 6.6.0 / Device Interface Guide / 721
25
KTDTL and NetDTL
Floating-point
Allen-Bradley
Data Type
•
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
•
Supported Data Types
•
•
Table 25-1 Data Type Cross Reference (Continued)
FactoryLink
Data Type
Message
Allen-Bradley
Data Type
Description/Conversion
BIN
Automatic conversion to STRUCT
STRUCT
Raw file contents as transmitted over
the Data Highway; length in elements
based on native element size of the
PLC file
ASC
“STRUCT” valid only in PLC files with
one word per element; high and low
order bytes swapped from Data
Highway packet contents
ST
Special PLC type specification for the
“ST” PLC file types; one element per
FactoryLink message element
722 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
Address Specification Formats
A DDRESS S PECIFICATION F ORMATS
This section contains descriptions of the formats you can use in specifying
addresses in read and write tables.
PLC-2 Format
Use the following formats to specify addresses for PLC-2 devices, and for PLC-3,
PLC-5, and PLC-5/250 devices configured for PLC-2 compatibility.
Note
You must use this format for unsolicited read operations.
word
25
word/bit
word
(Required) Enter the address of the PLC element in octal. Valid
values are 0 through 7777 octal. The actual high address depends
on the specific PLC addressed.
/bit
(Optional) After the address, enter a front slash (/) then the octal
bit number inside the PLC element addressed by the word. Valid
values are 0 through 17 octal, where 0 is the least significant bit
and 17 is the most significant bit.
,length
(Optional) After the address, enter a comma (,) then the decimal
number of words to be written to FactoryLink message elements.
Sample Address Entries:
17 Word 15 decimal
23/17 Bit 17 of word 23 (word 19 decimal)
7/7 Bit 7 of word 7 (7 decimal)
0,100 First 100 decimal words
FactoryLink 6.6.0 / Device Interface Guide / 723
KTDTL and NetDTL
word,length
•
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
•
Address Specification Formats
•
•
PLC-3, PLC-5, and PLC-5/250 Format
Use the following formats to specify addresses for PLC-3, PLC-5, and PLC-5/250
devices. The brackets enclose the parts of the format; do not enter these in your
address specification. Do not enter spaces between the parts of the format.
[module_id][filetype][filenumber][:;][element][/bit][,length][.subelement]
module_id
filetype
filenumber
: ;
(Valid for PLC-5/250 devices) Define the module ID (pushwheel)
number that specifies the thumbwheel value on the processor
module. (RM default is 0.)
(Required) Specify the PLC file type. For valid entries for a
specific PLC type, refer to the appropriate PLC file types and
subelements table in this chapter.
(Optional) Enter the file number. The default is 0 for all PLC
types except PLC-5, where a default file number exists for some
file types.
(Required) Enter either a colon (:) or semicolon (;).
element
(Optional; assumed 0 if not entered) Enter the file element
number in octal for input/output files and in decimal for all other
PLC file types. Follow this number with an appropriate separator
and either the bit specifier, length in file elements, or appropriate
Subelement.
/bit
(Optional) Enter a front slash (/) then the bit specifier in octal for
PLC-3 and input/output files and in decimal for all other PLC
types. If a back slash (\) is erroneously entered, the default value
will be used. The default is the least significant bit, 0.
,length
.subelement
(Enter for message elements) Enter a comma (,) then specify the
length, in file elements, to be read or written. The default is 1.
(Optional) Enter a period (.) then specify a subelement member of
the specified address file element. For valid entries for a specific
PLC type, refer to the appropriate file types and subelements
table in this chapter.
724 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
PLC-3 File Type Reference
PLC-3 F ILE TYPE R EFERENCE
This section provides a list of the valid file types for PLC-3 addresses and the
valid subelements for files types C and T.
File Types
The following file types can be used in PLC-3 address specifications:
Table 25-1 Valid File Types for PLC-3 Addresses
File Type
Description
Element
Length
in Words
Allen-Bradley
Data Type
Outputs
DIG/INT2
1
I
Inputs
DIG/INT2
1
T
Timers
STRUCT
3
C
Counters
STRUCT
3
N
Integers
DIG/INT2
1
F
Floating-point
FLT
2
D
Decimal BCD4
BCD4
1
B
Binary
DIG/INT2
1
A
ASCII
ASC
1
H
Long integer
INT4
2
S
Status table
DIG/INT2
1
FactoryLink 6.6.0 / Device Interface Guide / 725
25
KTDTL and NetDTL
O
•
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
•
PLC-3 File Type Reference
•
•
Subelements
The following subelements are valid for the specified file types in PLC-3 address
specifications:
Table 25-1 File Type C
Subelement
Description
Data Type
Writeable
U
Up enable
DIG
No
CD
Down enable
DIG
No
DN
Done
DIG
No
OV
Overflow
DIG
No
UF
Underflow
DIG
No
CTL
Control word
INT2
No
PRE
Preset value
INT2
Yes
ACC
Accumulated
value
INT2
Yes
Table 25-1 File Type T
Subelement
Description
Data Type
Writeable
TE
Enabled
DIG
No
TT
Timing
DIG
No
TD
Done
DIG
No
CTL
Control word
INT2
No
PRE
Preset value
INT2
Yes
ACC
Accumulated
value
INT2
Yes
726 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
PLC-5 File Type Reference
PLC-5 F ILE TYPE R EFERENCE
This section provides a list of the valid file types for PLC-5 addresses and the
valid subelements for files types BT, C, MG, PD, R, SC, T, and TD.
File Types
The following file types are valid for PLC-5 address specifications. Note that some
file types are valid only on new generation PLC-5 devices.
Table 25-1 Valid File Types for PLC-5 Addresses
File Type
Description
Allen-Bradley
Data Type
Element
Length
in Words
Default
File Number
Output image
DIG/INT2
0
1
I
Input image
DIG/INT2
1
1
S
Status
INT2
2
1
B
Binary
INT2
3
1
T
Timers
STRUCT
4
3
C
Counters
STRUCT
5
3
N
Integer
INT2
7
1
F
Floating-point
FLT
8
2
R
Control
STRUCT
6
3
BT
Block-transfer
STRUCT
None
6
MG
Message
control
STRUCT
None
61
PD
PID
STRUCT
None
82
SC
SFC status
STRUCT
None
3
ST
ASCII string
ST
None
42
TD
Token data
STRUCT
None
2
FactoryLink 6.6.0 / Device Interface Guide / 727
25
KTDTL and NetDTL
O
•
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
•
PLC-5 File Type Reference
•
•
Subelements
The following subelements are valid for the specified file types in PLC-5 address
specifications:
Table 25-1 File Type BT
Subelement
Description
Data Type
Writeable
EN
Enable
DIG
No
ST
Start
DIG
No
DN
Done
DIG
No
ER
Error
DIG
No
CO
Continue
DIG
No
EW
Enable waiting
DIG
No
NR
No response
DIG
No
TO
Time out
DIG
No
RW
Read/write
DIG
No
RLEN
Requested word
count
INT2
Yes
DLEN
Transmitted
word count
INT2
Yes
FILE
File-type number INT2
Yes
ELEM
Word number
INT2
Yes
RGS
Rack/group/set
INT2
Yes
Table 25-1 File Type C
Subelement
Description
Data Type
Writeable
CU
Up enable
DIG
No
CD
Down enable
DIG
No
728 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
PLC-5 File Type Reference
Table 25-1 File Type C (Continued)
Subelement
Description
Data Type
Writeable
DN
Done
DIG
No
OV
Overflow
DIG
No
UN
Underflow
DIG
No
CTL
Control word
INT2
No
PRE
Preset value
INT2
Yes
ACC
Accumulated
value
INT2
Yes
25
Table 25-1 File Type MG
Description
Data Type
Writeable
NR
No response
DIG
No
TO
Time out
DIG
No
EN
Enable
DIG
No
ST
Start
transmission
DIG
No
DN
Done
DIG
No
ER
Error
DIG
No
CO
Continuous
DIG
No
EW
Enabled waiting
DIG
No
ERR
Error code
INT2
Yes
RLEN
Request length
INT2
Yes
DLEN
Done length
INT2
Yes
FactoryLink 6.6.0 / Device Interface Guide / 729
KTDTL and NetDTL
Subelement
•
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
•
PLC-5 File Type Reference
•
•
Table 25-1 File Type PD
Subelement
Description
Data Type
Writeable
EN
Enable
DIG
Yes
CT
Cascaded type
DIG
No
CL
Cascaded loop
DIG
No
PVT
PV tracking
DIG
Yes
DO
Derivative of
DIG
No
SWM
Software A/M
mode
DIG
Yes
CA
Control action
DIG
No
MO
Station A/M
mode
DIG
Yes
PE
PID equation
type
DIG
No
INI
PID initialized
DIG
No
SPOR
SP out of range
DIG
No
OLL
Output limit low
DIG
No
OLH
Output limit high DIG
No
EWD
Error within
deadband
DIG
No
DVNA
Deviation high
alarm
DIG
No
DVPA
Deviation low
alarm
DIG
No
PVLA
PV low alarm
DIG
No
PVHA
PV high alarm
DIG
No
SP
Set point
FLT
Yes
730 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
PLC-5 File Type Reference
Table 25-1 File Type PD (Continued)
Subelement
Description
Data Type
Writeable
Proportional gain FLT
Yes
KI
Integral gain
FLT
Yes
KD
Derivative time
FLT
Yes
BIAS
Output bias%
FLT
Yes
MAXS
Setpoint
maximum
(scaled value)
FLT
Yes
MINS
Setpoint
minimum
(scaled value)
FLT
Yes
DB
Deadband
FLT
Yes
SO
Set output%
FLT
Yes
MAXO
Output limit
high%
FLT
Yes
MINO
Output limit
low%
FLT
Yes
UPD
Update time
FLT
Yes
PV
Process variable
FLT
Yes
ERR
Error
FLT
Yes
OUT
Output%
FLT
Yes
PVH
PV alarm high
FLT
Yes
PVL
PV alarm low
FLT
Yes
DVP
Deviation alarm
+
FLT
Yes
DVN
Deviation alarm - FLT
Yes
FactoryLink 6.6.0 / Device Interface Guide / 731
25
KTDTL and NetDTL
KP
•
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
•
PLC-5 File Type Reference
•
•
Table 25-1 File Type PD (Continued)
Subelement
Description
Data Type
Writeable
PVDB
PV alarm
deadband
FLT
Yes
DVDB
Deviation alarm
deadband
FLT
Yes
MAXI
Input range
maximum
FLT
Yes
MINI
Input range
minimum
FLT
Yes
TIE
Tieback%
FLT
Yes
Table 25-1 File Type R
Subelement
Description
Data Type
Writeable
EN
Enable
DIG
No
EU
Enable unloading DIG
No
DN
Done
DIG
No
EM
Empty
DIG
No
ER
Error
DIG
No
UL
Unload
DIG
No
IN
Inhibit
comparisons
DIG
No
FD
Found
DIG
No
CTL
Control word
INT2
No
LEN
Length
INT2
Yes
POS
Position
INT2
Yes
732 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
PLC-5 File Type Reference
Table 25-1 File Type SC
Subelement
Description
Data Type
Writeable
SA
Scan active
DIG
No
FS
First scan
DIG
No
LS
Last scan
DIG
No
OV
Timer overflow
DIG
No
ER
Step errored
DIG
No
DN
Done
DIG
No
PRE
Preset value
INT2
Yes
TIM
Active time
INT2
Yes
25
Subelement
Description
Data Type
Writeable
EN
Enable
DIG
No
TT
Timing
DIG
No
DN
Done
DIG
No
CTL
Control word
INT2
No
PRE
Preset value
INT2
Yes
ACC
Accumulated
value
NT2
Yes
Table 25-1 File Type TD
Subelement
Description
Data Type
Writable
HI
High word
INT2
Yes
LO
Low word
INT2
Yes
FactoryLink 6.6.0 / Device Interface Guide / 733
KTDTL and NetDTL
Table 25-1 File Type T
•
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
•
PLC-5/250 File Type Reference
•
•
PLC-5/250 F ILE TYPE R EFERENCE
This section provides a list of the valid file types for PLC-5/250 addresses and the
valid subelements for files types AS, C, MSG, PD, R, and T.
File Types
The following file types can be used for PLC-5/250 address specifications:
Table 25-1 Valid File Types for PLC-5/250 Addresses
File Types
Description
Element
Length
in Words
Allen-Bradley
Data Type
O
Outputs
DIG/INT2
1
I
Inputs
DIG/INT2
1
L
Long integer
INT4
2
SD
CVIM shared
memory
DIG/INT2
1
ST
String
ST
42
PD
PID
STRUCT
82
MSG
Message
control
STRUCT
56
AS
Adapter status
DIG/INT2
2
IS
Forced internal DIG/INT2
storage
1
S
System public
status
DIG/INT2
1
B
Binary
DIG/INT2
1
T
Timer
STRUCT
6
C
Counter
STRUCT
3
734 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
PLC-5/250 File Type Reference
Table 25-1 Valid File Types for PLC-5/250 Addresses
File Types
Description
Element
Length
in Words
Allen-Bradley
Data Type
R
Control
STRUCT
3
N
Integer
DIG/INT2
1
F
Floating-point
FLT
2
Subelements
The following subelements are valid for the specified file types in PLC-5/250
address specifications:
25
Table 25-1 File Type AS
Description
Data Type
Writeable
OI
Output inhibit
DIG
No
CF
Fault
DIG
No
RC
Retry count
INT2
Yes
Table 25-1 File Type C
Subelement
Description
Data Type
Writeable
CU
Up enable
DIG
No
CD
Down enable
DIG
No
DN
Done
DIG
No
OV
Overflow
DIG
No
UN
Underflow
DIG
No
PRE
Preset value
INT2
Yes
FactoryLink 6.6.0 / Device Interface Guide / 735
KTDTL and NetDTL
Subelement
•
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
•
PLC-5/250 File Type Reference
•
•
Table 25-1 File Type C
Subelement
ACC
Description
Accumulated
value
Data Type
INT2
Writeable
Yes
Table 25-1 File Type MSG
Subelement
Description
Data Type
Writeable
EN
Enable
DIG
No
ST
Start
transmission
DIG
No
AD
Asynchronous
done
DIG
No
AE
Asynchronous
error
DIG
No
CO
Continuous
DIG
No
EW
Enabled waiting
DIG
No
DN
Done
DIG
No
ER
Error
DIG
No
ERR
Error code
INT2
Yes
RLEN
Request length
INT2
Yes
DLEN
Done length
INT2
Yes
Table 25-1 File Type PD
Subelement
Description
Data Type
Writeable
EN
Enable
DIG
No
CT
Cascaded type
DIG
No
CL
Cascade loop
DIG
No
736 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
PLC-5/250 File Type Reference
Table 25-1 File Type PD (Continued)
Subelement
Description
Data Type
Writeable
PVT
PV tracking
DIG
No
DO
Derivative of
DIG
No
SWM
Software A/M
mode
DIG
No
CA
Control action
DIG
No
MO
Mode
DIG
No
PE
PID equation
DIG
No
INI
PID initialized
DIG
No
25
SPOR
SP out of range
DIG
No
OLL
Output limit low
DIG
No
OLH
Output limit high DIG
No
EWD
Error within
deadband
DIG
No
DVNA
Deviation high
alarm
DIG
No
KTDTL and NetDTL
DVPA
Deviation low
alarm
DIG
No
PVLA
PV low alarm
DIG
No
PVHA
PV high alarm
DIG
No
SP
Setpoint
FLT
Yes
KP
Proportional gain FLT
Yes
KI
Integral gain
FLT
Yes
KD
Derivative gain
FLT
Yes
BIAS
Output bias%
FLT
Yes
FactoryLink 6.6.0 / Device Interface Guide / 737
•
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
•
PLC-5/250 File Type Reference
•
•
Table 25-1 File Type PD (Continued)
Subelement
Description
Data Type
Writeable
MAXS
Setpoint
maximum
FLT
Yes
MINS
Setpoint
minimum
FLT
Yes
DB
Deadband
FLT
Yes
SO
Set output%
FLT
Yes
MAXO
Output limit
high%
FLT
Yes
MINO
Output limit
low%
FLT
Yes
UPD
Update time
FLT
Yes
PV
Process variable
FLT
Yes
ERR
Error code
FLT
Yes
OUT
Output
FLT
Yes
PVH
PV alarm high
FLT
Yes
PVL
PV alarm low
FLT
Yes
DVP
Deviation alarm
+
FLT
Yes
DVN
Deviation alarm - FLT
Yes
PVDB
PV alarm
deadband
FLT
Yes
DVDB
Deviation alarm
deadband
FLT
Yes
MAXI
Input range
maximum
FLT
Yes
738 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
PLC-5/250 File Type Reference
Table 25-1 File Type PD (Continued)
Subelement
Description
Data Type
Writeable
MINI
Input range
minimum
FLT
Yes
TIE
Tieback%
FLT
Yes
Table 25-1 File Type R
Subelement
Description
Data Type
Writeable
Enable
DIG
No
WU
Enable unloading DIG
No
DN
Done
DIG
No
EM
Empty
DIG
No
ER
Error
DIG
No
UL
Unload
DIG
No
IN
Inhibit
comparisons
DIG
No
FD
Found
DIG
No
LEN
Length
INT2
Yes
POS
Position
INT2
Yes
25
KTDTL and NetDTL
EN
Table 25-1 File Type T
Subelement
Description
Data Type
Writable
EN
Enable
DIG
No
TT
Timing
DIG
No
DN
Done
DIG
No
PRE
Preset value
INT4
Yes
FactoryLink 6.6.0 / Device Interface Guide / 739
•
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
•
PLC-5/250 File Type Reference
•
•
Table 25-1 File Type T
Subelement
ACC
Description
Accumulated
value
740 / FactoryLink 6.6.0 / Device Interface Guide
Data Type
INT4
Writable
Yes
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
SLC 500 File Type Reference
SLC 500 F ILE TYPE R EFERENCE
This section provides a list of the valid file types for SLC 500 addresses and the
valid subelements for file types C, R, and T.
File Types
The following file types can be used for SLC 500 address specifications. Note that
some file types are only valid on later model SLC processors.
Table 25-1 Valid File Types for SLC-500 Addresses
File Type
Description
Allen-Bradley
Data Type
Element
Length
in Words
Default
File Number
Output
DIG/INT2
0
1
I
Input
DIG/INT2
1
1
S
Status
DIG/INT2
2
1
B
Bit (binary)
DIG/INT2
3
1
T
Timers
STRUCT
4
3
C
Counters
STRUCT
5
3
R
Control
STRUCT
6
3
N
Integer
INT2
7
1
F
Floating-point
FLT
8
2
FactoryLink 6.6.0 / Device Interface Guide / 741
25
KTDTL and NetDTL
O
•
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
•
SLC 500 File Type Reference
•
•
Subelements
The following subelements are valid for the specified file types in SLC-500 address
specifications:
Table 25-1 File Type C
Subelement
Description
Data Type
Writeable
CU
Up enable
DIG
No
CD
Down enable
DIG
No
DN
Done
DIG
No
OV
Overflow
DIG
No
UN
Underflow
DIG
No
UA
Update
accumulated
value
DIG
No
PRE
Preset value
INT2
Yes
ACC
Accumulated
value
INT2
Yes
742 / FactoryLink 6.6.0 / Device Interface Guide
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
SLC 500 File Type Reference
Table 25-1 File Type R
Subelement
Description
Data Type
Writeable
Enable
DIG
No
EU
Unload enable
DIG
No
DN
Done
DIG
No
EM
Stack empty
DIG
No
ER
Error
DIG
No
UL
Unload
DIG
No
IN
Inhibit
DIG
No
FD
Found
DIG
No
LEN
Length
INT2
Yes
POS
Position
INT2
Yes
25
Table 25-1 File Type T
Subelement
Description
Data Type
Writeable
EN
Enable
DIG
No
TT
Timing
DIG
No
DN
Done
DIG
No
PRE
Preset value
INT2
Yes
ACC
Accumulated
value
INT2
Yes
FactoryLink 6.6.0 / Device Interface Guide / 743
KTDTL and NetDTL
EN
•
ALLEN-BRADLEY DATA TYPES AND ADDRESSES
•
SLC 500 File Type Reference
•
•
744 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 26
Messages and Codes
This chapter contains information about deciphering run-time status and error
messages that appear on the Run-Time Manager screen and about how
Allen-Bradley INTERCHANGE and RSLinx return codes function with the
KTDTL and NetDTL tasks.
Messages and error codes appear at run time on the Run-Time Manager screen
opposite the Shared Task description for the KTDTL or NetDTL task in the
message area under Last Message. These messages can also be written to a
real-time database message element for display on a custom graphics screen.
Refer to Chapter 23, “Configuring Communication Paths” for more information.
Allen-Bradley return-code messages are ASCII text strings returned by the
INTERCHANGE or RSLinx software to describe an error condition. Return-code
messages are indicated as (A-B return-code message) in this chapter. Refer to
“Allen-Bradley Return Codes” on page 750 for further information about
return-code messages.
FactoryLink 6.6.0 / Device Interface Guide / 745
KTDTL and NetDTL
Also, if you configured your application to create a run-time status window for
message display or if you specified a log file, status and error messages will
appear in this window or file as well. To create a status window, specify S in the
Flags column of the System Configuration Information panel. To define a file for
logging messages, specify the -L parameter in the Program Arguments column.
Refer to Chapter 22, “Getting Started” for more information.
26
•
MESSAGES AND CODES
•
Status Messages
•
•
S TATUS M ESSAGES
Status messages for the KTDTL and NetDTL tasks can be generated and
displayed by FactoryLink at task startup and at shutdown. These messages do not
require any action; they are displayed for information only.
Startup
The following status messages appear in the order they are listed every time the
task is started by the Run-Time Manager.
Allen-Bradley (KTDTL/NetDTL) Interface Startup
Cause:
The task is starting up normally.
Processing (DCT Filename)
Cause:
The task is reading the internal, preconfigured binary
configuration table files and packetizing information from the
specified internal device configuration table (DCT) file.
Block rd (#) block wr (#) excpt wr (#) unsol (#)
Cause:
The task is displaying the total number of communication
transactions configured for each type of operation defined in the
DCT files.
Tot 0 Allen-Bradley (KTDTL/NetDTL) Interface Started
Cause:
The task has started up normally.
Shutdown
The following message appears at task shutdown:
Normal Termination
Cause:
The task has shut down normally.
746 / FactoryLink 6.6.0 / Device Interface Guide
MESSAGES AND CODES
Error Messages
E RROR M ESSAGES
Error messages for the KTDTL and NetDTL tasks can be generated and displayed
by FactoryLink at task startup, during communications attempts, and at
shutdown. These messages require corrective steps to be taken; the action
required is described following the description of the cause of each message.
Startup
The following messages can be generated and displayed by FactoryLink if errors
occur at task startup:
no reads, no writes >>> nothing to do
This message is generated for various reasons:
No read or write operations are defined for the task.
Action:
Open the KTDTL or NetDTL configuration tables from the Main
Menu and define a read or a write operation in the Read/Write
Control and Information panels.
Cause:
The device configuration table files were not properly built,
possibly because the tables contain incorrect entries.
Action:
Verify the configuration table entries and correct as needed.
Check the FLAPP\DCT directory to verify the .DCT files were
built. Restart FactoryLink to regenerate these files, if necessary.
Cause:
The task does not recognize any read or write operations because
it is unable to read the FLAPP\DCT directory.
Action:
Verify the FLAPP\DCT directory has read and write privileges.
Grant these privileges if necessary.
Internal:Bad read on file
Internal:Out of memory tag array
Internal:...
Cause:
The task did not initialize properly. An internal message can
appear for a variety of reasons, including an incorrect file
conversion that occurred or an insufficient allocation of memory.
FactoryLink 6.6.0 / Device Interface Guide / 747
26
KTDTL and NetDTL
Cause:
•
MESSAGES AND CODES
•
Error Messages
•
•
Action:
Make a note of the message and what keys you pressed or
function you attempted to perform before the error occurred,
then contact Customer Support for assistance.
Communications
The following messages can be generated and displayed during a communications
attempt by the KTDTL or NetDTL task:
Connect (A-B KT card #/EI #): (A-B return-code message)
Cause:
After the task has started up and is attempting to establish
communications, it can display the status of the initial
connection to the specified card, port, or Ethernet interface.
Action:
Take the appropriate action indicated in the message to correct
the error.
(KTDTL/NetDTL) in Overtriggered State: Reduce Trigger Rate
Cause:
The timed trigger element is changing too rapidly.
Action:
Reduce the trigger rate or alter the method in which read and
write tables are triggered. Refer to “Techniques for Improving
Communication Performance” on page 712 for details.
Tot (# of errors since startup) (Table Name) Lsta: (Logical Station #) (A-B
return-code message)
Cause:
This message indicates the total number of communication
errors that have occurred for the specified logical station since
task start up. The return code indicates the status of a read or
write operation for the specified table name.
Action:
Take the appropriate action indicated in the message to correct
the error.
748 / FactoryLink 6.6.0 / Device Interface Guide
MESSAGES AND CODES
Error Messages
Shutdown
When the KTDTL or NetDTL task is terminated by the Run-Time Manager, the
following messages appear in the order they are listed:
Termination In Progress
Cause:
The termination procedure was started because of either an
internal run-time error or a normal FactoryLink termination
request.
Action:
Check the log file or the status window for other messages
displayed after this one. If the termination is not the result of a
normal termination request and another system message was
generated, make a note of this message. Contact Customer
Support for assistance if you cannot determine the source of the
error based on the subsequent message.
Cause:
The task is displaying the status of the disconnection from the
specified card or Ethernet interface.
Action:
Take the specified action (if any) to correct the error.
Disconnect (A-B KT card #/EI #): Was Not Connected
Cause:
This message appears only if the task was not connected with
the specified card or Ethernet interface at shutdown.
Action:
Check the log file for the message Connect (A-B KT card #/EI
#): (A-B return-code message). This message is displayed
prior to the disconnect message. Contact Customer Support for
assistance if you cannot determine the source of the error based
on the displayed return code in the connect message.
FactoryLink 6.6.0 / Device Interface Guide / 749
KTDTL and NetDTL
Disconnect (A-B KT card #/EI #): (A-B return-code message)
26
•
MESSAGES AND CODES
•
Allen-Bradley Return Codes
•
•
A LLEN -B RADLEY R ETURN C ODES
Allen-Bradley INTERCHANGE and RSLinx return-code messages function in the
following manner:
• The KTDTL and NetDTL tasks communicate with the Allen-Bradley
INTERCHANGE and RSLinx software through program function calls.
• The INTERCHANGE or RSLinx software returns a code to the KTDTL or
NetDTL task that provides information about the status of each function call.
• When the task receives the code (status or error) from the INTERCHANGE or
RSLinx software, it calls the utility function, DTL_ERROR_S, which provides an
ASCII string description of the status or error.
• These ASCII strings appear on the Run-Time Manager screen in place of the
run-time message (A-B return-code message).
In general, these messages are self-explanatory. Refer to Allen-Bradley’s
documentation for further information.
750 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
•
Telemecanique
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Part III
I
•
Copyright 1996 AEG Schneider Automation, SA. All rights reserved.
Telemecanique in this book
•
•
•
Table of Contents
•
Device Interface Guide
Telemecanique
Part III
Telemecanique
27
Telemecanique PLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743
PLC Interface Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Principles of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuration Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
External Device Definition Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
28
743
743
745
747
Telemecanique Configuration Tables . . . . . . . . . . . . . . . . . . . . . . . . 749
Configuring the External Device Definition Table . . . . . . . . . . . . . . . . . . . 750
Telemecanique Logical Station Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751
Telemecanique Read/Write Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758
29
System Configuration Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767
30
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 769
Connecting to XWAY Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring Telemecanique Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Slaves and the TW7 Data Fields . . . . . . . . . . . . . . . . . . .
First and Last Slave Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TW7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Network Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FactoryLink and TSX/PMX PLC Data Objects . . . . . . . . . . . . . . . . . . . . . .
Data Type Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Conversion Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Telemecanique PLC Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Unsolicited Data Configuration Example . . . . . . . . . . . . . . . . . . . . . . . . . .
31
769
770
771
771
772
773
776
776
777
778
784
Telemecanique Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789
FactoryLink 6.6.0 / Device Interface Guide / 753
•
•
Telemecanique
•
•
754 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 27
Telemecanique PLC
PLC I NTERFACE O VERVIEW
The Telemecanique programmable logic controller (PLC) interface for FactoryLink
allows the user to configure two-way communication between the FactoryLink
real-time database and one or more external devices.
The interface consists of a generic communication task and a specific
communication card device driver. The generic communication task is run by the
same microcomputer as FactoryLink. The specific device driver is run by the
co-processor card or by the microcomputer and works with FactoryLink to
establish the link between the real-time database and PLC data objects.
A single FactoryLink system can run more than one driver for simultaneous
communication with various external devices.
Principles of Operation
The PLC interface reads/writes data to/from external devices via a specific driver
and one or more communication ports located on one or more communication
cards. The read/write operations can be run periodically or be controlled by
triggers, operator actions, or system events.
The PLC interface task controls communication using data entered by the user in
the various configuration tables.
When the PLC interface task receives a response to a command from an external
device, it checks the response and acknowledges it, if it is correct.
FactoryLink 6.6.0 / Device Interface Guide / 755
Telemecanique
The PLC interface task also checks the response is received within a set time-out.
If the response time is exceeded or if an incorrect response is received, the task
repeats the command. If the retransmission counter reaches the maximum
number of sends allowed, the task considers the interface as having failed and
displays an error code in the Task Manager screen. The error code identifies the
device causing the communication problems.
27
•
TELEMECANIQUE PLC
•
PLC Interface Overview
•
•
Read
When a read operation is requested, the PLC interface task sends a command to
the device driver for it to read the objects specified by the user in a Read/Write
Configuration table. There can be two types of read operations:
Read block (triggered): Reads the values of all PLC objects specified in the
Read/Write Configuration table and writes them to the real-time database.
For a triggered read block, the user specifies a “trigger” element in the real-time
database that will be used to initiate read operations. When the trigger value is 1
(ON) and has changed state since it was last sampled, the PLC interface task
reads the addresses specified in the read/write table.
The block read operations ensure maximum performance levels for the PLC
interface task. This type of operation means a minimum number of block read
requests lets the user collect the data specified in the configuration table. The
PLC interface task sends these requests as “packets” separated by type of data
and groups of packets separated by logical station. The packet size depends on the
protocol used by the peripheral. The read process continues until the last block
read activated by the current trigger is performed.
Unsolicited read (unsolicited data): The PLC interface task can await data
sent by an external device for better operation with some external devices. In this
case the exchange is initiated by the external device, independently of
FactoryLink, so it can write data to the real-time database. These write
commands are treated as read actions as the data is received by the FactoryLink
real-time database in the same way as when objects are read from a PLC.
In order to receive unsolicited data, the PLC interface task emulates the
addressing structure of PLC objects to write to the real-time database. For this
reason, the write command from the PLC must apply to a specified type of data
object; otherwise, the task will not write its contents to the FactoryLink real-time
database.
756 / FactoryLink 6.6.0 / Device Interface Guide
TELEMECANIQUE PLC
PLC Interface Overview
Write
When a write operation is requested, the PLC interface task sends a command for
the driver program to write the data objects specified by the user in a Read/Write
Configuration table to the appropriate peripheral. Two write operations are
possible:
Block writes (triggered): Writes the values of all of the elements in the
database specified in a Read/Write Configuration table to a PLC.
When a block write is performed, the user specifies a trigger element taken from
the FactoryLink real-time database. The trigger starts the write operations. When
the trigger value is 1 (ON) and has changed state since it was last sampled, the
PLC interface task sends a command to the driver program to write to the PLC
the data objects specified by the user in the Read/Write Configuration table.
The block write operations ensure maximum performance levels for the PLC
interface task. This type of operation means a minimum number of block read
requests lets the user collect the data specified in the configuration table. The
PLC interface task sends these requests as packets separated by type of data and
groups of packets separated by logical station. The packet size depends on the
protocol used by the peripheral. The read process continues until the last block
read activated by the current trigger is performed.
Write on change of state (not triggered): Write on change of state is used only
to write elements whose value has changed (or elements that have a change of
state indicator set) since the last time the database was sampled by the task.
Configuration Tables
The user configures the FactoryLink PLC interface option by entering the
required information in a number of configuration tables that let the system read
and write data to/from an external device and initialize the communication
parameters.
External Device Definition table: This table lets the user specify up to 1000
logical port numbers. These numbers simplify the configuration of communication
access paths by grouping communication co-processors, their physical interface
ports, and the external devices in various combinations.
FactoryLink 6.6.0 / Device Interface Guide / 757
Telemecanique
Although various types of external devices may be used, the PLC interface task
normally uses five types of configuration tables:
27
•
TELEMECANIQUE PLC
•
PLC Interface Overview
•
•
Logical Station Control and Information tables: These two tables let the
user define communication parameters and establish the link between logical
stations and physical stations. The user can configure up to 1000 logical station
control and information tables (one for each logical port).
Read/Write Control and Information tables: These two tables let the user
specify the PLC data objects to be read and transferred to the FactoryLink
real-time database and the PLC data objects to be written from the FactoryLink
real-time database.
The number of read/write control information and configuration tables the user
can configure is limited by the amount of memory available. The number of
read/write tables is limited to 200 tables per type (200 block read tables, 200 block
write tables, 200 exception write tables). The number of entries in each read/write
table cannot exceed 1309 elements.
758 / FactoryLink 6.6.0 / Device Interface Guide
TELEMECANIQUE PLC
External Device Definition Table
E XTERNAL D EVICE D EFINITION TABLE
This table lets the user assign the logical port numbers to the various
combinations required: device type (UNI-TE, MODBUS protocols), and function to
perform (UNI-TELWAY communication).
This table is configured before defining the communication parameters or the
read/write operations.
To access this table, choose Define External Devices from the Configuration
Manager Main Menu. The following screen is displayed:
27
Specify the following information to initialize each logical port:
Logical Port
Logical port number representing a specific access path used for
communication.
Valid Entry: 0 to 999
FactoryLink 6.6.0 / Device Interface Guide / 759
Telemecanique
This table lets the user define up to 1000 logical ports. A single logical port is
usually adequate for most applications. If an application uses a large number of
different devices, multiple logical port numbers can be useful so data can be sent
from the FactoryLink real-time database to a number of devices on one or more
networks.
•
TELEMECANIQUE PLC
•
External Device Definition Table
•
•
Physical Port
Physical port number.
This number is not significant for XWAY network interface cards
or for COM ports.
Device Name
The identification of the driver program loaded for the selected
logical port. The number of characters allowed is 1 to 4.
Valid Entry: alphanumeric string of 1-4 characters: TE__ for
Telemecanique XWAY communication protocols
(MAPWAY, ETHWAY, FIPWAY, UNI-TELWAY)
Function
The type of communication performed by the application, via the
logical port.
Valid Entry: CUSTOM for any Telemecanique XWAY protocol
ETHWAY, MAPWAY, UNI-TELWAY COM Port,
FIPWAY
Memory
Not used for Telemecanique XWAY protocol.
Valid Entry: 16 to 128 Kbytes
Comment
(Optional) Comment for the logical port.
Valid Entry: alphanumeric string of up to 14 characters
The following table shows an example of the various entries.
760 / FactoryLink 6.6.0 / Device Interface Guide
TELEMECANIQUE PLC
External Device Definition Table
• Logical port 1: Comprising the ETHWAY card
• Logical port 2: Comprising the UNI-TELWAY COM port
When the information has been entered, choose Exit or press [F3] to validate the
entries and return to the Main Menu.
27
Telemecanique
FactoryLink 6.6.0 / Device Interface Guide / 761
•
TELEMECANIQUE PLC
•
External Device Definition Table
•
•
762 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 28
Telemecanique
Configuration Tables
The PLC Interface task allows the user to configure two-way communication
between the FactoryLink real-time database and one or more Telemecanique
drivers via a network interface card.
After completing the External Device Definition table, complete the following
Telemecanique configuration tables:
• Logical Station Control table
• Logical Station Information table
• Read/Write Control table
• Read/Write Information table
28
Telemecanique
FactoryLink 6.6.0 / Device Interface Guide / 763
•
TELEMECANIQUE CONFIGURATION TABLES
•
Configuring the External Device Definition Table
•
•
C ONFIGURING
THE
E XTERNAL D EVICE D EFINITION TABLE
Type TE in the Device Name field and CUSTOM in the Function field.
To access the Telemecanique configuration tables, choose TELEMECANIQUE from
the Configuration Manager Main Menu. The following screens are displayed:
To select a screen, place the cursor on a visible part of the screen and click on it
with the left mouse button.
764 / FactoryLink 6.6.0 / Device Interface Guide
TELEMECANIQUE CONFIGURATION TABLES
Telemecanique Logical Station Table
TELEMECANIQUE L OGICAL S TATION TABLE
The Logical Station Control table allows the user to specify information required
to initialize read/write communication between FactoryLink and a PLC. The
Logical Station Information table allows the user to establish a link between
logical ports and physical stations.
Logical Port
The logical port number specified in the External Device
Definition table corresponding to a specific communication
channel.
Valid Entry: 0 to 999
Baud Rate
Communication transmission speed in Baud.
Valid Entry: 4800, 9600, 19200 (default=9600)
Use only 4800 or 19200 settings if the TSX SCM module is
programmed for these values.
Type of parity used by the transmission.
Valid Entry: odd, even, none (default=odd)
Use only EVEN or NONE if the TSX SCM module is programmed
for these settings.
Data Bits
Number of data bits used in the transmission.
Valid Entry: 7, 8 (default=8)
Use only 7 if the TSX SCM module is programmed for this
setting.
FactoryLink 6.6.0 / Device Interface Guide / 765
Telemecanique
Parity
28
•
TELEMECANIQUE CONFIGURATION TABLES
•
Telemecanique Logical Station Table
•
•
Stop Bits
Number of stop bits used in the transmission.
Valid Entry: 1, 2 (default=1)
Use only 2 if the TSX SCM module is programmed for this
setting.
TYPE
Type of card that supports the logical port.
Valid Entry:
TEMAP1 for the MAPWAY 1 card
TEMAP2 for the MAPWAY 2 card
TEUTW1 for the UNI-TELWAY and COM port
TEETH1 for the ETHWAY 1 card
TEETH2 for the ETHWAY 2 card
TEFIP1 for the FIPWAY 1 card
TEFIP2 for the FIPWAY 2 card
TEPCS for the PLC programming port (usually
used to communicate with a PCX PLC board.
TEISA1 and TEISA2 for ISAWAY1 and ISAWAY2
driver TEIP1 and TEIP2 for tcp/ip1 and tcp/ip2
driver).
First Slave
Address
Number of the lowest slave address assigned to FactoryLink
communication on a Uni-Telway bus. This slave address is
reserved for unsolicited data. The slave addresses used for
transmission/reception of other types of messages start with the
address defined in this field + 1 and end with the address of the
last slave, defined in the next field.
Between 1 and 15 slave addresses can be assigned to
FactoryLink. For best performance, Telemecanique recommends
entering the default value. Refer to “Configuring Telemecanique
Networks” on page 786 for more information.
Valid Entry: 1 to 249 (default=1)
Last Slave
Address
The number of the highest slave address assigned for
FactoryLink communication on the UNI-TELWAY bus.
Between 1 and 15 slave addresses can be assigned to
FactoryLink. For best performance, Telemecanique recommends
entering the default value. Refer to “Configuring Telemecanique
Networks” on page 786 for more information.
Valid Entry: 5 to 253 (default=15)
766 / FactoryLink 6.6.0 / Device Interface Guide
TELEMECANIQUE CONFIGURATION TABLES
Telemecanique Logical Station Table
MSG Tag Name
(Optional) Tag of the database element that contains the report
on communication status on this logical port.
Valid Entry: standard element tag name
Valid Data Type: message
The MAPWAY/ETHWAY/FIPWAY/ISAWAY/XWAYIP interface cards do not use the
Baud Rate, Parity, Data Bits, Stop Bits fields. These fields must remain blank or
retain their default values. If this table was previously configured for a
UNI-TELWAY protocol and if it is now to be configured for a
MAPWAY/ETHWAY/FIPWAY/ISAWAY/XWAYIP protocol, it is not necessary to
change the initial value set in these fields. When a non UNI-TELWAY protocol is
used, First and Last Slave Address fields are used to determine the number of
communication sockets.
When the information has been entered, place the cursor on the logical port to be
configured, then place the cursor on the visible part of the Logical Station
Information table and click on the left mouse button.
28
Logical Port
Reminds the user of the number of the logical port to which the
information displayed in this table is assigned.
FactoryLink 6.6.0 / Device Interface Guide / 767
Telemecanique
The information entered in this table is assigned to the logical port whose number
is displayed in the Logical Port field. If this number is incorrect, return to the
Logical Station Control screen, and move the cursor to the logical port to be
configured, then once again call-up the display of the Logical Station Information
table.
•
TELEMECANIQUE CONFIGURATION TABLES
•
Telemecanique Logical Station Table
•
•
Error/Status Tag
(Optional) The name of the tag assigned to the real-time database
element that contains the error code for logical station
communication applications.
Valid Entry: standard element tag name
Valid Data Type: analog
0 - running
1 - The PLC target is not connected or a request
is refused by the PLC configuration to verify its
availability
3 - Timeout. The response from the logical station
was not received within the configuration
timeout period. Increase the timeout value in the
Telemechanique Logical Station configuration
panel.
6 - PLC Object can’t be reached or is not
configured. Check to ensure the PLC is
configured with the correct range.
7 - Unsolicited message of a non-configured
station is received, or a response can’t be linked
with any solicited requests. Check to ensure the
PLC address is a configured logical station.
9 - Internal Error. A response isn’t coherent, one
request can’t be sent, an error occured during
sending, sending buffers are full, or datagram
error.
Logical Station
A number entered by the user in a read/write table specifying a
logical port/physical station combination. A logical station
number can only be used for a single PLC.
Valid Entry: 0 to 999 (default=0)
Station Name
Device Type
Comment field to associate the logical station number to the
corresponding XTEL station name.
The type of PLC (TSX/PMX V3/V4/V5) used for communication.
Valid Entry: 17-20, 67-40, 47-400, 67-420, TSXV3, 37-10,
47-20, 87-10, 47-410, 87-410, TSXV6, 37-21,
47-30, 87-20, 47-411, 87-420, TSXV5, 37-22,
67-20, 87-30, 47-420, 107-410, PMXV4,
67-30, 67-410, 107-420, PMXV5, 57-10, 57-20,
50-30, 50-xx, 37-xx, PCX57, NUM10x0
The next five fields define the five level XWAYaddress. Refer to the corresponding
documentation for more information.
768 / FactoryLink 6.6.0 / Device Interface Guide
TELEMECANIQUE CONFIGURATION TABLES
Telemecanique Logical Station Table
Network Number
A hexadecimal value giving the network number.
Valid Entry: 0 to 7F (default=0)
Station Number
A hexadecimal value for the network address station number.
Valid Entry: For UNI-TELWAY: 0 to FE (default=FE)
For MAPWAY/ETHWAY/FIPWAY/XWAYIP: 0 to
3F
Gate Number
A hexadecimal value for the network address gate number.
Valid Entry: 0 to F (default=0) depending on the address to
enter
0 for a master address
5 for a slave address
For an unsolicited data, this number must be 10 + x, where x is
the number of the text block which send the request.
Module Number
A hexadecimal value for the module number on the network. For
a slave address, the two figures in hexadecimal notation
correspond to the rack number and the position of the module in
the rack.
Valid Entry: 0 to FF (default=0) depending on the address to
enter
0 for a master address
Location in the rack used by a TSX SCM module for a slave
address. For example, 07 corresponds to slot 7 in rack 0.
Device Number
A hexadecimal value for the network address device number.
Valid Entry: 0 to FE (default=0) depending on the address to
enter
0 for a master address
H’64’ plus the target slave number for a slave
address
The time (in seconds) during which the driver waits for a
response from the PLC. If this time is exceeded, the driver
repeats the message sent or sends an error message.
Valid Entry: 0 to 30 (default=10)
TW7
An indicator that shows if data transits a Telway network
betweenFactoryLink and a PLC.
YES The data transits via a Telway network
FactoryLink 6.6.0 / Device Interface Guide / 769
Telemecanique
Response Timeout
Seconds
28
•
TELEMECANIQUE CONFIGURATION TABLES
•
Telemecanique Logical Station Table
•
•
NO (Default) The data does not transit via a Telway
network
Drop
The number of a group of stations that are opened via the same
network interface. The same drop number must be assigned to all
PLCs that are connected to a common lower level network. Each
PLC equipped with a
MAPWAY/ETHWAY/FIPWAY/XWAYIP/ISAWAY communication
module must be assigned a different number.
A different drop number has to be assigned to each station
configured as receiving unsolicited datas.
If the same drop number is used for both normal read/write
operation and unsolicited datas, the performances for read/write
operation will be affected.
Valid Entry: 0 to 99 (default=0)
Sample entries are provided in the following panel:
770 / FactoryLink 6.6.0 / Device Interface Guide
TELEMECANIQUE CONFIGURATION TABLES
Telemecanique Logical Station Table
Press Tab and the following fields are displayed :
In this example, information is specified for logical port 0 defined in the
Telemecanique Logical Station Control panel. The error codes for logical station 2
(X-TEL symbolic name: LSTA2) are written to real-time database element
te_station2. Logical station 2 communicates with a TSX 17-20 PLC with network
number 0, station number FE, gate number 5, module number 7 and device
number 74.
The driver waits up to 10 seconds for a response to a read or write request before
declaring an error condition. The logical station is linked to station group 1 (drop
1) and data exchange does not transit via a Telway network.
28
Telemecanique
FactoryLink 6.6.0 / Device Interface Guide / 771
•
TELEMECANIQUE CONFIGURATION TABLES
•
Telemecanique Read/Write Table
•
•
TELEMECANIQUE R EAD /W RITE TABLE
These tables allow the user to specify the following information:
• Exception write, block write, block read, or any combination of these read/write
operations
• Up to 200 real-time database elements used as block read triggers
(with one read trigger per table)
• Up to 200 real-time database elements used as block write triggers
(with one write trigger per table)
• Telemecanique objects to read and transfer to the FactoryLink real-time
database
• real-time database elements that receive the contents of the PLC objects
It is possible to configure up to 200 read/write tables with up to 1309 elements
defined in each table.
Note
Different triggers must be used for each table.
If message type elements are used for block read or write operations, it is
recommended no more than 16 message type elements be entered in the same
table.
772 / FactoryLink 6.6.0 / Device Interface Guide
TELEMECANIQUE CONFIGURATION TABLES
Telemecanique Read/Write Table
Table Name
The user defined name of the read/write table to configure or
modify.
Valid Entry: alphanumeric string of up to 16 characters
Unsolicited Read
(Optional) Indicates reading unsolicited data from the logical
stations specified in this table must be interpreted by the PLC
Interface task. When an unsolicited data read is performed, the
PLC Interface task emulates the addressing structure of the PLC
objects to write to the real-time database. An unsolicited data
table must only contain Message type tags and only read Text
type PLC objects. Refer to “FactoryLink and TSX/PMX PLC Data
Objects” on page 794. FactoryLink listens for unsolicited data on
the First Slave Address. In addition, the user must define a
logical station whose address corresponds to the target address of
the text block used by the PLC for this transmission.
Y A normal write to the real-time database
F A forced write to the real-time database
N Unsolicited data is not interpreted
Exception Write
This indicator shows whether writing is required each time the
value of one of the elements specified in the Read/Write
Information table changes.
Y A change of state of any element generates a write
request of its value, regardless of the specified
triggers or of other values.
N No exception writes. Write operations are only
generated when the value of the write trigger and
its change of state bit are forced to 1. All of the
values are written, regardless of the status of their
change of state bit.
Block Read Priority
(Optional) Not used.
FactoryLink 6.6.0 / Device Interface Guide / 773
Telemecanique
It is possible to configure both exception write and block write
actions in the same table.
28
•
TELEMECANIQUE CONFIGURATION TABLES
•
Telemecanique Read/Write Table
•
•
Block Read Trigger
A FactoryLink real-time database digital element that, when
forced to 1 (ON), triggers a block read of the values specified in
the Telemecanique Read/Write Information table. The Read
Trigger is normally defined in another FactoryLink task such as
the Event and Interval Timer, Math and Logic, or Application
Editor.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Read
Disable
A digital database element that, when set to 1 (ON), disables the
block read action on this table.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Read
Complete
A digital element of the database forced to 1 (ON) by the PLC
Interface task once the block read of this table is complete. If this
element is defined when the PLC Interface task is initialized, the
value of this element is forced to 1 (ON).
The Read Completed elements are valid only if a different table is
used for each logical port.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Read State
A digital element of the database with a value set to 0 (OFF)
when a block read operation on the elements specified in the table
are in progress. Once the block read operations on this table are
complete, the value of this element is set to 1 (ON). If this
element is defined when the PLC Interface task is initialized, the
value of this element is forced to 1 (ON).
The Read State elements are valid only if a different table is used
for each logical port.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write Priority
(Optional) Not used.
774 / FactoryLink 6.6.0 / Device Interface Guide
TELEMECANIQUE CONFIGURATION TABLES
Telemecanique Read/Write Table
Block Write Trigger
A FactoryLink real-time database digital element that, when
forced to 1 (ON), triggers a block write of the values specified in
the Telemecanique Read/Write Information table. The block write
trigger is normally defined in another FactoryLink task such as
the Event and Interval Timer, Math and Logic, or Application
Editor.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write
Disable
A digital database element that, when set to 1 (ON), disables the
block write action on the elements specified in this table.
Valid Entry: standard element tag name
Valid Data Type: digital
Block Write
Complete
A digital element of the database forced to 1 (ON) by the PLC
Interface task once the block write of this table is complete. If this
element is defined when the PLC Interface task is initialized, the
value of this element is forced to 1 (ON).
The Block Write Complete elements are valid only if a different
table is used for each logical port.
Valid Entry: standard element tag name
Valid Data Type: digital
Write State
A digital element of the database with a value set to 0 (OFF)
when a block write operation on the elements specified in the
table are in progress. Once the block write operations on this
table are complete, the value of this element is set to 1 (ON). If
this element is defined when the PLC Interface task is initialized,
the value of this element is forced to 1 (ON).
The Block Write State elements are valid only if a different table
is used for each logical port.
FactoryLink 6.6.0 / Device Interface Guide / 775
Telemecanique
Valid Entry: standard element tag name
Valid Data Type: digital
28
•
TELEMECANIQUE CONFIGURATION TABLES
•
Telemecanique Read/Write Table
•
•
The following table shows an example of entries in the various fields:
Press Tab to display the following fields:
776 / FactoryLink 6.6.0 / Device Interface Guide
TELEMECANIQUE CONFIGURATION TABLES
Telemecanique Read/Write Table
Press Tab to display the following fields:
In this example, table te_rwtable1 is defined. Reading unsolicited data is not
interpreted. A change of state by any element causes the value of this element to
be written, regardless of the status of the triggers or of the other values
(Exception Write = Y is set).
The block read and write priority levels are set to the highest value, 1. When the
value of database element te_read equals 1 (ON), a block read of the values
specified in the Read/Write Information table is performed. When the value of
database element te_rdisable equals 1 (ON), block reading of table te_rwtable1 is
disabled. Once all of the block read operations for this table are complete, the PLC
Interface task forces the value of the te_rcomp database element to 1. The value of
the te_rstate database element changes to 0 while table te_rwtable1 is being read.
FactoryLink 6.6.0 / Device Interface Guide / 777
28
Telemecanique
When the value of database element te_write equals 1 (ON), a block write of the
values specified in the corresponding Read/Write Information table is enabled.
When the value of database element te_wdisable equals 1, block writing of the
values specified in table te_rwtable1 is disabled. Once all block write operations
for this table are complete, the PLC Interface task force the te_wcomp database
element to 1. The value of the te_wstate database element is 0 when the table
te_rwtable1 is being written.
•
TELEMECANIQUE CONFIGURATION TABLES
•
Telemecanique Read/Write Table
•
•
Once all of the information has been entered, bring the last table, Read/Write
Information, to the foreground by placing the cursor on the visible part of the
screen and clicking on the left mouse button.
The values entered in this table identify Telemecanique PLC objects that are:
• Read and transferred to the real-time database when the block read trigger
requests a block read of the table specified in the Table Name field
• Written from the real-time database when the block write trigger requests a
block write of the table specified in the Table Name field.
The data entered in this table is assigned to the table whose name is specified in
the Table Name field. If this name is incorrect, the user must return to the
Read/Write Control screen, and place the cursor on the name of the table to be
filled in, then display the Read/Write Information screen once again.
Specify the following data for each PLC object to read or write:
Station Name
Logical Station
Comment field to associate the logical station number to the
corresponding XTEL station name.
A number (defined in the Logical Station Configuration table)
that identifies the physical attributes required by the read and
write operations on the real-time database element.
Valid Entry: 0 to 999 (default=0)
All logical station numbers entered must first be defined in the
Logical Station Information table.
778 / FactoryLink 6.6.0 / Device Interface Guide
TELEMECANIQUE CONFIGURATION TABLES
Telemecanique Read/Write Table
Tag Name
PLC Object
The name of the real-time database element whose value is
updated when a block read action is performed or which is sent to
the PLC when a block write action is performed.
Symbolic representation of the PLC object to read or write.
Valid Entry: Refer to “FactoryLink and TSX/PMX PLC Data
Objects” on page 794.
The following table shows an example of entries in the various fields:
In this example, the database element te_pl1 is updated when a block read or a
block write operation is performed in relation to logical station 2 (the symbolic
name of the X-TEL station is LSTA2). The Telemecanique object to read or write is
word W0.
Once all data has been entered, click on Exit to validate it. Click on Exit or press
[F3] to return to the Configuration Manager.
28
Telemecanique
FactoryLink 6.6.0 / Device Interface Guide / 779
•
TELEMECANIQUE CONFIGURATION TABLES
•
Telemecanique Read/Write Table
•
•
780 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 29
System Configuration
Table
These tables allow the user to configure executable files to run, depending on the
type of configuration requested.
To open the System Configuration table, choose System Configuration from the
Configuration Manager Main Menu. The following panel is displayed.
Specify the following information:
Flags
Task Name
This field must be filled in with FR to automatically start the task
at run time.
This field must be filled in according to the type of
communications:
Valid
Entry
MAPWAY 1 card
MAPWAY 2 card
UNI-TELWAY COM port
ETHWAY 1 card
ETHWAY 2 card
FIPWAY 1 card
FIPWAY 2 card
Programming port (PCX
TEMAP1
TEMAP2
TEUTW1
TEETH1
TEETH2
TEFIP1
TEFIP2
TETSXPC
FactoryLink 6.6.0 / Device Interface Guide / 781
Telemecanique
Communications Type
29
•
SYSTEM CONFIGURATION TABLE
•
•
•
TCP/IP 1 card
TCP/IP 2 card
ISAWAY 1
ISAWAY 2
TEIP1
TEIP2
TEISA1
TEISA2
Leave the following fields as previously filled-in.
Description, Start Trigger, Task Status, Task Message, Display Status, Display Name,
Display Description, Start Order, Priority
Executable File
This field must be filled in with BIN/TECOM for the task to start.
782 / FactoryLink 6.6.0 / Device Interface Guide
SYSTEM CONFIGURATION TABLE
Program
Arguments
This field must be filled in according to the type of
communications:
Communications Type
MAPWAY 1 card
MAPWAY 2 card
FIPWAY 1 card
FIPWAY 2 card
UNI-TELWAY COM port
ETHWAY 1 card
ETHWAY 2 card
Programming port (PCX)
XWAYIP 1
XWAYIP 2
ISAWAY1
ISAWAY2
Valid
Entry
1
2
3
4
5
6
7
8
11
12
13
14
29
Telemecanique
FactoryLink 6.6.0 / Device Interface Guide / 783
•
SYSTEM CONFIGURATION TABLE
•
•
•
784 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 30
Reference
C ONNECTING
TO
XWAY N ETWORKS
The PC computer and its installed XWAY network interface card connect directly
to the appropriate network.
-XWAY Network Interface Cards
• FIPWAY network:
Use the half-length TSX FPC 10M interface board.
Refer to the TSX DM FPC 10M documentation for full instructions on installing
this board.
• ETHWAY network:
Use the half-length TSX ETH PC10M interface board.
Refer to the TSX DM ETH PC 10M documentation for full instructions on
installing this board.
• MAPWAY network:
Use the full-length TSX MAP PC7 42M interface board.
Refer to the TSX DM MAP PC7 M documentation for full instructions on
installing this board.
• UNI-TELWAY COM Port network:
A specific UNI-TELWAY software driver must be previously installed to use the
standard Serial COM port for UNI-TELWAY communication protocol. This
software can be ordered using the reference TXT LF UTW V50.
• XWAY-TCPI network: Contact your sales representative.
FactoryLink 6.6.0 / Device Interface Guide / 785
Telemecanique
• ISA-WAY network: Contact your sales representative.
30
•
REFERENCE
•
Configuring Telemecanique Networks
•
•
C ONFIGURING TELEMECANIQUE N ETWORKS
This subsection describes the various communication devices that can be
connected to a FactoryLink system and to PLCs to form a network.
It also lets the user determine the appropriate entries for the value of the first
slave address, last slave address, and the TW7 fields in the Telemecanique Logical
Station Configuration table described previously.
786 / FactoryLink 6.6.0 / Device Interface Guide
REFERENCE
Configuring the Slaves and the TW7 Data Fields
C ONFIGURING
THE
S LAVES
AND THE
TW7 D ATA F IELDS
This additional information is required to determine the appropriate data
required for entry into the various fields in the Telemecanique Logical Station
Control Information table:
First and Last Slave Addresses
A UNI-TELWAY bus can have up to 253 slave addresses as 0 is reserved for the
master). To improve communication efficiency between FactoryLink and a PLC or
a UNI-TELWAY bus, FactoryLink can send/receive requests to/from the master for
between 2 to 15 slave addresses.
This slave addresses characteristic does not apply to
MAPWAY/ETHWAY/FIPWAY/ISAWAY/XWAYIP, first slave and last slave are used
to define the number of communication sockets to be used.
The communication devices use the first slave address only for unsolicited
messages and the successive addresses (from the first address + 1 to the last
address) for message data.
To make use of this characteristic, assign the slave numbers, 4 to 18, to the
communication device. To do this, specify the value 4 in the First Slave Address
Field and the value 18 in the Last Slave Address Field in the Telemecanique Logical
Station Control Information table. This allows FactoryLink to send/receive up to
15 messages at a time to/from the network.
These settings must be compatible with “the number of addresses” declared in the
CONFIG.SYS configuration file. Note the TSX 37.xx PLCs can only poll 8
addresses if connected through the TER port.
For other XWAY protocols, the first slave/cost slave addresses are used to define
the number of communication sockets to be used. For example, 5-15 on ETHWAY
asks for 10 communication sockets.
30
TSX programming port can handle a maximum of 2 communication sockets. This
protocol is used with PCX PLC board.
Telemecanique
UNI-TE is a master-slave protocol. FactoryLink is always seen as slave. All
FactoryLink requests travel throuth the master. Response time may be impotant
if UNI-TE network has a lot of connection points.
It's recommended to declare the exact number of slaves in the master PLC. In
fact, any slave declared and missing will have slow down the pool cycle. The
FactoryLink 6.6.0 / Device Interface Guide / 787
•
REFERENCE
•
Configuring the Slaves and the TW7 Data Fields
•
•
master will have to retry several times the request and to wait each time the
response timeout.
When running, FactoryLink tries to connect to the PLCs defined in the
configuration tables. Connections may take several minutes if the network has a
significant number of slaves.
For best performences, install a PLC with two UNI-TE networks; one to collect the
data and another where FactoryLink will be the only slave.
XWAY Configuration Drivers
Xway driver default settings ( ETHWAY, FIPWAY, UNI-TELWAY) must be tuned
for FactoryLink:
For ETHWAY driver follow this procedure:
1 Call the configuration pannel (Start Menu - Settings - Control Panel)
2 Double click on the Network Icon
3 Select the ETHWAY01 or ETHWAY02 protocol
4 Click on "Properties"
5 Click on the "Advanced" tab
6 Select "7 - Number of Send Buffers", and set the value to 50
7 Select "8 - Number of Receive Buffers", and set the value to 50
8 Click on "OK" to validate your modifications
9 Exit the Network Configuration Pannel. The new settings are now active.
Note: The performance may degraded if a PLC on the network
is broken. This degradation can be minimized by changing the
RetryPeriod parameter of the ETHWAY driver from the default
of 800 to 100.
For Windows 95
1 Open the Control Panel by clicking Start Menu>Settings>Control Panel.
2 Double-click the Network icon.
788 / FactoryLink 6.6.0 / Device Interface Guide
REFERENCE
Configuring the Slaves and the TW7 Data Fields
3 On the Configuration tab of the Network property sheet, select ETHWAY01 or
ETHWAY02.
4 Click Properties>Advanced.
5 Select "4 - "Retry Period", and set 100
6 Click OK to enter the modifications
For Windows NT
1 Open the Control Panel by clicking Start Menu>Settings>Control Panel.
2 Double click on the Network Icon
3 On the Protocols tab of the Network property sheet, select ETHWAY01 or
ETHWAY02.
4 Click "Properties"
5 Set Retry Period field to 100.
6 Click OK to enter the modification.
For UNI-TELWAY
1 Run icon UNI-TELWAY
2 Select File, Advanced Configuration
3 Set the value 50 to SBUF et RBUF
For FIPWAY version 2.1 or earlier
30
1 Rename the dll x:\xdosdrv\cnffip_y.dll in cnffip.dll, where x:\ = Base folder
1 Double click on cnffip.exe
2 Select File, advanced configuration
3 Set 50 to SBUF et RBUF
For versions later than 2.1, refer to the procedure for UNI-TELWAY.
FactoryLink 6.6.0 / Device Interface Guide / 789
Telemecanique
where the driver fip is installed, xdosdrv = Folder where the drivers XWAY are
installed, _y= f for french, e for english , g for german.
•
REFERENCE
•
Configuring the Slaves and the TW7 Data Fields
•
•
TW7
Messages of up to 128 bytes in length can be transferred by UNI-TELWAY or
MAPWAY. Messages transferred by a TELWAY network cannot be more than 32
bytes in length. However, if a message must transit via a TELWAY network to
reach its final destination, specify YES in the TW7 field in the Telemecanique
Logical Station Configuration table.
790 / FactoryLink 6.6.0 / Device Interface Guide
REFERENCE
Network Examples
N ETWORK E XAMPLES
FactoryLink communicates directly with the PLCs via UNI-TELWAY or
MAPWAY/ETHWAY/FIPWAY (refer to example 1). Each PLC can, in turn, control
a lower level network of interconnected PLCs via UNI-TELWAY, MAPWAY,
ETHWAY, FIPWAY, ISAWAY, XWAYIP, or TELWAY (refer to Example 2).
FactoryLink communicates with the PLCs on these lower level networks via the
PLC common to both networks.
Each PLC on a network must be assigned the same drop number as the group of
stations to which it belongs. The drop number specifies which group of stations
the messages are sent to.
A UNI-TELWAY bus has one master. All other logical devices (LSTAx) are slaves.
A MAPWAY/ETHWAY/FIPWAY/ISAWAY/XWAYIP network has neither master nor
slave addresses.
Example 1: 1 FactoryLink, 1 network and 1 PLC.
In this example, FactoryLink communicates with LSTA0 on the MAPWAY
network.
Figure 30-0 Network Example 1
FactoryLink
X-WAY Network
30
FactoryLink 6.6.0 / Device Interface Guide / 791
Telemecanique
Device LSTAO
•
REFERENCE
•
Network Examples
•
•
Example 2: 1 FactoryLink system, 3 networks and 8 PLCs.
In this example, FactoryLink communicates with LSTA0 and LSTA4 via a
MAPWAY network.
A lower level UNI-TELWAY bus is connected to LSTA4 and a lower level TELWAY
network is connected to LSTA0.
Figure 30-0 Network Example 2
Monitor 77/2
LSTA 8 TO 23
X-WAY Network (net = 1)
(Sta (2))
(Sta (1))
TELWAY
Network
(net = 2)
Device
Device
LSTAO
(Drop0)
LSTA4
(Drop1)
Device
Device
(sta1)
(sta3)
LSTA1
(Drop0)
LSTA5
(Drop1)
Device
Device
LSTA2
(Drop0)
LSTA6
(Drop1)
Device
Master
Slave 16
UNI-TELWAY
Network
Slave 17
Device
Slave 18
(sta5)
LSTA3
(Drop0)
792 / FactoryLink 6.6.0 / Device Interface Guide
LSTA7
(Drop1)
REFERENCE
Network Examples
The configuration of these networks and of the lower level networks is set in the
Telemecanique Logical Stations Configuration table:
TELEMECANIQUE Logical Stations Control
Logical Port
TYPE
1
TEMAP1
TELEMECANIQUE Logical Station Information
Logical
Network
Station
Number
Station
Numbe
r
Gate
Module Device
Number Numbe Numbe
r
r
TW7
Drop
0
1
1
0
0
0
NO
0
1
2
1
0
0
0
YES
0
2
2
3
0
0
0
YES
0
3
2
5
0
0
0
YES
0
4
1
2
0
0
0
NO
1
5
1
2
5
3
74
NO
1
6
1
2
5
3
75
NO
1
7
1
2
5
3
76
NO
1
30
Telemecanique
FactoryLink 6.6.0 / Device Interface Guide / 793
•
REFERENCE
•
FactoryLink and TSX/PMX PLC Data Objects
•
•
F ACTORY L INK
AND
TSX/PMX PLC D ATA O BJECTS
This section describes how the FactoryLink communication system converts the
various types of data supported by Telemecanique PLCs for use with FactoryLink
and vice-versa.
It also provides instructions for filling in the PL7 Object field in the Read/Write
Configuration table.
Data Type Conversion
Each FactoryLink element specified in the Tag Name field in the read and write
tables is assigned a FactoryLink data type, a logical station, a corresponding PLC
memory address (specified in the PL7 Object field), and a PLC data type.
The data types supported by FactoryLink are different from those supported by
the PLCs. However, when writing to a FactoryLink data element from its
corresponding memory location in the PLC (PL7 Object), the software interface
converts the type of data from a PLC data object to a FactoryLink data object type.
In the same way, when writing to a PLC memory location (PL7 Object) from a
FactoryLink data element, the software interface converts the type of data from a
FactoryLink data object to a PLC data object type.
The following types of data objects are supported by the PLCs:
• Bit: BIT
• Single-length word (16-bits): WORD
• Double-length word (32-bits): DWORD
• Double-length floating point word objects: FDWORD
• Text (only for unsolicited data): TXT
• FactoryLink supports the following data types:
• Digital
• Analog
• Long Analog
• Floating-point
• Message (only for reading unsolicited data)
794 / FactoryLink 6.6.0 / Device Interface Guide
REFERENCE
FactoryLink and TSX/PMX PLC Data Objects
Conversion Process
Bit, single-length word, and double-length word data objects can be converted
respectively to/from FactoryLink digital, analog and floating-point elements.
Converting a PLC Data Object to a FactoryLink Data Object
The FactoryLink communication system converts PLC data object types: bits,
single-length words, and double-length words respectively into FactoryLink
digital, analog and floating-point data objects.
1. The task places the PLC data object to convert in the LSBs of a 32-bit word and
assigns the value 0 to non-significant bits.
2. The task then converts the complete 32-bit unsigned word into a FactoryLink
data element value.
If a digital type data object is required, the task performs the following
conversion: data value equal to 0, then the element takes the value 0 (OFF).
Data value not 0, then the element takes the value 1 (ON).
If an analog data object is required, the task performs the following conversion:
the 32-bit word is reduced to a 16-bit length word, then copied to the analog
data element. If the data object is a DWORD, the 16-bit MSB data is lost.
If a floating-point data object is required, the task performs the following
conversion: the 32-bit word is converted into a floating-point positive value,
then copied to the FactoryLink floating-point data element.
The PLC text type elements and the FactoryLink message type elements do
not require conversion. The sign extension is not implemented.
Converting a FactoryLink Data Element Into a PLC Data Object
1. The task places the FactoryLink data object to convert in the LSBs of a 32-bit
word and assigns the value 0 to non-significant bits.
2. The task then converts the complete 32-bit unsigned word into a PLC data
object value.
If a bit type data object is required, the task performs the following conversion:
data value equal to 0, then the bit is set to 0. Data value not 0, then the bit is
FactoryLink 6.6.0 / Device Interface Guide / 795
Telemecanique
The PLC Interface task converts FactoryLink digital, analog and floating-point
values respectively into PLC bit, single-length words and double-length word data
objects.
30
•
REFERENCE
•
FactoryLink and TSX/PMX PLC Data Objects
•
•
set to 1 (digital data elements equal 0 when inactive (OFF) and 1 when active
(ON)).
If a word type data object is required, the task performs the following
conversion: the 32-bit word is reduced to a 16-bit length word, then copied to a
PLC single-length word. If a floating-point data object is selected, the sign and
16
the decimal part are lost. In addition, if the integer part exceeds 2 -1, it is
cropped.
If a double-word data object is required, the task performs the following
conversion: the 32-bit word is entirely written to a PLC double word data
object.
The sign extension is not implemented.
Telemecanique PLC Objects
Depending on the type of data used, PLC data objects (memory addresses) can be
placed in the following categories:
• Bit objects
• Single-length word objects (WORD)
• Double-length word objects (DWORD)
• Double-length floating point word objects (FDWORD)
• I/O objects (I/O)
The names of PLC objects are specified in the PL7 Object field in the
Telemecanique Read/Write Configuration table in symbolic language, depending
on the type, function, and address of the data object.
Refer to the following tables to determine the symbolic representations valid for
PLC objects. Entry of the corresponding symbol in the PL7 Object field is not case
sensitive. Space characters are not allowed.
If a logical station is assigned to a TSX 37-xx PLC type, it is recommended to use
the standard IEC syntax (%MWi, %Si,...). However, it is still possible to use the
TSX V5 syntax (Wi, SYi,...), this allows it to connect to a TSX 37-xx PLC without
rewriting the communication tables of an existing application.
Note: PCX57 is an ATS (TSX57-xx, TSX37-xx) PLC type, so use
the ATS syntax. The available objects are the implemented
objects for ATS PLCs.
796 / FactoryLink 6.6.0 / Device Interface Guide
REFERENCE
FactoryLink and TSX/PMX PLC Data Objects
Table 30-0 Bit Objects
Object
Symbolic representation
TXS Syntax/ATS Syntax
Addressing
range (TSX /ATS)
Internal bit
Read/Write
Bi/%Hi/MI
i: internal bit number
i = 0 to 4095 / 0 to 255
System bit
Read/Write
SYi/Si
i: system bit number
i = 0 to 127/ idea
Table 30-0 Single-length word objects (WORD)
Object
Symbolic representation
TXS Syntax / ATS Syntax
Addressing
range (TSX /ATS)
Internal word
Read/Write
Wi/% MWi
i: internal word number
i = 0 to 32597 / 0 to
16384
Bit taken from an
internal word
read
Wi,b/%MWi,b
i : internal word number
b : bit number in hex.
i = 0 to 32597 /
0 to 16384
b = 0 to F
Constant word
read
CWi/%KWi
i : constant word number
i = 0 to 26206
Bit from constant
word read
CWi,b/%KWi,b
i : constant word number
b : bit number in hex.
i = 0 to 26206
b = 0 to F
30
System word
read/write
SWi/%SWi
i : system word
i = 0 to 127
Bit from system
word read
SWi,b/%SWi,b
i : system word number
b : bit number in hex.
i = 0 to 127
b = 0 to F
Common word
read/write
COMi,j/Not implemented
i : station number
j : common word number
i = 0 to 63
j = 0 to 63
Telemecanique
FactoryLink 6.6.0 / Device Interface Guide / 797
•
REFERENCE
•
FactoryLink and TSX/PMX PLC Data Objects
•
•
Table 30-0 Single-length word objects (WORD) (Continued)
Object
Symbolic representation
TXS Syntax / ATS Syntax
Bit from
COMi,j,b / Not implemented
commonword read i : station number
j : common word number
b : bit number in hex.
Addressing
range (TSX /ATS)
i = 0 to 63
j = 0 to 63
b = 0 to F
Table 30-0 Double-length word objects (DWORD)
Symbolic representation
TXS Syntax / ATS Syntax
Addressing
range (TSX /ATS)
Double-length internal
word
Read/Write
DWi / %MDi
i : double internal word number
i = 0 to 32596 / 0 to
16384
Bit from
double-length
internal word
read
DWi,b / %MDi,b
i : double internal word number
b : bit number in hex.
i = 0 to 32596 / 0 to
16384
b = 0 to 1F
Double-length
constant word
read
CDWi / % KDi
i : double constant word number
i = 0 to 26206
Bit from
double-length
constant word
read
CDWi,b / %KDi,b
i : double constant word number
b : bit number in hex.
i = 0 to 26206
b = 0 to 1F
Object
798 / FactoryLink 6.6.0 / Device Interface Guide
REFERENCE
FactoryLink and TSX/PMX PLC Data Objects
Table 30-0 Double-length floating point word objects: FDWORD
Symbolic representation
TXS Syntax / ATS Syntax
Object
Addressing
range (TSX /ATS)
Double-length
floating point
constant word read
FCDWi / %KFi
i: constant float word number
i = 0 to 32596 / 0 to
16384
Double-length
floating point word
read/write
FCDWi,b / %MFi,b
i : float internal word number
i = 0 to 32596 / 0 to
16384
The floating point numbers are stored with IEEE single precision format (32 bits)
inside the PLC and with IEEE double precision format (64 bits) inside
FactoryLink. This may induce a lost of precision when exchanging data between
the PLC and FactoryLink.
Table 30-0 I/O objects (I/O)
Object
Symbolic representation
TXS Syntax / ATS Syntax
Addressing
range (TSX /ATS)
Ixy,b / Not implemented
x : rack number in hex.
y : module number in hex.
b : bit number in hex.
x = 0 to F
y = 0 to 7
b = 0 to F
Discrete I/O module
output bit
write
Oxy,b / Not implemented
x : rack number in hex.
y : module number in hex.
b : bit number in hex.
x = 0 to F
y = 0 to 7
b = 0 to F
Register bit
read
IWxy,i / Not implemented
x : rack number in hex.
y : module number in hex.
i : word number
x = 0 to F
y = 0 to 7
i = 0 to 7
FactoryLink 6.6.0 / Device Interface Guide / 799
30
Telemecanique
Discrete I/O module
input bit
read
•
REFERENCE
•
FactoryLink and TSX/PMX PLC Data Objects
•
•
Table 30-0 I/O objects (I/O) (Continued)
Symbolic representation
TXS Syntax / ATS Syntax
Object
Addressing
range (TSX /ATS)
Bit from read
register word read
IWxy,i,b / Not implemented
x : rack number in hex.
y : module number in hex.
i : word number
b : bit number in hex.
x = 0 to F
y = 0 to 7
i = 0 to 7
b = 0 to F
Write register word
OWxy,i / Not implemented
x : rack number in hex.
y : module number in hex.
i : word number
x = 0 to F
y = 0 to 7
i = 0 to 7
Bit assigned to
Grafcet read
Xi / Not implemented
i : step number
i = 0 to 511
Read Timer
Ti,P/V/R/D / Not Implemented
i : timer number
P : preset value
V : current value
R : timer running
D : timer done
i = 0 to 127
Timer Write
preset word
Ti,P / Not implemented
i : timer number
i = 0 to 127
Monostable Read
Mi,P/V/R / Not implemented
i : monostable value
P : preset value
V : current value
R : monostable running
i = 0 to 31
Monostable Write
preset word
Mi,P / Not implemented
i : monostable number
i = 0 to 31
Read
Up/DownCounter
Ci,P/V/E/F / Not implemented
i : counter number
P : preset value
V : current value
E : upcount overflow
F : downcount overflow
i = 0 to 255
800 / FactoryLink 6.6.0 / Device Interface Guide
REFERENCE
FactoryLink and TSX/PMX PLC Data Objects
Table 30-0 I/O objects (I/O) (Continued)
Symbolic representation
TXS Syntax / ATS Syntax
Object
Addressing
range (TSX /ATS)
Up/Down Counter
Write preset word
Ci,P / Not implemented
i : counter number
i = 0 to 255
Read register
Ri,I/O/E/F / Not implemented
i : register number
I : input word
O : output word
E : empty register
F : full register
i = 0 to 127
Register Input word
write
Ri,I / Not implemented
i : register number
i = 0 to 127
Num Objects
FactoryLink allows access to a sub-group of NUM programmed in ladder objects.
The list is:
• Saved variables ( %Mi )
• Non-saved variables ( %Vi )
• Common words (%Si )
30
Telemecanique
FactoryLink 6.6.0 / Device Interface Guide / 801
•
REFERENCE
•
FactoryLink and TSX/PMX PLC Data Objects
•
•
Table 30-0 Num Objects
Symbolic
representatio
n Num
syntax
Object
Saved Variables
Word
Double Word
Bit from Word
Addressing
range
Read/Write
Read/Write
Read
%Mi.W
%Mi.L
%Mi.j
i=< 77FE
i=< 77FC
i=< 77FE, j<8
Non-Saved Variables
Word
Read/Write
Double Word
Read/Write
Bit from Word
Read
%Vi.W
%Vi.L
%Vi.j
i=< 77FE
i=<= 77FC
i=< 77FE, j<8
Common Word
Word
%Si.W
i=< 3F7E *
Read/Write
i = hexadecimal address of the object
j = Number of the bit in the word
* For this object, only addresses where the low byte is lower or equal to H7E are
allowed.
802 / FactoryLink 6.6.0 / Device Interface Guide
REFERENCE
FactoryLink and TSX/PMX PLC Data Objects
Caution: For NUM two words are consecutive and disjoin if
they are separated by 2 unities. And in the same
way two long words have to be separated by 4
unities.
Table 30-0
Wi
Wi+1
Wi+2
high Byte
Low Byte
high Byte
Low Byte
High Byte
Low Byte
As result
To take avantage of the algorithm which minimizes the number of requests, it’s
recommended to write odd word series or even word series. For long word write
series of long word equal modulo 4.
Examples :
Read table Tab0 = %M0.W,%M2.W,%M1A.W,W78.W generates 1 read request of
60 words.
Read table Tab1 = %M11.W,%M1B.W,%M1D.W,%M20.W,%M23.W,%M25.W
generates 3 read requests. Reading of 7 words from %M11.W, Reding of the word
%M20 and reading of 2 words from %M23.
Read table Tab2 = %V25.L,%V29.L,%V2D.L,%V2E.L,%V32.L,%V34.L,%V36.L
generates 4 requests. Reading of 3 long words from %V25.L, Reading of 2 long
words from %V2E.L , Reading of long word %V32.L and Reading of long word
%V34.L.
Write table Tab4 =
%M100.L,%M104.L,%M108.L,%M10A.L,%M10C.L,%M10D.L,%M111.L generates
4 write requests. Writing of 3 long words from %M100.L, writing of %M10A.L,
writing of %M10C.L and writing of 2 long words from %M10D.L
FactoryLink 6.6.0 / Device Interface Guide / 803
Telemecanique
Write table Tab3 = %S10.W,%S12.W,%S16.W,%S17.W generates3 write requests.
Writing of 2 words from %S10.W, writing word %S16.W and writing word %S17.W.
30
•
REFERENCE
•
Unsolicited Data Configuration Example
•
•
For NUM only the bits from 0 to 7 are available and are coded with the high byte
of the word.
Table 30-0
Wi
b7, b6, b5, b4, b3, b2, b1, b0 //////////////////////////////////
Wi+1
b7, b6, b5, b4, b3, b2, b1, b0
U NSOLICITED D ATA C ONFIGURATION E XAMPLE
When FactoryLink receives unsolicited data from a PLC, it compares the UNI-TE
address of the data received (a PLC and sender text block function) with the
addresses of the logical stations assigned to the message type elements in the
configuration tables. If a matching address is found, it automatically updates the
element assigned to this address using the data of the request received.
A single Message type element must be assigned to a logical station; otherwise,
only the first element encountered in the table with the lowest number will be
updated.
On a UNI-TELWAY bus, Serial Port:
• Master PLC:
Unsolicited data is generated by a master PLC from a text block. Configure the
CPL type text block TXT, for OUTPUT with:
TXTi,C = H’FC’
TXTi,M = H’xx65’ where xx is the location of the TSX SCM module in the rack
(FF for the built-in TSX SCI port)
TXTi,L = Number of bytes to send.
• Slave PLC:
804 / FactoryLink 6.6.0 / Device Interface Guide
REFERENCE
Unsolicited Data Configuration Example
To send unsolicited data from a UNI-TELWAY slave to a FactoryLink system,
configure the CPL type text block for OUTPUT with:
TXTi,M = H’TSX SCM slot, sender address + 64’
TXTi,C = H’07FC’ Category/Request code
TXTi,L = 6 + number of usable bytes
If the transmission buffer address = Wi
Wi = H’network number/00’
Wi + 1 = H’gate number/station number’
Wi + 2 = H’ (64 + lowest Monitor 77 address) FE’ E.g. H’65FE’
Wi + 3 = Data to send
Example:
Master station on multi-drop bus 0.
M77 addresses 1 to 15.
Slave station: ad0 = H ‘10’ (16),
ad1 = H ‘11’ (17),
ad2 = H ‘12’ (18).
The UNI-TELWAY module is located in slot 3.
FactoryLink 6.6.0 / Device Interface Guide / 805
30
Telemecanique
In these examples, the lowest FactoryLink address (H’65’) corresponds to the
address of Slave 1. If FactoryLink uses other slave addresses such as 10 to 25 (also
referred to as data link addresses), the lowest address is H’6E’ (100+10 in decimal
notation).
•
REFERENCE
•
Unsolicited Data Configuration Example
•
•
Configure the following text block to send unsolicited data from a slave device to
FactoryLink:
TXTi for OUTPUT
TXTi,M = H’0375’ (slot 3, sender address (H’64’ + ad1))
TXTi,C = H’07FC’ (unsolicited data request code)
TXTi,L = 6 + n (n = number of bytes to send)
Address of Buffer Wi :
Wi
= H’0000’ (network number 0)
Wi + 1 = H’05FE’ (gate H’05’, station H’FE’)
Wi + 2 = H’65FE’ (Monitor 77 address H’64’ + 1)
Wi + 3 = data to send
On a MAPWAY/FIPWAY/ETHWAY network:
Configure the TXT type NET function block for OUTPUT with to send unsolicited
data from a network station to the FactoryLink system:
TXTi,A = H’Monitor 77 network/station address’
TXTi,T = 0 Monitor 77 reception text block number (always 0)
TXTi,L = 2 + number of bytes to send
Wi = H’07FC’ unsolicited data category/request code
Wi + 1 = data to send
806 / FactoryLink 6.6.0 / Device Interface Guide
REFERENCE
Unsolicited Data Configuration Example
Table 30-0 Logical Station Information Panel Entries
Network
Number
Station
Number
Gate
Number
Module
Number
Device
Number
0
FE
5
FE
74
0
FE
5
FE
74
1
7
11
0
0
In this example, the first station is configured to receive unsolicited data sent
from slave 17.
The second station is configured to receive unsolicited data sent by text block 3 of
the master PLC application.
The third station is configured to receive unsolicited data from text block 1 of a
PLC application connected to the network as station 7.
Table 30-0 Read/Write Information Panel Entries for Unsolicited Read
Logical
Station
Tag Name
PL7 Object
1
Unsol1
TXT
2
Unsol2
TXT
3
Unsol3
TXT
Unsol1: FactoryLink real-time database element updated on reception of
unsolicited data from slave 17.
Unsol3: FactoryLink real-time database element updated on reception of
unsolicited data from text block 1 of station number 7 on XWAY network 1.
FactoryLink 6.6.0 / Device Interface Guide / 807
Telemecanique
Unsol2: FactoryLink real-time database element updated on reception of
unsolicited data from master text block 3.
30
•
REFERENCE
•
Unsolicited Data Configuration Example
•
•
808 / FactoryLink 6.6.0 / Device Interface Guide
•
•
•
•
Chapter 31
Telemecanique Error
Messages
This chapter describes the messages reporting operations and error conditions
that can be generated and displayed for the Telemecanique protocol module.
Bad DCT file
Cause:
The specified file is corrupt.
Action:
Delete the files from the FLAPP\DCT directory and restart
FactoryLink.
Cannot connect LPORT <lport number>
Cause:
(UNI-TELWAY only) The master PLC does not poll the
UNI-TELWAY slaves as expected.
Action:
Ensure the UNI-TELWAY master PLC polls the range of
communication slaves configured for the task.
Cannot find duntiw01.sys configuration in config.sys
Cause:
TECOM has been invoked on UNI-TELWAY, and the associated
UNI-TELWAY driver is not installed in the system.
Action:
Install the UNI-TELWAY driver before invoking TECOM.
Cause:
The communication task cannot open the requested associated
communication driver.
Action:
Ensure the software driver is installed in the system.
FactoryLink 6.6.0 / Device Interface Guide / 809
Telemecanique
Cannot open driver <driver name>
31
•
TELEMECANIQUE ERROR MESSAGES
•
•
•
Cannot read edi configuration
Cause:
No external device definition is configured.
Action:
Configure the EDI panel for the device.
Cannot read te__ configuration
Cause:
No Telemecanique configuration is found.
Action:
Configure the Telemecanique panels.
Cannot send request (no remote ack)
Cause:
(ETHWAY only) An addressed PLC is not physically connected to
the network.
Action:
Ensure all addressed PLCs are physically connected to the
ETHWAY network.
duntlw01.sys ‘NBR=’ parameter too small (mini = 2)
Cause:
The UNI-TELWAY driver must be configured to respond for a
minimum of two slaves.
Action:
Modify the NBR field in the config.sys file.
Link is spurious
Cause:
(UNI-TELWAY only) An unexpected, unsolicited message has
been received.
Action:
Ensure the PLC is sending unsolicited messages to the first
UNI-TELWAY slave number reserved for this purpose.
810 / FactoryLink 6.6.0 / Device Interface Guide
TELEMECANIQUE ERROR MESSAGES
Link timeout from <LSTA xxx>
Cause:
The response from logical station <xxx> was not received within
the configured timeout period. The physical link may have been
broken while requests were still waiting for a response.
Action:
Increase the timeout value in the Telemecanique Logical Station
configuration panel.
Logical port definition missing
Cause:
The External Device Definition panel does not have a
TE__/CUSTOM logical port configured.
Action:
Configure the logical port on the External Device Definition
panel.
Cause:
The Telemecanique panel does not define a logical port on the
invoked XWAY network.
Action:
Define the logical port on the Telemecanique panel.
Cause:
Definitions on the EDI and Telemecanique panels don’t match.
Action:
Ensure the definitions match in both EDI and Telemecanique.
Lport slaves range is too small (mini=2)
Cause:
The Telemecanique communication task must use a minimum of
two slaves.
Action:
Ensure the first and last slave fields have been configured
properly.
Cause:
More than 200 block read tables are configured.
Action:
Ensure less than 200 block read tables are configured.
FactoryLink 6.6.0 / Device Interface Guide / 811
Telemecanique
Maximum table count reached for Block Read
31
•
TELEMECANIQUE ERROR MESSAGES
•
•
•
Maximum table count reached for Block Write
Cause:
More than 200 block write tables are configured.
Action:
Ensure less than 200 block write tables are configured.
Maximum table count reached for Exception Write
Cause:
More than 200 exception write tables are configured.
Action:
Ensure less than 200 exception write tables are configured.
Maximum table count reached for Unsolicited Read
Cause:
More than 200 unsolicited read tables are configured.
Action:
Ensure less than 200 unsolicited read tables are configured.
No DCT file for this port
Cause:
No read/write IO is configured for this logical port.
Action:
Configure the necessary read/write IO for the logical port.
No response from <LSTA xxx>
Cause:
FactoryLink tried to read/write non-configured objects in a PLC.
For example, FactoryLink may have tried to read 43545 internal
words but the PLC was configured for 32767 internal words.
Action:
Check to ensure the PLC is configured with the correct range.
Request refused (No station)
Cause:
The configured PLC address does not exist on the network.
Action:
Verify the PLC address.
812 / FactoryLink 6.6.0 / Device Interface Guide
TELEMECANIQUE ERROR MESSAGES
Run option not found
Cause:
The Telemecanique communications driver option bit is not
validated.
Action:
Install the option bit.
Unsol. datagram received on unexcepted slave
Cause:
An unsolicited message has been received on an unexcepted
communication socket.
Action:
Ensure the sender (PLC) addresses the message to a configured
logical station.
31
Telemecanique
FactoryLink 6.6.0 / Device Interface Guide / 813
•
TELEMECANIQUE ERROR MESSAGES
•
•
•
814 / FactoryLink 6.6.0 / Device Interface Guide
Index
A
A_TO_FL
conversion function 341
activate/deactive station command 492
active/inactive status 493
adapter mode/adapter station 551
ADD
definition 320
process function 338
address specification formats, KTDTL and
NetDTL 723
addressing, offlink with KTDTL and NetDTL
616
Allen-Bradley
address entries 238
data types 229
Ethernet interface 629
INTERCHANGE 629
interface modules 613
KTDTL and NetDTL data types and addresses 719
Logical Station Control panel 212
Logical Station Information panel 216
other programs using 613
overview 211
Read/Write Control panel 218
Read/Write Information panel 226
return codes, used with INTERCHANGE
and KTDTL and NetDTL 750
see also KTDTL and NetDTL
software interface 629
switch setup 249
AM process function 338
ANALOG 298
analog element
Allen-Bradley conversions 230
BCD3 234
BCD4 234, 235
BIN 234
conversion functions 343
FactoryLink element used in status 318
FLT4 235
FLT8 235
INT2 234
INT4 234
read holding or input register 118
read memory register 128, 130, 132, 167
tags in data conversion 508
write to holding register 153
write to memory register 165
AND process function 338
application design tips and techniques 179
application programs 278
application, testing 197
ASC to message 233
ASCII 277, 341
conversion function 341
in conversion 319
strings 462
associating digital element and bit 320
Index I-815
B
BCD conversion function 341
BCD3
analog 230
floating point 231
long analog 232
BCD4
analog 231
floating point 232
long analog 233
BIN
analog 230
data type 693, 702, 720, 722
digital 230
floating point 231
long analog 232
message 233
bit-level addresses 692, 702
block write
block write request 140, 143
control panel entries 687–689
defined 673
how it works 674, 709
when to use 679
bridge identifier 645
bytes
basic concept 307
in design flexibility 301
C
cable connections
description and diagrams 79
Modbus Plus diagram 401
overview 64
Siemens H1 diagram 505
Square D diagram 536
I-816 FactoryLink 6.6.0
types of 79
worksheet 80
capabilities, limitations, and trade-offs for
General Purpose Interface 279
carrier detect 76
cascaded loop 189–191, 714–716
cascading tables 189
checksum
in error checking schemes 302
limitations of GPI 279
non-printable characters 317
clear to send 76
clearing change-status indicators 630
codes 600, 602, 603
coil register
see also read coil or input status register
write digital element to 163
COM ports
COM143 default string 462
COM535 default string 462
configuring 84–89
identifying 87
combination read request 113
combination write request 148, 175
command protocols, GPI 346
command response timeout 637
Command/Response Control panel
General Purpose Interface 289
Command/Response Information panel
General Purpose Interface 293
Command/Response table
General Purpose Interface 287
commands, logical station 492
common errors 196
see also messages and codes
communications
Allen-Bradley