Professional Documents
Culture Documents
68P02956C55-C
Motorola radio communications products are warranted to be free from defects in material and workmanship for a
period of ONE (1) YEAR, (except for crystals and channel elements which are warranted for a period of ten (10) years),
from the date of shipment. Parts, including crystals and channel elements, will be replaced free of charge for the full
warranty period but the labor to replace defective parts will only be provided for one Hundred-Twenty (120) days from
the date of shipment. Thereafter purchaser must pay for the labor involved in repairing the product or replacing the
parts at the prevailing rates together with any transportation charges to or from the place where warranty service is
provided. This express warranty is extended by Motorola Communications and Electronics Inc., 1301 E. Algonquin
Road, Schaumburg, Illinois 60196, to the original purchaser only, and only to those purchasing for purpose of leasing or
solely for commercial, industrial, or governmental use.
THIS WARRANTY IS GIVEN IN LIEU OF ALL OTHER WARRANTIES EXPRESS OR IMPLIED WHICH ARE
SPECIFICALLY EXCLUDED, INCLUDING WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE. IN NO EVENT SHALL MOTOROLA BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
DAMAGES TO THE FULL EXTENT SUCH MAY BE DISCLAIMED BY LAW.
In the event of a defect, malfunction or failure to conform to specifications established by seller, or if appropriate, to
specifications accepted by Seller in writing, during the period shown, Motorola, at its option, will either repair or replace
the product or refund the purchase price thereof, and such action on the part of Motorola shall be the full extent of
Motorola’s liability hereunder.
a. the product is used in other than its normal and customary manner;
c. unauthorized alterations or repairs have been made, or unapproved parts used in the equipment.
This warranty extends only to individual products, batteries are excluded, but carry their own separate limited warranty.
Because each radio system is unique, Motorola disclaims liability for range, coverage, or operation of the system as a
whole under this warranty except by a separate written agreement signed by an officer of Motorola.
Non-Motorola manufactured products are excluded from this warranty, but subject to the warranty provided by their
manufacturers, a copy of which will be supplied to you on specific written request.
In order to obtain performance of this warranty, purchaser must contact its Motorola salesperson or Motorola at the
address first above shown, attention Quality Assurance Department.
The Motorola products described in this instruction manual may include copyrighted Motorola computer programs
stored in semi conductor memories or other media. Laws in the United States and other countries preserve for Motorola
certain exclusive rights for copyrighted computer programs including the exclusive right to copy or reproduce in any
form the copyrighted computer program. Accordingly, any copyrighted Motorola computer programs contained in the
Motorola products described in this instruction manual may not be copied or reproduced in any manner without the
express written permission of Motorola. Furthermore, the purchase of Motorola products shall not be deemed to grant
either directly or by implication, estoppel, or otherwise, any license under the copyrights, patents or patent applications
of Motorola, except for the normal non-exclusive, royalty free license to use that arises by operation of law in the sale of
a product.
Table of Contents
INTRODUCTION......................................................................................................................................................1
DATABASE CONCEPT.............................................................................................................................................2
Table Types ......................................................................................................................................................2
Single-Column Table.................................................................................................................................................... 2
Multiple-Column Table ................................................................................................................................................ 3
Single- and Multiple-Column Tables: A Comparison................................................................................................... 4
Table Groups....................................................................................................................................................4
User Tables ................................................................................................................................................................... 4
System Tables............................................................................................................................................................... 5
Constants Table ............................................................................................................................................................ 5
Data Types .......................................................................................................................................................6
Discrete – Internal Bit (bit) ........................................................................................................................................... 6
Integer Value – Internal Integer Value (int).................................................................................................................. 7
Real Value – Internal Real Value (real) ........................................................................................................................ 7
Integer Parameter – Internal Integer Parameter (iprm) ................................................................................................. 7
Real Parameter – Internal Real Parameter (rprm) ......................................................................................................... 7
Discrete Input (d-i) ....................................................................................................................................................... 7
Discrete Output (d-o) .................................................................................................................................................... 8
Value Input (v-i) ........................................................................................................................................................... 8
Value Output (v-o)........................................................................................................................................................ 8
Scaled Analog Input (sAI) ) .......................................................................................................................................... 9
Scaled Analog Output (sAO) )...................................................................................................................................... 10
Mapped Discrete (mbit) ................................................................................................................................................ 10
Mapped Value (mval) ................................................................................................................................................... 11
Hours Timer (Hr:Mn) ................................................................................................................................................... 11
Minutes Timer (Mn:Sc) ................................................................................................................................................ 11
Seconds Timer (Sc:Ms)................................................................................................................................................. 11
Pulses Per Hour (pph) )................................................................................................................................................. 12
Time-Tagged DI (TgDI) ............................................................................................................................................... 12
Programmable Ladder Controller (plc_vi, plc_vo, plc_di, plc_do, plc_ri, plc_ro) ....................................................... 12
Index ............................................................................................................................................................................. 12
Constants ...................................................................................................................................................................... 13
LADDER DIAGRAM LANGUAGE .............................................................................................................................14
“Inputs” and “Outputs” ..................................................................................................................................14
Variables ..........................................................................................................................................................15
Ladder Diagram Elements ...............................................................................................................................15
“Normally-Open (N.O.) Contact” Element................................................................................................................... 15
“Relay On” Element ..................................................................................................................................................... 16
“Normally-Closed (N.C.) Contact” Element................................................................................................................. 17
“Relay Off” Element..................................................................................................................................................... 18
Comparators.................................................................................................................................................................. 19
“Relay Latch”, “Relay Unlatch” Elements ................................................................................................................... 20
Reset ............................................................................................................................................................................. 22
Timers........................................................................................................................................................................... 22
Differentiators: Positive (UP), Negative (DOWN) ........................................................................................................ 29
Count Up, Count Down ................................................................................................................................................ 32
i
Jump ............................................................................................................................................................................. 33
Scan .............................................................................................................................................................................. 34
Move Low, Move High................................................................................................................................................. 35
Arithmetical Calculations ............................................................................................................................................. 42
Boolean Algebraic Operations – AND, OR, XOR........................................................................................................ 43
Calc............................................................................................................................................................................... 43
Jump To Subprocess, Return ........................................................................................................................................ 46
Send .............................................................................................................................................................................. 48
Logical Shift to Left/Right............................................................................................................................................ 48
Arithmetical Shift to Left/Right.................................................................................................................................... 49
Rotate to Left/Right ...................................................................................................................................................... 49
Call ............................................................................................................................................................................... 50
Run Process .................................................................................................................................................................. 52
Conversion of Variable Notation .................................................................................................................................. 54
Copy Columns .............................................................................................................................................................. 54
User Call Function (UCL) ............................................................................................................................................ 55
Ladder Diagram Reference..............................................................................................................................55
Input Elements .............................................................................................................................................................. 56
Output Elements ........................................................................................................................................................... 56
APPLICATION PROGRAMMER.................................................................................................................................58
Application Programmer Window ...................................................................................................................58
Project..............................................................................................................................................................60
New............................................................................................................................................................................... 60
Open ............................................................................................................................................................................. 61
Close ............................................................................................................................................................................. 62
Save .............................................................................................................................................................................. 62
Save As ......................................................................................................................................................................... 62
Delete............................................................................................................................................................................ 62
Import Site Configuration ............................................................................................................................................. 63
Select Site Configuration File ....................................................................................................................................... 64
Import I/O Link File ..................................................................................................................................................... 65
Create Printable File ..................................................................................................................................................... 65
Create Central File ........................................................................................................................................................ 65
Database Builder .............................................................................................................................................65
User Tables ................................................................................................................................................................... 67
System Tables............................................................................................................................................................... 67
Constant Tables ............................................................................................................................................................ 68
Appending a Table........................................................................................................................................................ 68
Editing a Table.............................................................................................................................................................. 69
Variable and Duplicated Column Search ...................................................................................................................... 75
Database Building Examples ........................................................................................................................................ 77
Process Programming......................................................................................................................................79
Searching a Rung.......................................................................................................................................................... 80
Searching a Name ......................................................................................................................................................... 81
Rung Editor................................................................................................................................................................... 81
Examples of Building a Rung Sequence ....................................................................................................................... 86
I/O Link ............................................................................................................................................................88
I/O Link Column Definition ......................................................................................................................................... 90
Connect Items ............................................................................................................................................................... 91
Compiler...........................................................................................................................................................94
ii
Show Compiler Messages............................................................................................................................................. 96
Download Application/Network.......................................................................................................................96
Compress/Download ........................................................................................................................................98
Upload and Uncompress ............................................................................................................................................... 99
Monitor Mode ..................................................................................................................................................99
Database Monitoring..................................................................................................................................................... 100
Monitoring Snapshot..................................................................................................................................................... 102
Process Monitoring ....................................................................................................................................................... 102
Performance Monitor Table.......................................................................................................................................... 105
The Import Option............................................................................................................................................107
The Upgrade Option ........................................................................................................................................110
The File Editor Option .....................................................................................................................................110
The ToolBox Browse Function.........................................................................................................................111
ToolBox Editor.................................................................................................................................................112
SYSTEM AND CONSTANT TABLES .......................................................................................................................... 115
System Tables................................................................................................................................................... 115
Constant Tables................................................................................................................................................ 115
Tables Descriptions.......................................................................................................................................... 117
RTU-to-RTU Com Buff and RTU-RTU Frame Types ...................................................................................................117
Time & Date Table .........................................................................................................................................................117
Index Table .....................................................................................................................................................................120
Reserved Flags Table......................................................................................................................................................123
Performance Monitor Table............................................................................................................................................128
User Ports Table .............................................................................................................................................................128
Site table .........................................................................................................................................................................128
Tx Event Table ...............................................................................................................................................................128
Data Burst Table .............................................................................................................................................................128
Reserved Values Table ...................................................................................................................................................128
PRMEVENT TABLE .....................................................................................................................................................129
PLC Table.......................................................................................................................................................................130
USER DEFINED LOCAL PORTS ............................................................................................................................... 131
User Ports Table .............................................................................................................................................. 132
PTxFlg Variable and SEND Operator.............................................................................................................................132
PRxFlg Variable .............................................................................................................................................................136
PRxChr Variable and GetChr Function ..........................................................................................................................136
PRxNum Variable and GetDgt Function ........................................................................................................................137
PrtFal Variable................................................................................................................................................................138
PrtMod, Protcl and PrtRat Variables...............................................................................................................................138
Ready and NotRdy Functions .........................................................................................................................................140
Example of Building Local Communication Processes.................................................................................... 140
Database Definitions.......................................................................................................................................................141
Main Process...................................................................................................................................................................143
HeadrP Subprocess .........................................................................................................................................................144
KeyInP Subprocess .........................................................................................................................................................144
OutP Subprocess.............................................................................................................................................................145
USER DEFINED MDLC COMMUNICATION ............................................................................................................. 146
Central-to-RTU Data Transfer......................................................................................................................... 146
Central-to-RTU Broadcast............................................................................................................................... 148
RTU Event Reporting (IGC/M old central only) .............................................................................................. 148
RTU-to-RTU Communication Guidelines ........................................................................................................ 149
iii
Variables/Constants & Functions Used for MDLC Communication ............................................................... 149
Variables/Constants ........................................................................................................................................................149
Communication Functions available via the CALL Function.........................................................................................149
Site table........................................................................................................................................................... 150
RTU-to-RTU Communication .......................................................................................................................... 152
RTU-to-RTU Comm Buff / RTU-to-RTU Controls Tables............................................................................................152
Transmit Mode................................................................................................................................................................154
Receive Mode .................................................................................................................................................................155
Sequential Frame RTU-to-RTU Communication ............................................................................................. 156
RTU Event/Burst Reporting ............................................................................................................................. 157
TX Event Table...............................................................................................................................................................157
Event Definitions 1 and Event Definitions 2 Tables .......................................................................................................159
TxEvnt Function .............................................................................................................................................................159
Data Burst Table .............................................................................................................................................................160
Burst Function ................................................................................................................................................................161
Example of RTU-to-RTU Communication ....................................................................................................... 163
Site A Database...............................................................................................................................................................163
Site A User Rungs...........................................................................................................................................................166
Site B Database...............................................................................................................................................................169
Site B User Rungs...........................................................................................................................................................172
ADVANCED FEATURES
ACCESSING DATABASE VARIABLES VIA COORDINATES ........................................................................................174
Definitions........................................................................................................................................................175
X.25 PROTOCOL SUPPORT.....................................................................................................................................177
Service Provider Configuration .......................................................................................................................177
X.25 Service User Configuration .....................................................................................................................179
Site Configuration ............................................................................................................................................179
X.25 Service Configuration .......................................................................................................................................... 180
X.25 Service Provider................................................................................................................................................... 181
RTU Port Configuration ............................................................................................................................................... 183
X.25 Service User ......................................................................................................................................................... 186
File Menu...................................................................................................................................................................... 190
Edit Menu ..................................................................................................................................................................... 193
MDLC OVER PRIVATE DATATAC.........................................................................................................................195
RTU Site Configuration....................................................................................................................................196
User Parameters for Port 2 and 3 .................................................................................................................................. 196
Physical Layer .............................................................................................................................................................. 196
Link Layer .................................................................................................................................................................... 196
MOSCAD User Application .............................................................................................................................197
IP Gateway Configuration ...............................................................................................................................197
MDLC OVER MPT1327........................................................................................................................................198
MDLC over MPT1327 Setup............................................................................................................................199
Radio Configuration ........................................................................................................................................199
RTU Site Configuration....................................................................................................................................200
User Parameters for Port 3............................................................................................................................................ 200
Physical Layer .............................................................................................................................................................. 200
MAP27 Convert Table......................................................................................................................................202
MDLC OVER IP ....................................................................................................................................................203
MDLC via Terminal Server..............................................................................................................................203
iv
MDLC via Astro IP ..........................................................................................................................................204
MDLC over IP Setup........................................................................................................................................205
RTU Site Configuration....................................................................................................................................205
User Parameters for Port 2 and Port 3........................................................................................................................... 206
Physical Layer .............................................................................................................................................................. 207
Link Layer .................................................................................................................................................................... 207
MDLC Session Logical Channels Advanced Parameters ............................................................................................. 208
MDLC over iDEN ............................................................................................................................................208
IP Gateway to RTU Communication ............................................................................................................................ 209
RTU to IP Gateway Communication ............................................................................................................................ 209
RTU to RTU Communication....................................................................................................................................... 210
Modem Session State/Paging........................................................................................................................................ 210
MDLC over iDEN Setup...................................................................................................................................210
RTU Site Configuration....................................................................................................................................210
User Parameters for Port 2 and Port 3........................................................................................................................... 211
Physical Layer .............................................................................................................................................................. 211
Link Layer .................................................................................................................................................................... 211
Modem Configuration ......................................................................................................................................212
Specific AT commands sent to the iDEN Modem .............................................................................................213
ToolBox over IP ...............................................................................................................................................213
IP Conversion Table ........................................................................................................................................214
IP Gateway Configuration ...............................................................................................................................214
Site Configuration......................................................................................................................................................... 214
IP Conversion Table ..................................................................................................................................................... 215
Download...................................................................................................................................................................... 215
User Application ..............................................................................................................................................215
MDLC via TELNET..........................................................................................................................................215
MOSCAD Ethernet Interface ...........................................................................................................................216
Configuring MOSCAD RTU with EPIB ...................................................................................................................... 218
Ethernet IP Interface Configurator Utility for IP Configuration ................................................................................... 218
AUTHENTICATION .................................................................................................................................................223
General ............................................................................................................................................................223
Synchronization................................................................................................................................................225
Authentication Setup ........................................................................................................................................226
Network Configuration ................................................................................................................................................. 227
Authentication Options ................................................................................................................................................. 229
Download...................................................................................................................................................................... 230
User Application ..............................................................................................................................................231
EVENT DRIVEN SOFTWARE ...................................................................................................................................232
Definitions........................................................................................................................................................232
Data Type...................................................................................................................................................................... 232
I/O Link ........................................................................................................................................................................ 232
Event Driven Mechanism .................................................................................................................................233
Event Driven Tables.........................................................................................................................................234
How to Use the Event Driven Software............................................................................................................235
Reading the TmMost and TmLeas Columns................................................................................................................. 237
INTRAC PROTOCOL .............................................................................................................................................241
Scope ................................................................................................................................................................241
Applicable Documents.................................................................................................................................................. 242
About the INTRAC Protocol ........................................................................................................................................ 242
v
Call Functions for INTRAC Protocol...............................................................................................................242
INTRAC Protocol Variable .......................................................................................................................................... 244
The INTRAC Free Format Protocol ............................................................................................................................. 246
Using the MEIC MDLC Protocol (RTU to RTU)......................................................................................................... 248
Channel Status Variables .............................................................................................................................................. 249
Channel Parameters ...................................................................................................................................................... 250
Site Configuration ............................................................................................................................................251
Rung Usage Examples......................................................................................................................................255
Handling an Analog Type INTRAC Frame .................................................................................................................. 255
Handling an MEIC MDLC Frame ................................................................................................................................ 256
DUAL CPU OPERATION ........................................................................................................................................259
Address Setting............................................................................................................................................................. 259
Physical Outputs ........................................................................................................................................................... 260
Using the Dual CPU Option ......................................................................................................................................... 260
Updating the Secondary................................................................................................................................................ 261
Flags and Diagnostics ................................................................................................................................................... 263
GLOBAL POSITIONING SYSTEM (GPS) ..................................................................................................................265
Setting the GPS Parameters.............................................................................................................................266
System Tables Variables ..................................................................................................................................267
GPS Cable........................................................................................................................................................267
PID LOOP - PROPORTIONAL INTEGRAL DERIVATIVE ...........................................................................................269
General ............................................................................................................................................................269
PID Function ...................................................................................................................................................270
PID Table.........................................................................................................................................................270
How to Use the PID .........................................................................................................................................272
MOSCAD PID Application Example ...............................................................................................................273
General.......................................................................................................................................................................... 273
Glossary ........................................................................................................................................................................ 273
PID control function ..................................................................................................................................................... 273
Operation mode ............................................................................................................................................................ 274
Validity Check .............................................................................................................................................................. 274
Database Tables ............................................................................................................................................................ 274
Programming Process Rungs ........................................................................................................................................ 279
vi
## 64 LEVEL = 0 ......................................................................................................................................................... 290
## 65 LEVEL = 1 ...................................................................................................................................................... 292
## 66 LEVEL = 10/11 ................................................................................................................................................ 293
MTE..................................................................................................................................................................293
## 80 LEVEL = 0 ...................................................................................................................................................... 293
## 81 LEVEL = 1 ...................................................................................................................................................... 294
## 82 LEVEL = 2 ...................................................................................................................................................... 294
LINK.................................................................................................................................................................294
## 112 LEVEL = 0 .................................................................................................................................................... 294
## 113 LEVEL = 1 .................................................................................................................................................... 296
## 115 LEVEL = 10/11 .............................................................................................................................................. 296
NETWORK STOCK (NSTOCK) ....................................................................................................................297
## 144 LEVEL = 0 .................................................................................................................................................... 297
## 145 LEVEL = 1 ..................................................................................................................................................... 297
## 146 LEVEL = 2 ...................................................................................................................................................... 297
## 151 LEVEL = 4 ...................................................................................................................................................... 297
USERROM (USRROM)..................................................................................................................................298
## 160 LEVEL = 0 .................................................................................................................................................... 298
## 161 LEVEL = 1 .................................................................................................................................................... 298
## 163 LEVEL = 1 ..................................................................................................................................................... 298
NETWORK (NETWRK)...................................................................................................................................299
## 180 LEVEL = 0 ..................................................................................................................................................... 299
## 181 LEVEL = 10/11 ............................................................................................................................................... 299
MINISESSION (WIDE , EVNT , STCL) ........................................................................................................299
## 200 LEVEL = 0 ..................................................................................................................................................... 300
## 201 LEVEL = 1 ..................................................................................................................................................... 301
## 202 LEVEL = 2 .................................................................................................................................................... 301
## 203 LEVEL = 3 .................................................................................................................................................... 302
## 204 LEVEL = 4 .................................................................................................................................................... 302
## 205 LEVEL = 5 .................................................................................................................................................... 302
## 206 LEVEL = 6 .................................................................................................................................................... 302
## 207 LEVEL = 7 .................................................................................................................................................... 302
## 208 LEVEL = 8 .................................................................................................................................................... 302
## 209 LEVEL = 9 .................................................................................................................................................... 303
## 210 LEVEL = 10/11 ............................................................................................................................................. 303
GAPRATIO (GPRTIO)................................................................................................................................303
## 220 LEVEL = 0 .................................................................................................................................................... 303
HDLC (RAD1P, RAD2P,...) ...........................................................................................................................304
## 260 LEVEL = 0 ................................................................................................................................................... 304
## 261 LEVEL = 1 ..................................................................................................................................................... 305
## 262 LEVEL = 2 ..................................................................................................................................................... 306
## 263 LEVEL = 3 ..................................................................................................................................................... 308
## 264 LEVEL = 4 ..................................................................................................................................................... 309
## 270 LEVEL = 10/11 .............................................................................................................................................. 310
## 271 ........................................................................................................................................................................... 310
UART................................................................................................................................................................311
## 280 ........................................................................................................................................................................... 311
## 281 ........................................................................................................................................................................... 312
## 282 ........................................................................................................................................................................... 313
## 283 ........................................................................................................................................................................... 315
vii
## 285 ........................................................................................................................................................................... 317
## 286 ........................................................................................................................................................................... 318
## 287 ........................................................................................................................................................................... 319
## 288 ........................................................................................................................................................................... 321
## 290 ........................................................................................................................................................................... 322
## 291 ........................................................................................................................................................................... 322
RADIO CHANNEL (RAD1C , RAD2C,…) .......................................................................................................323
## 300 LEVEL = 0 ....................................................................................................................................................... 323
## 301 ........................................................................................................................................................................... 324
## 302 LEVEL = 2 ..................................................................................................................................................... 324
## 303 LEVEL = 3 ..................................................................................................................................................... 326
TRUNK CHANNEL..........................................................................................................................................327
## 320 ........................................................................................................................................................................... 327
## 321 ........................................................................................................................................................................... 328
## 322 ........................................................................................................................................................................... 328
## 323 ........................................................................................................................................................................... 330
RS232 CHANNEL ............................................................................................................................................331
## 340 ........................................................................................................................................................................... 331
## 341 ........................................................................................................................................................................... 332
## 342 ........................................................................................................................................................................... 333
## 343 ........................................................................................................................................................................... 334
MODEM CHANNEL........................................................................................................................................335
## 360 ........................................................................................................................................................................... 335
## 361 ........................................................................................................................................................................... 336
## 362 ........................................................................................................................................................................... 337
## 363 ........................................................................................................................................................................... 339
TIMERS (10__MS , 100_MS , 1__SEC , 1__MIN).........................................................................................340
## 380 LEVEL = 0 ....................................................................................................................................................... 340
TIME-TAG (T_TAG) .......................................................................................................................................340
## 400 LEVEL = 0 ..................................................................................................................................................... 340
CO-PROCESSOR (MC68882) ........................................................................................................................341
## 420 LEVEL = 0 ..................................................................................................................................................... 341
## 421 LEVEL = 0 ..................................................................................................................................................... 341
## 422 LEVEL = 0 ..................................................................................................................................................... 341
## 423 LEVEL = 0 ..................................................................................................................................................... 341
DI .....................................................................................................................................................................341
I/O MODULES (R0M1 , R0M2 ,...).................................................................................................................341
## 500 LEVEL = 1 ....................................................................................................................................................... 341
8DO..................................................................................................................................................................342
## 501 LEVEL = 1 .................................................................................................................................................... 342
## 502 ........................................................................................................................................................................... 343
## 503 LEVEL = 1 ..................................................................................................................................................... 343
## 504 LEVEL = 1 .................................................................................................................................................... 344
MIX ..................................................................................................................................................................344
## 505 LEVEL = 1 ..................................................................................................................................................... 344
##506 (MIX , LEVEL = 2) ........................................................................................................................................ 345
DSP (AC ANALYZER)......................................................................................................................................346
## 507 LEVEL = 1 ..................................................................................................................................................... 346
## 508 (SC , LEVEL = 1) ........................................................................................................................................... 347
##510 ............................................................................................................................................................................ 348
viii
##511 ............................................................................................................................................................................ 348
##513 ............................................................................................................................................................................ 348
##518 ............................................................................................................................................................................ 348
##519 ............................................................................................................................................................................ 348
RS485 ...............................................................................................................................................................349
## 520 ........................................................................................................................................................................... 349
## 521 ........................................................................................................................................................................... 350
## 522 ........................................................................................................................................................................... 351
## 523 ........................................................................................................................................................................... 352
FLASHAPP (FLASHDB)................................................................................................................................353
## 600 LEVEL = 0................................................................................................................................................... 353
##601 LEVEL = 20 , 21 , ... , 39................................................................................................................................. 353
## 620 ........................................................................................................................................................................... 354
LDIALER (DIL2D , DIL 3D)..........................................................................................................................354
## 640 LEVEL = 0 ................................................................................................................................................... 354
## 641 LEVEL = 1 ...................................................................................................................................................... 355
(ML_DL) ..........................................................................................................................................................355
## 645 LEVEL = 0 ..................................................................................................................................................... 355
## 646 LEVEL = 1 ..................................................................................................................................................... 356
TOPLC (PLC1L, PLC2L, PLC3L) ...................................................................................................................356
##660 LEVEL = 0 ........................................................................................................................................................ 356
## 661 LEVEL = 1 ..................................................................................................................................................... 357
TOSCADA (PLC1L, PLC2L, PLC3L) .............................................................................................................357
## 670 LEVEL = 0 ....................................................................................................................................................... 357
## 671 LEVEL = 1 ..................................................................................................................................................... 358
SWITCHER ......................................................................................................................................................358
## 680 LEVEL = 0 .................................................................................................................................................... 358
## 681 LEVEL = 1 ................................................................................................................................................... 359
## 682 LEVEL = 2 ................................................................................................................................................... 359
FRAME - SEQ..................................................................................................................................................359
## 700 ........................................................................................................................................................................... 359
BURST - SEQ ...................................................................................................................................................360
## 710 ........................................................................................................................................................................... 360
ROUTER (X25_RTR) ......................................................................................................................................360
## 720 LEVEL = 0 .................................................................................................................................................... 360
## 722 LEVEL = 1 .................................................................................................................................................... 361
## 724 LEVEL = 30(X.25 OVER MDLC) 31(USER) ............................................................................................ 361
## 725 LEVEL = 10/11 .............................................................................................................................................. 361
X25 (X25 MDLC , X251X) .............................................................................................................................362
## 900 LEVEL = 0 .................................................................................................................................................... 362
## 901 LEVEL = 1 ...................................................................................................................................................... 362
## 902 LEVEL = 2 ...................................................................................................................................................... 362
## 903 LEVEL = 3 ..................................................................................................................................................... 363
LAPB (X251L)................................................................................................................................................363
## 920 LEVEL = 0 ................................................................................................................................................... 363
## 921 LEVEL = 1 ..................................................................................................................................................... 364
## 922 LEVEL = 2 ..................................................................................................................................................... 364
## 923 LEVEL = 3 ................................................................................................................................................... 365
PHONE BOOK LEVEL = 0 PHNBK ..........................................................................................................365
##940 ............................................................................................................................................................................ 365
ix
##941 ............................................................................................................................................................................ 365
TIMER EVENT.................................................................................................................................................366
##960 ............................................................................................................................................................................ 366
##961 ............................................................................................................................................................................ 366
POOLMNGR ....................................................................................................................................................367
## 1130 ......................................................................................................................................................................... 367
## 1131 ......................................................................................................................................................................... 367
## 1132 ......................................................................................................................................................................... 367
## 1140 ......................................................................................................................................................................... 368
OCOMM LEVEL = 0 ...................................................................................................................................368
## 1400 ......................................................................................................................................................................... 368
## 1401 LEVEL = 1 ................................................................................................................................................... 369
## 1410 ......................................................................................................................................................................... 370
## 1420 LEVEL = 20.................................................................................................................................................. 371
## 1430 ......................................................................................................................................................................... 371
## 1431 ......................................................................................................................................................................... 372
## 1440 ......................................................................................................................................................................... 372
FSKADP (OCOMC).........................................................................................................................................372
## 1500 LEVEL = 0 ................................................................................................................................................... 372
## 1501 LEVEL = 1.................................................................................................................................................. 373
## 1502 LEVEL = 2 ................................................................................................................................................... 374
## 1503 LEVEL = 3 ..................................................................................................................................................... 376
## 1504 LEVEL = 4 ..................................................................................................................................................... 376
## 1510 ......................................................................................................................................................................... 377
GPS ..................................................................................................................................................................378
## 1600 ......................................................................................................................................................................... 378
## 1601 LEVEL : 1....................................................................................................................................................... 379
## 1610 ......................................................................................................................................................................... 380
CAPPL .............................................................................................................................................................380
## 1650 LEVEL = 0.................................................................................................................................................. 380
## 1651 LEVEL = 1................................................................................................................................................... 381
## 1652 LEVEL = 2................................................................................................................................................... 381
## 1653 LEVEL = 3................................................................................................................................................... 381
## 1654 LEVEL = 4................................................................................................................................................. 381
## 1655 LEVEL = 5................................................................................................................................................... 382
SFLASH (CPU 400 only) .................................................................................................................................382
## 1730 LEVEL = 0................................................................................................................................................ 382
## 1731 LEVEL = 1................................................................................................................................................ 382
## 1732 LEVEL = 2................................................................................................................................................ 383
## 1733 LEVEL = 3................................................................................................................................................ 383
RxMyZ (MOSCAD-L only) ...............................................................................................................................383
## 2000 LEVEL = 0................................................................................................................................................ 383
## 2001 LEVEL = 0................................................................................................................................................ 383
## 2002 LEVEL = 0................................................................................................................................................ 383
## 2003 LEVEL = 1................................................................................................................................................ 384
## 2004 LEVEL = 0................................................................................................................................................ 384
## 2005 LEVEL = 0................................................................................................................................................ 384
## 2006 LEVEL = 0................................................................................................................................................ 384
## 2007 LEVEL = 0................................................................................................................................................ 384
CTRL (MOSCAD-L Only) ................................................................................................................................384
x
## 2013 LEVEL = 0................................................................................................................................................ 384
## 2014 LEVEL = 1................................................................................................................................................ 384
GAUART DEVICE = COMxA, RTUxA, LINxA.............................................................................................385
## 2020 LEVEL = 0................................................................................................................................................ 385
## 2021 LEVEL = 1................................................................................................................................................ 386
##2022 LEVEL = 2................................................................................................................................................. 387
## 2040 LEVEL = 0................................................................................................................................................ 388
SITTBL .............................................................................................................................................................388
## 2060 LEVEL = 0................................................................................................................................................ 388
## 2061 LEVEL = 1................................................................................................................................................ 388
IPLINK LINxL.............................................................................................................................................389
## 2200 LEVEL = 0................................................................................................................................................ 389
## 2201 LEVEL = 1................................................................................................................................................ 390
## 2202 LEVEL = 2................................................................................................................................................ 390
## 2203 LEVEL = 3................................................................................................................................................ 390
## 2210 LEVEL = 10, 11........................................................................................................................................ 391
SLIP LINxSlp...............................................................................................................................................392
## 2300 LEVEL = 0................................................................................................................................................ 392
## 2310 LEVEL = 10, 11........................................................................................................................................ 393
IPLINK LINxL.............................................................................................................................................393
## 2500 LEVEL = 100............................................................................................................................................ 393
## 2501 LEVEL = 101............................................................................................................................................ 394
##2502 LEVEL = 102............................................................................................................................................. 394
##2503 LEVEL = 103............................................................................................................................................. 395
##2504 LEVEL = 104............................................................................................................................................. 395
##2505 LEVEL = 105............................................................................................................................................. 395
## 2510 LEVEL = 110, 111.................................................................................................................................... 395
##2520 LEVEL = 100............................................................................................................................................. 396
##2521 LEVEL = 101............................................................................................................................................. 397
##2522 LEVEL = 102............................................................................................................................................. 398
##2523 LEVEL = 103............................................................................................................................................. 398
##2524 LEVEL = 104............................................................................................................................................. 399
##2525 LEVEL = 105............................................................................................................................................. 400
##2526 LEVEL = 106............................................................................................................................................. 401
##2527 LEVEL = 107............................................................................................................................................. 402
##2530 LEVEL = 110,111...................................................................................................................................... 402
##2540 LEVEL = 210,211...................................................................................................................................... 403
##2598 .......................................................................................................................................................................... 404
##2599 .......................................................................................................................................................................... 404
DMAP27 DEVICE = RADxD ........................................................................................................................404
##2700 LEVEL = 0 ...................................................................................................................................................... 404
##2710 LEVEL = 10,11................................................................................................................................................ 405
MPT1327 (PHYSICAL MODULE) DEVICE = RADxP................................................................................406
##2750 LEVEL = 0 ...................................................................................................................................................... 406
##2751 LEVEL = 1 ...................................................................................................................................................... 408
##2752 LEVEL = 2 ...................................................................................................................................................... 409
##2753 LEVEL = 2 ...................................................................................................................................................... 410
##2754 LEVEL = 3 ...................................................................................................................................................... 412
##2760 LEVEL = 10,11................................................................................................................................................ 412
IMAP27 ............................................................................................................................................................413
xi
##2800 LEVEL = 0 ...................................................................................................................................................... 413
##2801 LEVEL = 1 ...................................................................................................................................................... 413
##2802 LEVEL = 2 ...................................................................................................................................................... 414
##2810 LEVEL = 10,11................................................................................................................................................ 415
DESx ................................................................................................................................................................416
##2900 LEVEL = 0 ...................................................................................................................................................... 416
##2901 LEVEL = 1 ...................................................................................................................................................... 416
##2902 LEVEL = 2 ...................................................................................................................................................... 416
##2903 LEVEL = 2 ...................................................................................................................................................... 416
AUSYNC...........................................................................................................................................................417
##3000 LEVEL = 0 ...................................................................................................................................................... 417
##3001 LEVEL = 1 ...................................................................................................................................................... 418
##3002 LEVEL = 2 ...................................................................................................................................................... 418
##3010 LEVEL = 10 .................................................................................................................................................... 418
##3011 LEVEL = 11 .................................................................................................................................................... 419
TMAUTH..........................................................................................................................................................419
##3100 LEVEL = 0 ...................................................................................................................................................... 419
##3101 LEVEL = 1 ...................................................................................................................................................... 419
xii
Introduction
The ToolBox for MOSCAD RTUs Application Programmer is used to build a program or
control process to be executed by the RTU. You can create an application to retrieve
information from the unit (e.g. measure temperature, test if a button has been pressed) and to
perform operations on the equipment (e.g. activate a pump, turn on a light.)
The RTU is a computer, with a CPU, real-time clock, RAM and ROM memory, serial
communication ports, etc. Whether it is installed at some field site, acting as a controller, or
acting as the communications bridge between a radio (or other) communications system and
the Master Control Center, the RTU can perform compute, communicate, monitor and control,
based on the application program.
An application can be created off-line, without being connected to the actual RTU, and later
linked, compiled and downloaded to the unit for execution.
The application is written is Ladder Diagram Language and ‘C’ language, based on the
variables and entities defined in the database and the system setup (the Site and Network
Configuration described in the System Setup & Diagnostics Tools manual.)
This manual describes how to define the database, program the processes, link the variables in
the database to the physical I/Os (Input/Outputs) of the RTU, and download the application to
the unit. Included is a thorough description of the table-based database concept, the ladder-
diagram language with its various elements, and an overview of the communication protocol.
Also included is a set of special advanced features which are available with the MOSCAD
Programming ToolBox. Some of these are add-on options which must be purchased. The
features include Accessing Database Variables via Coordinates, MDLC over IP, RDLAP, X.25
Protocol Support, Event Driven Software, INTRAC Protocol, Dual CPU Operation, Global
Positioning System (GPS), and PID LOOP.
Two related files are provided to help users. The first, Error Messages, describes, software
error messages and warnings generated by the error logger, corrupted database errors, compiler
errors, and warnings. The messages are listed as they appear on the screen, along with a
general indication of the type of error encountered. The second, a guide to the Software
Diagnostics Output from MOSCAD software modules, can be very useful for fine-tuning the
behavior of the system and allocating memory.
1
Database Concept
The RTU database is the collection of all local variables such as inputs, outputs, calculated
values, parameters, and those variables received via the communication link. It is comprised of
up to 127 user-oriented tables employing user-defined symbolic names.
Application Programmer includes a powerful, yet simple table editor, called Database Builder,
which makes database definition and modification a “snap”.
Defining the database as a set of structured tables provides the following advantages:
• The same tables are used during automatic creation of the central database.
• The same tables are used during symbolic run-time monitoring of the database.
• Adding/deleting devices is done by modifying the number of rows in the specific table
(table’s last index). The process is automatically adjusted to the new number of devices.
• Since tables are known to the central, communication between central and RTUs is
transparent to the RTU process (no process has to be written for handling the
communication).
• Any portion of any table can be downloaded from or uploaded to the central.
• Qualification formulas may be used as filters at the transmitting site, to reduce the amount
of transmitted data.
Table Types
The system provides two types of tables:
• Single-column tables
• Multiple-column tables
Single-Column Table
Single-column tables hold global RTU variables. All variables in the table (column) are of the
same data type. Each entry in this table is assigned a unique symbolic name. The data type of
the table appears below the table name and table symbol.
For every row in the table there is an associated Change of State (COS) flag. This flag is used
for communication with qualifiers. You may define a name for this flag (in the COS Name
box) to be used in the process (ladder diagram rungs).
2
Database Concept
Multiple-Column Table
Multiple-column tables hold symbolic structured data. Each table represents a group of 1 to
250 similar devices (e.g. pumps, reservoirs, transformers, etc.).
A row (record) in the table represents a single device, and a column a value which is common
to all devices. Each column has a unique symbolic name.
Each variable in the table has a unique logical name: <column name>, <row (device) index>.
The above table contains 5 rows (for 5 pumps) and one of the columns is called “Flow”. Here,
“Flow,0” defines the flow of the first pump, and “Flow,4” – the flow of the fifth pump. In
other words, “Flow,x” defines the flow of pump x, where x is the pump index. In each column,
the column data type appears below the column name.
3
Database Concept
For every row in the table there is an associated COS flag. This flag is used for communication
with qualifiers. You may define a name for this flag (in the COS Name field) to be used in the
process (ladder diagram rungs).
The Last Index (last device) is given a free name by the user (LstPmp in the above example; it
is seen when the table is scrolled). This name is used in the process to indicate the last device
in the table. The process is automatically adjusted to the actual number of devices (rows) when
it is changed by the user.
Duplicated Columns
The system enables you to define columns that are windows to other columns in different
tables. These are called duplicated columns. This feature is designed to build a table that will
serve as a report to the central. This table may include various columns that have been defined
in different tables.
This feature may also be helpful during debugging. You may define a table of duplicated
columns (windows) to view simultaneously specific values, located in different tables.
When using the duplicate column operation, the original column is not duplicated in the
database; the duplicated column only holds a “pointer” to the original column.
A single-column table holds single variables, while a multiple-column table is designed to hold
N devices (rows) that have the same structure.
A multiple-column table allows you to write an algorithm for a single row (device) and to
apply it to all the rows (devices) using an index. In a single-column table it is not possible and
not necessary to use an index.
Table Groups
The tables in the system are arranged in three groups:
• User tables
• System tables
• Constants tables
User Tables
User tables are defined according to application requirements. Up to 127 user tables may be
defined.
4
Database Concept
The first table in this group is already defined as a single-column table called Qualifiers. The
variables in this table may be named by the user. The qualifiers in this table are used during
group-calls from the old central (IGC/M) to form groups of RTUs (broadcast).
System Tables
The system tables are pre-defined tables, designed to hold communications buffers, index
pointers, time and date variables, and other system-related variables.
Some tables may be modified by the user to meet specific needs. However, system tables may
not be added to this group or deleted from it.
Constants Table
Symbolic constants (and not their numeric value) are used during process (ladder) editing. For
example, if a limit for a process is 100, a symbolic name such as Limit 1, rather than the actual
value, is used.
• Easy modification, since the constant has to be modified in only one place
• Better understanding and easier maintenance of the ladder
Some of the constant tables are pre-defined, including constants such as ASCII characters, port
names, modes and protocols.
Two tables in this group are provided for event definitions (up to 500 events) via symbolic
names. The event names should be defined in these tables. These events become automatically
known to the control center during the creation of the central database.
Symbolic constants that appear in the tables but are not used in the process (Ladder Diagram)
do not consume any memory space.
5
Database Concept
Data Types
Every column in the database tables (single or multiple-column), may be defined as one of the
following data types (the name in parentheses indicates the column data type in a multiple-
column table):
Value Meaning
‘0’ (false) The operation indicated by the logical variable is not active.
Examples: a machine that is not operating, a de-energized relay, an
alarm that is not activated, or a disconnected switch.
‘1’ (true) The operation indicated by the logical variable is active. Examples:
an energized relay, an operating machine, an activated alarm, a
connected switch.
Variables of this data type are products of internal functions (rungs) or received from another
site through the communication system.. When the system starts at cold start (for example,
after reset load), all Discrete variables are reset to ‘0’.
6
Database Concept
Variables of this data type are products of internal functions (rungs) or received from another
site through the communication system.. When the system starts at cold start (for example,
after reset load), all Integer Value variables are preset to ‘0’.
This data type includes the internal (calculated) real variables (floating point) in the range of -
3.402823466x1038 (displayed as -3.402823466E+38) to +3.402823466x1038 (displayed as
+3.402823466E+38). These variables are represented by four bytes in scientific notation.
Variables of this data type are products of internal functions (rungs) or received from another
site through the communication system.. When the system starts at cold start (for example,
after reset load), all Real Value variables are preset to ‘0’.
The variables of this data type are almost identical to the Real Value variables. The difference
is that they receive initial values at cold start of the system. While the Real Value variables are
reset to ‘0’ at cold start-up, the Real Parameter variables receive a value defined by the user.
However, this value may be changed during operation by means of the ladder diagram.
The user can connect each entry of any column, defined as Discrete Input, to any physical
input in one of the RTU Discrete Input modules (refer to the I/O Link section in the
Application Programmer chapter of this manual).
The user controls when the physical inputs are read into any column which is defined as
Discrete Input (refer to the Scan operator in the Ladder Diagram Language section).
The physical inputs are usually read before using the values of the column during the process.
7
Database Concept
The possibility of reading the inputs for each column separately enables you to perform
various operations at different rates (priorities).
The user can connect each entry of any column, defined as Discrete Output, to a physical
output in one of the RTU Discrete Output modules (refer to the I/O Link section in Application
Programmer chapter of this manual).
The user controls when the values of a specific column are sent to the physical outputs (refer
to the Scan operator in the Ladder Diagram Language section).
The values of the column are usually sent to the physical outputs at the end of the column
calculation (by the process).
Every module may provide different ranges of values. For example, the modules that include
A/D (the A/D provides a value that is proportional to the analog measurement) provide a
number in the range of -4,000 to +4,000 for an analog input in the range of -Full Scale to +Full
Scale.
The modules that include counters (accumulators) provide values in the range of 0 to +32,767.
When the counter reaches the value of +32,767 and is advanced, it returns to 0.
The connection between the variables in the columns, defined as Value Inputs, and the I/O
modules is performed by the I/O Link program (refer to the I/O Link section in Application
Programmer chapter of this manual).
The user controls when the physical inputs are read into any column defined as Value Input
(refer to the Scan operator in the Ladder Diagram Language section).
Usually, the physical inputs are read before using the values of the column during the process.
The possibility of reading the inputs for each column separately enables you to perform
various operations at different rates (priorities).
8
Database Concept
Note that every module may receive different ranges of values. For example, the modules that
include analog output should receive values between 0 and +2,000 for output voltage and
between 0 and +Full Scale for current.
The connection between the variables in the columns, defined as Value Outputs, and the I/O
modules is performed by the I/O Link program (refer to the I/O Link section in Application
Programmer chapter of this manual).
The user controls when the values of a specific column are sent to the physical outputs (refer
to the Scan operator in the Ladder Diagram Language section).
Usually, the values of the column are sent to the physical outputs at the end of the column
calculation (by the process).
This data type includes the variables representing physical values that are read by the A/D
modules only and scaled to Engineering Units (EGU) (real values). The range of the Scaled
Analog Input variable is from -3.402823466E+38 to +3.402823466E+38 (same as Real Value
and Real Parameter).
The user has to define the physical value at two points, so that the system will translate the
sensor output to a physical value, as demonstrated in the following graph:
Y physical
value
EGU High
20%
EGU Zero
{ 0
sensor
output
0 800 4,000 X
The first point, EGU High (EGUH), is the physical value when the sensor is at full scale. The
second point is the physical value when the sensor output is 0 or live-zero, as in the case of the
4-20 mA sensors. This second point is called EGU Zero, EGU0. For sensors that output
voltages in the range of ±V, the calibrating point is the physical value when the sensor output
is 0 and not -V.
The values of EGU Zero and EGU High should be defined in the relevant table by means of
the Show Related Data function. You also may define whether the EGU Zero is live-zero or
not.
9
Database Concept
The connection between the variables in the columns, defined as Scaled Analog Inputs, and
the A/D modules is performed by the I/O Link program (refer to the I/O Link section in
Application Programmer chapter of this manual).
The user controls when the values of a specific column are read from the physical inputs (refer
to the Scan operator in the Ladder Diagram Language section).
Usually, the physical inputs are read before using the values of the column calculation during
the process.
The possibility of reading the inputs for each column separately enables performing various
operations at different rates (priorities).
This data type includes the variables that are scaled to Engineering Units and are to be sent to
one of the I/O modules. The range of the Scaled Analog Output variable is from -
3.402823466E+38 to +3.402823466E+38 (same as Real Value and Real Parameter).
The user may define the two points (EGU Zero and EGU High) of the scaling function. Refer
to Scaled Analog Input.
The connection between the variables in the columns, defined as Scaled Analog Outputs, and
the I/O modules is performed by the I/O Link program (refer to the I/O Link section in
Application Programmer chapter of this manual).
The user controls when the values of a specific column are sent to the physical outputs (refer
to the Scan operator in the Ladder Diagram Language section).
The values of the column are usually sent to the physical outputs at the end of the column
calculation (by the process).
For each variable in a column defined as Mapped Discrete you should define the discrete
variable from which it is to be copied.
The user controls when the values are copied to the table (refer to the Scan operator in the
Ladder Diagram Language section). Performing the Scan operation on a Mapped Discrete
column is the same as separately mapping each variable in the column.
10
Database Concept
For each variable in a column defined as Mapped Value, you should define the value variable
from which it is to be copied.
The user controls when the values are copied to the table (refer to the Scan operator in the
Ladder Diagram Language section). Performing the Scan operation on a Mapped Value
column is the same as separately mapping each variable in the column.
A timer of less than one hour should be defined as a Minutes Timer, rather than Hours Timer,
in order to improve its resolution.
In each column defined as Hours Timer, the user should define the preset time of every timer.
This preset time is assigned to the timer at cold start-up of the system and may be set to
another value by the appropriate ladder diagram functions.
A detailed explanation about the use of the Hours Timer is provided in Ladder Diagram
Language.
A timer of less than one minute should be defined as Seconds Timer rather than Minutes
Timer in order to improve its resolution.
In each column defined as Minutes Timer, the user should define the preset time of every
timer. This preset time is assigned to the timer at cold start-up of the system and may be set to
another value by the appropriate ladder diagram functions.
A detailed explanation about the use of the Minutes Timer is provided in Ladder Diagram
Language.
In each column defined as Seconds Timer, the user should define the preset time of every
timer. This preset time is assigned to the timer at cold start-up of the system and may be set to
another value by the appropriate ladder diagram functions.
11
Database Concept
A detailed explanation about the use of the Seconds Timer is provided in Ladder Diagram
Language.
This data type defines variables (integers) with a value equal to the pulse rate in pulses per
hour.
The user has full control of the time that the pph is updated in the column (refer to the Scan
operator in the Ladder Diagram Language section.)
The user can connect each entry of any column, defined as Pulses Per Hour, to any physical
input in one of the RTU Discrete Input modules (refer to the I/O Link section in Application
Programmer chapter of this manual).
Time-Tagged DI (TgDI)
(MOSCAD ≥ V1.61, MOSCAD-L ≥ V1.00)
This data type is similar to the DI data type. In addition, the system keeps track of these inputs
and every change is recorded in a Time-Tag log buffer and/or events buffer together with the
date and time in 1 msec resolution. The Time-Tag buffer can be read using the Time-Tag
Logger tool. The events buffer can be read via a ladder construct by calling the GtEvnt
function (see Advanced Features in the Application Programmer manual).
This data type is relevant for electric applications and only the important inputs should be
defined as Time-Tagged DI, since this feature is CPU-time consuming.
The user can connect each entry of any column, defined as Time-Tagged DI, to any physical
input in one of the RTU Discrete Input modules (refer to the I/O Link section in Application
Programmer chapter of this manual).
This data type is used to read from the PLC or write to the PLC, which supports the Third
Party protocols (refer to the Third Party Protocols Support manual).
Index
This data type includes pointers to rows of multiple-column tables. Since each row in a
multiple-column table represents the variables of a device, the Index is a pointer to the device.
The Index enables the user to write an algorithm for one row of the table and apply it to all
table rows. The Index variable may be defined only in the Index table (one of the system
tables). The index value is limited to the range 0-255 at any given time (the number of rows in
a table is limited to 250).
12
Database Concept
Constants
Constants are defined by a symbolic name and numeric value in single-column tables. The
symbolic name of the constants are used in the ladder diagram.
There are two types of constants: Integer and Real (MOSCAD ≥ V1.44, MOSCAD-L ≥
V1.00).
The advantage of using the symbolic name in the ladder diagram rather than the value is that in
case of changes, it is easier to change the value only in one place (in the table) rather than
searching in all functions.
13
Ladder Diagram Language
The ladder diagram language is the user’s means to define the functions to be performed by the
RTU. In order to define the control program, its outputs should be defined as a function of the
inputs and time.
For your convenience, the user control program is divided into several (one or more)
processes. Each process has a six-character name and a description of up to 20 characters.
Each process consists of functions (rungs) that may have a logical name (optional) and a short
description. It is possible to open a window and to add a detailed description (without length
limitation) of the function.
The optional logical name is necessary only when activating the JMP operator to that rung.
Nevertheless, assigning a logical name and a brief description to each rung will be very helpful
when performing maintenance and modifications.
The first process in the Process List is always the MAIN process. This process must be defined
since it is performed by the system. In addition, the commands that activate other processes are
issued from the MAIN process by means of special operators.
The system software performs the process in cycles. All the rungs are executed sequentially in
each cycle. The time needed to perform one cycle is called “scan time”.
The words “inputs” and “outputs” are enclosed within quotation marks because these variables
are not necessarily physical inputs and outputs. They may also be “internal variables” -
variables that comprises the “output” of a rung and that may serve as an “input” in another
rung. The use of such internal variables enables the appropriate RTU to define and perform
complex monitoring and control functions.
The relationship between the “inputs” and the “output” (the function) is indicated in a
symbolic manner that expresses a relationship of logical conditions between the “inputs” and
the “outputs”. The RTU executes (computes) the logic function defined by the rung, and the
result for each “output” is either “1” or “0” where “1” means “the rung is true” and “0” means
“the rung is false”. The operation on the “output” is performed according to the result received
from the rung.
14
Ladder Diagram Language
Variables
The database, built by Database Builder as a set of tables, includes variables of various data
types. Each variable is described by a symbolic name: <Name> for a single-column table and
<Name>,<Index> for a multi-column table. The variables in the system may be of the
following data types (refer to the Database Concept chapter in this manual):
• Discrete
• Integer Value, Real Value
• Integer Parameter, Real Parameter
• Timers (three resolutions: Hours, Minutes, and Seconds)
• Mapped Discrete, Mapped Value
• Discrete Input, Discrete Output
• Value Input, Value Output
• Scaled Analog Input, Scaled Analog Output
• Time-Tagged DI
• PPH
• Index
• Integer Constant, Real Constant
The following section describes each element variable and its relevant data types.
The rung may be perceived as an “array” of contacts (representing the states of the relevant
“inputs”) through which “current” must “flow” towards the element that represents the
operation to be performed on the “output”. When such a flow path exists, the rung is “true”
and the appropriate operation is performed on the “output”. When a rung does not include any
“input” element, it is considered true and the output operation is always performed.
This element is used to designate an N.O. type contact element, such as a switch, a device, a
timer or an internal variable. When entered, the element name appears above the element.
15
Ladder Diagram Language
When the state of the element is “0” (false, not operating), the contact is considered to be open
(not conducting current). When the state of the element is “1” (true, operating), the contact is
considered to be closed (connected, conducting current). Consider this:
SW1
——| |——
The above symbolic contact represents the state of switch SW1. When switch SW1 is actuated,
the contact representing it is “connected”, and when the switch is not actuated, the contact is in
its normal state, that is, not connected.
The data type of the variable above the N.O. element may be one of the following:
This element designates an operation performed on a two-state element (“0” – not actuated,
“1” – actuated). When the name of the controlled element is entered, it appears above the
element, as follows:
MOTOR
——( )
If the rung is “true”, the element (in the above case, MOTOR) will be actuated. If the rung is
“false”, the controlled element will be stopped.
The data type of the variable above the “RELAY ON” element may be one of the following:
As an example, consider the automatic operation of a heating coil, designated Heater. The coil
which is actuated when a heating control switch, designated HeatSw (heating switch), is
actuated and when a float installed in a tank designated LvlSw (water level switch), which
checks that there is water in the tank, is also actuated. The rung for performing the actuation of
the heating coil should be as follows:
16
Ladder Diagram Language
Only when both contacts are actuated the rung is “true”; “current” reaches the “relay on”
element and the heating coil is actuated. The order in which the two “input” elements appear
in the rung is not important and has no influence on its operation.
Sometimes it is necessary to condition a rung on a certain device being in OFF state. This
means that the contact which represents the device closes (conducts current) when the device
is not actuated and opens (does not conduct) when the device is actuated. This function is
achieved by the Normally-Closed Contact element.
The data type of the variable above the N.C. element may be one of the following:
1. Refer again to the actuation of the heating coil and add one more condition for its
actuation. We shall assume that a valve is installed for emptying water from the
container, and let us stipulate that the heating coil is to be actuated on condition that
this valve is closed (not actuated). We shall designate the valve by the symbolic name
Valve. The rung will look as follows:
When Valve is not actuated, i.e., the contact is closed, the rung is “true” and the
heating coil is actuated.
17
Ladder Diagram Language
PB2
PB3
A B C D E X
/ ( )
Device X will be actuated when current flows through any of the branches in the rung.
The Motorola Advanced Ladder-Diagram Language enables you to define complex rungs, with
the only restriction being that the branches of the rung do not cross each other.
Sometimes, it is more convenient to define the logic conditions under which the controlled
device is to be stopped (instead of defining those conditions under which it is actuated). The
Relay Off element performs the opposite of the Relay On element; that is, when the rung is
“true”, the controlled device is stopped; as long as the rung is not “true”, the controlled device
is operating.
The variable above the Relay Off element may be defined as one of the following data types:
If either A or B is operating, the condition of the rung is fulfilled and device C is not
operating.
18
Ladder Diagram Language
Note that if C stops when A or B is actuated, then C is actuated when both A and B stop, as
expressed in the following rung:
PB2
PB3
Comparators
V1 V1 V1 V1
= = > <
V2 V2 V2 V2
Sometimes it is necessary to make a function (rung) conditional on the values of variables. For
this purpose, the language includes symbols representing four different types of comparators.
When the equality or inequality described by the comparator is fulfilled, the result is a closed
“contact” (enabling the flow of current through the “contact” of the comparator). When the
equality or inequality is not fulfilled, an open “contact” results.
The data type of the V1 and V2 variables may be one of the following:
If one of the values is constant, then the second value should not be constant. If the variable is
defined as a timer, the system automatically refers to the “time-left” value (refer to Timers.)
With the comparator operator, you may use real values and integer values.
As an example of the use of comparators, refer again to the case of the heating
element and add another condition for its actuation: the temperature of the water in
the tank be less than 95°C. Suppose that a thermometer with a continuous analog
output is installed in the tank, connected to an analog input of the RTU, and that an
integer variable designated TEMP has been defined (in the value input data type).
19
Ladder Diagram Language
“95deg” is a constant defined as equal to the value input corresponding to the analog
reading of 95°C.
The comparator compares TEMP to 95deg. Only if it is less than 95deg (and, of
course, all the other conditions are also fulfilled) is the heater actuated.
We will assume, still using the example above, that instead of a constant, the
temperature is compared to the value obtained from an external potentiometer (which
serves as a sort of thermostat). If we designate the value obtained from the
potentiometer with the symbolic name Preset (in the value input data type), we get the
following rung:
In some cases, it is more convenient to define separately the conditions under which an
“output” (relay or any other) is actuated, and the conditions under which that same “output” is
stopped (released), on the assumption that while the conditions for its actuation or release are
not fulfilled, the “output” remains in its last state. These two elements perform the respective
operation on the “output” when the rung is true. The symbol name of the relay output is always
20
Ladder Diagram Language
entered and appears above the element. When the rung is false, it has no influence on the
“output”.
The data type of the variable above the “RELAY LATCH” and “RELAY UNLATCH”
elements may be one of the following:
For example, refer to the turning on and off of a lighting system from five different
locations and with two push-buttons in each location, shown below.
ON 1
OFF 1
LIGHT
RTU
ON 5
OFF 5
Five pairs of ON/OFF switches are connected to the RTU, which actuates LIGHT.
The rung for performing this control function may be built in the conventional
“START-STOP” circuit form:
ON1
ON2
ON3
ON4
ON5
Each momentary pressing of one of the ON switches actuates LIGHT which then
provides “self-holding” or latching function. Each momentary pressing of one of the
OFF switches turns the lighting off.
The same control function may be performed using the ( L ) – “relay latch” and ( U )
– “relay unlatch” element:
21
Ladder Diagram Language
ON1 LIGHT
( L )
ON2
ON3
ON4
ON5
OFF1 LIGHT
( U )
OFF2
OFF3
OFF4
OFF5
The latching and unlatching operations occur only if the rung is true, therefore there is
no need for “self-holding” of LIGHT.
The advantages of these elements will become apparent in complex systems where they are
used in conjunction with additional elements that are explained in the following paragraphs.
Reset
——(RST)
When the conditions of the rung are fulfilled, the variable that appears above the element is
reset to zero. This variable may be of the following data types:
• Integer Value
• Integer Parameter
• Value Output
• Index
• Retentive Timer
In the case of retentive timers, the RST operator presets the timer, i.e., it returns the timer to its
preset time so that it may be actuated again by an appropriate rung (refer to Retentive Timer).
Timers
One of the most important parts of any control system is the timer. The timer provides delays
between different processes or the activation of a certain process for a predetermined time
period.
22
Ladder Diagram Language
During database building, it is possible to define specific columns as Timers. The resolution of
the Timer is according to the selected type: Hours, Minutes, or Seconds Timer.
The Timer mode of operation is set according to its definition as an output in the Ladder
Diagram.
The Timer has an unlimited number of contacts of the “normally open” and “normally closed”
types that may be used as “inputs” to other rungs (this is done simply by writing the same
symbolic name that was used for the output operator).
When defining a Timer in the Database Builder, its “duration time” (preset value) is also
defined. The preset value may be modified in the course of control program execution through
other rungs by using any “output” element that will update the value such as MOVE, or
Arithmetical Calculation operators. The new preset value is used by the Timer when next
started.
Timer1
( MOVE )
NewPst
When all conditions of the rung are fulfilled, the value of the NewPst constant or variable is
used as the new preset for Timer1.
When you define constants to be used as preset values for timers, you should consider the
following:
• For Hours Timer: the HH:MM preset value (0≤ HH≤ 99, 0≤ MM≤ 59) should be defined
as 60⋅(HH) + MM, since in memory the Hours Timer counts with resolution of one minute.
• For Minutes Timer: the MM:SS preset value (0≤ MM≤ 99, 0≤ SS≤ 59) should be defined
as 60⋅(MM) + SS, since in memory the Minutes Timer counts with resolution of one
second.
• For Seconds Timer: the SS:mm preset value (0≤ SS≤ 99, 0≤ mm≤ 99) should be defined as
100⋅(SS) + mm, since in memory the Seconds Timer counts with resolution of 10
milliseconds.
• For Hours Timer and Minutes Timer you can define timers in the Time Constants table. In
this table you can define timers in the XX:XX format.
The Time Constants table (one of the Constants tables) may be used for defining hour and
minute timer constants, without the need to perform the calculations described above.
23
Ladder Diagram Language
The DON timer operates as a function of the rung’s being true or false as follows:
a) When the rung is false, the timer is in its normal state (not actuated) and all its “normally
open” type contacts are open and those of the “normally closed” type are closed
(actuated).
b) When the rung changes its state to true the timer begins to run until its preset time period
elapses. While the timer is running, the state of its contacts is as described in a. above.
c) When the preset time of the timer elapses, the timer changes its state to true and all its
contacts of the “normally open” type close while those of the “normally closed” type open.
d) As soon as the rung ceases to be true, the timer stops, returns immediately to its normal
state, and the state of its contacts is once again as described in a) above. The On Delay
Timers timing diagram is shown below.
TRUE "1"
RUNG
{ FALSE "0" e
PRESET COUNT
"TIME
LEFT" { 0
DOWN
CLOSED "1"
TIMER'S
"NORMALLY
OPEN"
CONTACT
{ OPEN "0"
ON
DELAY
The “time left” comprises the delay time left. This time is kept at the preset value as long as
the rung is false and is then counted down when the rung is true. When the time left reaches
zero the “on delay” is finished.
The following are some examples of the use of “on delay” timer.
24
Ladder Diagram Language
VLV1 Tmr1
(DON)
Tmr1 PUMP1
( )
The contact Tmr1, which is a contact of the timer of the same name, is actuated 10
seconds after VLV1 is actuated and thus turns on PUMP1.
2. The light must turn on for a predetermined period of 10 minutes as a result of the
momentary pressing of the push-button START.
START LIGHT
RTU
To explain this example, let us go back to the timing diagram given previously, and
assume that the rung which actuates the timer is constantly true and ceases to be true
for a short period of time.
TRUE "1"
RUNG
{ FALSE "0"
ON DELAY
CLOSED "1"
{
TIMER'S
"NORMALLY
OPEN"
CONTACT OPEN "0"
CLOSED "1"
TIMER'S
"NORMALLY
CLOSED"
CONTACT
{ OPEN "0"
We get a pulse of the duration of the timer’s preset time plus the time for which the
push-button was pressed (a “differentiator” may be used to cancel the influence of the
push-button on-time). The ladder-diagram for this example looks as follows:
START T
/ (DON)
T LIGHT
/ ( )
Before explaining this example, let us first explain the concept of “scan”.
25
Ladder Diagram Language
In order to execute the control program defined in the ladder-diagram, the RTU
periodically performs all functions written in the Ladder Diagram one after the other.
After a certain period of time the RTU repeats this procedure. The performance of the
Ladder Diagram functions is called “scan” and the time between two scans is called
“scan time”.
Let us further assume that each time CLOCK is true, a lamp, designated LIGHT, is
latched. The lamp is turned off by an OFF condition external to the system.
LIGHT
RTU
OFF
CLOCK LAMP
( L )
OFF LAMP
( U )
CLOCK CLOCK
/ (DON)
CLOCK is a timer with a preset time of 04:00 seconds. The special rung in which the
timer is actuated (on condition that it is not true) provides a pulse, shown below.
1 scan
CLOSED "1"
{
TIMER'S
"NORMALLY
OPEN"
CONTACT OPEN "0"
ON DELAY
In this example, the rung with the DON output must be located after the rungs using
the timer contacts, since during that scan in which the timer concludes the countdown
of the delay (the delay is over), it again presets itself.
26
Ladder Diagram Language
The operation of this timer is similar to that of the “on delay” timer, except that the delay starts
with the transition of the rung to the state of OFF (“0”) instead of the transition to ON (“1”).
TRUE "1"
RUNG
{ FALSE "0"
PRESET COUNT
"TIME
LEFT" { 0
DOWN
The DOF Timer may be set to any one of the three resolutions: hours, minutes, or seconds.
The DOF Timer can generate a positive pulse with a duration that is equal to the Timer delay
if it receives TRIG (TRUE) for one SCAN. The appropriate rungs are described below.
TRIG PULSE
( DOF )
PULSE
1 scan
"1"
TRIG
"0"
OFF DELAY
PULSE
TIMER
As an example let us assume that a delay is necessary between the two outputs A and
B. Output B should start five seconds after output A has started and stops 20 seconds
after output A has stopped.
27
Ladder Diagram Language
A
5 sec 20 sec
A T1
(DON)
T1 T2
(DOF)
T2
( B )
The two delays are added “in series”, one influencing the upward transition and the
other – the downward transition. In this example the order in which the rungs are
written is irrelevant and DOF can precede DON.
Retentive Timer
——(TRT)
RST
TRUE "1"
RUNG
{ FALSE "0"
PRESET
a) As long as the rung is true (“1”) the timer counts down from its preset time.
b) When the rung ceases to be true, the time left is “frozen”, i.e., the timer stops counting but
remains at the point in the countdown that it reached while the rung was true.
28
Ladder Diagram Language
c) When the rung again becomes true, the timer resumes its countdown from the “frozen”
point.
d) When the time left is zero, all the “normally-open” contacts of the timer close, while all
the “normally-closed” contacts open.
e) The retentive timer will remain in this state until preset again by an RST output operator
having the same symbolic name as the timer.
The main application of the retentive timer is for accumulating the operating time of a certain
installation or device, and supplying an indication that a certain predetermined operation
period has come to an end. This indication may merely serve as a warning to the operator of
the system, or may automatically start another operation.
In cases where more than 99 hours must be counted, this may be done by combining a counter
and a retentive timer.
MOTOR
(Conditions for actuating the motor) ( )
MOTOR MotrHr
( TRT )
MotrHr L1
( )
SW1 MotrHr
( RST )
For versions ≥V3.70, the number of usable differentiators in the application is unlimited.
For versions <V3.70, the number of differentiators is limited to 1024 positive and 1024
negative differentiators.
29
Ladder Diagram Language
STEP
RTU StpMtr
"1"
STEP
"0"
"1"
"0"
A convenient way for performing this task is to identify the start of the pressing of the
switch by a “differentiating operation” performed by the positive differentiator
operator.
The differentiator is located on the branches of the rung as are the input operators.
The task of the positive differentiator is to identify and conduct current for the
duration of one scan when all the contacts along the branch, which includes the
differentiator (from its beginning to the location of the positive differentiator), have
changed state from open to closed.
The task of the negative differentiator is to identify and conduct current for the
duration of one scan when the contacts from the beginning of that branch to the
location of the negative differentiator stop being true.
In order to execute the task set in the example, two “off delay” timers must be used
(refer to Timers above): one of 0.5 second for actuating the stepping motor; the other
of 4 seconds for preventing an additional actuation. Both timers will be actuated by
the pressing of the switch (the 0.5-second timer will actuate the 4-second timer).
It should be noted that the differentiator in the first rung identifies the point in time at
which the switch STEP is pressed and timer T4S is not actuated. If STEP is pressed
before the timer has completed its countdown, the differentiator “waits” for the timer
(on condition that STEP is still pressed).
30
Ladder Diagram Language
TO.5S T4S
( DOF )
TO.5S StrMtr
( )
The following are examples illustrating the influence of the differentiators in a more
complex rung.
A B RELAY
↑ ( L )
C
Relay ( L ) is executed every time that the function (A⋅B)+C becomes true. In this
case, the differentiator influences the entire rung, from its beginning.
STEP
1 scan
DIF
StpMtr
(T0.5S) 0.5 sec.
T4S 4 sec.
E F RELAY
( U )
G H
↑
In the last rung, RELAY is unlatched when E is true in addition to one or both of the
following conditions: F is true or a COS (Change of State) from 0 to 1 in G and (H or
K).
31
Ladder Diagram Language
If the rung with the CTU or CTD operator is true, then the variable above the operator is
incremented in the case of the CTU operator, or decreased in the case of the CTD operator.
If the rung is true and its condition continues for more than one scan and only one count is
required, a differentiator must be included in the rung, to ensure that the output operator will
be activated only once.
The CTU and CTD operators may be used with the following data types:
• Index
• Integer Value
• Value Output
• Integer Parameter
You can apply the CTU and CTD operators to a Real variable by using—[+ ] or —[- ]
where the added/subtracted value is 1.
1. For a packing machine: when “n” products have been packed into a case, the
conveyor belt on which the cases are located should move forward to position the next
case to be filled. For each product placed into a case, a contact closes at an input
designated LOAD. The conveyor belt is advanced via an output designated STEP,
which should be actuated for one second.
LOAD COUNTR
↑ ( CTU )
COUNTR PlslSc
> ( DOF )
M
PlslSc COUNTR
( RST )
STEP
( )
Where M = n – 1.
The COUNTR variable (of value data type) counts the cases. When COUNTR≥n a
DOF Timer (Off Delay Timer; see Timers), named Pls1Sc, is activated with a preset
time of 1 second. This timer activates the STEP output and resets the COUNTR
variable.
2. For a tank or reservoir that is filled through two pipes: each pipe is equipped with
an output that emits a pulse for every liter of liquid passed into the tank. The tank also
has an outlet pipe equipped with the same kind of output, which emits a pulse for
every liter of liquid emptied from the tank. It is required to set up a counter that will
32
Ladder Diagram Language
indicate the exact quantity of liquid in the tank at any given time. Note that the pulses
from the various pipes may appear simultaneously.
Since the value, designated TOTAL, is incremented with every liter of liquid going
into the tank, and decreased with every liter of liquid going out of it, its value is
always equal to the exact quantity of liquid in the tank at any given time.
IN1 TOTAL
↑ ( CTU )
IN2 TOTAL
↑ ( CTU )
OUT1 TOTAL
↑ ( CTD )
Jump
——(JMP)
The JMP operator is the only operator that affects the sequential order of the rungs
performance. When the JMP operator is activated, the program “jumps” to the rung whose
name is specified above the operator.
The jump forward is used to skip several rungs that should not be performed if the rung with
the JMP operator is true. For example, if FLAG is true the program will jump to the rung
named NEXT.
FLAG NEXT
( JMP )
( )
( )
( )
Using the JMP operator reduces the necessary memory space since the alternative to the JMP
operator is to insert a N.C. element (on the FLAG variable) in each rung to be skipped when
FLAG is true. It also reduces the time performance since some rungs are skipped.
The jump backward is usually used when performing a loop with an index.
The JMP operator should be used only for skipping rungs within the process and not between
processes.
When using the JMP operator, it is not possible to add other output elements in the same rung.
33
Ladder Diagram Language
Scan
——(SCAN)
The SCAN operator is used for reading data from physical input modules to update a table
column defined as Discrete Input, Value Input, PPH, or Scaled AI, and for writing data from a
Discrete Output, Value Output, or Scaled AO column to the physical output modules. The
SCAN operator is also used for updating the Mapped Discrete or Mapped Value columns. The
column name above the operator indicates to the system if inputs are to be scanned or outputs
to be updated. In addition, the SCAN is used to get data from an external PLC using the Third
Party protocols (refer to the Third Party Protocols Support manual).
Using this operator, the user can control the refresh rate for all types of variables. Important
data should be scanned at a high rate, while other data can be scanned at a low rate.
Name: Pumps
0
1
.
.
n
This table includes n+1 rows for n pumps and the following columns (variables):
• Flow – a Value Input variable that specifies the flow for each pump.
• Presur – a Value Input variable that specifies the pressure of each pump.
• Control – a Discrete Output variable used a control for the pump operation.
The table includes other internal variables and parameters, not shown in the table.
The variables of this table are used by an algorithm to compute the Contrl output as a
function of the Flow, Presur, Fail, and other variables. Before performing the
algorithm, the actual values of these variables should be read (by using the SCAN
operator) from the appropriate physical inputs of the I/O modules into the table
columns.
Once the algorithm has been performed, the calculated values of the Contrl column
should be sent (by using the SCAN operator) to the appropriate physical outputs of
the I/O modules.
34
Ladder Diagram Language
MOVE is an output operator; when the conditions of the rung are fulfilled, the value below the
operator (A) is stored in the B variable, specified above the operator.
B
( MOVE )
A
The MOVE operator may also be used to transfer eight bits (starting with a byte boundary) of
discrete variables to the low byte of an integer variable.
A
( MOVE )
b1
In this rung the MOVE operator takes a series of eight consecutive bits (starting with b1) from
a single-column table and inserts it to the low byte of A (the high byte of A is not influenced).
The following diagram describes the bits arrangement in the integer variable. Note that the
first bit (b1) is inserted into a7.
35
Ladder Diagram Language
a15 a8 a7 a0
HIGH BYTE LOW BYTE
b1
b2
b3
b4
b5
b6
b7
b8
• Integer Value
• Value Output
• Integer Parameter
The MOVE operator may also be used to transfer the low byte of an integer variable to eight
consecutive bits, starting with a byte boundary. The following rung transfers the low byte of A
to eight consecutive bits of a single-column , starting with the bit named b1.
b1
( MOVE )
A
36
Ladder Diagram Language
a15 a8 a7 a0
HIGH BYTE LOW BYTE
b1
b2
b3
b4
b5
b6
b7
b8
• Integer Value
• Integer Parameter
• Value Input, Value Output
• Mapped Value
• Constant
• Index
• Discrete
• Discrete Output
The MOVH operator is used to transfer eight bits of discrete variables to the high byte of an
integer variable.
A
( MOVH )
b1
This operator takes a series of eight consecutive bits (starting from b1) from a single-column
table and inserts it to the high byte of A (the low byte of A is not influenced).
The following diagram describes the bits arrangement in the integer variable. Note that the
first bit of the byte (b1) is inserted into a15.
37
Ladder Diagram Language
a15 a8 a7 a0
HIGH BYTE LOW BYTE
b1
b2
b3
b4
b5
b6
b7
b8
The MOVH operator may also be used to transfer the high byte of an integer variable to eight
bits.
b1
( MOVH )
A
38
Ladder Diagram Language
a15 a8 a7 a0
HIGH BYTE LOW BYTE
b1
b2
b3
b4
b5
b6
b7
b8
• Integer Value
• Integer Parameter
• Value Input, Value Output
• Mapped Value
• Constant
• Index
• Discrete
• Discrete Output
Sometimes it is necessary to hold groups of discrete variables as values for storing and
communication purposes. When it is necessary to perform an operation on these values, they
should be transferred to a column of single bits (having a name for each bit). At the end of the
operation, the result is returned to the value variable form.
The Packed column of the following multi-column table includes 100 packed groups of bits
(16 bits in each packed group are represented as a value).
0
1
.
.
99
39
Ladder Diagram Language
The single-column table of discrete data type, named Unpacked Bits (below), includes 16
specific names for each one of the bits in the Packed value. In this example we will refer to the
bits as Bit15, Bit14, etc. In a real system, we will refer to the bits in meaningful names such as,
Status, Fail, Alarm, Contrl, etc. The order of the bits is from Bit15 to Bit0 to fit the MOVE
operator.
PACKED, I
b15 b8 b7 b0
HIGH BYTE LOW BYTE
Unpacked
bits
Bit15
:
: MOVH
:
:
Bit8
Bit7
:
: MOVE
:
:
Bit0
The following rungs perform a loop with index over all 100 values in the Packed column. All
values are moved, each at a time, into the Unpacked Bits table. The algorithm is performed on
the bits and the result is returned to the Packed table; the index is advanced to the next row.
The dashed rungs perform the algorithm on the unpacked bits. The algorithm does not include
an index since the same algorithm is applied on all groups.
Bit15 is the first bit of the high byte and Bit7 is the first bit of the low byte.
40
Ladder Diagram Language
I
(RST)
Temp
P_Loop (MOVE)
Packed,I
Bit15
(MOVE)
Temp
Bit7
(MOVH)
Packed,I
( )
( )
algorithm
rungs
( )
( )
Temp
(MOVH)
Bit15
Temp
(MOVE)
Bit7
Packed,I
(MOVE)
Temp
I
(CTU)
I P_Loop
< (JMP)
LstPac
I
=
LstPac
A BitCol,0
( MOVE ) ( MOVE )
BitCol,0 A
A BitCol,0
( MOVH ) ( MOVH )
BitCol,0 A
BitCol is the name of the bits column of a multi-column table. Note that in this case, the
number 0 is not an index, but the byte number (8 bits). BitCol,0 is the first byte, BitCol,1 is the
second byte, and so on.
The data types for these four cases are as specified above.
41
Ladder Diagram Language
Arithmetical Calculations
C C C C
+A -A xA / A
B B B B
C=A+B C=A-B C=AxB C=A/B
Arithmetical calculations are always used in the rung as output operators. When the conditions
in the rung are fulfilled (the rung is true), the calculation is performed and its result is stored in
C (A and B are not affected).
The A and B “inputs” to the operator may be of the following data types:
• Integer Value
• Integer Parameter
• Mapped Value
• Value Input, Value Output
• Index
• Real Value
• Real Parameter
• Scaled AI, Scaled AO
• Real Constant
• Integer Constant
• Integer Value
• Integer Parameter
• Value Output
• Index
• Real Value
• Real Parameter
• Scaled AO
• PPH
In arithmetical calculations you can not, normally, mix real values and integer values.
However, to mix real values and integers, you can move the integers to temporary Real-type
variables and perform the operations you want.
When defining the control program, it must be taken into consideration that the arithmetical
calculations (in particular multiplication and division) use considerable scan time, and
therefore should be performed only when strictly necessary, and not with every scan.
The calculation is performed only when the rung is true. If the calculation is to be performed
only once, the positive differentiator must be inserted in front of the calculation symbol.
For example, the variable X must be divided once every second by the variable Y and the
result applied to an analog output (digital-to-analog conversion) connected to a meter that
indicates a value designated RATIO.
42
Ladder Diagram Language
T1Sec RATIO
/X
Y
T1Sec T1Sec
/ ( DON )
T1Sec is true for the duration of one scan once every second. Therefore, the calculation is
performed every second.
In many cases, a sequence of arithmetical calculations are to be performed only under certain
conditions. In such cases, the JMP operator may be used to skip over this sequence when the
calculation is not required.
X C
O A C = A ⊕ B = A(XOR)B = A+B
R B
The AND, OR, and XOR operators perform (when the rung is true) a (Boolean) logic bitwise
operation on two variables (designated A and B in the elements above), and the result is stored
in the variable designated C (A and B are not affected).
The A and B inputs to the operator may be of the following data types:
• Integer Value
• Mapped Value
• Value Input, Value Output
• Integer Parameter
• Integer Constant
• Index
• Integer Value
• Value Output
• Integer Parameter
• Index
Calc
(MOSCAD ≥ V3.70, MOSCAD-L ≥ V1.00)
The CALC function enables you to write arithmetic expressions as you would on paper.
43
Ladder Diagram Language
The system software will then calculate the expression according to common mathematical
rules, (for example: x+y*z is considered as x+(y*z)) and the result will be stored in the output
operator.
• Integer Value
• Real Value
• Timers Hour
• Timers Minute
• Timers Second
• Integer Parameter
• Real Parameter
• Mapped Value
• Value Input, Value Output
• Scaled AI, Scaled AO
• PPH
• PLC Value Input
• PLC Value Output
• PLC Real Input, PLC Real Output
• Integer Constant
• Real Constant
• Index
• Integer Value
• Real Value
• Timers Hour
• Timers Minute
• Timers Second
• Integer Parameter
• Real Parameter
• Mapped Value
• Value Output
• Scaled AO
• PPH
• PLC Value Output
• PLC Real Output
All the binary operators require two parameters of the same type, integer value or real value.
If one parameter is an integer value and the other is a real value, the integer will be cast to
real. The only exception to this rule, is the power (^) operation which always converts the
operands to real value data type.
• Balanced parenthesis.
Before using the CALC function for your computations, please notice the following
restrictions.
1. Do not use bit variables, neither in the expression nor in the result.
2. Do not use a real value operand in a logic operator, either as a symbol, or as a partial
expression result.
5. Use the Neg function to label a negative number. Do not use the minus (-) symbol for this
purpose.
6. Do not use variable names which are identical with the functions’ names (for example: Sin
and Cos), since they will be considered as functions.
7. Do not include operator characters into the symbols names (for example: ‘n1+n2’ or
‘n3/’), since the characters will be considered as operators.
8. The user is responsible for the function’s parameters legality. No warning will appear if a
function receives a parameter with an illegal value. Examples of illegal values include:
Log(0), Log2(0), Log10(0), Sqrt(y) where y is a negative number, ASin(x) where x<=1 or
x>1, ACos(x) where x<=1 or x>1, Tan(π/2+n*π) where n is an integer.
10. The system software does not check the overflow during computation. The overflow is
checked while placing the expression result into the result symbol.
The ladder controlled ClcStt value is included in the Reserved Values table (System Tables).
When an overflow occurs, ClcStt is set to ‘1’ and it is the user responsibility to reset it.
Let x1=1, x2=2 and y1=2 where x1, x2 are of integer value data type and y1 is real
value.
45
Ladder Diagram Language
The two rungs below provide different results for the same expression, due to the
different selected data types.
1.
Result
(CALC)
Edit Calculation
x1+x1/x2
2.
Result
(CALC)
Edit Calculation
x1+x1/y1
As mentioned earlier, it is very convenient to divide the control program into processes
according to different subjects. Each process should handle one table or a few tables. One way
(see also Run Process) to activate a process is to call it as a “subroutine” by using the JSP
output element, as follows:
<Process Name>
( JSP )
When all conditions of the rung ending with the JSP operator, are fulfilled, the system “jumps”
to perform the process, specified above the JSP operator, as a subprocess. It is also possible to
call another subprocess from that subprocess (subprocess nesting).
The performance of the subprocess stops when one of the following occurs:
46
Ladder Diagram Language
When the program returns to the original process (from which the subprocess has been called),
it continues by performing the rung following the rung with the JSP operator.
For example, refer to the following table that consists of n+1 rows (n+1 devices) and
eight values (columns) for each device (A to H).
Ind A B C D E F G H
0
1
.
.
n
H,I = H(I) = f(A,B,C,D,E,F,I). The process includes the necessary rungs to compute H
for a specific row i.e., the index I is set and then the subprocess is called to compute
H. Note that the “calling” process defines the row while the “called” subprocess
performs the computation as a separate algorithm.
Suppose that the DEVICE variable indicates the row number and I is defined in the
Index table. The appropriate rungs for calling the FindH subprocess are:
I
(MOVE)
part of Main DEVICE
process or any
other process FindH
(JSP)
( )
:
( )
E
< (RET)
D
:
:
last rung ( )
The FindH process returns to the Main process if the last rung is performed or the
algorithm has found that E < D.
47
Ladder Diagram Language
It is not necessary to use the RET operator in the last rung of a subprocess. Use this operator
in a specific rung (not the last one) when you condition the return to the calling process.
When JSP and RET are used in a rung as output operators, it is not possible to add other
output operators than to that rung.
Send
——(SEND)
The SEND operator enables you to send a free-format message to the ports defined as User
Ports (controlled by the Ladder Diagram). The User Ports may be used to connect a computer,
printer, or any other device that requires serial communication.
For a detailed description of this operator, see User Defined Local Ports.
LSL: When the rung is true, a logical shift is performed on the variable (A), specified above
the operator, n times (1 to 15) to the left. ‘0’ are inserted to the shifted least significant bits.
• Integer Value
• Value Output
• Integer Parameter
For example, if LSL is executed with n=4 on A=01011000 10101101, the result will be:
A=10001010 11010000.
a15 a0
A
( LSL )
n
a15 a0
A
( LSR )
n
48
Ladder Diagram Language
ASL/ASR: Arithmetical shift to the left/right of the integer variable A, n times (1 to 15). In the
arithmetical shift the sign bit (bit 15) of the value does not change when the shift occurs.
• Integer Value
• Value Output
• Integer Parameter
a15 a0
± 0
A
( ASL )
n
a15 a0
± 0
A
( ASR )
n
For example, if ASR is executed with n=2 on A=01110101 10111001, the result will be
A=00011101 01101110.
Note that using ASL is multiplying by 2n and using ASR is dividing by 2n. It is more efficient
(less time consumption) to use the ASL or ASR operators to multiply/divide by 2, 4, 8, etc.
Rotate to Left/Right
——(ROL) ——(ROR)
ROL: When the rung is true, the bits of the A integer are shifted n times to the left. For every
shift the bit in a15 is inserted in a0. Note that the rotated bits are “wrapped around” (in
comparison to the shift operators).
• Integer Value
• Value Output
• Integer Parameter
49
Ladder Diagram Language
a15 a0
A
( ROL )
n
a15 a0
A
( ROR )
n
Call
——(CALL)
The CALL function allows “calling” various functions that receive and return variables
through the various tables in the system tables.
When the CALL operator is selected, a choice list of all available functions is displayed. You
should select the required function by using the arrow keys and pressing [Enter].
GetChr, GetDgt These functions are used to read characters or digits from the
User Port. For further information refer to User Defined Local
Ports.
Ready This function controls the Data Terminal Ready (DTR) and
switches it from ‘off” to ‘automatic’. If the input buffers are
clear, the Data Terminal Ready will be ‘on’, otherwise it will be
‘off’.
NotRdy This function switches the Data Terminal Ready (DTR) from
‘automatic’ to ‘off’.
SndFrm, AnsFrm, Refer to User Defined MDLC Communication
RcvFrm, TxFrm
50
Ladder Diagram Language
Sync (MOSCAD ≥ This function allows for sites synchronization using the ladder-
V 3.70, MOSCAD- diagram language. The synchronizing site time may be received
L ≥ V 1.00) from the Time&Date or from the GPS connected to the
synchronizing site’s Port 2.
This function has two parameters: the function name itself
“Sync”, and the Site ID, defined in the Site table (System
Tables).
Following are two examples illustrating a full system synchronization, and the
synchronization of all the units with Radio1 connected to one port (link
ID=RADIO1), as illustrated in the site table below:
Sync
( CALL )
AllSYS
51
Ladder Diagram Language
Sync
( CALL )
Rad1
Run Process
——(RUNP)
The RTU is based on a multi-tasking operating system. From all tasks that support the system,
five tasks may be used by the user processes written in ladder diagram language. These five
tasks run under five different priorities, as follows (high priority is the highest priority and
TskPrD - the lowest one):
One of many advantages of dividing the user application into processes is the capability to run
them under different priority tasks. The MAIN process is automatically run by the system
under the High priority task.
It is possible, but not always efficient, to call all the processes by the JSP operator as
subroutines of the MAIN process. Since all processes have the same priority, the Scan Time
will be very long (all processes have to be executed).
Usually, some of the processes are executed more often than others. Therefore, if some of the
processes will run under lower task priority, the MAIN process and the processes connected to
it by the JSP operator will run at a faster speed.
In a multi-tasking system the MAIN process may perform a few cycles while another process
that runs under a lower priority task performs only one cycle.
RUNNING
TskPrA
SUSPENDED
To run a process under a specific task, you should use the RUNP operator in the following
manner:
52
Ladder Diagram Language
<Process Name>
( RUNP )
TskPr(x)
When the rung is true, the process appearing above the operator, is run under the task specified
below the operator. Before running the process, you should ensure that this task is not busy.
For this purpose, the system provides four task priority flags in the Reserved Flags table (one
of the System tables), named TskPrA, TskPrB, TskPrC, and TskPrD.
When a task is busy, its corresponding flag is ‘1’. Therefore, one of the conditions of the rung
that includes the RUNP operator is that the relevant task flag is ‘0’.
It is very important not to run a task continuously because it will be impossible to run tasks
that have lower priority, including the system tasks. Thus, you should condition the RUNP
operator on a timer that will define the cycle time.
The following rungs run a process called EXEC under TskPrA. The conditions are that the
task is not busy (TskPrA=0) and the DOF Timer has completed its delay.
TEMP EXEC
( RUNP )
TskPrA
TEMP CYCLE
( DOF )
1 scan
"1
"
RUNP
0
task is running
TskPrA
timer delay
CYCLE
DELAY
OFF
If the timer delay is too short, then TskPrA will run continuously and lower priority tasks will
not be handled.
53
Ladder Diagram Language
The BCD operator refers to the value of the variable below the operator as a number in binary
format and converts it to a number in BCD format. The converted number is assigned to the
variable above the operator.
The BIN operator refers to the value of the variable below the operator as a number in BCD
format and converts it to a number in binary format. The new number is assigned to the
variable above the operator.
• Integer Value
• Value Input
• Integer Constant
• Integer Parameter
• Index
• Mapped Value
• Integer Value
• Value Output
• Integer Parameter
Copy Columns
(MOSCAD ≥ V1.63, MOSCAD-L ≥ V1.00)
C Dest
P Src
Y Count
The CPY operator allows you to copy columns of any data type to any other data type. The
number of bytes to be copied is specified by the Count variable.
The Dest variable may be any variable of a single-column table or any column of a multiple-
column table. This variable may be of any data type, except index.
The Src variable may be any variable of a single-column table or any column of a multiple-
column table. This variable may be of any data type.
The Count variable, that specifies the number of bytes to be copied, may be any variable of a
single-column table or a specific variable of a multiple-column table. This variable may be of
the following data types:
• Integer Value
• Index
54
Ladder Diagram Language
• Integer Parameter
• Integer Constant
C Tx_Buf,0
P Presur
Y Length
Length
( MOVE )
#16
C B,0
P V,0
Y Length
#16 is a constant defined in a Constants table. Its value is 16 (16 bytes*8=128 bits).
During the copy operation, the MOSCAD RTU checks that the number of bytes to be copied is
not greater than the size of the Dest column. If the number of bytes is greater than the size of
the Dest column, the copy operation is not performed and an appropriate message is sent to the
Error Logger.
U C-func
C P1
L P2
The UCL operator together with the ‘C’ Toolkit allows you to program the application using
‘C’ blocks. Refer to the ‘C’ Toolkit manual.
For more information about this option, please contact the Motorola System Support Center.
55
Ladder Diagram Language
Input Elements
—| |— Normally Open (N.O.) Contact
—| = |— Comparator Equal to
Output Elements
—( ) Relay On Contact
—( L ) Relay Latch
—( U ) Relay Unlatch
—(RST) Reset
—(JMP) Jump
56
Ladder Diagram Language
57
Application Programmer
Before configuring your database, carefully read Database Concept, which provides the
necessary theoretical background, and Ladder Diagram Language, which describes in detail
all programming symbols.
OPEN FILE
DEFINE
DATABASE
DEFINE
PROCESS*
COMPILE FILE
YES
ERRORS
NO
*If needed
58
Application Programmer
59
Application Programmer
Project Dir
The path to the application files. This information appears after you create or open an
application.
Project
Configuration
If you import a site configuration file (using the corresponding command in File menu), the
name of the configuration file appears here.
Project Menu
You can perform all basic file (project) operations using the commands listed in the Project
menu.
New
The New command opens a dialog box where you specify the name and path of the new
application. ToolBox defaults to the user sub-directory of the ToolBox (tbox950) directory.
You can create the new application files in directory \tbox950\user (default), or select another
directory. A description of the New dialog box parameters follows.
60
Application Programmer
Drives
If you want to store the application in a different drive, open the drop-down list and select the
drive. Your selection appears in Selected Path.
Directories
If the currently displayed directory is not where you want to store the new application, you can
also double-click [..] as many times as needed until you reach the branch you want. Your
selection appears in Selected Path.
Selected Path
ToolBox defaults to the \tbox950\user sub-directory. If you want to create a new application
under \user, just add the application name to the end of the displayed string. For example, if
the application name is Pumps, make sure the string reads: \tbox950\user\pumps. Then click
the Create button.
Application Programmer automatically opens a new sub-directory for each application. In the
above example a sub-directory named Pumps is created under \tbox950\user. The application
files are automatically named after the sub-directory (e.g. pumps.prg, pumps.wrk).
If you don’t want to use \tbox950\user, type a drive and directory, and click Create. For
example, to create an application named Pumps, in drive C, type c:\pumps and click Create.
If you want to store applications in a “root” directory of your own, first create the root. For
example, to create an application named Pumps in a directory named MyApps, in drive C,
create MyApps then type: c:\myapps\pumps in this box, and click Create.
Open
The Open command opens an existing application. The command displays the following
dialog box:
If the application is listed under Directories, double-click it. Otherwise, type the path and
application name in Selected Path, and click Open.
61
Application Programmer
Close
The Close command closes the current application without exiting Application Programmer. If
you made changes to the current application since the last save, ToolBox displays a message
that allows you to save before you close the application.
Save
The Save command saves the current application without closing Application Programmer. If
you worked with an application developed under an earlier version of ToolBox, a dialog box
appears where you can decide whether or not to save the application with the new format or
preserve the older format. The dialog looks as shown below; the version number changes
according to the version of the application you want to save.
To upgrade the application, click the V6.50 button. To preserve the older version, click the
button that shows your application’s version number.
When the application is saved, a central file is automatically created which can be downloaded
into the control central computer. See the Create Central File section later in this chapter.
Save As
The Save As command enables you to create a copy of the current application by saving it
under another name. This command opens a dialog box similar to the New dialog, and
performs the same operation (the button that creates the new application is Save). As in Save,
ToolBox allows you to upgrade the application and creates the central file automatically.
Delete
The Delete command deletes all the files of an application as well as its directory. You can
delete an application that is not currently open. If you want to delete the current application,
first select the Close command (File menu).
You cannot restore a deleted application. You may want to back the application up before you
delete it.
After you select the Delete command, the following dialog box opens:
62
Application Programmer
The process for selecting an application for deletion is the same as the process explained for
New. You can also type the path and name of the application in Select Path. After the
application path and name appear in Select Path, click the Delete button and confirm.
Files which exist in the directory that do not belong to the application are also deleted along
with the removed directory.
The procedure whereby you load the RTU’s site configuration changes, as explained below:
First import operation: A dialog box opens where you select the configuration file. After
selecting the file, it is copied to the application directory.
Subsequent import operation (the application version notwithstanding): If you select a site
configuration file the name of which is identical to one of the existing configurations, a dialog
box is displayed (shown below), where you are requested to decide whether or not to overwrite
the existing configuration file.
63
Application Programmer
The Replace command deletes the configuration file from the application directory and copies
the imported file to that directory. This operation also changes the I/O L4 file name.
Subsequent import operation (application version is older than 5.00): The following dialog
box is displayed:
Use the Replace command if you want to overwrite the existing configuration file.
64
Application Programmer
Version 5.00 (or later) of ToolBox enables you to link one application to more than one site
configuration so that the same application can be used for RTUs that have been configured
differently (different port and I/O definitions). To support this feature, all output
(configuration) file names, including the I/O file (L4) are derived from the configuration file
name and not from the application name (which was the case in older versions).
In any case, only one configuration is active at any given time. The active configuration
appears at the bottom of the Application Programmer window.
This option enables you to “import” an L4 file which is fully or partially compatible with the
selected configuration. When you access I/O links, the non-compatible I/O links are
automatically deleted and ToolBox requires you to re-define only the deleted ones.
ToolBox creates a file that carries the same name as the application and the .prn extension.
The file is stored in the application directory.
65
Application Programmer
Database Builder
Database Builder (Edit Menu) is used to build the application’s data tables. These tables are
the basis for process programming, I/O link definition, automatic central data base definition,
real-time monitoring of the RTU operation, etc.
After you select Database Builder from the Edit menu, the following is displayed:
All table editing operations are the same for all types of tables but differ in single- and
multiple-column tables.
Table rows
Click a row in the central section of the dialog box to perform an operation on the table its
represents. For example, to delete the Pumps table (see above figure) click the Pumps row to
select it. Then, click the Delete button.
Edit Table
Opens the Edit Table dialog box where you can add new lines to the table, or modify existing
table entries. See Editing a Table later in this chapter.
66
Application Programmer
Append Table
Opens the Append Table dialog box where you can start to build a new table. A new table
opened with Append Table is added to the end of the list. See Editing a Table later in this
chapter.
Insert Table
Same as Append Table but the table is added above the selected row.
Delete Table
Deletes the selected table. After selecting a row (a table name) and clicking this button,
ToolBox asks you to confirm that you want to delete the table. If you click Yes, ToolBox
checks whether the table contains data. If it is not empty, ToolBox will prompt you again. If
you click Yes, the table, including all its lines and columns will be deleted.
Printable File
Outputs the contents of the selected table to a plain text (ASCII) file. ToolBox assigns to the
file the name of the application with the .tbl extension. A Printable File operation overwrites
the file created in the previous operation. See also Create Print File.
Description
Allows you to enter detailed notes about the table.
Create Print File
Outputs the contents of all definitions in Database Builder to a plain text (ASCII) file.
ToolBox assigns to the file the name of the application with the .db extension. A Create Print
File operation overwrites the file created in the previous operation.
Search Name
Allows you to find a table or list duplicate columns. See Variable and Duplicated Column
Search later in this chapter.
User Tables
User tables contain the user-defined data (variables). One table has been defined for you, the
Qualifiers table. This table may be edited in a similar way to other user tables.
The Qualifiers table should be used to set special qualifiers (fields and/or subgroups of
variables) that affect the process in another site, in RTU-to-RTU communication, or to set
qualifiers that will identify and respond to a broadcast sent by the central (refer to User
Defined MDLC Communication).
Note: When third party protocols are used for communication, the Qualifiers table may be
deleted and recreated as a regular user table.
System Tables
The system tables include reserved variables that may be used as symbolic names during
process programming. Note that it is not possible to add tables to the system tables list.
After you click the System Tables tab, the following list is displayed:
67
Application Programmer
Constant Tables
The constants tables include reserved constants that may be used as symbolic names during
process programming. Some constants tables have been defined for you. You can add your
own tables.
After you click the Constant Tables tab, the following list is displayed:
Appending a Table
To append (create) a new table, click the table tab (User or Constants), then the Append Table
button in the Database Builder dialog box. The following is displayed:
68
Application Programmer
After clicking OK, the Edit Table dialog box opens. Enter the table values in that dialog.
Editing a Table
To add contents to a newly appended table, or to modify the contents of an existing table, use
the Edit Table dialog box. The Edit Table dialog box appears after you click OK in the
Append Table dialog box, or when you click Edit Table in the Database Builder dialog box.
The Edit Table dialog box changes according to the table type - single-column or multiple-
column. You have made this choice in the Append Table stage.
The following figure illustrates the Edit Table dialog box for a newly appended single-column
table.
69
Application Programmer
To create new entries in a single-column table, use the Add Line or Insert Line buttons.
To modify entries in a single-column table, click a box in the table that displays in the
central section of the dialog, and overwrite with a new value. The following figure illustrates a
single-column table that contains several lines. To change a name, for example, click an entry
in the Name column, and type the new entry.
Data Type
This is the data type you recorded for the table in the Append Table dialog box. You can
change the data type (open the drop-down list and select).
Changing the data type of an I/O column automatically cancels the corresponding I/O link
definitions. Changing the data type of a column that has related data (like timers, parameters)
cancels their preset values.
COS Name
Specify the COS (Change of State) flag name of the table. COS name may contain all special
characters except comma. Refer to User Defined MDLC Communication.
Add Line
Adds one row to the end of the table. The following columns appear:
Column Description
Insert Line
Same as Add Line, but the line is inserted between existing rows. Click the row above which
you want to add a new line, and click Insert Line. ToolBox re-numbers the lines.
Delete Line
Deletes a line. Click the line you want to delete, then click Delete Line. However, ToolBox
does not allow you to delete a line used in the process program or in a mapped column (such
as in a rung).
Description
Opens the ToolBox Editor and lets you enter notes and remarks about the table.
Printable File
Outputs the contents of the current single-column table to a plain text (ASCII) file. ToolBox
assigns to the file the name of the application with the .tbl extension. A Printable File
operation overwrites the file created in the previous operation.
Previous Table
Saves the latest changes in the current table, closes it, and displays the previous table in the
current category (e.g. User tables). This button is not active when you display the first table in
the category.
Next Table
Saves the latest changes in the current table, closes it, and displays the next table in the current
category (e.g. User tables). This button is not active when you display the last table in the
category.
71
Application Programmer
Close
Saves the latest changes in the current table, closes it, and returns to the Database Builder
dialog box.
In a single column table, the data type is defined in the Append Table dialog box; in a multiple
column table it is defined through the Append Column dialog box, accessed from the Edit
Table dialog. The available data type choices are explained
Every column in a multiple column table should be edited separately. Every column may
include a different data type.
The following figure illustrates the Edit Table dialog box for a newly appended multiple-
column table.
To create new entries in a multiple-column table, use the Append and Insert buttons.
72
Application Programmer
73
Application Programmer
Delete
Deletes an existing column. Click a cell in the column you want to delete, then click the Delete
button. However, ToolBox does not allow you to delete a column used in the process program
or in a mapped column (such as in a rung).
Description
Opens the ToolBox Editor and lets you enter notes and remarks about the table.
Printable File
Outputs the contents of the current multiple-column table to a plain text (ASCII) file. ToolBox
assigns to the file the name of the application with the .tbl extension. A Printable File
operation overwrites the file created in the previous operation.
Previous Table
Saves the latest changes in the current table, closes it, and displays the previous table in the
current category (e.g. User tables). This button is not active when you display the first table in
the category.
Next Table
Saves the latest changes in the current table, closes it, and displays the next table in the current
category (e.g. User tables). This button is not active when you display the first table in the
category.
Close
Saves the latest changes in the current table, closes it, and returns to the Database Builder
dialog box.
Append Column and Insert Column
The Append Column or Insert Column dialog box appears when you click Append or Insert,
respectively, in the Edit Table dialog box of a multiple-column table. This is where you define
a new column. The following figure illustrates the Append Column dialog box which is
identical to Insert Column, except for the box title.
74
Application Programmer
For a duplicated column, type the name of the existing column. A duplicated column is one
that already exists in another table and that you want to display in the current table for
reference.
Column Type
For a new column, open the drop-down list and select a data type.
Since a duplicated column already exists elsewhere, and has a data type, this parameter is not
active for a duplicated column.
Duplicate Column
Click this option if Column Name contains the name of an existing column that you want to
duplicate in the current table.
The last index of a duplicated column should be equal or less than the last index of the original
column. For example, assume that a value data type defined as V1 in a multiple column type
that has 10 rows (0-9). When you duplicate the last index should be less or equal to 9.
Otherwise the compiler will report an error.
After clicking OK, the dialog box closes and a new column appears in the Edit Table dialog
box. The location of the new column depends on the operation:
Note: Changing the data type of an I/O column automatically cancels the corresponding I/O
link definitions. Changing the data type of a column that has related data (like timers,
parameters) cancels their preset values.
75
Application Programmer
Finding a Variable
In the Database Builder dialog box, click the Search Name button. The Search Name dialog
box appears.
In the Name box, type a variable name and click OK. If the table exists, ToolBox opens the
table’s Edit Table dialog box.
1. In the Database Builder dialog box, click the Search Name button. The Search Name
dialog box appears.
2. In the Name box type the column name of the duplicated columns.
3. Click Search Duplicate, then OK. The Search Duplicate dialog box is displayed, as shown
below:
76
Application Programmer
4. Double-click the name of the duplicated column. ToolBox displays the Edit Table dialog
box of the table that contains the column.
The User table may be edited after defining its name, symbol, type, and data type (if it is a
single column table). The Edit Table function, selected from the Table List Operations menu,
allows different functions for single column and multiple column table, as detailed below.
77
Application Programmer
After selecting the appropriate data types, edit each table as follows, using the Append Table
on single column tables:
A temperature parameter of 80°C should be entered as 3,200, since the range of reading of the
analog-to-digital converter is -4,000 to +4,000. Assuming a full analog scale of 100°C (100%),
this parameter value should be 3,200.
Access the Discrete Inputs table by clicking the Edit Table button, and edit it as shown below.
Enter, as described above, the remaining data elements (and values when required) in separate
tables per each data type: AN1, T1 (10:00), PUMP1, TEMP (3,200).
78
Application Programmer
A series of 10 inputs (the first of which is IN) can execute a series of 10 outputs. The loop is
executed 10 times in the course of one scan.
Click the Last Index box and type 9. In the Last Index Name box, enter LstInd. The table
should look as displayed below.
When a series is involved, the series elements can be used as rung symbols during process
programming either directly (i.e., IN,5), or as an indexed series (IN,I). The index name (I) is
defined through the System’s Index table. The total length of the symbolic name and the
indexed name should not exceed eight characters.
You can assign meaningful names to variables in the database, such as KeyInp, TxCntr,
RxVal, etc., with capital letters. The system is not case-sensitive, therefore when writing
rungs, you do not have to type in the variable names with capital letters. The system will
automatically adjust your entries as defined in Database Builder.
79
Application Programmer
Process Programming
Once all variables participating in the control program have been defined via Database
Builder, you can proceed to programming the process.
Each process is built by programming a sequence of rungs in the Motorola Advanced Ladder-
Diagram Language. Each rung defines the behavior of one or several outputs as a function of
both the states of their inputs and the time.
To start process programming, open the Edit menu and select the Process Programming
command. The following dialog box is displayed:
The dialog box initially contains one table, Process list. As you add rungs, the Rungs List
table takes shape on the right side of the dialog. In this dialog box, you enter names and
descriptions in the same way as you edit table lines in the Database Builder dialog box.
80
Application Programmer
Search Name
Opens the Search Name dialog box. See Searching a Name below.
Create Print File
Generates a plain text (ASCII) file that contains all processes. After clicking this button wait
until ToolBox displays a message. ToolBox creates a file that carries the same name as the
application and the .prc extension. The file is stored in the application directory.
The MAIN process, the first row of the list, is a system default. It cannot be changed.
Edit
Opens the Rung Editor where you build the rung. Select the rung in the Rungs List, or just
double-click a rung in the list. See Rung Editor below.
Insert
Same as Add, but the rung line opens above the selected line.
Description
Opens the ToolBox Editor where you can document the rung in detail.
Copy
This function copies marke rung(s) below cursor position.
To mark single rungs: right-click them, or use CTRL+click, or use CTRL+arrow (up/down).
Searching a Rung
The Search Rung button allows you to locate a rung quickly in the Rungs List/Process List.
81
Application Programmer
In the Name box, type the name of the rung as it appears in the Name column of the Rungs
List. When you click OK, ToolBox selects the rung line in the list. Then you can, for instance,
click Edit to display the rung.
Searching a Name
The Search Name button allows you to find a specific variable (multiple column name or entry
in a single-column table), a table symbol, a COS name or a table symbol throughout the rung
sequences, when identified as input, output, or input and output.
In the Name box, type the name and then check one or both checkboxes (Search Input, Search
Output) according to the name you are looking for.
If the name that you specified exists, ToolBox displays the appropriate rung in the Rung Editor
dialog box (you can edit the rung).
After finding a variable, use the Search Next button to find its next appearance of the searched
variable.
Rung Editor
The Rung Editor dialog box is accessed when you select a rung in the Rungs List and click the
Edit button, or when you double-click a rung in the list, or when you press Enter. The editor
screen for a newly created rung looks as shown below.
82
Application Programmer
The rung may be perceived as an array of contacts (representing the states of the relevant
inputs), through which “current” must “flow” towards the elements which represent the
operation to be performed on the output. When such a flow path exists, the rung is “true”, and
the appropriate operation is performed by the output.
For a full description of the input/output operators, see the Ladder Diagram Language section.
83
Application Programmer
Close Branch
Closes a specific branch which has been opened with Open Branch (looping back). Click the
element where the branch should be closed, then click Close Branch.
! IMPORTANT
Up to six levels of branches may be used in a single rung provided that each branch is
looped back to the level from which it was opened.
Set Output
Opens the Output Elements to be Set in Rung dialog box. See Setting Output Elements, below.
Delete
Deletes an element from the rung. Click the element in the rung box (a gray box marks the
element), and click Delete.
D.B.B.
Opens the Database Builder which allows you to access the tables and make changes (or
lookup names) on-the-spot. After closing Database Builder, you return to the Edit Rung dialog
box.
Description
Opens the ToolBox Editor where you can document the rung in detail.
Prev (PgUp)
Asks the user whether to save the current rung (if modified), closes it and displays the previous
rung in the Rungs List. You can also press the PageUp key from the keyboard. After you
select the save option, ToolBox runs a validity check. If a logical error is found, ToolBox
displays an appropriate message and selects the element that caused the error. In this case, you
must correct the error before you continue.
Next (PgDn)
Same as Prev, but displays the next rung in the list. You can use PageDown key instead.
Search Next
Finds the next occurrence of the searched variable.
84
Application Programmer
Double-click the element to proceed to the element editing stage. Alternatively, you can
double-click an element in the Input box of the Rung Editor dialog box. ToolBox opens the
Edit Element dialog box. See Edit Element below.
Double-click the element to proceed to the element editing stage. Alternatively, you can
double-click an element in the Output box of the Rung Editor dialog box. ToolBox opens the
Edit Element dialog box. See Edit Element below.
Edit Element
The Edit element dialog box opens after selecting an input or output element, or when you
double-click an existing element in a rung, or when you select an element in a rung and click
the Edit button. You can also access the editing function by selecting the element and pressing
Enter. A visual representation of the element appears in the upper-left corner of the box, as
shown in the following figures.
The dialog may display one or more data entry boxes (e.g. Input 1, Input 2, or Output, Input,
Length), according to the type of the element. In these boxes type the appropriate names, such
as input variable names defined in tables. ToolBox makes sure that the names exist in the
database, and does not allow you to enter undefined names. The Browse button enables you to
go over the list of valid names.
85
Application Programmer
Call: Enables the user to select a ToolBox function from a choice list, and to optionally pass a
parameter to it. For details about the functions, see User Defined Local Ports and User
Defined MDLC Communication.
Calc: Enables you to enter a formula that contains operations and variables and to store the
result. See Calc in the Ladder Diagram Language section.
86
Application Programmer
Send: Enables you to record text combined with variables, that can be sent through user ports.
See User Defined Local Ports.
The examples below use variables mentioned in Database Builder examples earlier in
this chapter.
Example 1
First Rung:
Valves VLV1 (Open Branch Input) or VLV2 (Close Branch Input) as N.O. contact
inputs.
87
Application Programmer
Second Rung:
T1 is used as an N.O. input, EMRG as an N.C. contact input, and analog input AN1
depends on a comparator (if less than 3,200). The numeric value of the TEMP
parameter is 3,200. 3,200 is the value of a parameter data type, predefined in the data
base.
Process 1:
StEvnt
(1) ( CALL )
#2
GtEvnt
(2) ( CALL )
__Typ __Tbl
Procs1
(3) = ( JSP )
#0 #9
__Typ __Tbl
Procs2
(4) = ( JSP )
#0 #11
__Typ __Tbl
Procs3
(5) = ( JSP )
#0 #13
A series of 10 inputs (from IN,0 to IN,9) can execute a series of 10 outputs. The loop
is executed 10 times in the course of one scan.
Rung4: If I < 10 (the value of V10 in the data base is 10), jump to rung2. i.e., the
process is repeated for IN,1 – OUT,1; IN,2 – OUT,2... up to IN,9 – OUT9.
88
Application Programmer
I
(1) ( MOVE )
__Row
#1
Inp1, I Inp2, I
__Typ
Send2C
(4) ( JSP )
#2
(5) ( RET )
I/O Link
After the program is completed it should be linked to the outside world, by creating the link
between the variables defined in the database and the physical I/Os of the appropriate RTU, as
configured via Site Configuration.
The I/O link portion of the application uses the RTU configuration details, which were defined
and downloaded through Site Configuration. For further details, refer to Site Configuration.
Any change in the RTU configuration affects the application. Therefore, if you change the
configuration, do not forget to update the I/O link definition. Before defining links, you
should load the site configuration file using the Import Site Configuration command (File
menu).
To start the I/O link process, open the Edit menu and select the I/O Link command. The
following dialog box is displayed:
89
Application Programmer
The dialog box displays the table list, generated on the basis of the application database. The
Link Status column shows the I/O link status of these tables. I/O- designates a table whose
variables are still unlinked. The - sign disappears after completing the I/O link.
Note that changes in the database tables may create incompatibilities that affect the I/O links.
The I/O Link Column Definition dialog box allows you to link the desired I/O variables by
entering the data described below.
a) The I/O location (Rack 0-15) for the physical I/Os to/from the RTU (based on site
configuration definition).
b) The I/O definitions already defined in Database Builder, according to the different data
types:
2) IN_1 – IN_16: 16 discrete inputs to the RTU (previously defined in DBB as discrete
input data type).
3) FC_IN_ 1 – FC_ IN_2: The counters that count the number of pulses according to the
respective inputs (previously defined in DBB as value input data type).
4) OUT_1 – OUT_16: 16 control relay outputs of the RTU (previously defined in DBB
as discrete output data type).
90
Application Programmer
6) BI_1 – BI_16: Discrete inputs which are back indication for discrete outputs (discrete
input variables linked to a physical discrete output).
7) FAIL: The module fail status (previously defined in DBB as discrete input).
A data type may have several link options according to the I/O module defined in Site
Configuration. For example, when linking a Discrete Input variable to a Mixed I/O module
(including 8DI + 2AI + 4DO), the following options will appear in the I/O Link column:
IN_1–IN_8, BI_1–BI_4, and MOD_FAIL.
91
Application Programmer
If the data base table was defined as a single column table, the I/O link table includes the I/O
name (already defined in Database Builder; for example, IN1) and three more columns. Two
of them are for linking the data base I/O with the physical one (mapped according to the
respective rack and module). The third column is the I/O link programmer definitions. Open
the drop-down list and select an item.
Connect Items
This command enables you to quickly connect large numbers of variables to physical modules.
The command button becomes active after you define at least one row. What happens after you
press Connect Items, depends on the module type.
92
Application Programmer
For all modules, except for single-cable modules, a list of items is displayed, as shown in
the following figure.
The lower half of the dialog lists the items that await connection. Just select the last item to be
connected, and click OK.
For a single-cable module, ToolBox leads the user to the Connect Items command, by
displaying “Use Connect Items” in the I/O Link Column Definition column, as illustrated
below:
93
Application Programmer
As you press the Connect Items button, the Connect Group of Single Cable Elements dialog
box is displayed.
Since in the single-cable case two levels of selections are involved, the dialog provides two
lists. In the Choose Item Group list you select one group to display the corresponding items to
be connected (the list on the right). You can do one of the following:
• To select only one item from the list, just click it.
• To select items non-consecutive items, hold CTRL down and click the items.
• To select consecutive items, click the first, hold SHIFT down, and click the last.
If the selected items overwrite existing definitions, the following message box appears where
you can confirm or cancel the operation.
Also, if you select more items than the number of rows in the variables table, the following
message is displayed. If you confirm (Yes) the extra items are excluded from the operation.
94
Application Programmer
Compiler
The Compiler command (Run-Time menu) translates the application program into a suitable
form for downloading to the appropriate RTU (object file).
If errors are found during the compilation process, they are displayed, and the object file is not
created. The errors are stored in a log file with an .log extension in the application folder. If
an older file exists for the same configuration and application, it will be overwritten. ToolBox
displays the contents of this file in a window, at the end of the failed compilation process. You
can also see the messages via the Show Compiler Messages command (Run-Time menu). The
error log cannot be printed or saved from the Viewer.
The Less than V3.70 option enables the CPU selection buttons.
CPU
MOSCAD CPU 300: The memory size available for the application is 64 Kbytes.
95
Application Programmer
MOSCAD CPU 200: The memory size available for the application is 4 to 7 Kbytes. This
option is available for RTU versions less than 3.70. Later versions are supplied on CPU 300
and CPU 400.
Note: You can press ESC at any time to abort the compilation process.
The following list describes the extensions of the created object files.
ToolBox
Software
File Name Description
Version
<config name>.CFG site configuration ALL
<network name>.SCF network configuration ALL
<network name>.TBL network configuration ALL
<project name>.PRG application source file (rungs and data ALL
base)
<project name>.FCS Compressed application source file ≥ V3.90
<project name>.WRK Intermediate application source file ≥ V5.00
<project name>.BAK back-up application ALL
<project name>.DOC description file ALL
<project name>.WDO Intermediate description file ≥ V5.00
<project name>.BDO temporary back-up application description ALL
file
<config name>.L4 I/O link file ALL
<config name>.WL4 Intermediate I/O link file ≥ V5.00
<config name>.BL4 temporary back-up I/O link file ALL
<project name>.PRN print project or phone book ALL
<project name>.PRC print process ALL
<project name>.PR print specific process ALL
<project name>.DB print data-base ALL
<project name>.TBL print table ALL
< project name>.P30, compiler output monitoring maps < V3.90
.P31, .P32
<config name>.N30, compiler output monitoring maps ≥ V3.90
.N31, .N32
< project name>.TMP compiler output internal dissembler < V3.90
<config name>.DIS compiler output internal dissembler ≥ V3.90
96
Application Programmer
ToolBox
Software
File Name Description
Version
< project name>.RAM compiler output (the required RAM size < V3.90
for the compiled application)
<config name>.RA1 compiler output (the required RAM size ≥ V3.90
for the compiled application)
<project name>.OUT central file ALL
In ToolBox versions earlier than 5.00, output file names are derived from the project name and
not from the configuration name.
Download Application/Network
The application can be downloaded only after downloading the site configuration. Any
change in the site configuration affects the application. Therefore, if you change the site
configuration, update the I/O link definitions and download the application again. You can
download the application together with the network configuration and the compressed source.
97
Application Programmer
During the download process, ToolBox checks that the configuration is compatible with the
RTU (for MOSCAD versions up to 3.8x). The free RTU memory space for the application is
also checked. MOSCAD versions later than 4.00 or MOSCAD-L 1.00 or later do not require
full correspondence between the configuration and the application. It is the user’s responsible
to ensure proper functioning of the application.
After you select the Download Application/Network command from the Run-Time menu, the
following dialog box appears:
98
Application Programmer
Network File
Enter the name of the network file to be downloaded with the application.
Browse
If you do not know the name of the network configuration file, click this button. ToolBox
displays the Open dialog box which defaults to the configuration directory.
Site ID, Link ID
For network configuration download purposes, specify the Site ID and Link ID of the RTU. If
you specified the Site ID and the Link ID in the main window, the information is copied from
there.
Download
Click this button to start the download process.
Compress/Download
The Compress/Download command on the Run-Time menu is used to save the application in
flash memory, so it can be retrieved via the ToolBox computer. The command opens a dialog
box where some files are already marked for compression.
99
Application Programmer
In versions earlier than 5.00, the L4 and the output file names are identical to the project name.
Clicking a name (or pressing the spacebar) toggles between selection and deselection. Select
the files you want to compress and, optionally, download.
Click Proceed to upload and decompress the application to a directory named after the
application name. To save the uploaded application elsewhere, use Save As.
If the application you uploaded exists on your disk (same name), the dialog box offers the
Overwrite button (instead of Proceed) which you can use to overwrite the application on the
disk. If you upload an application that is already open, only Save As is available.
Monitor Mode
The Monitor Mode provides on-line monitoring of the RTU, either locally or from a remote
computer. This mode allows real-time monitoring of the actual values of the variables defined
in every database table or in every rung. It also provides I/O freeze function (Stop Scan) for
simulation and system test purposes, and allows you to change, update, or set conditions for
some of the database elements.
100
Application Programmer
To work in monitor mode, the ToolBox computer should be connected to the RTU (if locally
controlled). Then, open the Run-Time menu and select one of the monitoring commands.
Database Monitoring
Database Monitoring allows you to monitor the actual values received from the RTU during
run-time operations, for each database table. After you select this command, ToolBox opens
the Database Monitoring dialog box which is similar to Database Builder box.
If the table exists, ToolBox opens the Table Monitoring dialog box. See Table Monitoring
below.
Monitor
Opens the Table Monitoring dialog box for the selected table. Click a table name, then click
Monitor. Alternatively, you can double-click the table name or press Enter. See Table
Monitoring below.
If a CRC discrepancy between the application in the RTU and in the PC is detected the
following message appears: “Project is not compatible with unit application. Continue
monitoring?” If you click Yes, the monitor retrieves partial information. For example, if the
application in the RTU includes a table holding 20 lines, and the same table on the PC includes
40 lines, the process retrieves the 20 lines, and displays 0 in all other lines. In this case you
will not be able to write to a spot in the database that does not exist in the RTU. In all
subsequent windows, ToolBox displays “No communication/incompatible CRC”.
101
Application Programmer
Table Monitoring
After selecting the table to be monitored, the table is displayed in the Table Monitoring dialog
box, as shown below.
102
Application Programmer
Change Format
This function allows you to display a table column in a format different from the default
format of the corresponding data type (except for float). The following is displayed:
In the Display Format dialog box, open the drop-down list to see the options, and select one.
The default corresponds to the normal format of the data type in question.
Monitoring Snapshot
A snapshot of table monitor values can be saved to a file. The contents of the monitored table
are saved in CSV (comma delimited) format for use in Excel spreadsheets.
To set the option, go to the Prg sub-directory of the ToolBox (tbox950) directory. The
changes are made directly in the TOOLBOX.INI file located in the tbox950\Prg\. The file can
be modified using a standard Windows text editor. The parameter to be changed is in the
[General] section of the file, as shown below. Add /DBMONFILE to the Flags variable.
[General]
In order for the changes to the Table Monitoring to take effect, close the Application
Programmer tool if it is open. Start the Application Programmer tool again and select the
desired application and database table to monitor. When the User table being monitored is
closed, the contents of the table (without the column headings) are then saved. The snapshot
file named <index>.mon (where <index> is the number of the table as shown in the main
Database Builder and Database Monitoring screens.) is kept in the application directory (e.g.
tbox950\user\applx).
Process Monitoring
The Process Monitoring command allows you to monitor the actual values received from the
RTU during on-line operations, for each predefined rung. This is useful when debugging the
process. The command opens the Process Monitor dialog box which is similar to the Process
Programming dialog.
103
Application Programmer
Rung Monitor
The Rung Monitor dialog box is where you monitor the behavior of the selected rung during
run-time.
104
Application Programmer
For example, after setting the following qualifiers: I=9, J=3, K<5, the indexed element will be
sampled when all qualifiers conditions are fulfilled. In the rung, only D,I will be displayed
since J and K are not specified.
The values are sampled immediately after the rung has been executed. If the rung includes the
JMP, JSP, or RET operators, the values are sampled before executing the rung.
Next (PgDn)
Selects the next rung for monitoring.
105
Application Programmer
Prev (PgUp)
Selects the previous rung for monitoring.
Search Next
Finds the next occurrence of the searched variable.
Names
For monitoring the actual values/variable names of the database symbol names during run-time
(toggles between symbol names and values).
ScnTim (Scan Time): The system updates this variable to indicate the Main process scan time
(in 10 msec resolution). The scan time is measured from the beginning of the scan until the
beginning of the next scan.
MaxScn (Maximum Scan): This variable is also updated by the system. It indicates the
maximum Main process scan time (in 10 msec resolution). During monitoring this variable
displays the longest scan time since the system was started or since the variable was reset. It is
possible to reset this variable during monitoring by writing 0 into it for searching the longest
scan time.
106
Application Programmer
ScnLst (Scan Last): This variable is updated by the system. It indicates the time (in 10 msec
resolution) that has passed since the system has accessed and performed the last task (the
lowest priority task in the system software).
DtyCyc (Duty Cycle): This variable indicates the percentage of CPU cycle time that is
assigned for the Main process and all system tasks in higher priorities. The system starts with
60% duty cycle for these tasks.
When the system cannot execute the lower priority tasks (including the ladder tasks in
priorities A to D), it reduces the CPU percentage assigned for the higher tasks to allow for the
execution of the lower priority tasks.
107
Application Programmer
After selecting the project (Project menu), open the Options menu and select the Import
command. The following dialog box is displayed.
The Destination Project section shows the project that has been selected and, in a tree-like
structure, the elements of the application program. The application program elements are
divided into two main branches, Tables and Processes.
When you expand the branches and sub-branches of the Tables entry, you see a list of your
application tables. For example, when you expand the User sub-branch, the Import utility lists
the user-defined tables of the selected application program.
The sub-branches of Processes correspond to the processes of the selected application. Under
each process the Import utility lists the corresponding rungs.
Some of elements, such as some system tables, appear grayed. This means that you do not
have to import them, as they are identical in all projects. You can import elements that are not
grayed. For example: you can import the Index (system) table and the contents of the imported
table will be added to the present table. The newly imported elements will be shown in the list.
When you request to copy (import) elements, the Import utility goes through the following
stages:
108
Application Programmer
• Displays a report that shows the changes the utility is about to make in the destination
application
First import the tables and then the rungs and process. Importing rungs that refer to variables
that do not exist or that have a different data type in the destination project, causes the import
process to delete the references from the imported rungs (appropriate warning and error
messages are issued and the user is given the opportunity to cancel the import process).
1. Open the File menu of the Import utility and select the Select Source Project command. This
command displays the standard Open dialog box and focuses on your installation’s application
folder, listing existing applications.
2. In the Open dialog box, locate the application from which you want to import elements,
click the application and then OK. This operation displays the tree structure in the Source
Project pane of the Export Import window.
To start copying:
1. In the Source Project pane, expand the tree to locate the elements you want to import.
2. Select the tables using SHIFT+click or CTRL+click, as in any other Windows application.
3. Open the Edit menu and select the Copy command. This command copies the selected
tables to a dedicated clipboard.
For entire processes, select the Processes branch (the imported processes will be added to the
end of the process list).
For specific rungs, expand the Processes branch, locate and select the rung after which you
want to add the imported rung(s).
5. Open the Edit menu and select the Paste command. See next step.
All import operations are automatically registered in a special log file called “expimp.log”,
under the “Log” sub directory. After executing the very first import operation, a log file
already exists on your disk. Therefore, the next time you activate the Paste command, the
Import utility first asks you what to do with the existing log file, by displaying the
Append/Overwrite dialog box:
109
Application Programmer
• Click Overwrite to replace the existing log file. Earlier logged entries are deleted.
• Click Append to keep the existing log entries and to add the new entries to the end of the
log file.
• Click Browse to create a new log file and keep the older one. This button opens the
Browser dialog bow where you can specify a new name (and path, if you want).
The log file viewer opens. If warnings and/or errors are reported, read the log.
Warnings appear when the Import utility detects an error that it can correct - for instance,
when you import elements that already exist in the destination application.
As names (table, field, process, rung names) should be unique, the Import utility assigns new
names to the imported elements and the warning report indicates them.
New names consists of the old names and a numeric prefix that the utility selects randomly.
The random prefix may contain up to six digits.
Errors occur when the Import utility encounters a problem it cannot resolve. For example: if
you import a table contains values mapped to other tables (that are not imported), the import
process deletes the mapped data. If the utility runs out of random numbers, an error occurs.
For a full list of warnings and errors, and their explanation, see the Error Messages manual.
If you want to perform the import process, click Continue. If you want to stop it, click Abort. If
you click Abort no action takes place and you return to the Export Import dialog box.
Step 5. Importing
If you decide to continue, the Import utility displays the Importing... box and shows the
progress. When the progress indicator reaches 100%, click OK to end the operation.
If you close Application Programmer without saving the project, imported elements are not
saved in the application.
110
Application Programmer
The Paste command is a one-time operation. After selecting it once, it becomes grayed (you
cannot paste more than once, unless you select Copy again).
The Save As command (File menu) allows you to save the log under a new name.
The Cancel Selection command (Edit menu) cancels the selections in the Source Project pane.
Open the drop-down list and select the version to which you want to upgrade. Once the
application has been upgraded, it cannot be downgraded back to its original version.
111
Application Programmer
File Editor also provides a Configure option, which enables the user to customize the Options
menu by adding commands. The menu item name is specified along with associated command
(executable) and any desired options. Menu items can also be changed or removed using the
Configure command, as shown below.
112
Application Programmer
The Groups box lists the categories (like the basic variable types or process names). Click a
group to list the corresponding names in the Database Names box. Then, select a name and
click OK.
In order to save time, the displayed database names are not updated automatically after making
changes (for example, in the database or process list). Therefore, if you made changes, click
the Refresh button in the Database Names dialog box in order to update the list.
ToolBox Editor
The ToolBox Editor window appears when you click a Description button throughout the
Application Programmer. It allows you to enter detailed notes for documenting your
application.
ToolBox manages the documentation texts internally and assigns each text to the correct
entity. For example, when you click Description for a table, ToolBox stores the text you
entered in the editor window with the related table.
113
Application Programmer
The editor uses standard Windows text editing functionality. You can select text by dragging
the mouse over it, use cut-and-paste (CTRL+C, CTRL+X, CTRL+V), as well as undo
(CTRL+Z).
The notes are automatically included in the documentation printout created with the Create
Printable File command (File menu).
114
System and Constant Tables
This chapter describes and explains the system and constant tables, including examples. The
order of description is according to the system tables list. The constant tables are described
with the relevant system table.
System Tables
The system tables are pre-defined tables, designed to hold communications buffers, index
pointers, time and date variables, and other system-related variables. While the user tables and
some constant tables may be modified by the user to meet specific needs, the system tables
may not be modified. The following figure shows the system tables.
The system tables include reserved variables that may be used as symbolic names during
process programming.
Note that when you click the System Tables tab, you do not see all of the tables. Use the scroll
bar to see the rest of the list.
Constant Tables
The user may use symbolic constants (instead of their numeric value) during process (ladder)
editing. For example, if a limit for a process is 100, a symbolic name such as LIMIT 1 is used
in the process instead of the value.
Some of the constants tables are pre-defined, including constants such as, ASCII characters,
port names, modes and protocols, etc. These tables are described later in this chapter.
115
System and Constant Tables
Note that when you click the Constants Tables tab, you do not see all of the tables. Use the
scroll bar to see the rest of the list.
116
System and Constant Tables
Tables Descriptions
The following is a description of the pre-defined tables.
For further details about the RTU-to-RTU configuration, refer to User Defined MDLC
Communication.
To facilitate the use of the Time & Date table, the system provides constant tables to be used
in the ladder application.
There is an appropriate constants table for each variable in the Time & Date table (except for
the Seconds variable). The user may define constants to be used with the Seconds variable.
These constants should be in the range of 00 to 59.
Year variable: the Years table includes symbolic names for the years (starting from 1991).
The user may add constants to this table and also modify the names of the existing constants.
117
System and Constant Tables
Month variable: the Months variable includes the names of the months of the year. This table
is protected and is not editable.
Date variable: the Dates table includes all possible dates - from the 1st of the month up to the
31st. This table is also protected and is not editable.
118
System and Constant Tables
Day variable: the Days table includes the days of the week. This table is also protected and is
not editable.
Time variable: the Time constants table allows you to define constants with values in the 24-
hour format Hr:Mn (Hr varies between 0 and 23, and Mn varies between 0 and 59).
1) The following rung activates the DyStrt process at a specific hour, defined as
SrtTim.
Time DyStrt
= ↑ ( JSP )
StrTim
Note that the differentiator causes a single access to the DyStrt process at the
beginning of the minute defined by the StrTim variable.
2) The following rung performs the same operation five days a week (Saturday and
Sunday are not included).
3) The following rung performs the MnStrt process once, on the first of the month. In
the same way it is possible to make process performance conditional on a month
and/or year.
DATE MnStrt
= ↑ ( JSP )
1'st
119
System and Constant Tables
Index Table
This table (which may be edited) allows the user to define the necessary indices for writing
programs. It is recommended to define indices with one-character symbolic names (such as I,
J, K) for creating 6-character symbolic names for variables. The variable name field in the
Ladder Diagram is 8-character long: SYMBOL,x.
One of the advantages of building the data base in multiple column tables (in which each row
represents a controlled device) is that it provides the possibility to define one algorithm for
one device and to run this algorithm by an “index” on all the devices. The index is actually a
variable pointer to the table rows. For this purpose, the system provides an index data type. To
define indices, use the Index table (one of the system tables). Each variable defined in this
table is an index.
• ENABLE – a bit variable that specifies whether the air conditioner in a specific
section should be activated or not.
• TEMP – a value input variable that is the temperature reading from a specific
section.
• LowLmt – a parameter that defines the temperature lower limit for a specific
section.
• HiLmt – a parameter that defines the temperature upper limit for a specific
section.
120
System and Constant Tables
The LstFan variable (defined by the user) indicates the number of the last fan, in this
case 49. The following rungs activate all 50 fans; I is the index, defined in the Index
table.
TEMP
(1) ( SCAN )
TEMP
(2) ( SCAN )
ENABLE,I FAN,I
(4) / (U)
TEMP,I
>
LowLmt,I
I
(5) ( CTU )
I FnLoop
(6) < ( JMP )
LstFan
I
=
LstFan
FAN
(7) ( SCAN )
Before performing the algorithm, the 50 temperatures (complete column) are read by
the SCAN operator. The I index is then reset to point the first row in the table. When
I=0, all values of the indexed variables refer to the first section. Therefore, the
algorithm will start with the first row (i.e., the first section).
The algorithm is written as a loop (rungs 3 to 6), starting at the FnLoop rung and
ending at the rung with the JMP operator. The algorithm logic is as follows:
• If the section is ENABLED and the actual temperature is higher than HiLmt, the
fan is activated by the LATCH operator (rung 3).
• If the section is not ENABLED or the actual temperature is lower than LowLmt,
the fan operation is stopped (rung 4).
• The I index is advanced by the CTU (count up) operator to perform the algorithm
on the next section (rung 5).
121
System and Constant Tables
• The I index is compared to the LstFan variable (rung 6). If it is found smaller or
equal to the LstFan variable it means that the loop is to be performed again (for
the next section). If the I index is higher than the LstFan variable, the program
exits the loop and proceeds to the next rung (7).
The last rung (7) scans the FAN variable to update physical outputs according to the
FAN column in the table.
By using an index, the algorithm is written only once and not n times.
The loop size is defined by the LstFan variable, and not 49 (the last section in our
example). That is, by a single operation (refer to the Database Builder section in the
Application Programmer chapter) you can reduce or enlarge the size of the table – the
algorithm is automatically adjusted to the number of sections.
You can refer to a specific row by assigning a number rather than the index. For
example, TEMP,3 indicates the temperature of section number 3 (the 4th row, starting
from 0).
2. When the algorithm for an external device (for each row in the table) is long and
complicated (considering CPU time), you may want to divide the control operation so
that only one row of the table will be handled in a process SCAN. This case is
different from the previous example, where the algorithm for all rows is handled in
one SCAN. In this case, the rungs are as follows:
I I
(1) > ( RST )
LstFan
I TEMP
(2) = ( SCAN )
0
ENABLE,I FAN,I
(4) / (U)
TEMP,I
>
LowLmt,I
I
(5) ( CTU )
I FAN
(6) > ( SCAN )
LstFan
The first rung checks that the I index is in the correct range. If I>LstFan, it is reset to
0. Only when I=0, all temperatures are read by the SCAN operator.
122
System and Constant Tables
The logic of activating and deactivating the fans is similar to the previous example
and so are the rungs (3 and 4). The I index is incremented by the CTU operator to be
ready for the next row in the next SCAN.
When I>LstFan the FAN column is scanned to send the values to the physical outputs.
Note that the SCAN operator is performed on the TEMP and FAN variables once
every 50 cycles (in this case) and not in every cycle.
In example 1, the I index of the loop may be used in the same process for another loop, since
the index is used only within the loop.
In example 2, you should not use the I index again, since it is incremented in between cycles
and keeps the pointer for the next cycle. Therefore, it cannot be used in another loop.
Indices are defined only in the Index table. You may perform arithmetic operations on indices
beside the RST, CTU, and CTD operators. Refer to the description of the relevant operator.
I/O_Fl: This variable is set by the system; ‘1’ indicates that one of the I/O modules is faulty.
This variable may be used to activate a local relay output, named BELL, that is reset by a local
push-button, named ACK.
123
System and Constant Tables
I/O_F1 BELL
↑ (L)
ACK BELL
(U)
The differentiator causes the Latch operation to be performed only at I/O_Fl appearance.
The I/O_Fl variable may also be used for sending events to the central. Refer to RTU Event
Reporting in User Defined MDLC Communication.
Init: Initialization. This variable is set by the system to ‘1’ when a new application is
downloaded to the RTU during “reset-load” (all variables are preset), or when a “cold-restart”
is performed. If this variable is used, it should be reset at the end of the process.
For example, the PreSet process is run at initialization. At the end of the process, the Init
variable is reset to ‘0’.
Init PreSet
Part of Main ( JSP )
Process
PreSet Init
Process (U)
PwrUp: A variable set by the system to ‘1’ upon power-up or power restore (not as the Init
variable that is set to ‘1’ only at cold start-up). If the PwrUp variable is used, it should be reset
after performing all power-up operations.
The PwrUp variable may be used as a condition to perform various operations at power-up as
in the following example.
PwrUp CONT
/ ( JMP )
Power-up PwrUp
Operations (/)
CONT
When the PwrUp variable is not true (no power-up), the rungs that perform the power-up
operations are skipped.
Note that during “cold-restart” the Init and the PwrUp flags are set to ‘1’, and during “warm-
restart” the Init flag is set to ‘0’ and the PwrUp flag is set to ‘1’. It is the user’s responsibility
to reset these flags.
AC_Fal: This flag is set by the system to ‘1’ when a power failure causes switching to a back-
up battery. It is reset when power is restored. A parallel external LED AC(FAIL) on the CPU
front panel is lit upon AC power fail.
124
System and Constant Tables
Note that this flag is relevant only if the unit is equipped with a back-up battery.
For example, if the AC power failure is longer than 10 minutes, a local buzzer will sound and
an event will be sent to the central. The FalDly delay-on timer is defined as a Minutes Timer
and its value is set to 10:00 (10 minutes).
AC_Fal FalDly
( DON )
FalDly BUZZER
( )
FalDly
↑ event transmission
BatFal: This flag is set by the system to ‘1’ when the voltage of the CPU back-up lithium
battery is low. Note that this flag is relevant only if the battery is present in the CPU module. If
the battery is not inserted in the CPU module, this flag will not indicate the battery absence.
PushB1( MOSCAD ≥V 2.00, MOSCAD-L ≥V 1.00), PushB2 ( MOSCAD ≥V 2.00): These two
variables allow you to access the status of the PB1 and PB2 push-buttons via the ladder
diagram. When a push-button is pressed, the appropriate variable is set to ‘1’. The variables
may be reset by the rungs (latch operation).
AuthOK: This variable is set to '1' when the second and third Authentication keys (used in the
synchronization of an RTU) are valid, but the first key (used in authenticating incoming frame
data) may not be. In this case, synchronization messages from a server to a client will be
processed. Incoming data frames will be accepted by the RTU if the timestamp is valid and
will be rejected if it is not.
The AuthOK variable is set to '0' when the second and third Authentication keys are not valid,
but the first key may be valid. In this case, synchronization messages from a server to the
client will no longer be processed. Incoming data frames will be accepted by the RTU if the
timestamp is valid and will be rejected if it is not. As soon as the receiving RTU's clock
becomes unsynchronized, no incoming data frames will be accepted by the RTU. The user
will then have to redefine the second and third authentication keys and download them to the
RTU using the Network Configuration utility.
For more details on authentication keys and the synchronization of the RTU based on the Max
Drift parameter, see the Authentication chapter in Advanced Features in the Application
Programmer manual.
TskPrA - TskPrD (Task Priority): These four system flags indicate to the ladder whether the
A to D tasks are running or not. Refer to the RUNP output operator in Ladder Diagram
Language.
GPSVal ( MOSCAD ≥V3.70, MOSCAD-L ≥V1.00): This variable indicates if the GPS is
communicating with the MOSCAD, or if it is disconnected. It is set by the system to ‘1’ when
the communication is valid, and to ‘0’ when it is null. Refer to Global Positioning System in
Advanced Features in the Application Programmer manual.
125
System and Constant Tables
ErrLog: This flag is set by the system to ‘1’ when there is at least one error in the error log
file. It is reset when the file is empty.
The ErrLog variable may be used to inform the control center that there is an error (ErrLog=1)
– as in the following rung.
ErrLog INFOER
↑ ( JSP )
When ErrLog=1, the program jumps to the INFOER (inform error) process. This process
performs the task of sending events to the control center. In this case, the event is an error
event. An example of such a process is given in User Defined MDLC Communication - RTU
Event Reporting.
TimTag: This flag is set by the system to ‘1’ when there is at least one message in the Time
Tag log file. It is reset when the file is empty.
The TimTag variable may be used to inform the control center that there is a message
(TimTag=1) in the Time Tag log file – as in the following rung.
TimTag INFTAG
↑ ( JSP )
When TimTag=1, the program jumps to the INFTAG (inform time tag) process. This process
performs the task of sending events to the control center. In this case, the event is a message in
the Time Tag log file. An example of such a process is given in User Defined MDLC
Communication – RTU Event Reporting.
DefC_Y: This flag is set by the system to ‘1’ only when the RTU “knows” its default central.
At the first transmission of the central (after system setup), each RTU holds the routing to the
default central. If such a transmission has not occurred (DefC_Y=0), then an RTU
transmission to the default central will result with an error – the ERR LED of the MOSCAD
RTU will light.
For example, refer to a process that performs burst communication towards the default central.
This process includes the following rungs:
Esite
( MOVE )
Cntral
To prevent an RTU transmission to the default central without “knowing” the default central
(such a transmission will result with an error), the transmission rung should be conditioned by
the DefC_Y flag, as follows:
DefC_Y TxEvnt
( CALL )
b
126
System and Constant Tables
The TxEvnt function will be called only when DefC_Y=1, that is RTU “knows” its default
central.
For example, it is possible to activate a DOF timer (with a T preset time) according to the
CntCom variable in order to change the RTU mode of operation in case of central failure
(CntCom=0), as follows:
CntCom T
/ ( DOF )
T MODE2
/ (L)
The MODE2 user bit may be used to activate the RTU in an independent mode of operation. If
MODE2=0, there is communication with the central. If MODE2=1, there is no communication
with the central.
EvOvfl: This flag is set by the system. ‘1’ indicates that the event queue is full and the next
event will be written over the existing events. It is the user’s responsibility to reset this flag.
PrmFlg: For Dual CPU Mode, ‘1’ indicates that the CPU is plugged in Slot-0 (Primary).
PrmFal: For Dual CPU Mode. The Secondary’s application may use this flag to check if a
failure has occurred in the Primary CPU module. ‘1’ indicates that there is a failure in the
Primary.
DisCom: When active (1), the CPU does not respond to messages that were sent to its main
address, and in addition, does not send any message (burst, SndFrm etc.). The CPU responds
only to messages that were sent to its secondary address or messages that were sent in LOCAL
Mode.
127
System and Constant Tables
Site table
The Site table is applicable only for RTU-to-RTU communication, event reporting, data burst,
and sync. This table is used to define all the RTUs that the present RTU wishes to
communicate with. For each destination RTU, the user should define a symbolic name, logic
address (Site ID), and the link (link ID) through which it is connected. When programming the
process using the ladder rungs, the user should employ only the symbolic site name in the
appropriate rung for sending the data to that site. For further details including examples, refer
to User Defined MDLC Communication.
Tx Event Table
The Tx Event table is used as a buffer when sending events to the central. The events should
be defined in the constants Event Definitions 1 & 2 tables. The MDLC Port ID’s table includes
the port name(s) which connects the central computer to the FIU. For further details, refer to
User Defined MDLC Communication.
The Data Burst table is used by the RTU to transmit data to the central. The data to be
transmitted may be either a complete row of a multi-column table or a single-column table. For
further details, refer to User Defined MDLC Communication.
128
System and Constant Tables
SelfID: This variable provides the Site ID of the unit. For example, this variable may be used
when you do not want to create many applications with minor changes. You can use the SelfID
variable to modify one common application according to the needs of a specific RTU.
ClcStt (MOSCAD ≥ V3.70, MOSCAD-L ≥ V1.00): This variable is updated following a Calc
operation. When an overflow occurs, CllStt is set to ‘1’ and it is the user’s responsibility to
reset it.
UclStt (MOSCAD ≥ V3.70, MOSCAD-L ≥ V1.00): This variable is used by the ‘C’ Toolkit
and it is updated following a Ucl output operation. It is the user’s responsibility to reset this
variable.
GpsOfs (MOSCAD ≥ V3.70, MOSCAD-L ≥ V1.00): This variable enables the user to update
the RTU to daylight savings time. The GpsOfs default value is ‘0’, and it may be either
positive or negative according to the local time offset in respect to the universal time
(measured in hours).
For further details about the GPS, refer to Global Positioning System in Advanced Features in
the Application Programmer manual.
PRMEVENT TABLE
(MOSCAD ≥ V3.00, MOSCAD-L ≥ V1.00)
The PRMEVENT table enables the user to define buffers for the Event Driven software.
Unlike polling/scanning, the Event Driven software performs calculations or sends commands
only when changes occur at the inputs.
For further details about the Event Driven software, refer to Event Driven Software in
Advanced Features in the Application Programmer manual.
129
System and Constant Tables
PLC Table
(MOSCAD ≥ V3.00, MOSCAD-L ≥ V1.00)
The PLC table is used to define the connectivity to third-party controllers in the system.
For further details about Third-Party Protocols, refer to Third Party Protocols Support manual.
130
User Defined Local Ports
Some ports in the system may be defined as user ports via Site Configuration. The user ports
are controlled by the ladder application through the appropriate functions and through the user
ports table (one of the system tables). There are specific constant tables, described below, that
play a role in user defined communication.
When a port is defined as a user port, the port and the protocol are controlled by the user that
writes the rungs. For example, you may use a port for printing on a printer or for connection to
a computer (or any other smart unit) by writing the appropriate protocol.
The RS-232 ports in the system use a telephone-type 8-pin connector. To connect any
equipment that requires a standard RS-232 interface, use one of the following cables:
1) Terminal adapter cable FLN6457 (with female 25-pin D-type connector) for connection to a
terminal, computer, or printer.
2) Modem adapter cable FLN6458 (with male 25-pin D-type connector) for connection to an
external modem.
To connect two RS-232 ports of two sites (configured as RS-Link in Site Configuration), use
the above mentioned cables (connect the male and female 25-pin D-type connectors). You can
not connect two RS-232 ports without these cables.
131
User Defined Local Ports
Each row in the table includes the variables and flags for each User Port. User_1 refers to row
0, User_2 – to row 1, and User_3 – to row 2 (refer to the User Port Names table in the
Constants Tables list). Use these symbols to refer to the port (the assignment of the physical
ports is performed by Site Configuration).
Select the user ports table from the System Tables list. It looks as shown below.
USER_2
(SEND)
132
User Defined Local Ports
This rung sends the message in the window to USER_2 (User Port no.2). The next
rung, after performing the SEND operator, should check whether the message is to be
sent or not (since the system buffer is full). You should insert the value of USER_2
into an index variable (for example, x) and then check if PTxFlg,x is equal to 1 or not.
If the message was not taken for transmission, then the SEND operator should be activated
again after a while.
You may call the SEND function with an index that has been loaded with the appropriate
value: USER_1 to USER_3.
The SEND operator sends a free-format message to the ports defined as user ports.
USER_1
(SEND)
free-format message
When the rung is true, the message in the window is sent to the user port specified above the
SEND operator.
The message may include characters, text, and also variables combined with text. The message
may be sent to a printer, terminal, or may be used for communicating with any other unit using
serial protocol.
If the rung conditions are constantly fulfilled and you want to send the message only once, a
differentiator should be used.
The following rungs print a message that includes the temperature when it exceeds
HiLmt or goes below LowLmt. TEMP is the temperature variable and HiLmt and
LowLmt are constants.
133
User Defined Local Ports
TEMP USER_2
> ↑ ( SEND )
HiLmt
TEMP
<
LowLmt
<TEMP> indicates to the unit that the value of the TEMP variable should be sent. The
variable in between the angular brackets must be defined in the data base. The
variable may be either from a single-column table or from a multi-column table
including an index (for example, Status,I).
Format 1:
<BIT>: Sends the value of a discrete variable (0 or 1) with a space before the digit: “ 0” or
“ 1” (i.e., two characters).
Format 2:
<VAL>: Sends the value of the VAL variable defined as one of the following data types:
The value is sent as a fixed field of six characters in the range of -32,768 to +32,767. For
example:
30000
-27263
+12
-500
1
0
If the VAL variable is defined as one of the following data types, then the value is sent as a
fixed field of 16 characters in the range of -3.402823466x1038 to +3.402823466x1038:
• Real Value
• Scaled AI, Scaled AO
• Real Parameter
• Real Constant
134
User Defined Local Ports
Format 3:
Format 4:
<<VAL>: Sends the value of the VAL variable in its actual length (not as a fixed field length).
Note that formats 1-4 convert the value of the variable into an ASCII string while Format 5
sends the value of the variable as a character directly to the port.
Format 5:
‘n<STRING,I>: Sends a series of characters (n characters) whose codes (variables) are stored
in the low bytes of the variables in a column named STRING (starting at STRING,I). For I=K
the first string to be sent is LOWBYTE(STRING,K) and the last one
LOWBYTE(STRING,K+n). It should be noted that n may be an integer constant or index. n as
index enables sending a string with variable length (supported from version ≥ V1.63).
When the RTU sends the text, it adds <LF> and <CR> characters at the end of each line. The
codes appear in the following order: <LF> (Hex-0A) and <CR> (Hex-0D).
You may cancel the insertion of these two codes by adding the “\” character at the end of the
line (after the last character). This feature is useful when defining a protocol by the SEND
operator and also when sending “Escape Sequences” or parts of sentences to a terminal screen.
If you use “\”, make sure that there are no additional spaces after the character. Otherwise, it is
not considered as CR-LF cancellation.
The rung below positions the cursor on column 30 of the first line and then sends the
following heading: ALARM REPORT SCREEN.
USER_1
(SEND)
<-[1;30H\
Note that you must make sure that the terminal accepts “Escape Sequences”.
The first line in the window positions the cursor on the screen. The “Escape Sequence” starts
with the Esc character; type the Esc character on your keyboard – the symbol will appear on
the screen.
The \ character at the end of the first line informs the system not to insert <LF> and <CR> at
the end of the “Escape Sequences”.
135
User Defined Local Ports
If the “\” character at the end of a line is part of your text, then add a space at the end
of the line.
USER_1
(SEND)
To print a variable in 24-hour format, use %<VAL>. This will send the VAL variable as:
“_HH:MM”. For example, %<TIME> will send the TIME variable in this format.
The system automatically identifies a Timer variable (Hours, Minutes, or Seconds) in between
< > or << >, and sends it in Timer format: “_XX:YY” for <Timer> and “XX:YY” for
<<Timer>.
For example, for row 14, column 24: y=0x3134 (the ASCII values of 1 and 4, respectively)
and x=0x3234 (the ASCII values for 2 and 4, respectively).
PRxFlg Variable
The PRxFlg variable is updated by the system when the GetChr and GetDgt functions are
called. The variable receives the value ‘1’ whenever a character is read from the selected User
Port. If the PRxFlg variable is ‘0’ after calling the GetChr function, it means that no character
has been received. Refer to the PRxChr and PRxNum variables.
You should ensure that the reading operation was successful (a character has been read) by
checking the PRxFlg variable.
136
User Defined Local Ports
The following rung will read a character from User Port no.3.
GetChr
(CALL)
USER_3
The ASCII table, accessed from the Constant Tables list, contains all the characters that you
may use for comparison with the PRxChr value. The ASCII characters are detailed in the
following table.
The GetDgt function is called by the CALL operator. It reads one digit from the specified port
into the PRxNum variable in the specified row. PRxNum = (old PRxNum)*10 + Input Digit.
Once the GetDgt function has been executed, you should check the following:
• PRxFlg is ‘1’, indicating that a digit has been read from the port.
137
User Defined Local Ports
• PRxChr has received the value of ChrDgt (8196 – refer to the ASCII table). If the value of
the PRxChr variable is not equal to ChrDgt, it means that the received character is not a
digit. In this case the received character is stored in the PRxChr variable and PRxNum is
not affected.
PrtFal Variable
The PrtFal (Port Fail) variable is updated by the system when the SEND function is called.
The PrtFal variable specifies the status of the port:
PrtMod Variable
The PrtMod variable may receive one of the modes that appear in the User Port Modes table
(one of the Constant tables) shown below:
138
User Defined Local Ports
For example, 7bEv2S means 7 bits, even parity, and 2 stop bits.
Protcl Variable
The Protcl variable defines the protocol to be used. It may receive one of the options that
appear in the User Port Protocols table (one of the Constant tables) as shown below:
In the Binary protocol (default in the table and in the system), the characters are transparently
transferred.
The XonXof protocol defines the ports for ASCII and automatically supports the Xon and Xoff
control characters. If you use Xon/Xof, make sure that the data that is sent does not conflict
with the Xon/Xof values (the data should not include the values 10/13).
139
User Defined Local Ports
PrtRat Variable
The PrtRat variable defines the port data speed. It may receive one of the options that appear
in the User Port Baud Rates table as shown below:
The Ready and NotRdy functions, called by the CALL operator, allow manual control (via
rungs) of the DTR (Data Ready) or CTS (Clear To Send) signals, depending on the type of
connection. The functions may be applied on user ports only.
If the RTU acts as DTE, then the Ready and NotRdy functions control the DTR signal. If the
RTU acts as DCE, then these two functions control the CTS signal.
The default mode of operation is that the system software automatically controls the
communication. Calling the NotRdy function will reset either the DTR or CTS signal. Calling
the Ready function will return the automatic mode of operation (controlled by the system
software).
Contrary to the Send operation which sends the job to the system software for execution, the
Ready/NotRdy functions affect the port immediately. This means that, if you need to perform
an operation between Ready and NotRdy, use a delay timer to ensure the execution of the Send
operation.
140
User Defined Local Ports
screen and then the message “Enter Number”. The end user will enter a number while each
digit will be displayed (echo). After pressing ENTER, the number is multiplied by a factor
(defined in the database). The result is then displayed. The database of definitions (variables
and constants) and the process/subprocesses of this simple example are shown below.
Database Definitions
Two value variables (STATE and RESULT) are used in the process programming. They are
defined in a User table named Internal Variables.
141
User Defined Local Ports
Four constants, Header, KeyIn, OutSt, and Finish, which define the STATE variable, are also
used in the process programming. They are defined in a Constant table named Internal
Constants.
• MAIN – The main process calls the sub-processes as a function of the STATE variable.
• HeadrP – Sends a header and instructions to the screen.
• KeyInP – Positions the cursor and displays the typed number after each digit.
142
User Defined Local Ports
Main Process
The main process controls the RTU local communication. The main process checks the
STATE variable and jumps to a subprocess accordingly. First, the process sends the headers to
the screen. Then, it receives the number entered by the end user and multiplies it by an internal
factor. Finally, the result is sent to the screen, and the STATE variable is reset to 0.
Note that the process is serial and any subprocess will not be performed until the previous one
has been executed (by the STATE variable that is advanced after the subprocess execution).
After performing one complete cycle of receiving, computing, and displaying the result, the
STATE variable is compared to the Finish variable to start another cycle.
143
User Defined Local Ports
STATE HeadrP
J_Hadr = (JSP)
Header
STATE KeyInP
J_KyIn = (JSP)
KeyIn
STATE OutP
J_Outp = (JSP)
OutSt
STATE GetChr
Reset = (CALL)
Finish USER_1
PrxFlg,0 STATE
(MOVE)
Header
PrxNum,0
(RST)
HeadrP Subprocess
This subprocess sends messages (headers) to the screen by the following rungs:
USER_1
(SEND)
[2J
[1;25H\
THIS IS A DEMO SCREEN
[3;0H\
Enter Number:\
PTxFlg,0 STATE
(MOVE)
KeyIn
The first row in the window clears the screen. The second row positions the cursor in column
25 of the first line of the screen. The third row includes the header to be displayed. The fourth
row positions the cursor at the beginning of line 3 of the screen, and the last row includes the
message “Enter Number :” to be displayed.
The second rung checks the PTxFlg,0 (indicates the flag of port USER_1) variable. If it is 1, it
means that the messages have been taken for transmission to the port, and the STATE variable
is assigned the KeyIn value.
KeyInP Subprocess
This subprocess receives each key press (checks whether it is a numeric or non-numeric key)
and displays the digits typed in. Then, upon receiving the CR character, the number is
multiplied by the FACTOR constant. At this stage, the STATE variable is advanced. The
subprocess comprises the following rungs:
144
User Defined Local Ports
GetDgt
(CALL)
(1)
USER_1
[5;0H<PRxNum,0>\
STATE
(MOVE)
OutSt
The first rung (1) calls the GetDgt function in order to read a digit into the PRxNum variable.
The second rung (2) checks that a digit has been received (PRxFlg,0 is true) and that it is a
digit by comparing the value of the received digit (PRxChr,0) to ChrDgt. If so, then the
accumulated number PRxNum is sent to the screen.
The third rung (3) checks if a CR character has been received (PRxFlg,0 is true and the value
of the received character is Chr_CR). If it so, then the received number, accumulated in
PrxNum, is multiplied by the FACTOR constant, the result is inserted into the RESULT
variable, and the STATE variable is advanced.
OutP Subprocess
This subprocess sends the result to the screen. It comprises the following rungs:
USER_1
(SEND)
[7;0H\
INPUT NUMBER MULTIPLIED BY FACTOR = <FACTOR>
EQUALS TO <RESULT>.
STRIKE ANY KEY TO CONTINUE
PTxFlg,0 STATE
(MOVE)
Finish
145
User Defined MDLC Communication
The MOSCAD system uses the MDLC protocol, based on the OSI (Open Systems
Interconnection) model published by ISO. The protocol comprises the seven recommended
layers adapted for SCADA and supports all Toolbox functions. It also supports the following
functions:
In addition, any cross-section of any table can be downloaded from or uploaded to the central.
The central may download/upload any number of rows, columns, a complete table, and one or
more columns in one or more rows if they meet specific conditions.
This type of communication is almost transparent to the process in the RTU. The definition of
the database tables cross-sections to be included in each transmission is performed by the Data
Transaction Selectors (refer to the MCP-M User Guide).
The central may condition the data transfer from the RTU on the COS (Change of State) flag.
The RTU will transmit only the row numbers of the required tables in which the COS flag is
true, and the relevant data. When the data is transferred to the central, the RTU resets the COS
flag to 0.
The COS flag is a single bit for every row of all tables. It may be true in the following cases:
• Any change in one of the table entries, defined as Discrete Input, will automatically set the
COS flag of the appropriate row.
• In table columns defined as Value Input/Scaled Analog Input, any change in the last
reported data that is greater than COS delta (defined for every Value Input in the I/O Link)
will automatically set the COS flag of the appropriate row. The user can also set and reset
the COS flag in an application, using services provided by the ‘C’ Tookit.
• By applying the Ladder Diagram operators on the COS Name variable, the user can define
the conditions (such as, calculated variables) to set/reset the COS flag.
To set the COS flag in a single/multi-column table, use the following rung:
146
User Defined MDLC Communication
<Name>,I
( L )
<Name> is the COS Name that you have assigned to the single/multi-column table. I is an
index that indicates the row of the relevant COS flag.
In previous versions of the Toolbox, the COS flag was supported by means of the SetCOS
function. From version 1.74 of the Toolbox, the COS flag is supported by the COS Name
variable. When upgrading previous versions, the SetCOS function is still supported.
Remember that if the relevant rungs of the SetCOS function are deleted, you will have to use
the COS Name variable to handle the COS flag.
147
User Defined MDLC Communication
Central-to-RTU Broadcast
The system enables simultaneous data transmission to a group of RTUs. This type of
communication, called Broadcast, should modify the RTUs’ mode of operation or serve as a
trigger for a specific operation. The broadcast command includes the necessary information
concerning the addressed RTUs and the command itself.
The broadcast may be transmitted over a specific link or all links in the system. The broadcast
message includes a condition (qualifier). The broadcast is received by all RTUs on the
specified link(s). Only the RTUs that fulfill the condition will refer to the broadcast (the other
RTUs which do not fulfill the conditions will ignore the broadcast). An unlimited number of
RTU groups may be created by defining different qualifiers. The qualifiers are defined in the
Qualifiers table (reserved by the system as one of the User Tables). For more information, see
the MCP-M/MCP-T manual.
Since the value of the qualifier can be dynamically changed, the composition of the RTU
group can vary accordingly. Each RTU checks the validity of the qualifier; if the condition is
valid, the RTU automatically belongs to the group.
The broadcast command then assigns a value to a specific variable in the Qualifiers table in all
RTUs that belong to the group.
Broadcast reception does not require any support in ladder diagram; it is sufficient to define
the qualifiers in the Qualifiers table to be used by the user process.
Since the MCP-M/MCP-T does not know how many RTUs will belong to the group, there is
no acknowledgment for this type of communication. Therefore, you should use broadcasts
only when a synchronized operation is to be performed on a group of RTUs.
Logically, the broadcast may be described in the following manner (Qual1 and Qual2 are two
variables defined in the Qualifiers table):
The Qual2 variables of all RTUs having a Qual1 variable equal to x, receive the value of y.
The y value may be used to control the RTUs’ mode of operation or as a trigger for a specific
operation. You may create any number of groups by defining different qualifiers in the
Qualifiers table. Each RTU may belong to more than one group, according to the defined
qualifiers.
The events are defined during RTU process programming, where each event is defined by a
symbolic name in the Events table. See RTU Event/Burst Reporting.
148
User Defined MDLC Communication
Since all variables and constants required for this type of communication are already included
in the appropriate System tables, the user may build the applicable communication process
through the process programming, using rung sequences. The user should specify the data to
be transmitted and the name of the addressed RTU.
• Normal fashion – the order of the transmitted frames is not guaranteed. The order of the
received frames may be different from the order of the transmitted frames.
• Sequential fashion – the order of the received frames is identical to the order of the
transmitted frames.
Variables/Constants
The user can control the MDLC two-way communication between RTUs (burst and broadcast)
and event reporting to the central by using the appropriate variables/constants and functions
provided by the system (see Communication Functions available via the CALL Function in
this chapter).
The variables and constants are from the following database tables: Site table, RTU-to-RTU
Comm Buff, RTU-to-RTU Controls, Tx Event, Tx Burst, and Event Definitions.
• SndFrm (Send Frame): Transmission of an MDLC frame initiated by the RTU to another
RTU. Answer is required. Appropriate when the data is being relayed through other sites
(i.e. when Source/Destination sites are not the From/To sites.)
• AnsFrm (Answer Frame): Answering of an MDLC frame in response to another RTU
transmission. Appropriate when the data is being relayed through other sites (i.e. when
Source/Destination sites are not the From/To sites.)
• RcvFrm (Receive Frame): Reception of an MDLC frame transmitted by another RTU.
149
User Defined MDLC Communication
Site table
In the Site table, you should define all the RTUs which perform RTU-to-RTU communication,
and the centrals to which you want to send events. The Site table includes four columns/fields,
as detailed below:
• Link ID – the link through which the RTU is connected to the network. Pressing [Enter]
when the cursor is in this field will display a choice list.
150
User Defined MDLC Communication
The site names defined in this table should be used when writing rungs. The system will
communicate with the RTUs according to the Site IDs and Link IDs defined in this table.
The first row in the table, Cntral (for central), is the system default central (IGC/M old central
only). If the system includes several centrals that are designated to receive events, they should
be defined in this table: the central symbolic name and the Site ID and Link ID of the
RTU/FIU connected to that central.
In this table, you may also define names of groups for transmitting broadcasts (do not confuse
RTU-to-RTU communication broadcast with broadcasts that are sent from the central to a
group of RTUs according to qualifiers). To define a broadcast, define the Site ID as 0. The
Link ID should be the link name to which the broadcast is to be transmitted. To send a
broadcast to all RTUs in the system, the Link ID should be ALL_LINKS (selected from the
choice list).
When Site ID = 0, all RTUs in the specified link (or all RTUs in the system if Link ID =
ALL_LINKS) will receive the transmitted frame. You may add conditions to the transmitted
frame by using the variables of the Qualifiers table. In this case, only the RTUs that fulfill the
conditions will refer to the transmitted frame.
When using the Site_ID variable for setting the DstSit or for comparison with SrcSit, the
Database Table Monitoring mode will display the Site_ID index in the Site table and not its
real value. This is different from other variables in order to make the communication more
efficient without wasting time on the conversion of indices to names.
151
User Defined MDLC Communication
RTU-to-RTU Communication
RTU-to-RTU communication consists of transferring information between an application
defined for one RTU and another application defined for a parallel RTU. When configuring
the RTU application, the user should update the applicable tables previously defined.
The RTU-to-RTU communication includes a frame transmission (of Origin type or FrmSeq –
see Receive Variables in this chapter) from RTU A to RTU B and a frame transmission (of
Answer type – see Receive Variables in this chapter) from RTU B to RTU A, with or without
data as an acknowledgment.
Note that you may also send a broadcast from RTU A to a group of RTUs. There is no
acknowledgment.
152
User Defined MDLC Communication
Transmit Variables
DstSit (Destination Site): The name of the addressed RTU, as defined in the Site table. The
DstSit variable is used only by the SndFrm and SndSeq functions.
Tx_Len (Transmit Length): The number of values to be transmitted. This number must be
between 1 and the number of values defined in the buffer. After the frame is taken by the
system, the system clears Tx_Len variable to 0. Otherwise, it means that the queue is full.
TxBuf (Transmit Buffer): Up to 80 variables that are the transmit buffer. Use the MOVE or
CPY operators to insert the variables into the TxBuf (you may use indexes).
Receive Variables
ScrSit (Source Site): After calling the RcvFrm or GetSeq functions, this variable receives the
name of the transmitting RTU. The site identification is performed by comparing the RTU
name (in the SrcSit variable) to the RTU names defined in the Site table (see Site table in this
chapter).
FrmTyp (Frame Type): When a frame is received, this variable is updated according to the
type of frame received. There are six types of frames in the RTU-RTU Frame Types table (one
of the Constants Tables), as follows:
• Origin – For a frame that has been transmitted by the SndFrm function from the other
RTU. An answer is required.
• Answer – For a frame that has been transmitted by the AnsFrm function from the other
RTU. No answer is required.
• GrpCal – For a frame that has been transmitted by the TxFrm/ SndFrm function from the
other RTU. No answer is required.
153
User Defined MDLC Communication
• Messag (MOSCAD ≥ V1.61, MOSCAD-L ≥ V1.00) – For a frame that has been transmitted by
the TxFrm function from the other RTU. No answer is required.
• NO_Ans – When the RcvFrm function is activated and the addressed unit has not
answered, SrcSit receives the index of the unit and Rx_Len is reset to 0.
• FrmSeq (MOSCAD ≥ V3.00, MOSCAD-L ≥ V1.00) – For a frame that has been transmitted by
the SndSeq function from the other RTU.
Rx_Len (Receive Length): The number of values received (up to 80). When the frame is
received by the RcvFrm or GetSeq functions, the Rx_Len variable is set to the number of
values received by the buffer. If no frame is received Rx_Len is reset to 0.
Transmit Mode
The transmission is performed through the RTU-to-RTU Controls and RTU-to-RTU Comm
Buff tables. The user should write rungs to set the destination site name (DstSit variable), the
Tx_Len (number of values to be transmitted in the frame), and move the values to be
transmitted by the MOVE/CPY operators, to the corresponding variables in TxBuf.
SndFrm
( CALL )
<Error>,n
After calling the SndFrm or SndSeq functions, the Tx_Len variable should be checked. If this
variable has been reset to 0, it means that the frame has been queued for transmission. If it has
remained the same, it means that the frame has not been taken for transmission because the
internal buffers are full. In this case, you should retry sending the frame after a period of time
(by using a timer).
In case of failure, such as faulty addressed RTU, or if no Ack is received, the bit (<Error>,n)
specified by the user below the CALL operator is set to ‘1’ to indicate a failure. Note that this
bit is reset to ‘0’ at the beginning of the transmission routine. You should select the name of
the variable (after defining it in the database). You also can define a column for these error
bits and use an index (e.g. Err,x) to indicate an error for each RTU.
This Error bit is useful when several transmissions are to be sent to the same site. Because the
ComFal bit defined in the Site table for each site is reset to 0 each time transmission is
initiated, the Error bit in the SndFrm function can be used to track the status of each
transmission to the site, rather than the status of the site itself. Otherwise, the behavior of the
error bit is exactly like that of the ComFal bit (see Site table above).
154
User Defined MDLC Communication
Receive Mode
The receive function is carried out by using one of the following rungs:
RcvFrm
( CALL )
GetSeq
( CALL )
When a frame is received, the Rx_Len variable is set by the system to the number of values in
the received frame, and the SrcSit variable is set to the name of the transmitting site. The
transmitting site name (SrcSit) should be checked by comparing it (using comparator
elements) to the site names defined in the Site table. The frame type should be compared to the
frame types defined in the RTU-RTU Frame Types table.
If the transmitting site is not defined in the Site table, the frame is received by the system and
SrcSit = -1.
To answer a call initiated by another RTU, the answering function is carried out by using the
following rungs:
DstSit
( MOVE )
SrcSit
Tx_Len
( MOVE )
#1
AnsFrm
( CALL )
DstSit should receive the SrcSit from which the Origin frame has been sent. Tx_Len should be
assigned the value of 1 even if there is no data to transmit (used as an acknowledge).
The AnsFrm function is identical to the SndFrm function except that the error bit name is not
included.
The answer frame is transmitted to the site that sent the frame of Origin type.
155
User Defined MDLC Communication
When using regular RTU-to-RTU communication, transmitted frames are not guaranteed to be
received in their original transmit order because of the unknown number of retries and
acknowledgments. It is the application’s responsibility to rearrange the data in its logical
order.
In some applications, such as file transfer, it is important to receive frames in their original
order. The system features a unique sequential frame RTU-to-RTU communication (SndSeq
and GetSeq functions) which does not use retries and acknowledgments. This type of
communication re-arranges the frames at the receiving site in their original transmit order.
Every transmitted frame is assigned a sequential number, which is used at the receiving site to
re-arrange the frames by means of an internal buffer.
Following is an example of a site that transmits frames in Sequential Communication, to Site2
and Site3. A counter is included in TxBuf,0 to allow the application at the receiving site to
check the numbering of the received frames.
The rungs at the transmitting site are as follows:
156
User Defined MDLC Communication
Cnt1
CntUp ( CTU )
Cnt1 Send
= ( JMP )
defBIG
( RET )
Tx_Len
Send ( MOVE )
#10
DstSit
( MOVE )
Site2
PushB1 SndSeq
( CALL )
PushB2 DstSit
( MOVE )
Site3
SndSeq
( CALL )
P1
( RST )
TxBuf,0
( CTU )
TX Event Table
Transmitting an event (including the data and time of occurrence) to a central (IGC/M old
central) is performed by the variables defined in the Tx Event table.
157
User Defined MDLC Communication
Event: This variable should be loaded with the name of the event to be transmitted by using the
MOVE operator. The event names are defined by the user in the Event Definitions tables.
After calling the TxEvnt function, check if this variable has been reset to 0. If it is reset, it
means that the event has been sent. If not, try to resend it after a period of time (by using a
timer).
EvIndx (Event Index): This index, attached to the event, provides additional information on the
event. For example, refer to a pump table of five rows defined for five pumps. If a failure
(defined as PmpFal) has occurred then the EvIndx can be used to indicate the row number
(pump) that has failed.
ESite (Event Site ID): This variable should be loaded with the name of the central site to
which the events are to be transmitted. If the system includes several centrals, then the Site ID
and Link ID of the RTU/FIU to which each central is connected, should be defined in the Site
table. If you wish to transmit only to the active central (default central), you should use the
Cntral name that appears in the first row of the Site table, and check that DefC_Y=1 and not 0
(IGC/M old central only).
EPrtID (Event Port ID): The central is usually connected to one of the FIU ports (in some
cases directly to an RTU). Since the event is transmitted to the FIU address, the port should
also be specified. This variable should be loaded with one of the following values: Comp_1 or
Comp_2 (refer to the MDLC Port ID’s table in the Constants Tables menu). If the ESite
variable is defined as the default central (the first line in the Site table), you should not refer to
the EPrtID variable (IGC/M old central only).
158
User Defined MDLC Communication
Use the MOVE operator to move an event name to the Event variable prior to calling the
TxEvnt function.
Do not use the first entry (index=0), since after calling the TxEvnt function, this value is reset
by the system to 0, indicating that the event has been transferred to the transmission queue.
TxEvnt Function
To send an event, you should enter the values into the Tx Event table variables by the MOVE
operator and call the TxEvnt function – refer to the following rungs as an example.
ESite
( MOVE )
Cntral
Event
( MOVE )
PmpFal
EvIndx
( MOVE )
I
DefC_Y TxEvnt
(CALL)
<Error>,x
159
User Defined MDLC Communication
In this example, the I index indicates the number of the failed pump.
If all events are to be transmitted to the same central, then you should activate the first two
rungs only once since the ESite and EprtId variables will not change.
After calling the TxEvnt function, you should check that the Event variable has been reset, as
indication that the event has been taken by the system for transmission. If the Event variable
has not been reset, it means that the event has not been taken for transmission (all buffers are
full). In this case, you should try resending the event after a period of time (by using a timer).
The RTU sends the event through the communication network to the central and receives an
acknowledgment for the event from the central.
If the event has not been acknowledged after a specific number of retries, the system will set a
bit (<error>,n; defined by the user), to indicate that the event has not been acknowledged by
the central.
BSite: The name of the central site (MCP-M or MCP-T) to which the data is to be transmitted.
If the system includes several centrals, then the Site ID and Link ID should be defined in the
Site table.
BPrtID: If the central (IGC/M old central) is connected to one of the FIU ports (in some cases
RTU). Since the data is transmitted to the FIU address, the port should also be specified. This
variable should be assigned one of the following values: Comp_1 or Comp_2 (refer to the
160
User Defined MDLC Communication
MDLC Port ID’s table in the Constants Tables menu). If the BSite variable is defined as the
default central (the first line in the Site table) or MCP-M, you should not refer to the BPrtID
variable (IGC/M old central only).
BStat: After calling the Burst function, you should check the BStat variable. When the data
burst is taken for transmission into one of the system buffers then BStat=0. When there is no
free buffer, the burst data will not be transmitted and BStat=1. If the burst data is not
transmitted, try to resend it after a period of time (by using a timer).
In case of a burst transmission, the RTU can transmit data equivalent to one complete row of a
table or multiple rows of the same scan that have fit in one communication buffer. The table
name and row number must be specified in the process programming.
Burst Function
(MOSCAD ≥ V1.44, MOSCAD-L ≥ V1.00)
To transmit data from an RTU to the central you should specify the name of the central to
which the data is to be transmitted, and define the data to be transmitted (table symbol and row
number) – refer to the following rungs as an example.
BSite
( MOVE )
Cntral
DefC_Y Burst
( CALL )
Tbl,I
Tbl is the data table symbol and I is the row number index.
After calling the Burst function, check the Bstat variable to see if it equals ‘0’. If Bstat=0, that
does not necessarily mean that the burst transmission has been received by the central. To
ensure that the burst transmission has been received, check the ComFal bit in the Site table
after a period of time. If ComFal=1, it means that the central has not received the burst
transmission. If ComFal=0, it means that the central has received the burst transmission.
Note that the Burst function will only raise the ComFal bit if the Application Data-Ack from
Central parameter (in Site Configuration Advanced Parameters) is enabled.
The line of data to be transmitted (table, row #) is typically much smaller than the size of a
frame (160 bytes). Therefore the system has the ability to send multibursts, i.e. several lines of
data in one burst, to a given unit. The actual transmission will take place either:
3. when the scan time is so long that it exceeds the timeout for sending (as defined by the
system.)
Both MCP-M and MCP-T can handle single or multibursts without any special notification.
161
User Defined MDLC Communication
The BrsSeq function, like the Burst function, can send single or multibursts, though it differs
from Burst in that it does not send Ack and cannot raise the ComFal bit.
162
User Defined MDLC Communication
GetSeq
( CALL )
Site A initiates, at definite intervals, a value transmission to Site B. Site B, after receiving the
value, is supposed to transmit back the same value to Site A.
It is possible to get a printout of the number of transmissions and receptions that Site A has
performed at any time by pressing the PRINT push-button.
The RESET push-button allows the restarting of the application (as well as when the system
has stopped).
Site A Database
Internal Values
The following value variables are used in the process programming:
• BsyTry – counts the number of retries if the value is not taken for transmission (no free
buffers in the transmit queue)
These variables are defined in one of the User tables, named Internal Variables table
(“Integer Value” data type).
163
User Defined MDLC Communication
Communication Constants
Three constants, #0, ONE, and N are also used in the process programming. They are defined
in one of the Constant tables, named Comm. Constants table.
Communication Timers
Two Seconds timers are used in the process programming, as follows:
• TryDly – timer of 1:00 second used in case the value has not been taken for transmission
These timers are defined in one of the User tables, named Comm. Timers.
164
User Defined MDLC Communication
Discrete Inputs
Two discrete inputs, RESET and PRINT, are used in the process programming. They are
defined in one of the User tables, named Buttons table.
Discrete Outputs
The following discrete outputs (LEDs), defined in one of the User tables, named LEDs table,
are used in the process programming:
• BsyFal – indicates that the value has not been taken for transmission
165
User Defined MDLC Communication
Sites
Site B (the name of the site that Site A communicates with) should be defined in the Site table
(one of the System tables).
The Prepar rung checks if a new cycle is to be started according to the Off Delay timer of
30:00 seconds. The transmission of another value is disabled by this timer during the
166
User Defined MDLC Communication
transmission cycle. The rung also verifies that no failures have occurred by comparing TxVal
and RxVal. If they are not equal, it means that a failure has occurred.
If a new value is to be transmitted, then TxVal is advanced by the CTU operator and its value
is assigned to TxBuf,0 for transmission. Site_B is moved to the DstSit variable to specify the
destination site. Tx_Len receives the value ONE (one value is to be transmitted), and BsyTry
receives the value of N, which indicates the number of retries in case the value is not taken for
transmission.
Tx_Len BsyTry
= ( RST )
#0
TxCntr
( CTU )
Tx_Len TryDly
≠ ( DOF )
#0
TxOn
( )
The Trnsmt rung calls the SndFrm function until BsyTry is 0 (the value has been transmitted).
The TxOn LED is lit by the relay on element. The rung checks that the TryDly is not on (delay
between retries). The transmission is then enabled by calling the SndFrm function. TxFail will
be set to ‘1’ in case of failure. BsyTry is decreased (the value has been transmitted once).
If the value has been taken for transmission (Tx_Len=0), BsyTry is reset to 0 (to prevent
calling the SndFrm function) and TxCntr (counts the number of transmissions) is advanced.
If the value has not been transmitted (Tx_Len≠0 ), the Off Delay timer TryDly is activated.
If all retries have been performed (BsyTry=0) and the value has not been transmitted
(Tx_Len≠0), the BsyFal LED is lit and Tx_Len is reset to 0.
167
User Defined MDLC Communication
RcvFrm
Receiv ( CALL )
RxCntr
( CTU )
The reception is carried out by calling the RcvFrm function. If a value has been received, and
Rx_Len is not 0, the SrcSit (transmitting site) is Site_B, and the received frame is of Answer
type (FrmTyp=Answer), then RxBuf,0 (the received value) is moved into the RxVal variable.
Rx_Cntr is advanced.
168
User Defined MDLC Communication
RESET
( SCAN )
RESET Report
/ ( JMP )
TxVal
( RST )
RxVal
( RST )
TxCntr
( RST )
RxCntr
( RST )
BsyTry
( RST )
Tx_Len
( RST )
BsyFal
( U )
TxFail
( U )
PRINT USER_1
Report ↑ ( SEND )
TxOn
( SCAN )
The buttons are scanned by the SCAN operator. If the RESET button is pressed, all variables
(TxVal, RxVal, TxCntr, RxCntr, BsyTry, Tx_Len, and Rx_Len) are reset to 0. If the PRINT
button is pressed, the message in the window will be sent to the screen. Note that since there
are no codes in the window, the message will be displayed in scroll mode.
Site B Database
Internal Values
The BsyTry value variable is used in the process programming. This variable counts the
number of retries in case the value is not taken for transmission. It is defined in one of the User
tables, named Internal Variables table.
169
User Defined MDLC Communication
Communication Constants
Three constants, #0, ONE, and N are also used in the process programming. They are defined
in one of the Constant tables, named Comm. Constants table.
Communication Timers
A Seconds timer, TryDly, is used in the process programming. This timer is of 1:00 second
and is used in case the value has not been taken for transmission. It is defined in one of the
User tables, named Comm. Timers table.
170
User Defined MDLC Communication
Discrete Outputs
The following discrete outputs (LEDs) are used in the process programming:
• BsyFal – indicates that the value has not been taken for transmission
These discrete outputs are defined in one of the User tables, named LEDs table.
Sites
Site A should be defined in the Site table (one of the System tables).
171
User Defined MDLC Communication
BsyTry RcvFrm
Receiv = ( CALL )
#0
The first rung checks that the unit is not transmitting (BsyTry=0) before calling the RcvFrm
function. Then, if Rx_Len≠0 (a frame has been received) and the received frame is of Origin
type, then the received value (in RxBuf,0) is assigned to TxBuf,0 (for transmission, Site B
transmits back to Site A the same value). Tx_Len is set to ONE and BsyTry is set to N (10).
BsyTry TryDly AnsFrm
Trnsmt > / ( CALL )
#0
BsyTry
( CTD )
Tx_Len BsyTry
= ( RST )
#0
Tx_Len TryDly
≠ ( DOF )
#0
TxOn
( )
TxOn
( SCAN )
The Trnsmt rung transmits the value until BsyTry is 0. The TxOn LED is lit by the relay on
element. The rung checks that TryDly is not on (delay between retries). The transmission is
then enabled by calling the AnsFrm function. BsyTry is decreased (the value has been
transmitted once).
If the value has not been transmitted (Tx_Len≠0), the Off Delay timer TryDly is activated.
When the timer is on, the value is not transmitted (because of the Normally Closed element
applied on TryDly).
172
User Defined MDLC Communication
If all retries have been performed (BsyTry=0) and the value has not been transmitted
(Tx_Len≠0), the BsyFal LED is lit and Tx_Len is reset to 0.
173
Accessing Database Variables via
Coordinates
One of the most important features of the RTU is its database structure and concept (refer to
Database Concept). The RTU database is divided into reserved and user-defined
variables/constants, arranged according to various data types (such as discrete inputs/outputs,
value inputs/outputs, timers, parameters, etc.)
The application database is built as a set of tables, where each table defines a group of devices,
each row defines a separate device and each column contains a specific device data. The table
entries are assigned user-significant names, such as PUMP1.
Since database variables are assigned meaningful logical names, it is very easy to build,
understand and modify the database.
Two functions, FETCH and STORE, are available for accessing database variables also via
coordinates. Every database variable can be accessed by the following three coordinates:
• Y coordinate (Y=0,1,...,249) is the row number in the user table that appears under the
index (Ind) column
This way of accessing database variables may be useful for mapping the database of one RTU
into another RTU using user protocols (which use coordinates to access database variables
rather than logical names).
174
Accessing Database Variables via Coordinates
Definitions
Using the FETCH and STORE functions requires the definition of a single-column user table
of integer value type, with the following variables.
Note that the order of the variables in the table is mandatory. The variable names shown in the
table are recommended.
The first three values (Table#, Row# and Column#) represent the coordinates of the required
variable in the database. They must be set by the user before calling the FETCH or STORE
functions.
The FETCH/STORE call return code will be returned in the RetCod variable, as follows:
0 – OK
1 – spare
2 – invalid Z coordinate
3 – invalid Y coordinate
4 – invalid X coordinate
When calling the FETCH function, the required data will be put in Data0/ Data1 variables
according to the data type (specified by the ColTyp variable), as follows:
• If the data is of Bit type (ColTyp=1), the data will be put in Data0 variable according to the
following:
• If the data is of Value type (ColTyp=2), the data will be put in Data0 variable.
175
Accessing Database Variables via Coordinates
• If the data is of Floating Point type (ColTyp=4), the data will be put in Data0 and Data1
variables.
Before calling the STORE function, the data to be stored in the database must be set as
follows:
• If the data is of Bit type (ColTyp=1), the data must be put in Data0 variable according to
the following:
• If the data is of Value type (ColTyp=2), the data must be put in Data0 variable.
• If the data is of Floating Point type (ColTyp=4), the data must be put in Data0 and Data1
variables.
For example, to store the value of fl1 (floating point variable) in the Z0,Y0,X0 coordinates, the
following rungs should be used:
Table#
( MOVE )
Z0
Row#
( MOVE )
Y0
Colmn#
( MOVE )
X0
C Data0
P fl1
Y #4
Store
( CALL )
Table #
176
X.25 Protocol Support
This feature is available in ToolBox versions ≥ V3.00, but the option, named X.25 option for
ToolBox, must be purchased separately. A separate license is required for each RTU which
uses the option.
The X.25 protocol is available in the X.25 Service Provider configuration, for establishing a
MOSCAD MDLC-based network (as the X.25 Packet Private Network) which provides X.25
services for user computers and/or user X.25-based RTUs. The protocol is also available in
X.25 Service User configuration, for communicating between MOSCAD RTUs as DTEs over
existing X.25 networks based on non-MOSCAD Packet Switching Equipment (PSE).
DTE
X.25 X.25
DTE
MOSCAD
MDLC-based
X.25 Network
X.25 X.25
RTU
DTE
The MOSCAD RTUs operate as the DCE (Data Communication Equipment), representing the
network's interface to the user DTE. (If needed, the MOSCAD RTU port may be configured as
a DTE).
177
X.25 Protocol Support
Each DTE is connected to a port of a MOSCAD RTU that is configured to support X.25
protocol.
DTE
X.25
MOSCAD
RTU RADIO
MDLC -based
X.25 Network
MOSCAD MOSCAD
RTU RADIO . . . . . . RADIO
RTU
X.25 X.25
RTU
DTE
The following figure describes an example of expanding an existing X.25 network with
MOSCAD RTUs. In this example, the MOSCAD RTUs are used as a communication media
for DTEs (highlighted in the figure) that cannot be connected via line.
178
X.25 Protocol Support
DTE
X.25
X.25
Packet Data
Network
X.25
X.25
DTE
MOSCAD
RADIO
RTU
MDLC
DTE
MOSCAD
RADIO RTU X.25
179
X.25 Protocol Support
MOSCAD RTU
( DTE )
X.25
(DCE)
Third Party X.25
Provider
X.25 X.25
MOSCAD RTU
( DTE ) MOSCAD RTU
( DTE )
Site Configuration
The Site Configuration program includes two levels of definitions for X.25 support, as
follows:
• Service Configuration: the type of connection and related parameters (logical definition)
The logical definition is carried out via the System option, and the physical definition is
carried out via the Ports option of the Site Configuration program. Note that the system cross-
checks both definitions for conflicts (appropriate messages are displayed).
2. Open the site configuration file and click on the X.25 tab.
3. Double-click on the X25 Type button and open the X25 Support drop-down list. The
following screen is displayed:
180
X.25 Protocol Support
a) Service Provider, 1 to Many, Master - for the MOSCAD RTU to which the Host/PSE
(Packet Switching Equipment ) is connected.
b) Service Provider, 1 to Many, Slave - for the MOSCAD RTUs to which the user's DTEs
are connected.
HOST / PSE
MOSCAD
RTU
as RADIO
Master
MDLC -based
X.25 Network
MOSCAD MOSCAD
RTU RTU
as RADIO . . . . . . as RADIO
Slave Slave
X.25 X.25
181
X.25 Protocol Support
For the MOSCAD RTU defined as Master (the MOSCAD RTU that is connected to the
Host/PSE), select the Service Provider, 1 to Many, Master option - the following is displayed:
182
X.25 Protocol Support
The third part of the address (***) is not relevant for the
Master.
183
X.25 Protocol Support
For the MOSCAD RTUs defined as Slave (the user's DTE/RTU are connected to these
MOSCAD RTUs), select the Service Provider, 1 to Many, Slave option - the following is
displayed.
Note that the Master/Slave Address and Port Address Field definitions must match - the length
of the third part of the address must be identical. For example, if the Master address is
123456789SS[**], then the corresponding port address is ************[P*].
Note also that the value of P must correspond to the port name of one of the X.25 ports (X25-
P1, X25-P2, etc.)
184
X.25 Protocol Support
Port 1 or Port 3 define the Port Interface as X25 PROTOCOL (RS-232, Sync, X.25). The
resulting User parameters are:
Port Type/Connection Mode: RTU as DTE, RTU as DCE, RTU as DCE with TxClk Input
(only for Port 3).
Default: RTU as DCE.
This field defines the physical interface between the RTU and
the user's DTE.
RTU as DTE: the Programmable RS232 plug-in module
receives the TxClk and RxClk clocks from the DCE.
RTU as DCE: the Programmable RS232 plug-in module
provides the TxClk and RxClk clocks to the DTE.
RTU as DCE with TxClk Input: the Programmable RS232
plug-in module provides the TxClk clock to the DTE and
receives the RxClk clock from the DCE. Note that this is the
default physical interface for Port 1.
Port Name: X.25-MAIN, X.25-P1, X.25-P2, X.25-P3,
X.25-P4, X.25-P5
X.25-MAIN: In Service Provider configuration, the port of the
RTU as Master that is connected to the Host/PSE must be
defined as X.25-MAIN.
X.25-MAIN: In Service User configuration, this is the port of
the RTU which is connected to the external X.25
communication provider (Third Party).
X.25-P#: In Service Provider configuration, the port of the
RTU as Slave that is connected to the DTE/RTU must be
defined as X.25|P1 to X.25-P5.
Link Name: Range: X25 1 to X25 3
185
X.25 Protocol Support
Default: X25 1
Data Speed: Range: 300 to 9600 Bd
Default: 9600 Bd
No. of Tx Retries: Range: 1 to 9
Default: 1
The number of times that a message is automatically
retransmitted if it has not been acknowledged. Type in the
desired value and press [Tab] to advance to the next field.
Logically Defined as: Range: DTE, DCE
Default: DTE
The RTU may be logically defined either as DTE or DCE,
according to the user equipment.
Description: A free-format field.
After entering all your selections, click the OK button to return to the Ports List table. Note
that the table has been updated according to your entries.
186
X.25 Protocol Support
If you are using Port 3 as the X.25 port, define it as shown below. Be sure to set ‘Logically
defined as’ to DTE.
For a description of the parameters for Port 1 and Port 3, see RTU Port Configuration above.
Next click on the X.25 tab and double-click on X.25. The following is displayed.
187
X.25 Protocol Support
You must define the following parameters. The third parameter defaults to 60 seconds, but
this can be changed, if desired.
Double-click on Advanced Flow and you will get the screen below with Logical Channel
parameters.
188
X.25 Protocol Support
All the parameters can be left at their default values, except the following parameter:
Scroll down in the Advanced Flow window and more parameters will be displayed (Logical
Channel continue/LAPB).
Set this to 1.
The Advanced timers/heap tab shows more parameters which may be left at their default
values.
In order to enable communication between MOSCAD RTUs over X.25 networks, the Sites and
their X.25 addresses must be defined and downloaded to the units. This is done using the X.25
Address Table tool. To start the program, double-click the X.25 Address Table icon in the
MOSCAD Programming ToolBox folder. The following screen is displayed.
189
X.25 Protocol Support
The dialog opens with an empty X.25 address table. You can define a new table or load an
existing one and type in changes or additions.
190
X.25 Protocol Support
X.25 Address
You can enter up the X.25 address for each site. The address can hold up to 14 characters.
The valid characters are: 1234567890.
File Menu
You can perform all the basic file operations using the commands of the File menu. After
opening the menu, the following commands are displayed:
New
The New command (File menu) clears the current address table from the dialog. If you have
made changes without saving them, the tool asks you if you want to save the file. Then it
opens a new address table file.
Open
The Open command (File menu) opens an existing address table. After activating this
command, the tool displays the Open dialog box, as shown below.
The Open dialog box defaults to the config sub-directory of the ToolBox (tbox650) directory,
and to the .x25 type files (address table files). The config sub-directory is where ToolBox
stores address table files by default.
Select the address table file (see parameters below) and click OK to load it.
Use the parameters in the order specified below. Normally you’ll only use the File Name
parameter.
Drives
If the displayed drive is not the one that holds your address table files, open the drop-down list
and select the correct drive.
191
X.25 Protocol Support
Directories
If the currently displayed directory is not the correct one, double-click the drive letter at the
beginning of the Directories list and locate the directory. To access sub-directories, double-
click parent directories.
List Files of Type
This box shows the type (extension) of the files currently displayed in the File Name list. If
the displayed file type “filter” is not .x25, open the drop-down list and select the .x25 type.
File Name
Type the name of the address table file. ToolBox automatically adds the .x25 extension.
Alternatively, locate the file name in the file list, and double-click the name.
After loading the file, you can edit existing data by direct typing or using the Edit menu
command, or add new entries.
Save
The Save command (File menu) stores the current address table.
If the file has not been saved at least once, ToolBox opens the Save As dialog box where you
assign a name to the address table file.
If the file has been saved at least once, ToolBox just saves the file.
Save As...
The Save As... command (File menu) saves the current address table under a different file
name. Generally, you’ll use this command when you want to create an address table file that
is slightly different from an existing one (load the existing file, save it under a new name, and
make the changes).
The command opens the dialog box shown below. This dialog also appears when you request
to save an address table file for the first time.
Use the parameters in the order specified below. Normally you’ll only use the File Name
parameter.
Drives
If the displayed drive is not the one that holds your address table files, open the drop-down list
and select the correct drive.
Directories
If the currently displayed directory is not the correct one, double-click the drive letter at the
beginning of the Directories list and locate the directory. To access sub-directories, double-
click parent directories.
List Files of Type
This box shows the type (extension) of the files currently displayed in the File Name list. If
the displayed file type “filter” is not .x25, open the drop-down list and select the .x25 type.
192
X.25 Protocol Support
File Name
Type the name of the address table file you want to create, and click OK. ToolBox
automatically adds the .x25 extension. If you specify the name of a address table file that
appears on the list, ToolBox issues a message asking you whether you want to overwrite the
existing file. Select Yes only if you want to replace the existing file with the new one.
Delete
The Delete (File menu) command deletes an address table file from the config directory.
After you select the command, ToolBox displays the Delete dialog box, as shown below.
After clicking OK, ToolBox asks you to confirm the operation. Select Yes only if you are sure
that you want to delete the file.
193
X.25 Protocol Support
Merge
The Merge command combines two X.25 address tables. Follow these steps:
2. Open the File menu and select the Merge command. The following is displayed.
Download
The Download command (File menu) sends the current X.25 Address Table to any RTU in the
network. After selecting this command, select Local if you are locally connected to the RTU,
or Remote (including Site ID and Link ID) if you are communicating with a remote unit. Click
on the Download button to send the table to the unit.
Upload
The Upload command (File menu) get the current X.25 Address Table from any RTU in the
network. After selecting this command, select Local if you are locally connected to the RTU,
or Remote (including Site ID and Link ID) if you are communicating with a remote unit
194
X.25 Protocol Support
Edit Menu
The Edit menu contains the following commands:
Insert Row
Inserts a new line above the line where the cursor currently stands.
Sort Table
Rearranges the table in Site ID order.
195
MDLC Over Private DataTac
MOSCAD RTUs (≥ V7.00) can communicate over Private DataTac systems (RDLAP) with
SCADA centrals and with other RTUs. All MDLC features are preserved except for clock
synchronization.
RTUs are connected to RDLAP radios (e.g. VRM 500, 600, 650, 660, and TRM 660) via
RS232. An RTU sends a message (MDLC), through the radio to the Radio Network
Controller (RNC). The RNC encapsulates the MDLC message and send it over IP to the IP
Gateway. The IP Gateway then extracts the MDLC message from the IP envelope and
transmits it to the appropriate destination. If the destination is another RTU over Private
DataTac, the IP Gateway (≥ V3.00) must support the reflector feature, which enables it to
“reflect” the message back over RDLAP.
SCADA
Central
Ethernet
Host Computer
MCP/T
w/Reflector WINGS
RS-232
RNC
Programming
ToolBox
RF
SYSTEM
RS232 RS232
MOSCAD MOSCAD-L
RTU RTU
RS-232
Programming
ToolBox
The picture above shows a typical system which supports MDLC communication over RDLAP
radios. Note that the IP Gateway is configured as RDLAP reflector. A host computer attached
to the Ethernet can receive TCP/IP applications from non-MOSCAD terminals on existing
RDLAP systems, if required. A MOSCAD ToolBox can be connected to one of the RTUs,
and can access another RTU by using its Site ID and Link ID. ToolBox can also be attached to
one of the serial ports of the IP Gateway.
196
MDLC Over Private DataTac
Most of the Advanced Parameters for MDLC Over Private DataTac use the default values.
Those which should be modified are described below.
Physical Layer
The values of the following parameters should be modified.
Link Layer
The values of the following parameters should be modified.
197
MDLC Over Private DataTac
Set to 80.
Interval between TX retries upon BUSY ACK Range: 10-100
(*100mSec)
Default: 40
Set to 100.
IP Gateway Configuration
Define a new logical port of the IP port as RDLAP reflector, where the Link Name is “RADIO
1.” This is actually a virtual port, with MDLC Stack over RNC Stack over IP.
198
MDLC over MPT1327
With MDLC over MPT1327, two MOSCAD RTUs can communicate with one another in an
MDLC network over MPT1327 radio infrastructure using the MAP27 communication
protocol.
Each RTU is attached to a radio. A MAP27 conversion table, which maps Site IDs to Radio
IDs, is created in the ToolBox and downloaded to the RTUs. This acts as a kind of phone
book and enables routing over the MDLC network to the proper radio/site destination.
All MDLC communication is supported, including clock synchronization. For this reason, the
infrastructure (i.e. Base Station) must support Group Call. Both the radio and the Base Station
must support nonprescribed data transmission.
When using this media, the initial communication between two radios is established using an
MAP27 protocol (UART communication) while data is sent using the MDLC protocol
(synchronous communication). Once the information has been transmitted, the call is ended as
it began, using MAP27.
An RTU will end an MDLC over MPT1327 call either when the radio disconnects or when the
communication is idle for a certain amount of time. As long as no call exists, the CPU polls
the radio once per second to maintain communication with the radio.
In the diagram below, a typical configuration is shown, with RTUs attached via Port 3 to
trunked radios which communicate through MPT1327 infrastructure.
199
MDLC over MPT1327
SCADA
Central
Programming
ToolBox Ethernet
LINE 1
IP
RS-232 Gateway
Programming
ToolBox
Base MDLC
Station
Network
Piggyback Piggyback
Port 3 Port 3
Modem Modem
MOSCAD MOSCAD-L
RTU 1 RTU 2
RS-232
Programming
ToolBox
2. Define the MAP27 conversion table using the MAP27 Convert Table icon in the
MOSCAD Programming ToolBox folder.
3. Download both site configuration and MAP27 conversion table, together with network
configuration, if necessary, applications, etc. to the RTU.
Radio Configuration
When the system is purchased, the radio’s default configuration is set up for MAP27
communication. These defaults must NOT be changed in the RSS by the user. The radio’s
RSS values should match the recommended defaults.
The radio’s RSS parameters must match the parameters stored in the MOSCAD RTU exactly.
If changes are made to the radio parameters (besides the address values), the system will not
work properly.
200
MDLC over MPT1327
The Advanced Parameters which are unique to MDLC over MPT1327 do not appear in the
Site Configuration section of the System Setup and Diagnostics Tools manual, and are
described below. Advanced Parameters which are not unique but whose default is different for
this feature are also described below.
The values of these parameters are generally not modified. Changes must be done carefully or
the system may not work properly.
Physical Layer
To access the parameters below, click on the Advanced Physical tab, on the More button and
again on the More button.
201
MDLC over MPT1327
202
MDLC over MPT1327
The radio ID, which is burned into the radio appears in the RSS as MPT1327 Format: Own
Prefix and Own Ident. This is represented in the MAP27 conversion table as MAP27 Prefix
and MAP27 Ident (e.g. Prefix: 4, Ident: 4101).
Note: One of the first entries of the MAP27 conversion table, Site ID 0, must contain the radio
address defined in the system for group call (broadcast). All radio IDs in the MAP27
conversion table must be registered in the Base Station.
Once it is complete, the MAP27 conversion table is downloaded to the all RTUs in the
network.
203
MDLC over IP
Most of the information in this chapter refers to MOSCAD and MOSCAD-L ≥ V7.00, except
for the MOSCAD Ethernet Interface, which refers to MOSCAD ≥ V3.7x and MOSCAD-
L/MOSCAD NFM ≥ V1.00. The information regarding Tetra, Standard Modem, and Null
Modem refers to MOSCAD and MOSCAD-L ≥ V9.00.
The MDLC over IP feature is available in ToolBox versions ≥ V7.51, but the option, named
MOSCAD over IP option for ToolBox, must be purchased separately. A separate license is
required for each RTU which uses the option.
With the MOSCAD over IP option, MOSCAD RTUs and IP Gateways (≥ V3.00) can use IP
(Internet Protocol) technology to interface to advanced radio infrastructure (e.g. digital
ASTRO IP conventional systems) and to standard private IP networks. Most benefits of the
MDLC protocol are preserved. MDLC and IP networks can be integrated in the same system,
as networking properties are preserved. MOSCAD MDLC applications need not be modified
as the lower layers of the protocol support IP.
MDLC packets to be transmitted are enveloped inside IP datagrams and sent between remote
RTUs or between an IP Gateway and an RTU.
An IP Gateway can act as a gateway between the field and the SCADA Central to extract the
enveloped frames from the IP message. A ToolBox can be connected to one of the RTUs, to
one of the serial ports of the IP Gateway, or to the Ethernet.
Each RTU/IP Gateway is assigned a Site ID. In addition, each RTU/IP Gateway with an IP
interface is assigned an IP address. An IP conversion table which maps Site IDs to IP
addresses is created in the ToolBox and downloaded to the RTUs and IP Gateway. This
enables routing over the IP network to the proper destination.
Several variations of MDLC over IP exist, MDLC via Terminal Server (SLIP), MDLC via
Astro3.xx, MDLC via Tetra, MDLC via Standard Modem, MDLC via Null Modem, and
MDLC via Ethernet Interface.
Standard modem is a new ‘connected to’ device introduced for MOSCAD and MOSCAD-L ≥
V9.00. It operates above Slip or PPP connection types. The Connect to Standard modem
option supports any standard modem capable of packet data, including ASTRO6’s XTS radio,
GPRS G18 modem, Novatell’s CDPD radio and Tetra. Refer to Connecting to Standard Modem
for details on how to configure this option.
Null modem is a new ‘connected to’ device introduced for MOSCAD and MOSCAD-L ≥
V9.00. It operates above PPP connection type only. It is suitable for direct cable connection
over PPP with other devices such as Terminal Servers.
204
MDLC over IP
In the diagram below, a typical configuration is shown, with RTUs attached via SLIP (Serial
Line IP) port to a Terminal Server, which is in turn attached to Ethernet.
With MOSCAD/MOSCAD-L > V9.00, Terminal server can be connected with PPP instead of
SLIP.
SCADA
Central Programming
ToolBox
Ethernet
LINE 1
IP
RS-232 Gateway
Programming
ToolBox IP
Network
Ethernet
RTUs can be connected via SLIP connection to an ASTRO 3.xx radio, which is part of an IP
network. The mapping of the radio ID to an IP address is done in the Wireless Network
Gateway (WINGS) box which can then be connected via Ethernet to an IP Gateway, SCADA
Central, etc.
205
MDLC over IP
In the diagram below, a typical configuration is shown, with RTUs attached via SLIP over
RS232-E to ASTRO SPECTRA radios which support IP data capability. A ToolBox is
connected to one of the RTUs through either Port 2 or Port 3. The IP Gateway on Ethernet
acts as a gateway, translating between the IP and MDLC protocols.
SCADA
Central
Programming
ToolBox Ethernet
IP
Cloud
LINE 1
IP
RS-232 Gateway
Programming WINGS
ToolBox
RNC
ASTRO RF IP
SYSTEM
Network
MOSCAD MOSCAD-L
RTU RTU
RS-232
Programming
ToolBox
2. Define the IP conversion table using the IP Address Table icon in the MOSCAD
Programming ToolBox folder. This icon will only appear with the purchase of the
MOSCAD over IP option.
3. Download both site configuration and IP conversion table, together with network
configuration, if necessary applications, etc. to the RTU.
206
MDLC over IP
207
MDLC over IP
The Advanced Parameters which are unique to MDLC over IP do not appear in the Site
Configuration section of the System Setup and Diagnostics Tools manual, and are described
below.
Physical Layer
The values of these parameters are generally not modified.
If Terminal Server is used with PPP the following optional parameter appears instead of
Connection String:
Link Layer
Maximum rows in Range: 0-200
conversion table Default: 100
Maximum number of sites with which the RTU can
communicate.
Periodic check of Default: Disable
failed RTU This option cannot be enabled in MDLC over IP.
208
MDLC over IP
209
MDLC over IP
A site is paged by sending it a poll request and awaiting a poll reply. During this time, the
MOSCAD can continue to transmit to other sites (and receive transmission from other sites). If
the site responds with a poll reply, or any other MDLC data, it is considered as reachable, and
all pending transmissions are sent to it immediately. Further transmissions will be sent to it as
well without paging until the site is declared as failed.
If an ‘ICMP Destination Unreachable’ message is received or if the site does not respond to
paging for a configurable poll interval, it will be polled again for a maximum number of polls.
If there is still no response, the site is considered to be failed, and the network layer is notified
so any pending transmissions can be redirected to an alternative route. If subsequent
transmissions are to be sent to the site through an MDLC over IP port, paging will be
performed again before actual transmission takes place.
When using modem devices iDEN, Tetra, Standard and Null modem, all sites are reset to
unknown state when disconnecting and reconnecting the modem/cable to RTU. As a result,
following this operation, paging will be performed before a transmission is sent.
210
MDLC over IP
With non-modem devices, such as Terminal server (SLIP), ASTRO3.xx and MDLC via
Ethernet, reconnecting cable will not cause paging to be performed.
Application layer
For MOSCAD and MOSCAD-L ≥ V9.00, it is also possible to connect to an iM1000 modem
over PPP instead of SLIP. This, however, does not improve reliability as it is handled by
MDLC and involves more communication overhead (RTU to modem communication) as well
as prolonged connect time to the modem. Therefore, it is highly recommended to use SLIP
instead of PPP when connecting to an iM1000 modem.
MDLC over iDEN, which uses IP technology, deals only with the first mode (PD). The other
two can only be used with an external dialup port in the MOSCAD RTU, and do not support
direct communication with another RTU/IP Gateway having an MDLC over IP port.
Therefore they are not relevant to this topic.
In the figure below, the SCADA central and IP Gateway are connected via LAN to iDEN
infrastructure. Each RTU has an iM1000 modem connected to its MDLC over IP Port using
SLIP. A unique IP address is assigned to each RTU according to its modem’s identifier. All
communication between RTUs and the IP Gateway involves sending datagrams in packets
over the internet (IP). A PC running MOSCAD Programming ToolBox can be connected
directly to an RTU or operate remotely over IP.
211
MDLC over IP
SCADA
Central
Ethernet
IP
LINE 1 Routing
Net
IP
RS-232 Gateway
Programming
ToolBox
Home
iDEN Agent
infrastructure Interface
Router
Mobile
Base Data
Station Gateway
LINE 1
212
MDLC over IP
Paging is a “wake up call” which causes a dormant/idle modem to wake up and allocate
appropriate RF resources needed to communicate over a packet data network. Once the packet
channel has been accessed, the paged modem will become active for a limited amount of time.
While in active state, the modem can only handle packet data, and cannot get any voice
dispatch calls. It is important to note that the iM1000 modem only handles data and no
voice/dispatch calls.
Note: Because of the overhead involved in paging and accessing a channel, there will be a
certain delay before the modem becomes active and can receive data. The length of the delay
depends on the topology and state of the network. This may be relevant for some applications
involving data sent from one RTU to another.
Note that with MOSCAD/MOSCAD-L ≥ V9.00 the user can configure PPP instead of SLIP
but it is not recommended for reasons mentioned above.
Currently the iDEN modem can be physically connected to Port 2 or 3. Note however, that in
this case, no external radio can be added to MOSCAD or MOSCAD-L due to physical
limitations. MOSCAD-L with iDEN connected to Port 2 can support an internal radio (e.g.
Spread Spectrum, Mobat) on Port 3.
213
MDLC over IP
The Advanced parameters are the same as described above for general MDLC over IP with the
following exceptions:
If a PPP connection type is used (not recommended for iDEN) the following optional
parameters exist as well but they should be left empty:
User name Set appropriate user name for connecting to the modem
when performing PPP authentication.
Password Set appropriate password for connecting to modem when
performing PPP authentication.
Physical Layer
The values of these parameters are identical to other variations of MDLC over IP as described
above.
214
MDLC over IP
Link Layer
Modem configuration Range: 40-255 sec
timeout (Sec) Default: 40
The period of time the network will wait for successful
configuration of the modem upon power up of modem or
MOSCAD. If within this period, the modem
configuration does not complete, MOSCAD marks the
port as Failed, though configuration continues. If
configuration fails, the modem may not be properly
configured. Configuration status can be checked using
the Error Logger and Software Diagnostics (LIN1L Level
0, 101.
For more details, see Modem Configuration below.
Enable RALP Default: Yes
Radio Application Layer Protocol. Enables periodic
sampling of the modem to get messages about its status
(whether the modem is registered in the network and can
send/receive packet data over the infrastructure). Modem
diagnostics can also be checked using the ToolBox
Software Diagnostics utility.. The valid values are:
Yes
No
Like RCP, RALP uses a separate socket from the data
socket and works in parallel to MDLC over the air using
a SLIP connection.
Get modem status Range: 0-255 sec
sample time (Sec) Default: 10
Relevant only if Enable RALP is YES.
The period of time to wait between checking the status of
the modem (if it is registered with the network and able
and to send/receive packet data over the infrastructure.)
Modem diagnose reply Range: 10-255 sec
timeout (Sec) Default: 10
Relevant only if Enable RALP is YES.
The period of time for the ToolBox Software Diagnostics
to wait a reply from the modem before returning an error.
(e.g. LIN1L levels, 102, 103.)
Restart modem when Range: 10-255 sec
deregistered Default: Yes
Relevant only if Enable RALP is YES.
If Yes, then restart the modem each time it is detected
that the modem has been de-registered by the system.
This will make the modem more reliable, however
MDLC data may be lost when restarting the modem (until
it initiates itself.)
215
MDLC over IP
Modem Configuration
The parameters described above for the iDEN modem are configured through the MOSCAD
Programming ToolBox Site Configuration utility when the modem or MOSCAD is powered
up. The RTU sends AT commands to the modem to change its mode to offline, program the
necessary settings, and return it to online mode. This is transparent to the user, but during this
time the MOSCAD cannot transmit MDLC via this port. Any data sent is queued until the
modem returns to online mode. If the configuration fails, queued data is returned to the
network for retransmission via an alternative route. If the configuration fails, it is possible that
the modem was not properly configured. The Error Logger and Software Diagnostics should
be checked to identify the problem (IPLINK LIN1L Level 0, 101).
Other parameters are set by the iDEN infrastructure over the air when the modem is powered
up. If the configuration fails, this may be due to a problem with the iDEN infrastructure. In
this case, users should consult with the iDEN network operator.
If one of the modem’s internal settings (i.e. the service key used for fraud
prevention/authentication, number assignment module, network ID or, passcode) needs to be
modified, this can be done locally, using the Applet IX1000 software. The Master Reset
operation may also be required to change the modem identification number and enable the
iDEN infrastructure to reset parameters in the modem. These changes should only be
performed in coordination with the technical support group.
As of C toolkit version V6.0, it is possible to retrieve diagnostics from the iM1000 modem via
RALP over packet data. This may useful in writing a driver to perform specific tests. Refer to
the MOSCAD_ipport_sendrequest service in the MOSCAD Programming ToolBox C Toolkit
manual. The user must be familiar with the RALP protocol. For more information, see iDEN
Radio Application Layer Protocol (RALP) specification, PRO-SUS-023.
AT&D0 – Instruct the modem to ignore DTR, since the RTU does not support it.
216
MDLC over IP
AT+WV175=10 – Set the modem’s session timeout to 10 seconds, i.e. after 10 seconds from
the last communication over the air, the modem becomes idle and needs to be paged in order to
receive data.. Setting it to 0 makes the session state permanent.
If a PPP connection was selected instead of SLIP, this command is replaced with
AT+WS45=4. The modem initiates PPP when going online.
AT+WS182=3 – Communication over the air will not be compressed. Setting this parameter to
1 will compress data over the air.
Note: If needed, before the modem is set to online mode, it is reregistered using the commands
AT+WPDEREG and AT+WPREG. This occurs only when the RTU powers up, and after the
modem has been deregistered from system.
217
MDLC over IP
Connection to Tetra radio is done using PPP over Tetra infrastructure. Since Tetra
infrastructure connects to LAN as well, a LAN-connected IP Gateway, or an RTU with
Ethernet Plug in board (EPIB) can communicate directly with these RTUs over Tetra
infrastructure.
In the figure below, the SCADA central and IP Gateway are connected via LAN to Tetra
infrastructure. Each RTU has an MTH300 radio connected to its MDLC over IP Port using
PPP. A unique IP address is assigned to each RTU according to its radio’s identifier (SSI).
All communication between RTUs and the IP Gateway involve sending datagrams in packets
over the internet (IP). A PC running MOSCAD Programming ToolBox can be connected
directly to an RTU or operate remotely over IP.
218
MDLC over IP
The MOSCAD Programming ToolBox can communicate with remote RTUs over IP using the
Tetra infrastructure. The PC running the ToolBox is connected to the Tetra radio (e.g.
MTH300 radio) or to the RTU. For this purpose, the PC should have a Tetra PD installation
(as specified in the TetraMSdialupInstall.wri file in the C:\Tbox950\Doc directory.) After setting
up the connection using the PC ‘Dial-up networking’ with “s=2” number, the user should run
the Communication Setup utility, select Ethernet port and specify in a focal point RTU/IP
Gateway IP Address under ‘Local Site IP Address’.
The flow of data from the IP Gateway to the MOSCAD RTU, from the MOSCAD RTU to the
IP Gateway and from RTU to RTU is very similar to the one described in MDLC via iDEN. It
is important to note that RTU to RTU communication is routed through the infrastructure LAN
system and not directly.
As with the iDEN modem, if the Tetra is connected to Port 2, no additional external radio can
be connected to Port 3 due to physical limitations. If no external radio is used, the Tetra can be
connected to Port 3.
It is recommended to use a special Tetra Interface board for connecting Tetra to RTU. This
board drives the radio power, and enables the RTU to control it using software in the event
that the radio gets stuck. This board, which is connected to the radio data cable, should be
connected to Port 2 or Port 3 of the CPU.
If this board cannot be used, a modification should be made when using the FKN4904A
connector (RS232-E for iDEN). Connect RJ45 wire 6 (RTS which is not connected to
anything) to pin 4 in the 9 pin male adapter. This will enable the RTU to control DTR of the
radio. Refer to the Connection to iDEN radio section of Appendix A of the System Setup &
Diagnostics manual for details on the FKN4904A connector.
This modification to FKN4904A should also be made when connecting to a Standard modem.
The Advanced parameters are the same as described above for general MDLC over IP with the
following exceptions:
219
MDLC over IP
The following parameters should be left empty for Dimetra-P radios such as MTP300,
MTH300 and MTM300. They should be used for the Dimetra-S radios such as the D2700.
User name Set appropriate user name for connecting to the modem
when performing PPP authentication.
Password Set appropriate password for connecting to the modem
when performing PPP authentication.
Physical Layer
The values of these parameters are identical to other variations of MDLC over IP as described
above.
Link Layer
Disconnect on Range: Disable – Enable
icmp:netunreach Default: Disable
If set to Enable, connection to the modem/radio will be
terminated by force when getting an icmp:netunreach.
This message specifies that thepeer site was unreachable
because of network problems. Sometimes these problems
can be resolved by reconnecting to the modem.
For Tetra, it is recommended to leave it set to Disable.
220
MDLC over IP
With Tetra, a paging mechanism to each site (peer) in the IP conversion table has been added
to make MDLC over IP more reliable. If the parameters below are not visible, they will have
the default values as specified. The parameters are the same as in MDLC over iDEN but their
default values were changed to suit Tetra infrastructure. For more information, refer to MDLC
over IP Site Paging.
221
MDLC over IP
222
MDLC over IP
AT&D1 – Instruct the modem to check DTR is active. When the RTU deactivates DTR, the
radio will reset its port, and the PPP connection will terminate.
AT+WS45=4 – Instruct the radio to initiate PPP with the RTU when getting the ATD
command.
A file can be downloaded into the RTU specifying the exact command set needed by the
modem/radio. A default AT command set is used in case this file is not downloaded.
In this category, the following modems/radios mabe used. A file for each one is included
in the C:\Tbox950\config directory.
• Tetra radios, when the Tetra port is not sufficient for that type of radio (file Tetra.ipm).
Connection to Standard modem is made using either PPP or SLIP over the operator
infrastructure. Since the operator infrastructure connects to LAN as well, a LAN-connected IP
Gateway, or an RTU with an Ethernet Plug in board (EPIB), can communicate directly with
these RTUs over that infrastructure.
223
MDLC over IP
As with the iDEN modem, if the Standard modem is connected to Port 2, no additional
external radio can be connected to Port 3 due to physical limitations. If no external radio is
used, the Standard modem can be connected to Port 3.
As with Tetra, if the Tetra board is not used to connect to the modem, the following
modification should be made when using the FKN4904A connector (RS232-E for iDEN).
Connect RJ45 wire 6 (RTS which is not connected to anything) to pin 4 in the 9 pin male
adapter. This will enable the RTU to control DTR of the radio. Refer to the Connection to
iDEN radio section of Appendix A of the System Setup & Diagnostics manual for details on
the FKN4904A connector.
The Advanced parameters are the same as described above for general MDLC over IP and
MDLC over Tetra. Some of their defaults have been changed.
Specify the following parameters if the RTU needs to login into the modem when using PPP
connection.
User name Set appropriate user name for connecting to the modem
when performing PPP authentication.
Password Set appropriate password for connecting to the modem
when performing PPP authentication.
Physical Layer
The values of these parameters are identical to other variations of MDLC over IP as described
above.
224
MDLC over IP
Link Layer
Disconnect on Range: Disable – Enable
icmp:netunreach Default: Disable
If set to Enable, connection to the modem/radio will be
terminated by force when getting an icmp:netunreach.
This message specifies that thepeer site was unreachable
because of network problems. Sometimes these problems
can be resolved by reconnecting to the modem.
For Standard modem, it is recommended to leave it set to
Disable.
Does modem support Range: YES – NO
abort sequence Default: YES
Specify YES if the modem supports abort sequence.
Abort sequence is a +++ string sent with a 1 second delay
before and after, causing the modem to move into
command mode.
Specifying this parameter as NO will expedite connection
to the Tetra radio.
Disconnect on idle Range: 1- 65535
timeout sec Default: 0
When specifying a timeout in seconds, the RTU monitors
the delay from the last time anything was received from
the modem (during PPP mode). If this time expires, this
means there is a problem with the modem connection.
The RTU will disconnect and reconnect to the modem.
If 0, this parameter ignored.
Ignore CD Range: Never, Always, When connect
Default: Never.
When connecting to the modem, its CD is constantly
being polled, and if inactive, the RTU will reconnect to
it. This parameter enables the user to bypass the polling
by ignoring CD. Setting this parameter to Always will
cause RTU not to check CD at all. Setting it into When
connect will ignore CD during the PPP connection phase.
When PPP is connected, CD will be polled.
Setting this parameter to Never will always check CD.
The paging mechanism is used with Standard modem, as with Tetra and iDEN. A paging
mechanism to each site (peer) in IP conversion table makes MDLC over IP more reliable. If
these parameters are not visible, they take their default values as 0, thus disabling paging.
They have the same meaning as in MDLC over iDEN. For more information, refer to MDLC
over IP Site Paging.
225
MDLC over IP
AT&D1 – Instruct the modem to check if DTR is active. When the RTU deactivates DTR, the
radio will reset its port, and the PPP connection will terminate.
AT+WS45=4 – Instruct the radio to initiate PPP with the RTU when getting the ATD
command.
A PC program called TestModem.exe running MOSCAD code connects into any radio using
an IP modem file. If a new radio/modem need to be connected into the MOSCAD, it is advised
to use this utility in order to set up an appropriate IP modem file.
The following is an example of IP modem file used for G18 modem (G18.ipm):
[Initialize]
$WaitForOk= 2000 ; Default Wait for OK timeout in milliseconds
$DTEIPAddr= 0.0.0.0 ; IP Address of DTE (MOSCAD).
; Set to 0 in order to obtain from PPP.
$GtwyIPAddr= 0.0.0.0 ; IP Address default gateway.
$DTESubnetMask= 0.0.0.0 ; Subnet Mask
$Username= ; Client username (and server when supported)
$Password= ; Client password (and server when supproted)
$DialWhen= 0 ; 0 - Dial always, 1 - never dial, 2-dial
; on demand (not supproted)
$AbortSeqExist= 1 ; 1 - Modem support abort Sequence
$IgnoreCD= 2 ; 0 - Never / 1 - Always / 2 - Ignore CD
; when connecting
$DisconctIcmpNet= 0 ; 1 - Disconnect modem when getting
226
MDLC over IP
; icmp:netunreach
$DisconctRxIdleTime= 0 ; 0 - never disconnect if inactive,
; otherwise number of seconds to disconnect
; if RX inactive
$SetRtsTimeout= 15000 ; How long to wait after setting RTS
$UnsetRtsTimeout= 1000 ; How long to wait after unsetting RTS
$ModemAddress= 0 ; Modem address (string)
$ModemVersion= 0 ; Modem version (string)
$ModemName= g18 ; Modems type for diagnotic purposes
$ModemRSSI= -- ; Modem RSSI – just for diagnostics
[SetCommandMode]
<+++><><5>
[Hangup]
<ATH><OK>
[VerifyParms]
[ConfigureParms]
<AT><OK>
<AT&F0&D2&C1E0><OK>
<ATV1W1S95=47><OK>
<AT&K3><OK>
[VerifyIpParms]
[Dial]
<ATD*99#><CONNECT 9600/ARQ><40>
The following is an example of IP modem file used for XTS2500 radio (ASTRO6.ipm):
[Initialize]
$WaitForOk= 2000 ; Default Wait for OK timeout in milliseconds
$DTEIPAddr= 0.0.0.0 ; IP Address of DTE (MOSCAD). Set to 0 in
; order to obtain from PPP.
$DCEIPAddr= 0.0.0.0 ; IP Address of radio
$GtwyIPAddr= 0.0.0.0 ; IP Address default gateway.
$DTESubnetMask= 0.0.0.0 ; Subnet Mask
$Username= ; Client username (and server when supported)
$Password= ; Client password (and server when supproted)
$DialWhen= 0 ; 0 - Dial always, 1 - never dial, 2-dial on
; demand (not supproted)
$AbortSeqExist= 1 ; 1 - Modem support abort Sequence
$IgnoreCD= 1 ; 0 - Never / 1 - Always / 2 - Ignore CD when
; connecting
$DisconctIcmpNet= 0 ; 1 - Disconnect modem when getting ICMP:Net
; Unreach
$DisconctRxIdleTime= 0 ; 0 - never disconnect if inactive,
; otherwise number of seconds to disconnect if
; RX inactive
$SetRtsTimeout= 5000 ; How long to wait after setting DTR
$UnsetRtsTimeout= 1000 ; How long to wait after unsetting DTR
$ModemAddress= 0 ; Modem address (string)
$ModemVersion= 0 ; Modem version (string)
$ModemName= ASTRO6 ; Modems type for diagnotic purposes
$ModemRSSI= -- ; Modem RSSI
[SetCommandMode]
<+++><><5>
[Hangup]
<ATH0x0D><>
<AT><OK>
227
MDLC over IP
[ConfigureParms]
<AT><OK>
<ATE0V1><OK>
<AT&C1><OK>
<AT&K3><OK> ; Hardware flow control
[Dial]
<ATDT><CONNECT>
[Hangup] Called when disconnecting the modem after it was set to command mode.
[VerifyParms] Called after disconnecting the modem to check modem identity, signal level,
etc.
[ConfigureParms] Called after verifying that the modem is OK. The set of AT commands
will be specified here.
[VerifyIpParms] Called after configuring basic AT commands and before connecting the
modem. Needed when the Modem IP Address or RTU IP Address is to be retrieved using AT
commands. This is primarily required for SLIP connections.
[Dial] Called when dialing into the modem. This is the last command issued before moving
on to PPP or SLIP.
When a given <AT command> is not specified, no command will be issued. Note that empty
brackets <> must be used if no command is to be issued.
When <Expected response> is not specified, the RTU will wait and ignore any response. Note
that empty brackets must be used <> if no reponse is verified.
When <Timeout in seconds> is not specified, the RTU will wait $WaitForOkTimeout for the
modem to respond.
If the response does not match <Expected response>, the RTU will keep waiting for a
specified timeout. If the desired response is still not received, the RTU will declare an error
and start modem configuration all over again.
228
MDLC over IP
The characters \r (0x0D Hex) are automatically appended to each AT command, unless
<Expected Response> is empty. In that case 0x0D should be appended explicitly in the
command.
The characters \n\r (0x0A and 0x0D) are automatically prepended and appended to each AT
command. There is no need to specify these delimiters explicitly.
Expected response can also be an environment variable as set above. For example, the line
below will issue the AT+WPCURNEI? command and put its response in the DTEIPAddr
variable. This variable among others is used by the system when bringing up the connection.
<AT+WPCURNEI?><$DTEIPAddr>
<AT\$command><OK>
The following variables exist in MOSCAD/MOSCAD-L V9.00 but are ignored. They are
considered to be 0 and are for future use.
$Authenticate
$DialWhen
This connection is made using PPP and is basically the same as MDLC over Standard modem,
except that no file is supported, and no AT commands are issued.
When the RTU is powered up, it expects a CD on the MDLC over IP port, and then it initiates
PPP connection. CD is constantly being polled, and if it drops, PPP is disconnected. The user
can opt to ignore CD using Advanced Link Layer parameters in the site configuration. In this
case, PPP is initiated upon power up. When connected, CD is polled in order to stay
connected. If it drops, then PPPt is reconnected.
229
MDLC over IP
As with the iDEN modem, if the Null modem is connected to Port 2, no additional external
radio can be connected to Port 3 due to physical limitations. If no external radio is used, the
Null modem can be connected to Port 3.
The Advanced parameters are the same as described above for general MDLC over IP and
MDLC over Standard modem and are therefore not repeated here.
In some cases it is better to use the Standard Modem, rather than Null modem, even when
connecting directly to another device. For example when connecting to Windows NT, as
Windows NT expects a client to send a client string and respond with clientserver.
IP Conversion Table
When the MOSCAD over IP option is installed, the IP Address Table icon will be added to the
MOSCAD Programming ToolBox folder. Click on the icon to start the tool. Add entries for
each Site ID, as shown below.
Note that for MDLC over Astro3.xx, all IP addresses in the IP conversion table must be
registered in WINGS. These can be changed remotely afterwards. If an RTU IP address is
changed in the site configuration and downloaded, then the RTU updates the radio which
updates the WINGS box. Entries in the WINGS box need not be updated manually.
For MDLC over iDEN, MDLC over Tetra, and MDLC over Standard or Null Modem, consult
the system provider for the infrastructure relating to the IP addresses.
230
MDLC over IP
You can also check the IP Address yourself. After the RTU is configured using Site
configuration, connect the modem to the RTU, and invoke the SW Diagnostics tool in the
Software Diagnostics & Loggers utility. For a port link ID named LINE1, first run device
LIN1L level 101 and see if the state of the configuration task is “Connected and registered”.
Then run level 0, and see the RTU IP Address as obtained from the modem.
For all variations of MDLC over IP except MDLC via Telnet, download the IP conversion
table to all the RTUs in the network.
IP Gateway Configuration
Site Configuration
Configure a Port 1 as MDLC over IP, as follows:
(Note that this is one of the virtual ports over Port 1, rather than physical port.)
Default group IP Same as for all RTUs. For Astro IP, this is the same as
address the address registered in the WINGS Box. (See RTU Site
Configuration.) This is optional.
The rest of the parameters are set up according to normal IP Gateway procedures. Any
exceptions or known problems are described in the release notes.
IP Conversion Table
Prepare an IP conversion table with IP addresses of all RTUs and IP Gateway, identical to the
one prepared for the RTUs. Note that the same file may be used.
Download
Download the site configuration and IP conversion table along with network configuration, if
necessary to the IP Gateway.
User Application
Because there is no full ACK between RTU and RTU, you have to be careful about using
TxFrm. It is possible that frames will be lost because there is no Frame Sequence and no End
to End Acknowledge. This ACK may be done at the application level, if necessary.
231
MDLC over IP
Communication between RTUs and between RTUs and IP Gateway is performed by opening
channels over TELNET in the IP Gateway. Each RTU must have a separate channel and every
channel must have a separate link ID. Data transmitted from one RTU to another is switched
by the IP Gateway, even if both RTUs are connected to the same Terminal Server. Therefore,
the MDLC network grows with each RTU added to the network, and overhead is created when
transmitting data over the network. This is in contrast to MDLC via Terminal Server and
MDLC via Astro IP, where all the RTUs and IP Gateway share the same link ID.
In the diagram below, a typical configuration is shown, with several RTUs attached via
TELNET to a Terminal Server, which is in turn attached to Ethernet.
SCADA
Central
Ethernet
RSLINK 1.....RSLINK4
MCP/T or
RS-232 IP Gateway
Programming
ToolBox IP
Network
Ethernet
In order to allow MOSCAD and MOSCAD-L RTUs to communicate over Ethernet media, the
following two products have been developed:
232
MDLC over IP
• Ethernet unit (EU) – It is enclosed in compact plastic and it includes two ports. The
connection to Ethernet is via the 10BT port and the connection to MOSCAD/MOSCAD-L/
MOSCAD NFM RTU is via the RS232 port on the EU. The EU can be connected to any
RS232 port of MOSCAD/MOSCAD-L/MOSCAD NFM RTU. The EU is utilized on
MOSCAD/MOSCAD-L in cases when the EPIB cannot be plugged into Port 3.
The functionality of the EPIB and EU is identical. Within the scope of this document, the
EPIB and EU products are referenced as EPIB.
The figure below illustrates an example of SCADA system with IP Gateway and MOSCAD
RTUs connected to Ethernet LAN:
SCADA
Central Programming
ToolBox
Ethernet 1
LINE 1
IP
RS-232 Gateway
Programming
ToolBox IP
Network
Ethernet 2
Ethernet 3
10BaseT 10BaseT
10BaseT
Ethernet MOSCAD MOSCAD
Unit RTU-IP2 RTU-IP3
RS-232 with with
Ethernet Ethernet
MOSCAD Plug-in Plug-in
RTU-IP1 board on board on
RS-232 Port 3 Port 3
Programming
ToolBox
The MOSCAD RTU with EPIB provides TCP/IP connectivity over Ethernet LAN – for both
SCADA and NFM systems. In addition, it supports transmitting/receiving of MDLC packets
that are enveloped inside IP datagrams. This feature is known as MDLC via IP or MDLC over
IP.
For NM application, the MOSCAD RTU with EPIB, based on SNMP /UDP, provides the
NMC (Network Manager Center) users with the current status of NE (Network Element)
objects and with the events (Traps) that are associated with each entity.
For SCADA application, the MOSCAD RTU with EPIB, based on TCP/IP API, provides the
users with the current values of the MOSCAD tables and with the events (Bursts) that are
associated with each entity.
233
MDLC over IP
The SCADA central or the NM manager can access the database of the MOSCAD RTU with
EPIB by using the TCP/IP API or the SNMP protocol. The SCADA central or the NM
manager can access directly to the Data Base of the MOSCAD RTU with EPIB only, but not
to the data Base of any other MOSCAD that is connected to it via the MDLC network.
The figure below describes the architecture of NM and SCADA systems that are based on IP
network and includes control center workstations and computer that exchange data with the
MOSCAD RTU with EPIB.
Programming
Control Center ToolBox
NM or SCADA
Platform
TCP/IP on Ethernet
Router
WAN
After activating the Ethernet IP Interface Configurator program, the user should define the IP
Configuration and the SNMP Configuration parameters. In addition, the user should define the
IP Conversion Table. The IP Conversion Table is needed only if the MDLC network is
234
MDLC over IP
extended by the IP network or, in other words, the MDLC frames are enveloped in IP
datagrams (MDLC over IP is being used).
The defined SNMP Configuration, IP Configuration and the IP Conversion Table are then
downloaded to the EPIB from the Ethernet IP Interface program or by specifying Remote Site
ID of 65286 from the MOSCAD Programming ToolBox IP Conversion Table utility.
Once the IP address of an EPIB unit has been configured, it can be redefined remotely by
downloading a new IP Interface configuration.
To configure the EPIB, set the IP and SNMP Configuration parameters shown in the figures
below.
IP Configuration parameters
IP Interface (MOSCAD) IP ADDRESS
Range: 000.000.000.001-255.255.255.254
IP address of the MOSCAD RTU with EPIB. For information on this and other IP Addresses
in the configuration, see your network administrator.
Default Router IP Address
Range: 000.000.000.001-255.255.255.254
Net Mask Address
Range: 000.000.000.000-255.255.255.255
235
MDLC over IP
Contact
The name of the contact person responsible for setting, configuring and maintaining the
MOSCAD RTU with EPIB and all NFM RTUs and devices installed at the communication
sites.
Location
For maintenance purposes, the address of the location of the MOSCAD RTU with EPIB
device should be provided. The NMC application or the MIB Browser can retrieve this address
by using the MOSCAD RTU with EPIB MIB.
Community Read
The definition of the Community String Read provides a READ security password to the
MOSCAD RTU with EPIB. The NMC should supply the same Community String (case
sensitive) in order to read information from the MOSCAD RTU with EPIB:
(Get_PDU/Get_Next_PDU Requests PDUs) and for sending Traps).
Community Write
The definition of the Community String Write provides a WRITE security password to the
MOSCAD RTU with EPIB. The NMC should supply the same Community String (case
sensitive) in order to write information to the MOSCAD RTU with EPIB: Set_PDU Request.
DB Refresh Interval[s]
The database refresh interval specifies the refresh (validity) interval in seconds of the data
received from the sites in the internal MOSCAD RTU with EPIB cache. The data is discarded
after this interval expires.
The connecting RS232 cable (not provided by Motorola) should be a D-type connector
adapter, female with 25 or 9 pins configured as below. Note that the location of the pins in the
8-pin connector is from left to right (1 to 8).
237
MDLC over IP
The RTU port data speed should be set using the ToolBox to 19200. Once the ToolBox is
connected to the EPIB, other downloading, programming or diagnostic operations may be
performed.
Errors or diagnostics from the EPIB can be read using the ToolBox either directly from an
external unit or via the MOSCAD from the plug in board. In order to do so, set up the
ToolBox communication with Site ID 65286 Link ID LINE 1.
Download
Once the IP Interface Configuration has been completed, it is downloaded to the EPIB unit,
using the Download icon or the Download command from the Tools menu. The name of the
IP Conversion table must also be specified (see below) so that it too will be downloaded. The
button to the right of the checkbox enables the user to browse for the IP Conversion table
name.
After the Ethernet IP Interface Configuration has been downloaded to the EPIB, it can be
changed remotely. In the Comm Setup utility, specify the EPIB IP address. Run the Ethernet
IP Interface Configurator utility and modify the IP/SNMP settings. Specify the IP Conversion
table and download the new Ethernet IP Interface configuration.
238
Authentication
General
The information in this chapter refers to MOSCAD and MOSCAD-L ≥ V8.00.
This feature is available in ToolBox versions ≥ V8.50, but the option, named Authentication
over MDLC, must be purchased separately. A separate license is required for each
authenticated RTU.
With the Authentication option, MOSCAD RTUs/IP Gateways can rely on the integrity of
information sent on the MDLC network. An RTU/Gateway can be certain that received data
was transmitted by the original sender and not by some other, unauthorized source.
In order for authentication to work, the clocks of RTUs connected to the authenticated links
must be synchronized. Each MDLC data packet transmitted over an authenticated link is
marked with an encrypted timestamp (ETS) which indicates when the frame was sent.
Information whose timestamp has expired will be discarded as invalid (though negative
acknowledgement is not sent).
Synchronizing Server (SS): An RTU or IP Gateway which synchronizes the clocks of other
RTUs or IP Gateways.
If a given link is configured as an authenticated link, all RTUs on that link must be defined as
authenticated or they will not “understand” the timestamp and will discard the authenticated
frames as invalid. Similarly, an authenticated RTU connected to a link which is not
authenticated will not understand incoming frames and will discard them as invalid. Thus, one
authenticated RTU communicates with another authenticated RTU, and an RTU which is not
defined as such communicates with another unauthenticated RTU. The figure below depicts a
system with both authenticated and unauthenticated links.
239
Authentication
SCADA Programming
Central ToolBox
LINE 1
IP
Gateway
MOSCAD MOSCAD
RTU-112 Fiber Optic PSTN RTU-152
LINE 3
DIAL
(Authenticated)
(Unauthenticated)
MOSCAD MOSCAD
RTU-113 RTU-153
MOSCAD MOSCAD MOSCAD MOSCAD MOSCAD MOSCAD
RTU-114 RTU-115 RTU-116 RTU-141 RTU-142 RTU-143
*For IPGW V4.00 or higher
Because authentication is a function of the link and not of the CPU, an RTU can be connected
to an authenticated link through one port and to a regular (unauthenticated) link through
another port. Authentication is currently available on all media except MDLC over IP,
(Ethernet, Astro radio, SLIP) MDLC over DataTac, X.25, Dial and Terminal server, because
RTUs cannot be time synchronized via these types of media. Any RTUs connected to those
links cannot be synchronized (through those links) and therefore cannot be defined as
authenticated. In fact, authentication cannot be implemented on any media which cannot
support RTU clock synchronization. There are some links which cannot be authenticated even
if they are connected to a reliable clock source, because the network time delay is variable and
authentication is based on time.
In the figure above, RTU-11 cannot receive authenticated data over the Astro radio link from
RTU-111, but it can receive it from RTU-115 via LINE 3 which is connected to a different
port. Note that the three RTUs on the DIAL link (e.g. RTU-142) can be < V8.00 because
authentication is not relevant for them. Older RTUs which are to be connected to an
authenticated link must be upgraded to V8.00 or higher.
Note: If an RTU with an RS232 link is connected through a Terminal Server to a remote
Gateway, this link cannot be authenticated because it cannot be synchronized. While the
Network Configuration tool does not prevent the link from being marked authenticated, the
communication will fail. This same RTU can be connected via another authenticated RS232
link to local RTUs.
RTU to be forwarded to a remote RTU, if the RTUs are connected to each other with an
authenticated link.
In order to authenticate communication between two (or more) authenticated MDLC networks,
the link connecting them must be an authenticated link. If the data is to be authenticated, each
of the links through which it is routed (from the source to the destination) must also be so.
Synchronization
The concept of time-based authentication relies on proper synchronization of RTU clocks. In
a given network, one primary clock source can synchronize all the RTUs in a hierarchical
manner.
Synchronization is based on a client/server relationship. A site with a reliable clock (e.g. from
GPS or user application) is defined by the user as a Synchronizing Server. Other RTUs which
are directly connected to that primary source are defined as its Synchronized Clients. When
the server starts up, it notifies its clients of its availability, who can then request
synchronization from the server. When a client starts up, it requests clock synchronization
from the RTU defined as its server. (Note that SYNC requests frames are also authenticated.)
The server will periodically send out synchronization broadcasts to its clients.
In a given network, there can be more than one server but each RTU will only have one
defined server. If an RTU is connected to two links (or to two zones) each of which has a
server, the RTU will use the one with the smaller Site ID as its server. Note that in a multi-
zone network, if one radio zone is authenticated, all zones are authenticated, because they are
actually the same radio link.
In the example below, the letters in the RTU names reflect their operation modes, i.e. “S”
indicates a server, “C” indicates a client, and “CS” indicates a client/server. The figure below
depicts a network of RTUs with one server, RTU-S1, which gets its time from GPS. It
synchronizes those RTUs connected to it via RSLink2 , i.e. RTU-CS11, RTU-C12, RTU-C13,
RTU-C14 and RTU-CS15. As soon as RTU-CS5 (a client/server) receives its synchronization
from RTU-S1, it will in turn synchronize all the site attached to it on Radio1 (i.e. RTU-C151,
RTU-C152, etc.) Note that RTU-142 is not synchronized because it is on a DIAL connection.
It will also be unauthenticated, as are the RTUs linked via Astro radio. If communication
between RTU-141 and RTU-142 must be authenticated, a primary clock source such as GPS
can be connected to one of the RTUs to enable synchronization. However, the link to RTU-
C14 remains unauthenticated.
241
Authentication
SCADA Programming
Central ToolBox
LINE 1
IP
Gateway
MOSCAD RTU-
RTU-112 Fiber Optic PSTN C152
LINE 3
DIAL
(Authenticated)
(Unauthenticated)
MOSCAD RTU-
RTU-113 C153
RTU- RTU- RTU- MOSCAD MOSCAD MOSCAD
C114 C115 C116 RTU-141 RTU-142 RTU-143
Time synchronization can only be performed over a single link between two RTUs (e.g. from
RTU S1 to RTU C11, from RTU CS15 to RTU C152.). In order to reach sites which are not
directly connected to the server, clients must be defined as servers (hence the name
client/server) to “repeat” or propagate the synchronization message. Each link must have one
server.
A client/server which has not received synchronization from its server in a long time, (perhaps
due to a communication problem in the network) will stop sending periodic synchronization to
its clients, because it assumes that its own clock is no longer synchronized. In this case, the
client/server will act as a pure client until it is synchronized, and then it will return to
client/server mode.
Note: If an RTU has at least one authenticated link, all synchronization messages initiated by
the application will be blocked. It is, therefore, recommended to modify existing MOSCAD
Ladder/C applications so that they will no longer initiate clock synchronization.
In the figure above, the GPS is connected to the MOSCAD server. As of IP Gateway version
V3.20, the IP Gateway can act as a server and RTU-S1 is not required. The IP Gateway
cannot be connected to GPS, but it can use another clock source, such as NTP or ToolBox PC
clock. An MCP-M can only support authentication if it is attached to a MOSCAD CPU.
Authentication Setup
The setup for Authentication is performed in the Network Configuration utility. The sites in
the network and their associated links are defined. The authentication and synchronization for
242
Authentication
each link is configured as well as the related Advanced Parameters. The completed network
configuration is then downloaded to the RTU.
Note: No changes to the site configuration are required. However, if the Clock
Synchronization Delay of the link is not zero (e.g. for MTS-2000 Conventional Radio), this
parameter may need to be updated in the Site Configuration utility.
Network Configuration
To set up the system for Authentication, double-click the Network Configuration utility in the
MOSCAD Programming ToolBox folder. Plan your network topology on paper and decide
which links will be authenticated and the operation mode (client, server, client/server) of each
site. Define all the sites and their associated links, as described in the Network Configuration
section of the System Setup and Diagnostics manual.
When the Authentication option is installed, two new commands will be available in the Edit
menu of the Network Configuration utility.
-Authenticate Links- enables the user to configure those links which are authenticated.
-Authentication Options- enables the user to set the Advanced Parameters related to
authentication.
Authenticate Links
When the Authenticate Links command is selected, a table of all links in the network is
displayed, as shown in the Links Authentication Information window below.
To specify that the link is authenticated, check the Authenticated box to the right of the Link
ID. Next specify the Site ID of the server which will perform synchronization for all the RTUs
243
Authentication
on the link. If the RTU is a server, specify its Site ID for all the authenticated links connected
to it. If the RTU is a client, its Site ID cannot be entered into the Server Site ID field. If an
RTU is a client/server, specify its Site ID for the appropriate links for whom it will act as a
server. A Server Site ID of 0 indicates that those RTUs are not attached to a server, but have
another clock source (e.g. GPS attached to each site.)
Next double-click a given Link ID to open the Define Keys and Aliases dialog (see below) and
define the authentication keys/key aliases to be used for validating the timestamp in the
dataframe. If you close the Define Keys and Aliases dialog using the OK button, the Has
Keys/Has Aliases buttons to the right of the entry in the Links Authentication Information will
be marked with a check.
Note: If the Server Site ID or authentication keys are not defined for any link in the table, the
authentication information will not be downloaded to the network.
It is possible to authenticate a link from the main Network Configuration screen by clicking
the right mouse button and selecting Authenticate Link when the cursor is in a Link ID cell.
The next time you open the Links Authentication Information window, the box to the right of
that Link ID will be already checked.
Authentication Keys
The Authentication Keys are defined for a given link within a given network. This enables the
user to determine which subnetworks within the system will understand each other. When
either the Has Keys or Has Aliases button is selected, the screen below is displayed.
244
Authentication
Three keys of eight bytes each should be defined. Each byte can be entered as either a
numeric value or as a string. To switch from numeric to string format, click the appropriate
field. If the chosen number cannot be displayed in ASCII format, an asterisk will be displayed
instead.
To use the same authentication keys for all links in the network, click the Force All Links
button. In this situation, all data transmitted around the network will be understood by all
authenticated RTUs.
Note: Force All Links can be used to define keys for all the links and then certain links can be
modified in order to vary the authentication and limit the motility of the data.
The authentication keys are not saved on the disk. When the Network Configuration utility is
exited, the authentication keys are erased from the ToolBox. Yet it may be difficult to
remember which authentication keys were downloaded to the Flash memory of the RTU.
Therefore, a name or key alias may be defined for each authentication key to remind the user
of the key without compromising the integrity of the authentication. To define a key alias, type
a string in the Alias field.
Click OK to save the key definitions or Cancel to exit without saving. . If you close the Define
Keys and Aliases dialog using the OK button, the Has Keys/Has Aliases buttons to the right of
the entry in the Links Authentication Information will be marked with a check.
Authentication Options
To set the advanced parameters for Authentication, select the Authentication Options
command from the Edit menu. The range of values for each parameter is specified between <
> symbols. For example, <1-200> means that the value can be a number between 1 through
200. You can specify a value greater than the maximum value, in which case the system only
issues a warning message. Exceeding the range may consume additional memory and may
cause unexpected or incorrect behavior in the RTU. The default is automatically entered in
the parameter field and appears between square brackets (for example: [80]). You can change
this value.
TX Stamp Interval (seconds) <5-1800> [150]
This parameter defines the interval between two consequent generations of an authentication
stamp for transmission. A higher value saves CPU time but at the same time decreases the
protection of the authentication mechanism, since an authentication stamp generated at a given
instant will be used to authenticate all the outgoing frames in the next TX Stamp Interval
seconds.
TX Periodic Server SYNC Interval (seconds) <60-30000> [1800]
This parameter defines the interval between two periodic SYNC messages sent by a Server or
a Client-Server. A lower value will decrease the clock drift between any two CPUs in the
network, but will increase the communication overhead on the network.
RX Periodic Sync Interval (seconds) <120-60000> [3600]
This parameter defines the interval between two expected SYNC messages. It is relevant to
Client and Client-Server operation modes. If an expected SYNC message does not arrive at an
RTU within this time interval, it will send a SYNC request message to its known Server. In
case of a Client-Server, if an expected periodic SYNC message does not arrive, the RTU will
not send any periodic SYNC messages on those Links it serves, until it succeeds in requesting
245
Authentication
SYNC from its Server and receiving a valid response. It is recommended that this value be set
to at least twice the value of Server TX Periodic SYNC Interval.
TX Sync Request Retry Interval (seconds) <10-30000> [20]
This parameter defines the interval between two consecutive retries to transmit a SYNC
request and receive a valid response. It is relevant to Client and Client/Server operation
modes. The request is used by the RTU after restarting (to initially get the Server’s clock) and
also when (for some reason) the periodic SYNC message is not received, or not properly
authenticated.
Note that the maximum drift may actually be smaller than the Max Drift parameter, because
the incoming timestamp is compared to an internal generated timestamp and not to an actual
clock. The internal timestamp is generated every TX Stamp Interval. Consider a situation
where the Max Drift is set to 300 seconds and the TX Stamp Interval is set to 150 seconds. An
RTU whose clock has drifted by 200 seconds may reject the received frame as invalid if its
internal timestamp was generated 140 seconds previously.
Max Network Delay (Msec) <0-3600000> [0]
This parameter defines the maximum of all delays of the authenticated links in the network. It
is relevant to received frames only. If a frame carrying a timestamp with a value of t1 is
received, the receiving RTU will add the value of Maximum Network Delay to t1 for the
purpose of authenticating the frame. In most cases, this parameter should be set to zero.
Download
Once the network has been configured and the authentication information has been defined,
the network configuration is downloaded to each site in the network. This can be done using
the Download icon or the Download command from the Tools menu.
Note After downloading the network configuration, the RTU does not need a cold restart to
perform authentication.
246
Authentication
The Authentication configuration can be downloaded remotely to an RTU, but this is not
recommended for security reasons. If the Authentication must be downloaded remotely, the
most remote sites should receive the configuration first and then the closer sites (bottom-up
along the hierarchy) so that communication is maintained at all times.
User Application
The system variable AuthOK on the Reserved Flags table in the System Tables of the
Application Programmer Database Builder. See the System and Constant Table section of the
Application Programmer manual.
247
Event Driven Software
Some applications, especially electrical ones, have to deal with fast changes caused by various
events. The RTU provides you with the necessary database types and special functions in order
to deal with such events.
These functions allow you to get information on the change that has occurred (database
coordinates, data, and time stamp) and activate a specific process accordingly, rather than
polling the database. It also allows you to activate "fast" timers (shorter than Scan time) upon
events.
The time stamp can also be retrieved without waiting for an event to take place and stored in
the Ladder Database.
Definitions
Data Type
The Event Driven concept is applicable only for Discrete Inputs of Time-Tagged DI (TgDI)
data type.
This data type is similar to the DI data type (see Database Concept). Note that only the
important inputs should be defined as Time-Tagged DI, since this feature is CPU-time and
space consuming. By calling the Time function, a time stamp can also be retrieved and
appended to an analog input called via the SCAN function from the Ladder. This need not be
related to a specific event.
I/O Link
The specification of a Time-Tagged DI as Event-Driven is done during I/O Link (accessed
from the Application Programmer). For details, refer to Application Programmer.
During I/O linking, each Time-Tagged DI may be defined in the Event Type column as one of
the following types:
248
Event Driven Software
• TIMETAG – for time-tagged COS. Changes are stored in a time tag logger with the time of
occurrence in 1 msec resolution. For further details, refer to Utilities in the System Setup
and Diagnostics Tools manual.
• TAG+EVENT – for time-tagged and event-driven COS. A combination of the above two
types.
When calling the GtEvnt function, the event is transferred to the Event-Driven database table
(PRMEVENT table), while the rack, module, and input numbers are translated into X,Y and Z
coordinates, (where: X=column no., Y=row no., Z=table no.). Simultaneously, the
corresponding table in the database is updated according to the change that has occurred.
In version 3.40, or higher, the event's time (date and time) is written to the TmMost and
TmLeas columns in the PRMEVENT Table). These are two real type parameters, that
represent the event's time as follows:
TmMost TmLeas
Day Month Year Hour Minute Second mili-seco
1 byte 1 byte 1 byte byte 1 byte 1 byte 2 bytes
1-31 1-12 0-99 0-23 0-59 0-59 0-999
249
Event Driven Software
Since the tables can hold up to eight columns, all the time's parameters (day, hour etc.) are
arranged in two real type variables. In order to read specific information (e.g: seconds), the
user should perform LSL (Logic Shift Left) or LSR (Logic Shift Right) for the relevant
variable, TmMost or TmLeas.
The number 0 in the YEAR byte (part of the TmMost) represents the year 1980, the number 1
represents the year 1981 etc. until the number 99 which represents the year 2079. (e.g: 15
represents the year 1995).
The system can simultaneously handle up to 150 events and timers. If there are more than 150
events/timers, the EvOvfl flag of the Reserved Flags table (one of the System Tables), will be
set to 1. In this case, it is recommended to clear the events queue (by calling the StEvnt
function), and performing ordinary scan.
The system can set timers for up to 10 seconds. If no event is read during this period of time,
the timer will be turned off, and the EvOvfl flag will be set to 1. It is the user's responsibility
to reset this flag to 0.
For operations that require delay, the RTU provides the SetTmr function. The end of the timer
is regarded as an event.
3 - The RTU's time was set by the ToolBox (using the Time & Date utility or Send Sync,
F9, from the Time Tag menu)
5 - The existence of the time's parameters in the TmMost and TmLeas columns, is a result of
calling the Time function.
The two frames at the bottom of the PRMEVENT Table, show the time and date (TmMost and
TmLeas), in a readable format. The user may read these parameters on-line, by activating the
Monitor mode in the Application Programmer.
• SetTmr – to start a timer after an event. The termination of the timer is also regarded as an
event (this timer does not depend on the Scan time). The value of the timer should be set in
the ___Val variable (in x10 msec).
The following rungs provide examples that cover all aspects of the Event Driven mechanism.
251
Event Driven Software
StEvnt
(1) ( CALL )
#2
GtEvnt
(2) ( CALL )
__Typ __Tbl
Procs1
(3) = ( JSP )
#0 #9
__Typ __Tbl
Procs2
(4) = ( JSP )
#0 #11
__Typ __Tbl
Procs3
(5) = ( JSP )
#0 #13
As part of the MAIN process, the above rungs check that an event has occurred, and fulfilling
certain conditions, activate appropriate subprocesses. The above rungs are described below:
Rung 1: The StEvnt function is called with a parameter of 2 to enable the Event Driven
mechanism. It is recommended to put this rung in the Init process.
Rung 2: The GtEvnt function is called; the system retrieves an event from the event queue
into the PRMEVENT table, including the event type, table number, column
number, row number, and data of COS.
Rungs 3-5: These rungs check the ___Typ variable and the affected table number; if ___Typ
is not 0 (meaning that there is an event in the queue), the system jumps to
perform a specific process according to the table number. For example, in rung 4
the system jumps to the Procs2 subprocess since the table number is 11.
The rungs below describe the use of the timer function of the Event Driven mechanism.
252
Event Driven Software
I
(1) ( MOVE )
__Row
#1
Inp1, I Inp2, I
__Typ
Send2C
(4) ( JSP )
#2
(5) ( RET )
Rung 1: This rung stores the row number (___Row) in the I index.
Rung 2: If it is an event (not caused by a timer; ___Typ=1), and Inp1,I is not equal to
Inp2,I, then the system jumps to the Send2C subprocess to send specific bits to
the central.
Rung 3: If it is an event (not caused by a timer; ___Typ=1), and Inp1,I is equal to Inp2,I,
then the ___Val variable gets the value of 30 (thus, setting the timer to 300 msec),
and the SetTmr function is called to activate the timer. Note that the parameters
of the event are still kept in the PRMEVENT table.
Rung 4: If the event is caused by a timer (___Typ=2), the system jumps to the Send2C
subprocess to send the current status of Inp1,I and Inp2,I to the central.
In the MAIN process, you should add appropriate rungs to perform a loop, that checks if there
are additional events in the queue.
253
Event Driven Software
The following rung checks the analog value ANA1, and according to its value, activates the
Time function. This option allows the user to get the occurrence time of an analog event.
ANA1
Time
( CALL )
500+
To obtain the date and time, decode TmMost and TmLeast, as follows (provided that TmMost
and TmLeas are not zero and contain date/time information to be decoded):
Step 1. Define a set of user variables, as illustrated below. Variables 0 through 6 will get the
date and time components; variables 8 through 11 are auxiliary variables:
Mv1, Mv2 (for TmMost) and Lv1, Lv2 (for TmLeas) must be consecutive.
254
Event Driven Software
C Mv1
P TmMost
Y #4
C Lv1
P TmLeas
Y #4
Rung: r6
Mday
( MOVE )
Mv1
Mday
( LSR )
#8
A Mmonth
N Mv1
D #255
MYear
( MOVE )
Mv2
MYear
( LSR )
#8
A Mhour
N Mv2
D #255
Rung: r7
255
Event Driven Software
Mmin
( MOVE )
Lv1
Mmin
( LSR )
#8
A Msec
N Lv1
D #255
MSec
( MOVE )
Lv2
Rung: r8
256
INTRAC Protocol
Scope
The INTRAC software module included in the ToolBox, provides the user with the ability to
define the INTRAC parameters, including protocol parameters, timing parameters and
hardware interface definition, in order to allow integration of the RTU with MOTOROLA
INTRAC equipment and the INTRAC protocol. The INTRAC module supports Ladder
Diagram Language, parameter tables and the related call functions. In addition to the INTRAC
networks, the software also supports the old MDLC protocol, which is used in the RTU to
RTU communication for MEIC 1000 units.
The hardware interface is a piggyback modem, which is connected to the CPU and to the
physical channel through the CPU's Port-3. A general system view is provided in the following
figure.
INTRAC
EQUIPMENT
INTRAC
COMMUNICATION
CONVENTIONAL
TRUNK RADIO
RADIO
MOSCAD
CPU
RS-232
INTRAC
OR PORT-3
MODEM PROGRAMMING
TOOL BOX (PC)
257
INTRAC Protocol
This chapter provides the user with the information, required to build the Ladder Diagram for
INTRAC net and to define the channel parameters.
In addition, the chapter explains the call functions and their parameters.
Applicable Documents
In this chapter we assume that you are familiar with the ToolBox software. However,
additional documentation is available if necessary. For description of the INTRAC protocol
and INTRAC system, refer to manual: – INTRAC 2000 – Service Manual, 68P02962G05-O.
SYSTEM
BIT 0 ADDRESS BIT 15
SECURITY
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
GROUP DATA
STATION
ADDRESS
ADDRESS
32 BIT INTRAC WORD
Bit 1-9 – Station address, identifies the remote unit within a system.
Bit 10-11 – System address, identifies the system (four combinations) SYSTEM-0 ..
SYSTEM-3.
Bit 12-14 – Group address (Group A-H). Identifies the receive group (in a
codeword transmitted by the remote station) or the transmit group (in a
codeword received by the remote station).
Bit 16-25 – Data. Contains the specific data according to the nature of the group
being transmitted or received.
Bit 26-31 – Security for the entire codeword. 5 bit or a cyclic code of all the
preceding data bits (according to the Bose Chaudhuri 26/31 code). Bit
31 is the overall parity check bit.
258
INTRAC Protocol
TxIntr Function
TxIntr – This function allows the RTU to transmit a frame, using the INTRAC protocol. The
type of the transmitted frame data section is defined by the function's parameters where the
options are:
I_BIT The data section is an eight bit word. The remaining two bits determine
the type of information for the other eight bits (EXEC, CNTRL etc.).
Before transmission, ITxStt=1. If the frame was queued for transmission, ITxStt=0.
RxIntr Function
RxIntr – This function allows the RTU to receive an INTRAC frame from the INTRAC
equipment. Processing the received frame's data section is dependent upon the function
parameters, where the options include: I_ANLG, I_CNTR, I_BITS and I_PARM (see TxIntr
function).
The user should define the appropriate parameter for this function, according to the Group ID
(or Sub-group ID) of the received frame. This information is available after calling the UpIntr
function (see the next paragraph).
Calling the RxIntr function when the queue is empty will reset the IRxStt.
Update Function
UpIntr – Calling this function allows the user to read the main parameters of a received frame
from the queue. The function sets the frame parameters into the INTRAC table, except for the
data section. The original frame remains in queue until the RxIntr or DuIntr function is called.
Calling the UpIntr function when the queue is empty will reset the IRxStt (INTRAC Receive
Status) parameter. The affected parameters from this function are:
259
INTRAC Protocol
IRxGrp If a frame is received, the IRxGrp contains the group ID of the transmit
station. The enable value: 0..7 (Grp_A..Grp_H).
DuIntr Function
DuIntr – This function dumps a received INTRAC frame from the reception queue. This is
useful when the parameters of the received frame (address, group etc.) do not match the
receiving station definitions.
Some of these variables are dedicated for the INTRAC protocol only, while others are defined
as general variables, and may be used for other protocols.
260
INTRAC Protocol
261
INTRAC Protocol
Bits/Parm : 0..255
262
INTRAC Protocol
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
SECURITY
DATA
(CRC)
32 BIT INTRAC WORD
The free format protocol uses five more general variables, which are common to other
functions as listed in the following table. The user should call the RxIntr with I_GNRL
parameter when a reception of a free format INTRAC frame is expected.
The acceptable address range for reception is the entire enable system address range.
263
INTRAC Protocol
Tx_Rpt
Tx_Lnk
Rx_Lnk ITxStt See variable table above in Intrac Protocol
IRxStt Variable.
ITD_Hi The higher 10 bits of the transmitted frame Any: Bit 25 .. Bit 16
(High .. Low)
ITD_Lo The lower 16 bits of the transmitted frame Any: Bit 15 .. Bit 0
(High .. Low)
IRD_Hi The higher 10 bits of the received frame Any: Bit 25 .. Bit 16
(High .. Low)
IRD_Lo The lower 16 bits of the received frame Any: Bit 15 .. Bit 0
(High .. Low)
TxVl1..TxVl5: The data values of the transmitted frame, according to the Tx#Vl
parameter. For example: if the Tx#Vl was set to 3, the user
should define the data for the following three variables: TxVl1,
TxVl2 and TxVl3.
264
INTRAC Protocol
265
INTRAC Protocol
1. The radio channel status (R_Stt) is recognized by the "Channel Busy" line. This line has a
polarity which may be defined by the user (configuration parameter), according to the
following table.
2. For trunked radio, channel is recognized as a "busy" when both the RxEn condition and
Tone Detected are active.
266
INTRAC Protocol
Channel Parameters
The parameters, listed below, are used to define the interface between the RTU and the
channel. These are configuration parameters which may be changed during system run time.
ROvrid: For radio channel: Waiting time (100 mSec units) before transmission is burst
over the channel, despite the existence of a "Channel Busy" indication.
RQuiet: For conventional radio: A quiet channel period (mSec units), during which
transmission is disabled. After this period, transmission will start.
LOvrid: For Line channel: Waiting time (100 mSec units) before forcing transmission
onto a channel, despite the existence of a "Channel Busy" indication.
LQuiet: For Line: Quiet channel period (mSec units), during which transmission is
disabled.
R_Ptt: For radio channel: Warmup time (mSec units) between a PTT request and the
start of data transmission (a constant tone is transmitted for this period before
data transmission).
RptMod: Repeater Mode: When the Repeater Mode is active, and a frame is received on a
channel, the system will transmit the frame to the other channel. For example, if
the repeater mode is active, and a frame has been received in the line channel,
this frame will be sent during the radio channel and vice versa.
StnAdr: RTU TO RTU Station address: If an MEIC MDLC frame is received with a
destination address which matches the RTU TO RTU Station address parameter,
then this frame will be accepted.
The reception of an MEIC MDLC frame depends on the following conditions being fulfilled:
1. The destination address of the received frame does not exceed the MDLC protocol address
range.
2. The destination address field in the received frame, is the desired individual station
address, or system address.
All channel timing parameters are defined in mSec units, except for the ROvrid and LOvrid
which are defined in 100 mSec units.
These parameters can be changed during system run time using the Rung or Monitor utilities.
If the user input value for these parameters is not correct, (out of range), the user is alerted by
the system's error logger to correct the value. In a normal operating situation (after definition
and download execution of configuration), these parameters receive their initial values from
the configuration files.
The previously mentioned parameters, with the exception of StnAdr and RptMod, cannot to be
changed during transmission. A user change request will be accepted only at the end of the
current transmission cycle.
267
INTRAC Protocol
Site Configuration
The configuration of an INTRAC channel in the RTU is enabled only on Port-3. To define the
INTRAC channel parameters, configure the port to INTRAC, Conventional (or Trunked). The
configuration parameters are divided between the User and Advanced Physical Layer tabs. The
parameters are listed below:
Protocol Parameters
Timing Parameters
268
INTRAC Protocol
b. Repeat Radio to Line and Line to Radio (RptMod): When the Repeater Mode is active,
and a frame is received on one of the channels, the system will transmit the frame to the
other channel. For example, if the repeater mode is active, and a frame has been
received on the line channel, this frame will be sent over the radio channel and vice
versa.
1. The destination address of the received frame does not exceed the MDLC
protocol RTU-to-RTU Address Range.
2. The destination address field in the received frame is our station address, or the
system address.
f. Quiet time on free channel: Quiet channel period before transmission. Setting this
parameter to "0", will terminate the waiting time and transmission will start immediately
after the "free channel" detection.
g. Wait for Channel-Access Timeout: Maximum waiting time for available channel for
transmission. If at the end of this period, the channel is not available, the system
provides a failure notice and the transmission attempts will be terminated.
269
INTRAC Protocol
h. Warmup Channel Time: Transmits a constant tone during this period, before data
transmission starts.
i. Transmission timeout: The maximum time frame for data transmission. Transmission
over this time will be terminated, and a failure will be declared. The transmission
always ends (normally or forced) with a constant tone for holdup time.
j. Wait for Holdup timeout: During this period, the system allows the plug-in modem to
transmit the contents of its internal buffer, after the MOSCAD RTU has finished data
transmission. It is not recommended to change this parameter.
k. Holdup Channel Time: The length of time a constant tone transmission is continued
after the end of transmission.
l. Shutup Channel Time: The minimum waiting time between one frame transmission
and the next. It is measured from the end of the constant tone of the last transmission.
WARMUP HOLDUP
TIME TIME SHUTUP
CHANNEL TIME
p. Channel busy indication: Technique used for detecting radio input. In most cases, CM
(Channel Monitor) alone is used. TD (Tone Detect) is an audio signal more commonly
associated with Trunked radios.
q. Channel monitor Polarity: relates to radio channel busy criteria and reception
conditions for CM only. Polarity should be set based on the digital signal used by the radio
(see radio specifications).
a. No Channel Time before Request (Low): When the channel does not exist, this
parameter determines the allotted time to wait before asking for TxEn (transmit enable).
This parameter is relevant if one of the functions, TxWdth or TxIntr was called with
Tx_Lnk=1 (Tx_Lnk=LoTrnk or Radio).
b. No Channel Time before Request (High): When the channel does not exist, this
parameter determines the allotted time to wait before asking for TxEn (transmit enable).
270
INTRAC Protocol
This parameter is relevant if one of the functions, TxIntr or TxWdth was called with
Tx_Lnk=11.
c. Quiet Channel Time before Request (High): When the channel exists and is quiet, this
parameter determines the time to wait before asking for TxEn (transmit enable). This
parameter is relevant if one of the functions, TxWdth or TxIntr has been called with
Tx_Lnk=11 (Tx_Lnk=HiTrnk).
d. Channel Request PTT Active and Negated time: These two parameters, are used to
determine the PTT active time (Pressed) and PTT release time after the transmit enable
TxEn request.
e. Warmup channel: This parameter has the same meaning as in the conventional radio,
but the "Warmup time" must be greater than the "Trunk turn around time" parameter of
the specific radio.
The hardware parameter definition for Conventional and Trunked radio is identical, except for
the "busy channel" detection and reception condition. For trunked radio, the system
determines these parameters to be "RxEn active" and "Tone Detected", as a default.
Preparation – Rung-1
Parameter Values:
Destination Address = 511
Tx-Direction = R-T-M (Remote To Master)
Group = 5
Data = +100
271
INTRAC Protocol
Preparation Rung
TxDir
( MOVE )
#0
ITxStn
( MOVE )
#511
ITxGrp
( MOVE )
#5
ITxDat
( MOVE )
#100
Frame Transmission
In this Rung, transmission depends on pressing the CPU PB1 push-button. The following are
the frame parameters:
• ITxStt = 1
• TxRpt = 0 (send once)
• TxLnk = 2 (channel = Line)
After calling the TxIntr function, if the frame was queued for transmission, the system resets
the variable ITxStt. The Rung checks this variable, and if ITxStt=0 it resets the Push-button
PB1 flag. If the frame was not queued for transmission, ITxStt remains "1" and a new
transmission attempt will start.
Transmission Rung
PushB1
ITxStt
( MOVE )
#1
TxRpt
( MOVE )
#0
TxLnk
( MOVE )
Line
TxIntr
( CALL )
I_Angl
ITxStt
PushB1
= ( U )
#0
272
INTRAC Protocol
Reception Rung
The following is a Rung example for an analog frame reception. The execution of RxIntr
function, depends on the following conditions:
As mentioned before, these parameters (IRxStt and IRxGrp) are available after calling the
UpIntr function.
After checking these variables, the Rung calls the RxIntr function with the I_Anlg parameter
and increases the value of the counter variable Rx_Cnt.
Reception Rung
UpIntr
( CALL )
IRxStt IRxGrp
RxIntr
= ( CALL )
#0 #6
RxCnt
( CTU )
Preparation Rung
The preparation Rung defines a frame transmission with four values, to address 511. The
following are the Rung parameters:
273
INTRAC Protocol
Preparation Rung
TxTo
( MOVE )
#511
Tx#Vl
( MOVE )
#4
TxVl1
( MOVE )
#10
TxVl2
( MOVE )
#11
TxVl3
( MOVE )
#12
TxVl4
( MOVE )
#13
Transmission Rung
The frame transmission in this example, depends on the CPU's push-button 1 (PB1). If PB1
was pressed (once), a transmission sequence of an MEIC MDLC frame will start with the
following parameters:
Tx#Vl = 5
TxRpt = 0 (send once)
TxLnk = 2 (Line)
Calling the TxWdth function prepares the frame and sends it. If the frame has been queued for
transmission, the variable Tx#V1 is 0, and the Rung uses this condition to reset the Push-button
PB1 flag. If the frame has not been queued for transmission, the value of Tx#V1 and BP1 flag
is not changed and a new transmission attempt will start.
274
INTRAC Protocol
Transmission Rung
PushB1
Tx#Vl
( MOVE )
#5
TxRpt
( MOVE )
#0
TxLnk
( MOVE )
Line
TxWdth
( CALL )
Tx#Vl
PushB1
= ( U )
#0
Reception Rung
The following is a Rung example for an MEIC MDLC frame reception. If there is a frame in
the queue, increment the counter Rx_Cnt.
Reception Rung
RxWdth
( CALL )
IRxStt
RxCnt
( CTU )
#0
275
Dual CPU Operation
The most important single Module in an RTU is its CPU. Using the Dual CPU option (two
CPU modules at one RTU), ensures that a single failure in the CPU will not cause the whole
RTU to fail.
Two CPU modules are plugged into the MOSCAD RTU. The first CPU Module, named
Primary, is plugged into slot "0" of the first motherboard and the second CPU, named
Secondary, is plugged into slot "1" of the same motherboard.
Both CPUs, use the same communication port (e.g: Port 3) to communicate with the central.
Only the active CPU activates its communication port, and responds to received frames.
The active CPU will also be the only one that controls the I/O Bus, the nonactive CPU will be
blocked from the I/O Bus.
The Secondary CPU uses the motherboard connection between the modules, to check
(automatically by the firmware), if the Primary is alive and active.
In case of a malfunction in the Primary CPU module, the Secondary CPU module
automatically (after a few seconds) starts functioning It takes over the I/O Bus and the
Communication channels to the central.
After the Secondary has taken control, there is no way to change this situation (return the
control to the Primary), other than switching OFF the system power, plugging in the new
Primary CPU, and turning it ON again.
Address Setting
Both CPUs, are usually loaded with the same application (or a similar application), enabling
the Secondary to take control when a failure is detected in the Primary. If a specific
application consists of accumulated information (measurements, counters, etc.), the Secondary
must be updated with this particular information, in order to prevent loss of the information.
The CPUs communicate with each other via the RS485 Link (using the RTU to RTU
Communication), and this requires that they both have different addresses. This requirement
contradicts with the requirement to assign the same address for both CPUs, allowing the
central to communicate with the Secondary after a switchover, in case of a malfunction in the
Primary.
To resolve this contradiction, use the "Dual-Address" feature of the MOSCAD (this feature is
set up during the CPU Configuration phase). The Primary CPU is configured with two
addresses: the main address and main address minus 1 (e.g: 100 and 99).
276
Dual CPU Operation
ACCESS TO
SCADA ADDRESS 100
RTU
RADIO RADIO
ADDRESS RANGE=
(Site ID -1)
99-100
CPU MODULE
SECONDARY
PORT-3
The Secondary CPU is also configured with two addresses: the main address and main address
plus 1 (e.g.: 100 and 101). The result is that the central continues to use the main address
(100) for communicating to the RTU, and the "shifted" addresses (±1) are used for
communication between the CPUs. For remote communication to this RTU (for diagnostics,
upload and download), the user should use the unique addresses (99 and 101) or LOCAL
mode.
Physical Outputs
When the Secondary becomes active, it takes over the I/O Bus. The ML (Magnetically
Latched) relay outputs keep their last state. The EE (Electrically Energized) momentary relays,
the Analog Outputs and the AC analyzer outputs are reset and revert to their original values, as
updated by the application in the Primary (before it failed). The behavior of the digital outputs
in the mixed I/O modules depends on their relay types as described above.
The Site ID offset is set in the Advanced Parameters. Click on the Site Configuration icon
from the main MOSCAD Programming ToolBox window. Open the configuration file, click
on Advanced Parameters and then on the MDLC Network Layer parameters.
277
Dual CPU Operation
Change the Addr. Range response for ‘All RTU Simulation’ parameter to -1 for the Primary
and +1 for the Secondary.
Timer
First define the Timer rung. In the User Table list, create one table, named Timer. In this
table, define two parameters, Ta and Tb, and set each value to 0:30 (Sec)
Define a process, named MAIN, with one rung r1. This rung will activate the Updating rung
every 60 seconds (Ta+Tb).
Process List
Process Description
Main Main process
278
Dual CPU Operation
Ta
Updat
↑ ( JSP )
Ta
Tb
/ ( DON )
Tb
Ta
( DON )
rung: r1
Updating Process
Set the value 3 in the BufEnd parameter in the RTU to RTU Comm Buff table, to support the
four value vector - Vec (0-3).
− The first rung, sends the vector Vec from the Primary to the Secondary.
Updating rung
DstSit
( MOVE )
Secndry
Tx_Len
( MOVE )
#5
TxBuf,0
( MOVE )
. Vec,0
. TxBuf,3
( MOVE )
Vec,3
SndFrm
( CALL )
DmyBit
In addition to the above mentioned rung, the Primary CPU is also required to receive the
Secondary's response. If a valid answer has been received from the Secondary, the SecStt flag
is set to High. The following rung performs this process:
279
Dual CPU Operation
RcvFrm
( CALL )
#0 AnsFrm Scndry
Reception
RcvFrm
( CALL )
SndAns
( L )
Send Answer
SndAns DstSit
( MOVE )
SrcSit
Tx_Len
( MOVE )
#1
AnsFrm
( CALL )
Tx_Len
SndAns
( U)
#0
280
Dual CPU Operation
PrmFal : The Secondary's application may use this flag to check if a failure has occurred
in the Primary CPU. '1' indicates that there is a failure in the Primary.
281
Global Positioning System (GPS)
The MOSCAD/MOSCAD-L system uses the MOTOROLA ONCORE GPS receiver precise
time measurement application for synchronization purposes, for example to synchronize the
RTU with other SCADA systems. Two options are available to connect the GPS receivers:
1. Connect a GPS receiver to the MCP/M. The MCP/M will then synchronize the entire
system according to a synchronization layout, accessed from the Programming ToolBox
Time Tag Logger utility or from the Sync CALL function of the ladder-diagram language.
The MOSCAD units use ONCORE GPS receivers equipped with a 1 Pulse per Second (PPS)
output. The receivers are connected to Port 2 of each RTU. In case of a satellite failure, the
time is manufactured internally and the receiver indicates its inability to trace the satellite.
! IMPORTANT
MOSCAD only: If your system is from before V3.70, make sure you are using the
required modified CPU prior to GPS connection.
282
Global Positioning (GPS)
The Time period to get data from GPS (sec) field defines the interval between two time
updates from the GPS receiver. The range is 2 to 60 Seconds.
The Local offset from universal time (hours) field defines the time offset of the current
location from the Universal Time Coordinate (UTC). The range is -23.5 to 23.5 hours.
In the Description field you may enter a free-format description of the port interface (up to 36
characters).
After entering all your selections, press [Esc] to return to the Ports List table. Note that the
table has been updated according to your entries.
283
Global Positioning (GPS)
After setting the GPS parameters and downloading the configuration to the RTU, the unit
starts updating its time accordingly. You may use the Site Time & Date utility, to verify the
RTU time.
The ladder controlled GpsOfs value is included in the Reserved Values (system) table. This
value enables the user to update the MOSCAD unit to Daylight Savings Time.
The GpsOfs default value is ‘0’, and it may be either positive or negative according to the
specific time changes (measured in hours). This value is added to the “Local offset from
universal time” value, defined in the RS232-GPS RECEIVER definition window, following
thereafter.
When the GpsOfs is set, the RTU time is updated starting from he next GPS report, except
following a “cold start”, which may last up to one minute.
GPS Cable
To connect Port 2 of the RTU to the GPS receiver, you should use the FKN4487 adapter and
the connection cable described in User Guide.
284
PID LOOP - Proportional Integral
Derivative
General
(MOSCAD ≥ V1.61, MOSCAD-L ≥ V1.00)
The following figure describes the PID Loop performed by the MOSCAD RTU.
The measured process value is converted by the transducer into voltage or current, which
in turn is converted by the A-to-D converter into a scaled analog input - a real (32-bit
floating point) value designated by the symbol pidIN which represents the current value of
the measured process.
The PID block is driven by the error signal (E) calculated as the difference between the
setpoint - pidSP (the desired value) and pidIN (the actual value).
The PID block transfer function is defined by its parameters. Its output, pidOUT, is a real
(32-bit floating point) value, driving the D-to-A converter.
The output of the D-to-A converter, voltage or current, is used as the controlling drive for
the process.
The purpose of the loop is to minimize the error E(t) by driving the process to follow the
setpoint value.
If E(t) = SP(t) - IN(t), then the transfer function of the PID block is defined as follows:
dt
where:
285
PID LOOP - Proportional Integral Derivative
IN(t) - the PID input that represents the measured process value in "Input
Engineering Units" [IEU].
OUT(t) - the output of the PID loop in "Output Engineering Units" [OEU].
In the PID table, all the abovementioned variables have the prefix pid, i.e. IN becomes
pidIN, SP becomes pidSP, etc.
Note that up to eight PID loops can be calculated in a MOSCAD CPU 400.
PID Function
The PID function performs the following three calculations:
• The integration, whose contribution to the output signal is proportional to the integral of
the error between 0 to t plus I0, which serves as the initial value of the integral (for t=0).
The integral drives the process of the setpoint value with a zero position error.
• The derivation, whose contribution to the output signal is proportional to the rate of
change of the error signal.
PID Table
To access the PID table, open the Application Programmer in the MOSCAD Programming
ToolBox folder. Select the Database Builder from the Edit menu. The following dialog
box is displayed:
286
PID LOOP - Proportional Integral Derivative
• If no PID Table appears in the list of Table Names, it must be created. Click the Add
PID Table button.
• If PID Table appears in the list of Table Names, double-click its name in the Table Name
list.
287
PID LOOP - Proportional Integral Derivative
The PID table includes the following parameters. For more details on each parameter, see
the example project:
• pidIN - the scaled analog input (32-bit floating point value) that represents the
controlled process.
The value in this column is updated when the SCAN function using this column name
is called.
• pidSP - this variable represents the setpoint, the desired state of the controlled process.
This is a real parameter variable that has an initial value for each row (each loop).
You may modify the value of this variable in the rungs when a change in the controlled
process is needed.
• pidK - this real parameter variable represents the gain of the loop. Its initial value
usually remains the same. The value of this variable may be modified in the rungs.
• pidKd - derivative factor in seconds that controls the output correction rate at which
the output responds to the change of error. A value of zero will disable the derivative
action. The value of this variable may be modified in the rungs. Default: 0.0
• pidKi - integration factor in "repetitions per second”. A value of zero will disable the
derivative action. The value of this variable may be modified in the rungs. Default: 0.0
This real parameter value starts with an initial value which represents I0. It is
continuously modified to represent the value of the above equation. The value may be
changed in the rungs to any desired value.
• pidDb - this variable defines the PID output dead band. It prevents frequent changes of
the pidOUT variable when the absolute value of the difference between the new
calculated value and the current value is smaller than the pidDb value. When pidDb=
pidOUT, the pidOUT variable is always updated by the PID. Default: 0.0
• pidOUT - the scaled analog output (32-bit floating point value) that drives the process.
Note that the PID table, like all other User tables in the database, can be edited, deleted,
searched, or converted to a printable file. Rows can be added, as can a table description.
288
PID LOOP - Proportional Integral Derivative
The example below shows a PID application for a MOSCAD RTU. While the specific
application controls water flow, the concept of the PID control is universal and the
example described herein can be used for other applications.
General
This application is used to control water flow by changing the position of a regulating
valve. The flow is measured by an Analog Input (range: 0-15000 liter/hour). The valve
position is controlled by an Analog Output (range: 0-100%).
The database used in this example is described below. Each table in the database is shown
as it appears in the Database Builder. Each variable used in the tables is described.
Finally the application process rungs are described as they have been implemented in the
sample project.
Glossary
CV - Controlled Value: The measured or calculated process input
SP - Process SetPoint value
Err - Process error = SP - CV
AO - Process Analog Output: Sets the position of the controlled element
1. The proportional part of the PID function contributes to its output the result of
(PidK) x (Err). That means that AO increases when Err increases, and AO decreases
when Err decreases, by the proportional gain PidK.
The PID function does not put a limit to the proportional part. In certain cases, when Err is
large, it may cause the AO to be changed by large steps and to reach its limits. This may
289
PID LOOP - Proportional Integral Derivative
cause fluctuations in analog output and unstable condition of the controlled process. In
order to prevent this problem, the application reduces the PidK when Err is large. Thus the
Integral action is dominant when Err is large, and the Proportional action is more dominant
Note: Setting the PID function parameters requires some knowledge about tuning PID
loops. The current version of MOSCAD PID function and the application example
described below, does not include 'self tuning' feature. The user has to set them manually,
write additional application or use external PC based software for this purpose.
2. The integral part of the PID contributes to its output the result of
[(PidK*PidKi) x Integral of (Err)], where the summation is performed every time the PID
calculation is performed. That means that AO increases as long as Err is positive, and AO
decreases as long as Err is negative. The summation result is stored in the PidInt variable,
where it can be set by the application too.
The PID function does not put a limit to the integral part. In certain cases, this may cause
the AO to reach its low or high limits. The application, as explained later, has to deal with
such situations.
3. The derivative part of the PID contributes to its output the result of
(PidK*PidKd) x (Err rate of change). That means that AO increases as long as Err rate of
change is positive, and AO decreases as long as Err rate of change is negative. If Err is
constant the derivative portion of the PID function equals to zero.
In the described example the derivative factor was set to zero, since its action is not
required for flow control.
Operation mode
A PID loop can be either in Auto mode or in Manual mode. In Auto mode, the operator
can set the required flow and the PID function sets the AO according to process conditions.
In Manual mode, the operator can set the position of the regulating valve directly, and the
PID function results are ignored.
The MOSCAD application handles the transition from one operation mode to the other.
Validity Check
The controlled value of a loop is usually an analog input. The application in the following
example also supports the validity check of the CV, in order to prevent loop malfunction.
The PID setpoint is also checked to be within predefined limits. If it exceeds these limits, it
is operates according to the minimum or maximum setpoint range accordingly.
Moreover, the resulting AO of the PID function is also checked for validity before
updating the physical analog output.
The MOSCAD PID application, described in this section, uses the built in PID table, with
additional User tables and process, to control the CV (e.g. pipe flow) by setting the
position of the AO (e.g. regulating valve). The inputs of the function are the required flow
(SP) and the measured flow (CV).
290
PID LOOP - Proportional Integral Derivative
Database Tables
The database tables are shown below. Each variable used in the tables is described.
0 0
PID Table
Table name: PID Table COS name:
Table symbol: Last index (Ind): 0
Last index name: I_PID
0 0% 0.0 1.0
0 0% 0.0 1.0
291
PID LOOP - Proportional Integral Derivative
pidIN - PID controlled value input. - Represents the controlled value (CV). This value is
not linked directly to the analog input and is updated by application. The scaling of the
input can be defined in this column, by setting the EGU Zero and EGU High accordingly.
pidSP - Represents the process setpoint (SP)
pidK - Proportional gain factor. A default value is defined in the table. Application
changes the value according to Err value, as explained later.
pidKd - Differential factor. Equals zero. Not used for flow control process.
pidKi - Integral factor. A default value for the integral part mutiplier is defined in the table.
However, application changes this value when the relevant pidK is changed, as explained
later
pidInt - Accumulated (calculated) integral part.
pidDb - PID Process output deadband sets the minimum step of change in the PID function
output. In the application example it is set to zero. For fast response process this value
should be kept to a minimum.
pidOUT - PID function output. This value is not linked directly to the analog output. The
scaling of the output can be defined in this column, by setting the EGU Zero and EGU
High accordingly. For the process in this example the output range is defined as 0 - 100
(%). Its value is checked to be in a certain range before updating the analog output
variable.
292
PID LOOP - Proportional Integral Derivative
0 3.0-4 10.0
293
PID LOOP - Proportional Integral Derivative
PidDif - Difference (Err) between setpoint (SP) and process controlled value(CV)
DifTmp – Process error in CV engineering units
RTemp - Process error in percents of CV full scale
O_Max - Temporary bit. Indicates that output has reached its maximum position
(AO_Max)
O_Min - Temporary bit. Indicates that output has reached its minimum position
(AO_Min)
PidAlr - Pid loop alarm flag. This alarm indicates that the PID process value did not reach
its setpoint (including the AlrDB deadband) within the predefined time (AlrTim)
0 TPID 01:00
TPID - PID calculation time interval (multiplied by 10 ms). The timer preset value is set by
PtPID.
0 BTemp
294
PID LOOP - Proportional Integral Derivative
0 PtPID 100
PtPID - A parameter to set PID calculation time interval (10msec resolution). The
minimum setting for running 8 PID loops is 100 (1 second).
Constants
The application uses the following constants:
Rung Description
P05 Scan PID AI
P10 Reset Index p
PL10 Local Setpoints
PL12 Local Setpoints
P18 Manual mode limits
P20 Manual Mode
P21 Jmp P50 if no TPID
P25 Auto Mode
P30 Check Input range
P50 Increment Index p
P60 Check Index p
P90 Run PID Calc
M91 Jmp P200 if no TPID
295
PID LOOP - Proportional Integral Derivative
Rung P05: Scan the analog input (CV) of the PID loop.
Pid_AI
P05 (SCAN)
Rung P10: The number of PID loops which are controlled by the application is set by the
number of rows in the PID Table. The same application with an index 'p' handles all loops.
This rung resets 'p' index to run the first PID loop.
p
P10 ( RST )
Rung PL12: In Auto mode, the Pid_AO is always copied to AO_Set. This enables smooth
transition to Manual mode without a step change in the loop SP.
ModSet,p AO_Set,p
PL12 = (MOVE)
Auto Pid_AO,p
Rung P18: In Manual mode, the AO_Set value is checked to be within a predefined range
(AO_Min and AO_Max). If it exceeds these limits, the output is set to the relevant limit.
AO_Set,p Pid_AO,p
< (MOVE)
AO_Min AO_Min,p
296
PID LOOP - Proportional Integral Derivative
Rung P20: In Manual mode, the Pid_AI is checked to be within a predefined range
(CV_Min and CV_Max) and copied to CV_Set. This enables smooth transition to Auto
mode without a step change in the loop PidSp.
In addition, the AO_Set value is checked to be within a predefined range (AO_Min and
AO_Max) and is copied to Pid_AO, and PidInt. Updating the latter variable is also
important to keep the AO in the last position when loop mode is changed to Auto, while
there is no change in the setpoint.
Pid_AI,p Pid_AI,p
= =
CV_Min,p CV_Max,p CV_Set,p
(MOVE)
pidSP,p
AO_Set,p AO_Set,p Pid_AO,p
> < (MOVE)
AO_Min AO_Max AO_Set,p
AO_Set,p AO_Set,p
= =
AO_Min AO_Max pidInt,p
(MOVE)
Pid_AO,p
Rung P21: Skips the next two rungs when PID loop is not calculated.
TPID P50
P21 / ( JMP )
Rung P25: In Auto mode, the CV_Set (set by the operator) is checked to be within a
predefined range (CV_Min and CV_Max) and copied to PidSp. In addition the AO_Set
value is updated by the Pid_AO.
CV_Set,p CV_Set,p
= =
CV_Min,p CV_Max,p AO_Set,p
(MOVE)
Pid_AO,p
297
PID LOOP - Proportional Integral Derivative
Rung P30: In Auto mode, the Pid_AI is checked to be within a predefined range (CV_Min
and CV_Max) and copied to PidIn accordingly.
Pid_AI,p Pid_AI,p
= =
CV_Min,p CV_Max,p
Pid_AI,p pidIN,p
> (MOVE)
CV_Max,p CV_Max,p
Pid_AI,p pidIN,p
< (MOVE)
CV_Min,p CV_Min,p
Rung P50: Counts up (increments) the index counter (to execute the next loop).
p
P50 ( CTU )
p PL10
P60 < (JMP)
I_PID
p
=
I_PID
Rung P90: Runs the PID calculation on all loops every TPID interval.
TPID P.I.D.
P90 ( CALL )
Rung M91: Skips the next rungs, which check the PID function results, if PID function was
not performed.
TPID P200
M91 / ( JMP )
298
PID LOOP - Proportional Integral Derivative
p
P100 ( RST )
Rung P110: Checks the PidOut (PID function output) to be within a predefined range
(AO_Min and AO_Max), and copies it to Pid_AO accordingly.
pidOUT,p Pid_AO,p
> (MOVE)
AO_Max,p AO_Max,p
pidOUT,p pidOUT,p
= =
AO_Min,p AO_Max,p
Rung P112: PID loop performance is checked. If the output fails to be within a predefined
range (PidSp +/- AlrDB) for longer than AlrTim, an alarm flag (PidAlr) is set.
ModSet,p PidDif,p
P112 = - pidSP,p
Auto Pid_AI,p
DifTmp,p
(MOVE)
PidDif,p
DifTmp,p DifTmp,p
< - R0
R0 DifTmp,p
RTemp,p
(CALC)
RTemp,p
AlrTim,p
>
(DON)
AlrDB,p
AlrTim,p PidAlr,p
( )
299
PID LOOP - Proportional Integral Derivative
Rung P113: In order to prevent large fluctuations in output when Rtemp (process error in
percents) is greater than AlrDb (user defined parameter), the application divides the PidK
by a constant 100. In order to keep the integral factor unchanged, it is multiplied by the
same constant. Thus, the Integral action is dominant when process error is large, and the
Proportional action is more dominant when process error is small.
Note: The constant is used for the example only. For a practical PID loop, the proper
constant (or other type of handling these factors) must be implemented.
Rung P114: In Auto mode, when PidOut exceeds AO_Max, it is kept at that level. The first
time the process error becomes negative, the AO_Max is copied to PidInt. This operation
eliminates the effect of positive accumulated value of the Integral portion when AO is in
its maximum position.
300
PID LOOP - Proportional Integral Derivative
Rung P115: In Auto mode, when PidOut exceeds AO_Min, it is kept at that level. The first
time the process error becomes positive, the AO_Min is copied to PidInt. This operation
eliminates the effect of negative accumulated value of Integral portion when AO is in its
minimum position.
Rung P130: Counts up (increments) the index counter (to execute the next loop).
p
P130 ( CTU )
Rung P200: Writes the resulting analog output to Pid_AO by Scan operation.
Pid_AO
P200 ( SCAN )
TPID TPID
P210 (MOVE)
PtPID
TPID TPID
/ (DON)
301
Software Diagnostics Output
This section lists the diagnostics which are available for the various MOSCAD RTU devices. The
messages are listed as they appear on the screen, with %% signs in the text to represent the device’s
current alphanumeric values.
The description which follows the diagnostics messages, provides an explanation for the variables.
Term Explanation
## 16 LEVEL = 0
Mini Session Channels : %% 1
Master Channels : %% 2
Slave Channels : %% 3
1. Number of logical mini-sessions that serve the RTU applications. A mini-session is an API layer that
serves the RTU-to-RTU communications, event bursts, and setcall.
2. The number of logical channels above the Presentation layer from which the RTU can initiate
communications. In an RTU there are no such logical channels as there is no application that can
initiate a call. Control centers (e.g. MCP-M) do have such applications such as schedulers and
command dispatchers.
3. The number of logical channels above the Presentation layer through which the RTU reacts to calls
simultaneously (such as error logger, diagnostics, D.B. monitor, process monitor, date and time,
download). The RTU does not need more than 2-4 channels for regular and orderly activity.
302
Software Diagnostics Output
## 17 LEVEL = 1
Minisession Channels
--------------------
Minisession Key Application ID
--------------- -----------------
This is the applications table that uses the mini-session API for communication purposes. For each
application this table records the key for the instance of the mini-session, and the application ID.
## 18 LEVEL = 2
Master Channels
-------------------
Transport Key Slave: Site Port Link
------------- ---- ---- ----
This table defines the logical channels located above the Presentation layer, and capable of initiating
communications. For each channel the table records the call destination. The destination address
consists of the site ID, the port ID, and the link ID.
## 19 LEVEL = 3
Slave Channels
--------------
Transport Key Master: Site Port Link Channel Id
------------- ---- ---- ---- ----------
This table defines the active logical channels that can react to communications from ToolBox, the control
center, MCP-M, or MCP-T. For each logical channel, the table records information about the SRC that
initiated the call, namely, the site ID, link ID, Port ID and the identification number of the logical channel
that was used for the call.
## 20 LEVEL = 4
Frame Sequence Channels
-----------------------
Frame Seq Key Application Id
------------- --------------
The Frame Seq Key field holds the key of the application that should receive the frames originating from
the corresponding application on the transmitting side, specified in the Application ID field.
## 21 LEVEL = 5
Exp Send L_dup State T_reset T_dup T_hole B_reset B_ack
L_dup The last sequence number that can be accepted as the sequence of a duplicated frame.
303
Software Diagnostics Output
T_reset The amount of time a unit waits after having acknowledged repeated reset requests, before
sending its own reset frame.
T_dup The amount of time a unit, which has received frames with identical numbers, considers
them as duplicates instead of new transmissions.
T_hole The amount of time a unit, which has received frames with holes in the sequence numbers,
still expects to receiving the missing frames.
## 23
Curr Since Last Diagnostic: Max # # Max #
Waiting Waiting Range Time Hole Resets
Buffers Buffers Holes Holes Len
# Range Holes The number of range “holes” found since the last diagnostic.
# Time Holes The number of time “holes” found since the last diagnostic.
304
Software Diagnostics Output
## 32 LEVEL = 0
# of buffers in heap : %% 1
# of buffers left in heap : %% 2
The minimum # of buffers left
in heap from last diagnostic : %% 3
# of times the heap was empty
since last diagnostic : %% 4
Size of one buffer in bytes : %% 5
During init flag : %% 6
Bad heap flag : %% 7
Unit time for freeing by force : %% 8
Pointer to start chain : %% 9
Pointer to current chain : %% 10
Pointer to end chain : %% 11
3. Minimum number of free buffers left in heap since the last diagnostic. This information reflects the
extent to which the heap is capable of meeting RTU needs under heavy traffic.
4. The number of times, since the last diagnostic, the RTU software detected an empty heap. A large
number of times points to incorrect allocation of memory resources.
7. The flag that points to memory overwrite in the memory area allocated to the heap.
8. Unit of time to be measure how long a buffer is out of the heap (used by other parts of the system).
9. 10. and 11. The heap consists of a chain of joined buffers. For chain management purposes, a key
holds pointers to the beginning of the chain, the end of the chain, and to the next buffer that will be
taken from the chain. The P_current_chain value must be (numerically) between the start and end
values.
## 32 LEVEL = 1
Buf Key Next Cntr #FF
--------------------------------------
Key Handle (identifier) of the heap. (If =0, buffer is in heap. Otherwise buffer is in use by system.)
Cntr Counts intervals of time that the buffer is out of the heap. (Meaningful only if key ≠ 0)
#FF Forced free. (Meaningful only if key ≠ 0.) Indicates the total number of units that the buffer was
in use out of the heap. Set back to zero when heap is returned to heap. If this value is greater
than 3, there may be a memory leak problem. Please consult product group.
305
Software Diagnostics Output
## 48 LEVEL = 0
Physical device key : %% 1
Physical PIN’s table : %% 2
Heap key, to be used by the receive function : %% 3
Heap key, to be used by the transmit function : %% 4
Mask address (ignore addresses or not) : %% 5
System address : %% 6
Specific logical address (site id) : %% 7
Extra address 1 : %% 8
Extra address 2 : %% 9
Mode of operation : %% 10
TimeAuth device key (HEX) : %% 11
TimeAuth handle : %% 12
Authentication stamp offset : %% 13
General - The adapter is the layer which coordinates the transmission / reception of the MDLC frame
above Asynchronous Port.
2. PIN Table - A pointer which allows “cabling” during run time to the physical asynchronous layer
selected in Site Configuration.
3. The Rx Heap key - This is the key to the formatted buffer Heap HP_F_RX to be used to collect the
stream of bytes which is received in the Asynchronous Port in the MDLC Frame.
4. The Tx Heap key - This is the key to the unformatted buffer Heap HP_UF_A to be used to convert
the MDLC frame into a stream of bytes for transmitting through the Asynchronous Port.
5. 0XFFFF - means receiving every MDLC frame regardless of its address. (used for the Protocol
Analyzer)
6. The System address - In the local port (not above radio) the value is zero , even if the user chooses a
different value.
13. Offset of Authentication stamp within the buffer for authenticated SYNC frames only.
306
Software Diagnostics Output
## 49 LEVEL = 10,11
# of transmitted frames : %% 1
# of transmission fails : %% 2
# of received frames : %% 3
# of received frames (with error) : %% 4
Mask of errors (receive) : %% 5
Number of non-properly authenticated SYNC frames : %% 6
2. The number of unformatted frames that have been transmitted and for which the physical layer
returned a fail signal.
3. The number of received frames includes only correct frames (including acknowledgment frames).
4. The number of unformatted frames that have been received with some error.
b15 . . . . . . . . . . b8 b7 b6 b5 b4 b3 b2 b1 b0
Reserved
## 64 LEVEL = 0
Logical channel no. : %% 1
Timeout between Tx retries : %% 2
Timeout between channel busy retries : %% 3
Timeout between Rx frames : %% 4
Timeout of Rx wait (till session chk) : %% 5
Current timeout between Tx retries : %% 6
Current timeout between channel busy retries : %% 7
Current timeout between Rx frames : %% 8
Current timeout of Rx waiting : %% 9
No. of Tx retries : %% 10
No. of channel busy retries : %% 11
Current no. of Tx retries : %% 12
307
Software Diagnostics Output
7. The current number of seconds between transmission attempts in case of Busy ACK.
8. The actual time that the site waits until it issues its ACK to a partial reception.
9. The actual time that the site will wait for the first time until it asks the other site “is session on?”
14. The sequence number of the master session at the initiator’s site.
15. The current number of frames in a single transmission while waiting for ACK on the receiving site.
308
Software Diagnostics Output
16. The total number of frames in a single transmission while waiting for ACK on the receiving site.
17. The size of the Tx queue until the Transport layer suspends the application.
19. The index of the next buffer to be added to the queue. (end of queue).
20. The sequence number of the first frame and last frame in the queue.
26. A temporary queue in case of holes in reception (the receiving sequence number is different from
expected). The data is similar to the Rx queue
27. Does Transport expect start session in the next frame to be received?
30. Was Sync ACK transmitted? Have new frames been received?
36. Is this the first burst in the current transmission for sending Start Session?
## 65 LEVEL = 1
no. of buffers in Tx queue : %%
no. of buffers in Rx queue : %%
no. of buffers in temp queue : %%
The number of MDLC frames in each queue in this instance of the Transport layer.
309
Software Diagnostics Output
## 66 LEVEL = 10/11
# of transmitted frames : %% 1
# of received frames : %% 2
# of re-transmitted frames : %% 3
# of received frames (with error) : %%
# of frames in Tx queue : %%
# of frames in Rx queue : %%
# of frames in Tx queue (held by link layer) : %%
# of frames in Tx queue (held by physical layer) : %%
1. The # of Transmitted Frames (does not include retransmission and acknowledgment frames.)
3. The # of Re-transmitted Frames represents only frames rejected by the physical layer (do not use this
number; use the # of Re-transmitted Frames in the Link device).
MTE
## 80 LEVEL = 0
Unused RAM memory : %% 1
Total RAM handled by MTE : %% 2
Number of created tasks : %% 3
Number of created devices : %% 4
Spare stack for each task stack : %% 5
Spare stack for sup. stack : %% 5
Length of sup. stack (without spare) : %% 6
Unused sup. stack (without spare) : %% 7
Length of 1 task control block (tcb) : %% 8
Length of 1 device control block (dcb) : %% 8
Address of mt_curtaskid : %% 9
Address of mt_curprio : %% 9
Maximum allowed value for low task watchdog : %% 10
Maximum allowed value for high task watchdog : %% 10
Maximum reached value of low task watchdog : %% 11
Maximum reached value of high task watchdog : %% 11
2. The amount of memory that the MTE (the operating system) received at startup and distributed
among all of the instances that were created in the system.
3. The number of tasks (infinite threads) that were created according to the site configuration.
4. The total number of instances created by the MTE according to the site configuration.
5. The number of extra bytes for each stack. These bytes are designed to detect memory corruption.
8. The length in bytes in the MTE structures — TCB (Task Control Block) and DCB (Device Control
Block).
310
Software Diagnostics Output
9. Data on the current task (the task ID and the task priority).
10. The RTU tasks are wrapped by two inner tasks (high, low) which are to be reached by the CPU every
so and so ticks (the numbers are defined).
11. These two numbers are the maximum reached by the two tasks above.
## 81 LEVEL = 1
The list of all of the instances created, the key of each one of them and its address in memory.
## 82 LEVEL = 2
The list of all of the tasks created in the system, the stack address of each one of them, and the current
number of unused bytes.
LINK
## 112 LEVEL = 0
Number of boxes in table (size of Tx queue) : %% 1
Number of ack buffers to alloc : %% 2
Sequence (most + least - up to 13 bits) : %% 3
Number of retries until positive ack received : %% 4
Number of retries for negative ack (busy) : %% 5
Interval until next retry in case of busy : %% 6
Number of retries for setcall frame : %% 7
Simultaneous (4 channel priority) : %% 8
Specific logical address : %% 9
System address : %% 10
Number of holds : %% 11
Interval between holds : %% 12
All RTU range response : %% 13
Stop using AUTH TX state (flag, 1=YES) : %% 14
Start using AUTH TX state (flag, 1=YES) : %% 14
Stop using AUTH RX state (flag, 1=YES) : %% 15
Start using AUTH RX state (flag, 1=YES) : %% 15
Stop obeying AUTH TX (flag, 1=YES) : %% 18
Start obeying AUTH TX (flag, 1=YES) : %% 19
Stop obeying AUTH RX (flag, 1=YES) : %% 10
Start obeying AUTH RX (flag, 1=YES) : %% 11
Is AUTH active TX (flag, 1=YES) : %% 12
Is AUTH active RX (flag, 1=YES) : %% 13
Obeying AUTH TX (flag, 1=YES) : %% 14
Obeying AUTH RX (flag, 1=YES) : %% 15
TimeAuth handle: : %% 16
TimeAuth device key (HEX): : %% 17
1. The number of MDLC frames that the Link layer can handle simultaneously.
2. The number of ACK frames that are available to the instance Link for transmitting ACK for the
receiving MDLC frames.
3. The number of bits reserved for the sequence number in the Link layer protocol of the MDLC Frame.
311
Software Diagnostics Output
4. The number of times the MDLC frame was retried without receiving ACK.
5. The number of MDLC frame retries that received Busy ACK. (The receiving site does not have
enough room to handle it because of overload).
11. The time that the Link layer waits when the Physical layer returns Busy to the transmission attempts
of the Link layer in “private conversation”, until it retries.
12. The number of times the Link layer will try to transmit to the Physical layer, if the latter returns Busy
in “private conversation”.
13. The Link layer is capable of answering a range of addresses. This number is the upper bound that the
RTU reacts to, whereas the lower bound is the Site ID.
20. Flag which indicates that AUTH is active for TX (1=YES, 0=NO)
21. Flag which indicates that AUTH is active for RX (1=YES, 0=NO)
312
Software Diagnostics Output
## 113 LEVEL = 1
Address 0 to transmit in same snapshot : %% 1
Address 1 to transmit in same snapshot : %% 1
Address 2 to transmit in same snapshot : %% 1
Address 3 to transmit in same snapshot : %% 1
Network device key : %% 2
Physical device key : %% 3
Physical pin’s table : %% 3
Last reported station in fail : %% 4
Port fail flag : %% 5
‘one to one’ flag : %% 6
Full duplex flag : %% 7
# of frames in Tx queue : %% 8
# of frames in ‘wait for ack’ queue : %% 9
# of frames in ‘busy & setcall’ queue : %% 10
# of frames in ‘busy & finish’ queue : %% 11
‘private conversation’ flag : %% 12
1. The Link layer is capable of sending to up to four different addresses simultaneously. These fields
contain the last four target addresses transmitted in the same transmission.
3. The pins table and key of the Physical layer below link. The Link layer is capable of connecting to
any of the different physical media.
10. The number of frames currently in the Busy and Broadcast queue that are waiting for the timeout
between retries.
11. The number of frames waiting for the timeout between retries to be over and to be transmitted before
new data frames waiting in the Tx queue.
12. Whether link functions in the private conversation mode (not in use in RTU).
1. The # of Transmitted Frames does not include retransmission and acknowledgment frames.
313
Software Diagnostics Output
2. The # of Re-transmitted Frames represents only frames rejected by the physical layer (do not use this
number; use the # of Re-transmitted Frames in the Link device).
## 144 LEVEL = 0
RAM sock size : %% 1
RAM stock length : %% 2
Network configuration size : %% 3
Was network configuration downloaded ? : %% 4
Used site id for download : %% 5
Used link id for download : %% 6
Is it a node ? : %% 7
5. The Site ID which was used for loading the network (must be the same as the self site ID).
6. The Link ID which was used for loading the network (must be one of the RTU links).
## 145 LEVEL = 1
Nothing in stock *
Marked with * if no path was learned, otherwise a table of the learned paths appears:
Dest Link Via Site Thru Link
## 146 LEVEL = 2
Nothing in scf *
## 151 LEVEL = 4
Pointer to authentication information header %% 1
314
Software Diagnostics Output
USERROM (USRROM)
## 160 LEVEL = 0
Does application exist ? : %% 1
Is application running ? : %% 2
User RAM base address : %% 3
Allocated user RAM length : %% 4
Diffs. down address : %% 5
Diffs. up address : %% 6
## 161 LEVEL = 1
status = U_STOP => 161 1
U_NONE => 162 2
U_RUN => 163 3
2. There is no application.
When LEVEL = 1, DEVICE = USERROM, then the following diagnostic will be delivered, depending
on the status.
## 163 LEVEL = 1
Flow input scan rate: %% * 10msec. 1
Minimum calculation period in scans: %% (100 / %% percent accuracy) 2
Number of pph columns: %% 3
Total number of pph elements: %% 4
1. Time period in units of 10msec between two successive scans of each digital input for which PPH is
being performed.
2. Minimum time period between two PPH calculations (the time is in scan units as described above).
315
Software Diagnostics Output
## 165 LEVEL = 1
Flash sets
----------
Type Operation Start End Burn_adr Source length Erased_len
Operation The type of operation to be performed on the specified flash (0=Erase, 1=Program,
0xFFFE=Abort, 0xFFFF=no operation (default)).
NETWORK (NETWRK)
## 180 LEVEL = 0
# of links actually connected to network layer : %% 1
Transport interface key : %% 2
Formatted buffers heap key 1 : %% 3
Formatted buffers heap key 2 : %% 3
Network stock key : %% 4
Default central link key : %% 5
Default central via link-id : %% 6
Default central thru site-id : %% 7
The unit site-id : %% 8
The default central flag : %% 9
The network transparent flag : %% 10
1. The number of links registered on the network layer, when each zone is considered a separate link.
3. Heap keys. Identifier of heap from which to take buffers for the Network to transmit Default central
location, and also to duplicate MDLC frame, if needed.
5. The link key through which MDLC frames should be channeled in case of Dest = default central.
7. The site ID where the MDLC frame is directed towards the Default Central.
316
Software Diagnostics Output
10. Is the Network “transparent,” i.e. is there only a single path for transmission?
1. The # of Transmitted Frames does not include retransmission and acknowledgment frames.
## 200 LEVEL = 0
Application id : %% 1
No. of boxes in device : %% 2
No. of retries : %% 3
Interval between retries : %% 4
Time till flushing rcv frames : %% 5
Protocol flags : %% 6
Does task exist ? : %% 7
Is flushing needed ? : %% 8
Heap key : %% 9
Index of first box in free queue : %% 10
Index of first box in “wait for answ” queue : %% 11
Index of first box in “answers from outside” queue : %% 12
Index of first box in “request to applic” queue : %% 13
Index of first box in “waiting for applic answer” queue : %% 14
Index of first box in “originate from applic” queue : %% 15
Index of first box in “setcall from applic” queue : %% 16
Index of first box in “answers from applic” queue : %% 17
5. The time in seconds until the system discards the MDLC frames not solicited by the Application
layer (Ladder or “C” application)
317
Software Diagnostics Output
## 201 LEVEL = 1
Boxes_nr : %% 1
Boxes in free queue : %% 2
Boxes in wait_for_outside_answr queue : %% 3
Boxes in outside_answrs queue : %% 4
Boxes in requests_from_applic queue : %% 5
Boxes in wait_for_applic_answr queue : %% 6
Boxes in originate queue : %% 7
Boxes in setcall queue : %% 8
Boxes in answer queue : %% 9
1. Total number of boxes to be handled by this instance. Each box handles one MDLC frame.
## 202 LEVEL = 2
“waiting for outside answer queue”
------------------------------------------
buf site port link retries ret_time indx p_indx _indx q_nr
318
Software Diagnostics Output
---------------------------------------------------------------------
%% %% %% %% %% %% %% %% %% %%
1 2 3 4 5 6 7 8 9 10
1. Frame address.
7. Box index.
## 203 LEVEL = 3
“outside answers queue”
-------------------------------
buf site port link retries ret_time indx p_indx _indx q_nr
---------------------------------------------------------------------
%% %% %% %% %% %% %% %% %% %%
1 2 3 4 5 6 7 8 9 10
## 204 LEVEL = 4
“requests from application queue”
-----------------------------------------
buf site port link retries ret_time indx p_indx _indx q_nr
---------------------------------------------------------------------
%% %% %% %% %% %% %% %% %% %%
1 2 3 4 5 6 7 8 9 10
## 205 LEVEL = 5
“waiting for application queue”
--------------------------------------
buf site port link retries ret_time indx p_indx _indx q_nr
---------------------------------------------------------------------
%% %% %% %% %% %% %% %% %% %%
1 2 3 4 5 6 7 8 9 10
319
Software Diagnostics Output
## 206 LEVEL = 6
“originate queue”
---------------------
buf site port link retries ret_time indx p_indx _indx q_nr
---------------------------------------------------------------------
%% %% %% %% %% %% %% %% %% %%
1 2 3 4 5 6 7 8 9 10
## 207 LEVEL = 7
“setcall queue”
------------------
buf site port link retries ret_time indx p_indx _indx q_nr
---------------------------------------------------------------------
%% %% %% %% %% %% %% %% %% %%
1 2 3 4 5 6 7 8 9 10
## 208 LEVEL = 8
“answers queue”
--------------------
buf site port link retries ret_time indx p_indx _indx q_nr
---------------------------------------------------------------------
%% %% %% %% %% %% %% %% %% %%
1 2 3 4 5 6 7 8 9 10
## 209 LEVEL = 9
“free queue”
---------------
buf site port link retries ret_time indx p_indx _indx q_nr
---------------------------------------------------------------------
%% %% %% %% %% %% %% %% %% %%
1 2 3 4 5 6 7 8 9 10
320
Software Diagnostics Output
GAPRATIO (GPRTIO)
## 220 LEVEL = 0
The main process CPU usage in percent : %% 1
The other system tasks usage in percent : %% 2
The main process flag (hplcin) : %% 3
The main process key : %% 4
1. The percent of the CPU reserved for the ladder application and the tasks above it ( the 10ms and the
Rxlink tasks).
2. The percent of the CPU reserved for the rest of the tasks under the ladder application.
3. A flag for three different states:
a. Whether the ladder application is running at the moment.
b. Whether the ladder application is not running at the moment.
c. Whether the ladder application has been running for 1.2 seconds continuously.
4. The main process key.
## 260 LEVEL = 0
HDLC hardware/software last status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Current channel port (HDLC_PORT) : %% 4
Reception data lock (RXBD_LOCK) : %% 5
Transmission data lock (TXBD_LOCK) : %% 6
Reception data header (RXBD_HEAD) : %% 7
Reception data tail (RXBD_TAIL) : %% 8
Transmission data header (TXBD_HEAD) : %% 9
Transmission data tail (TXBD_TAIL) : %% 10
Communication signals (HDLC_SIGNAL) : %% 11
Communication buffers (HDLC_TYPE) : %% 12
Discard frame counter (DISFC) : %% 13
Crc error counter (CRCEC) : %% 14
Abort sequence counter (ABTSC) : %% 15
Non matching address counter (NMARC) : %% 16
Frame retransmit counter (RETRC) : %% 17
Current reception empty buffers : %% 18
Current reception ready buffers : %% 19
Current transmission ready buffers : %% 20
Current transmission empty buffers : %% 21
321
Software Diagnostics Output
## 261 LEVEL = 1
HDLC hardware control and status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Scc configuration register (SCON) : %% 4
Scc mode register (SCM) : %% 5
Scc data sync. register (DSR) : %% 6
Scc event register (SCCE) : %% 7
Scc mask register (SCCM) : %% 8
Scc status register (SCCS) : %% 9
Temp receive crc (RCRC_L/H) : %% %% 10
Crc polynom mask (C_MASK_L/H) : %% %% 10
Temp transmit crc (TCRC_L/H) : %% %% 10
Discard frame counter (DISFC) : %% 10
Crc error counter (CRCEC) : %% 10
Abort sequence counter (ABTSC) : %% 10
Nonmatch address counter (NMARC) : %% 10
Frame retransmit counter (RETRC) : %% 10
Receive frame maximum length (MFLR) : %% 10
Receive frame length counter (MAX_CNT) : %% 10
User define frame address mask (HMASK) : %% 11
User define frame addresses (HADDRX) : %% %% %% %% 12
322
Software Diagnostics Output
4. Determines the clock direction (Rx or Tx) and the baud rate
12. The addresses to which this site responds via this port.
## 262 LEVEL = 2
HDLC hardware data buffers status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Receive buffer descriptor 0 (RXBD0) : %% %% %% %% 4
Receive buffer descriptor 1 (RXBD1) : %% %% %% %% 5
Receive buffer descriptor 2 (RXBD2) : %% %% %% %% 6
Receive buffer descriptor 3 (RXBD3) : %% %% %% %% 7
Receive buffer descriptor 4 (RXBD4) : %% %% %% %% 8
Receive buffer descriptor 5 (RXBD5) : %% %% %% %% 9
Receive buffer descriptor 6 (RXBD6) : %% %% %% %% 10
Receive buffer descriptor 7 (RXBD7) : %% %% %% %% 11
Transmit buffer descriptor 0 (TXBD0) : %% %% %% %% 12
Transmit buffer descriptor 1 (TXBD1) : %% %% %% %% 13
Transmit buffer descriptor 2 (TXBD2) : %% %% %% %% 14
Transmit buffer descriptor 3 (TXBD3) : %% %% %% %% 15
Transmit buffer descriptor 4 (TXBD4) : %% %% %% %% 16
Transmit buffer descriptor 5 (TXBD5) : %% %% %% %% 17
Transmit buffer descriptor 6 (TXBD6) : %% %% %% %% 18
Transmit buffer descriptor 7 (TXBD7) : %% %% %% %% 19
Rxd/Txd function code (R/TFCR) : %% 20
Maximum receive buffer length (MRBLR) : %% 21
Current receive buffer status : %% 22
Current receive buffer offset (RBD#) : %% 23
Current receive data pointer : %% 24
Current receive byte counter : %% 24
Current receive temp memory : %% 24
Current transmit buffer status : %% 25
Current transmit buffer offset (TBD#) : %% 26
Current transmit data pointer : %% 27
Current transmit byte counter : %% 27
Current transmit temp memory : %% 27
323
Software Diagnostics Output
23. The offset value in the descriptors of the last received frame.
26. The offset value in the descriptors of the last transmitted frame.
324
Software Diagnostics Output
## 263 LEVEL = 3
HDLC software control and status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Current mode parameters (MODE_BACKUP) : %% 4
Current rate parameters (RATE_BACKUP) : %% 5
Current sync parameters (SYNC_BACKUP) : %% 6
Address mask parameters (MASK_BACKUP) : %% 7
Address data parameters (ADRS_BACKUP) : %% %% %% %% 8
Current channel name (CHAN_BACKUP) : %% 9
Current channel data (CHAN_DATA) : %% 10
Current channel code (CHAN_CODE) : %% 11
Current heap name (HEAP_BACKUP) : %% 12
Current heap name (HEAP_DATA) : %% 13
Current heap data (HEAP_CODE) : %% 14
Current channel port (HDLC_PORT) : %% 15
Reception data lock (RXBD_LOCK) : %% 16
Transmission data lock (TXBD_LOCK) : %% 17
Reception next free (RXBD_FREE) : %% 18
Transmission next free (TXBD_FREE) : %% 19
Reception data header (RXBD_HEAD) : %% 20
Transmission data tail (TXBD_TAIL) : %% 21
Communication signals (HDLC_SIGNAL) : %% 22
Communication buffer (HDLC_TYPE) : %% 23
Communication HDLC lock (HDLC_LOCK) : %% 24
Communication time lock (TIME_LOCK) : %% 25
Communication time data (TIME_DATA) : %% 26
Communication status (NOISY) : %% 27
(QUIET) : %% 28
Communication preset/timers (GRANT) : %% %% 29
(QUIET) : %% %% 30
6. Not relevant.
7. Not relevant.
8. The addresses to which this site will respond through this port.
325
Software Diagnostics Output
29. GRANT-TIME for channel access: The time the site will wait to obtain a transmission channel until
it decides that a channel is not available.
## 264 LEVEL = 4
Mode of operation : %% 1
TimeAuth device key (HEX) : %% 2
TimeAuth handle : %% 3
Authentication stamp offset : %% 4
3. TimeAuth identifier.
4. Offset of Authentication stamp within the buffer for authenticated SYNC frames only.
326
Software Diagnostics Output
## 271
HDLC hardware/software last status :-
Discard frame counter (DISFC) : %% 1
CRC error counter (CRCEC) : %% 2
Abort sequence counter (ABTSC) : %% 3
Non matching address counter (NMARK) : %% 4
Frame retransmit counter (RETRC) : %% 5
327
Software Diagnostics Output
UART
## 280
UART hardware/software last status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Current channel port (UART_PORT) : %% 4
Reception data lock (RXBD_LOCK) : %% 5
Transmission data lock (TXBD_LOCK) : %% 6
Reception data header (RXBD_HEAD) : %% 7
Reception data tail (RXBD_TAIL) : %% 8
Transmission data header (TXBD_HEAD) : %% 9
Transmission data tail (TXBD_TAIL) : %% 10
Communication signals (UART_SIGNAL): %% 11
Communication buffers (UART_TYPE) : %% %% 12
Idle characters counter (IDLC) : %% 13
Parity error counter (PAREC) : %% 14
Framing error counter (FRMEC) : %% 15
Noise error counter (NOSEC) : %% 16
Break error counter (BRKEC) : %% 17
Current reception empty buffer : %% 18
Current reception ready buffers : %% 19
Current transmission ready buffers : %% 20
Current transmission empty buffers : %% 21
10. Offset in TX_QUEUE from where this device takes the next frame for transmission.
13. The actual counter that counts the number of idles since the last character was received. For example,
the time that a character takes to arrive (corresponds to idle) at 9600 baud is 1 msec.
14. The number of times the parity error occurred during the reception of a single byte.
15. The number of times the framing error occurred during the reception of a single byte.
328
Software Diagnostics Output
16. The number of times the noise error occurred during the reception of a single byte.
17. The number of times a break signal (end of reception) was received at the port.
## 281
UART hardware control and status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Scc configuration register (SCON) : %% 4
Scc mode register (SCM) : %% 5
Scc data sync. register (DSR) : %% 6
Scc event register (SCCE) : %% 7
Scc mask register (SCCM) : %% 8
Scc status register (SCCS) : %% 9
Idle characters maximum (MAX_IDL) : %% 10
Idle characters counter (IDLC) : %% 11
Break characters register (BRKCR) : %% 12
Parity error counter (PAREC) : %% 13
Framing error counter (FRMEC) : %% 14
Noise error counter (NOSEC) : %% 15
Break error counter (BRKEC) : %% 16
User defined UART addresses (UADDRX) : %% %% 17
Control character register (RCCR) : %% 18
Control character table (CHARACTERX) : %% %% %% %% 19
: %% %% %% %%
4. Determines the clock direction (Rx or Tx) and the baud rate
10. How many idles to wait before declaring that the transmission has ended.
11. The actual counter that counts the number of idles since the last character was received. For example,
the time that a character takes to arrive (corresponds to idle) at 9600 baud is 1 msec.
329
Software Diagnostics Output
13. The number of times the parity error occurred during the reception of a single byte.
14. The number of times the framing error occurred during the reception of a single byte.
15. The number of times the noise error occurred during the reception of a single byte.
16. The number of times a break signal (end of reception) was received at the port.
## 282
UART hardware data buffers status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Receive buffer descriptor 0 (RXBD0) : %% %% %% %% 4
Receive buffer descriptor 1 (RXBD1) : %% %% %% %% 5
Receive buffer descriptor 2 (RXBD2) : %% %% %% %% 6
Receive buffer descriptor 3 (RXBD3) : %% %% %% %% 7
Receive buffer descriptor 4 (RXBD4) : %% %% %% %% 8
Receive buffer descriptor 5 (RXBD5) : %% %% %% %% 9
Receive buffer descriptor 6 (RXBD6) : %% %% %% %% 10
Receive buffer descriptor 7 (RXBD7) : %% %% %% %% 11
Transmit buffer descriptor 0 (TXBD0) : %% %% %% %% 12
Transmit buffer descriptor 1 (TXBD1) : %% %% %% %% 13
Transmit buffer descriptor 2 (TXBD2) : %% %% %% %% 14
Transmit buffer descriptor 3 (TXBD3) : %% %% %% %% 15
Transmit buffer descriptor 4 (TXBD4) : %% %% %% %% 16
Transmit buffer descriptor 5 (TXBD5) : %% %% %% %% 17
Transmit buffer descriptor 6 (TXBD6) : %% %% %% %% 18
Transmit buffer descriptor 7 (TXBD7) : %% %% %% %% 19
Rxd/Txd function code (R/TFCR): %% 20
Maximum receive buffer length (MRBLR) : %% 21
Current receive buffer status : %% 22
Current receive buffer offset (RBD#) : %% 23
Current receive data pointer : %% %% 24
Current receive byte counter : %% 24
Current receive temp memory : %% 24
Current transmit buffer status : %% 25
Current transmit buffer offset (TBD#) : %% 26
Current transmit data pointer : %% %% 27
Current transmit byte counter : %% 27
Current transmit temp memory : %% 27
330
Software Diagnostics Output
23. The offset value in the descriptors of the last received frame.
26. The offset value in the descriptors of the last transmitted frame.
331
Software Diagnostics Output
## 283
UART software control and status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Current mode parameters (MODE_BACKUP): %% 4
Current rate parameters (RATE_BACKUP): %% 5
Current sync parameters (SYNC_BACKUP): %% 6
Address mask parameters (MASK_BACKUP): %% 7
Address data parameters (ADRS_BACKUP): %% %% %% %% 8
Current channel name (CHAN_BACKUP): %% 9
Current channel data (CHAN_DATA) : %% 10
Current channel code (CHAN_CODE) : %% 11
Current heap name (HEAP_BACKUP): %% 12
Current heap name (HEAP_DATA) : %% 13
Current heap data (HEAP_CODE) : %% 14
Current channel port (UART_PORT) : %% 15
Reception data lock (RXBD_LOCK) : %% 16
Transmission data lock (TXBD_LOCK) : %% 17
Reception next free (RXBD_FREE) : %% 18
Transmission next free (TXBD_FREE) : %% 19
Reception data header (RXBD_HEAD) : %% 20
Transmission data tail (TXBD_TAIL) : %% 21
Communication signals (UART_SIGNAL): %% 22
Communication buffer (UART_TYPE) : %% 23
Communication HDLC lock (UART_LOCK) : %% 24
Communication time lock (TIME_LOCK) : %% 25
Communication time data (TIME_DATA) : %% 26
Communication status (NOISY) : %% 27
(QUIET) : %% 28
Communication preset/timers (GRANT) : %% %% 29
(QUIET) : %% %% 30
6. Not relevant.
7. Not relevant.
8. The addresses to which this site will respond through this port.
332
Software Diagnostics Output
29. GRANT-TIME for channel access: The time the site will wait to obtain a transmission channel until
it decides that a channel is not available.
333
Software Diagnostics Output
## 285
UART hardware/software last status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Current channel port (UART_PORT) : %% 4
Reception data lock (RXBD_LOCK) : %% 5
Transmission data lock (TXBD_LOCK) : %% 6
Reception data header (RXBD_HEAD) : %% 7
Reception data tail (RXBD_TAIL) : %% 8
Transmission data header (TXBD_HEAD) : %% 9
Transmission data tail (TXBD_TAIL) : %% 10
Communication signals (UART_SIGNAL): %% 11
Communication buffers (UART_TYPE) : %% %% 12
Idle characters counter (IDLC) : %% 13
Parity error counter (PAREC) : %% 14
Framing error counter (FRMEC) : %% 15
Noise error counter (NOSEC) : %% 16
Break error counter (BRKEC) : %% 17
Current reception empty buffers : %% 18
Current reception ready buffers : %% 19
Current transmission ready buffers : %% 20
Current transmission empty buffers : %% 21
10. Offset in TX_QUEUE from where this device takes the next frame for transmission.
13. The actual counter that counts the number of idles since the last character was received. For example,
the time that a character takes to arrive (corresponds to idle) at 9600 baud is 1 msec.
14. The number of times the parity error occurred during the reception of a single byte.
15. The number of times the framing error occurred during the reception of a single byte.
16. The number of times the noise error occurred during the reception of a single byte.
17. The number of times a break signal (end of reception) was received at the port.
334
Software Diagnostics Output
## 286
UART hardware control and status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Scc configuration register (SCON) : %% 4
Scc mode register (SCM) : %% 5
Scc data sync. register (DSR) : %% 6
Scc event register (SCCE) : %% 7
Reserved register (RES2) : %% 8
Scc mask register (SCCM) : %% 9
Reserved register (RES3) : %% 10
Scc status register (SCCS) : %% 11
Idle characters maximum (MAX_IDL) : %% 12
Idle characters counter (IDLC) : %% 13
Break characters register (BRKCR) : %% 14
Parity error counter (PAREC) : %% 15
Framing error counter (FRMEC) : %% 16
Noise error counter (NOSEC) : %% 17
Break error counter (BRKEC) : %% 18
User defined UART addresses (UADDRX) : %% %% 19
Control character register (RCCR) : %% 20
Control character table (CHARACTERX) : %% %% %% %% 21
: %% %% %% %%
4. Determines the clock direction (Rx or Tx) and the baud rate
8. Reserved.
10. Reserved.
12. How many idles to wait before declaring that the transmission has ended.
335
Software Diagnostics Output
13. The actual counter that counts the number of idles since the last character was received. For example,
the time that a character takes to arrive (corresponds to idle) at 9600 baud is 1 msec.
15. The number of times the parity error occurred during the reception of a single byte.
16. The number of times the framing error occurred during the reception of a single byte.
17. The number of times the noise error occurred during the reception of a single byte.
18. The number of times a break signal (end of reception) was received at the port.
## 287
UART hardware data buffers status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Receive buffer descriptor 0 (RXBD0) : %% %% %% %% 4
Receive buffer descriptor 1 (RXBD1) : %% %% %% %% 5
Receive buffer descriptor 2 (RXBD2) : %% %% %% %% 6
Receive buffer descriptor 3 (RXBD3) : %% %% %% %% 7
Receive buffer descriptor 4 (RXBD4) : %% %% %% %% 8
Receive buffer descriptor 5 (RXBD5) : %% %% %% %% 9
Receive buffer descriptor 6 (RXBD6) : %% %% %% %% 10
Receive buffer descriptor 7 (RXBD7) : %% %% %% %% 11
Transmit buffer descriptor 0 (TXBD0) : %% %% %% %% 12
Transmit buffer descriptor 1 (TXBD1) : %% %% %% %% 13
Transmit buffer descriptor 2 (TXBD2) : %% %% %% %% 14
Transmit buffer descriptor 3 (TXBD3) : %% %% %% %% 15
Transmit buffer descriptor 4 (TXBD4) : %% %% %% %% 16
Transmit buffer descriptor 5 (TXBD5) : %% %% %% %% 17
Transmit buffer descriptor 6 (TXBD6) : %% %% %% %% 18
Transmit buffer descriptor 7 (TXBD7) : %% %% %% %% 19
Rxd/Txd function code (R/TFCR): %% 20
Maximum receive buffer length (MRBLR) : %% 21
Current receive buffer status : %% 22
Current receive buffer offset (RBD#) : %% 23
Current receive data pointer : %% %% 24
Current receive byte counter : %% 24
Current receive temp memory : %% 24
Current transmit buffer status : %% 25
Current transmit buffer offset (TBD#) : %% 26
Current transmit data pointer : %% %% 27
Current transmit byte counter : %% 27
Current transmit temp memory : %% 27
336
Software Diagnostics Output
23. The offset value in the descriptors of the last received frame.
26. The offset value in the descriptors of the last transmitted frame.
337
Software Diagnostics Output
## 288
UART software control and status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Current mode parameters (MODE_BACKUP): %% 4
Current rate parameters (RATE_BACKUP): %% 5
Current sync parameters (SYNC_BACKUP): %% 6
Address mask parameters (MASK_BACKUP): %% 7
Address data parameters (ADRS_BACKUP): %% %% %% %% 8
Current heap name (HEAP_KEY) : %% 9
Current channel port (DART_PORT) : %% 10
Reception data lock (RXBD_LOCK) : %% 11
Transmission data lock (TXBD_LOCK) : %% 12
Reception next free (RXBD_FREE) : %% 13
Transmission next free (TXBD_FREE) : %% 14
Reception data header (RXBD_HEAD) : %% 15
Transmission data tail (TXBD_TAIL) : %% 16
Communication signals (UART_SIGNAL): %% 17
Communication buffer (DART_TYPE) : %% %% 18
Communication UART lock (DART_LOCK) : %% 19
Communication time lock (TIME_LOCK) : %% 20
Communication time data (TIME_DATA) : %% 21
Communication status (NOISY) : %% 22
(QUIET) : %% 23
Communication preset/timers (GRANT) : %% %% 24
(QUIET) : %% %% 25
Incoming Call flag : %% 26
Second counter : %% 27
6. Not relevant.
7. Not relevant.
8. The addresses to which this site will respond through this port.
338
Software Diagnostics Output
24. GRANT-TIME for channel access: The time the site will wait to obtain a transmission channel until
it decides that a channel is not available.
## 290
UART hardware/software last status :-
Parity error counter (PAREC) : %% 1
Framing error counter (FRMEC) : %% 2
Noise error counter (NOSEC) : %% 3
Break error counter (BRKEC) : %% 4
1. The number of times the parity error occurred during the reception of a single byte.
2. The number of times the framing error occurred during the reception of a single byte.
3. The number of times the noise error occurred during the reception of a single byte.
4. The number of times a break signal (end of reception) was received at the port.
## 291
UART hardware/software last status :-
Parity error counter (PAREC) : %% 1
Framing error counter (FRMEC) : %% 2
Noise error counter (NOSEC) : %% 3
Break error counter (BRKEC) : %% 4
1. The number of times the parity error occurred during the reception of a single byte.
2. The number of times the framing error occurred during the reception of a single byte.
3. The number of times the noise error occurred during the reception of a single byte.
339
Software Diagnostics Output
4. The number of times a break signal (end of reception) was received at the port.
## 300 LEVEL = 0
Radio hardware/software last status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Current channel port (CHAN_PORT) : %% 4
Channel status mode (CHAN_MODE) : %% 5
Channel driver lock (CHAN_LOCK) : %% 6
Channel signals (CHAN_SIGNAL): %% 7
Channel access type (CHAN_ACCESS): %%
Channel driver type (CHAN_TYPE) : %% 8
Channel control register (PBCNT) : %% 9
Channel direction register (PBDDR) : %% 10
Channel data register (PBDAT) : %% 11
Current reception empty buffers : %% 12
Current reception ready buffer : %% 13
Current transmission ready buffers : %% 14
Current transmission empty buffers : %% 15
1. Device-key address.
4. Port number.
5. Configuration mode.
340
Software Diagnostics Output
## 301
Radio hardware control and status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Scc configuration register (SCON) : %% 4
Scc mode register (SCM) : %% 5
Scc data sync. register (DSR) : %% 6
Scc event register (SCCE) : %% 7
Scc mask register (SCCM) : %% 8
Scc status register (SCCS) : %% 9
Channel control register (PBCNT) : %% 10
Channel direction register (PRDDR) : %% 11
Channel data register (PBDAT) : %% 12
1. Device-key address.
4. Determines the clock direction (Rx or Tx) and the baud rate
## 302 LEVEL = 2
Radio hardware data buffers status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Receive buffer descriptor 0 (RXBD0) : %% %% %% %% 4
Receive buffer descriptor 1 (RXBD1) : %% %% %% %% 5
Receive buffer descriptor 2 (RXBD2) : %% %% %% %% 6
Receive buffer descriptor 3 (RXBD3) : %% %% %% %% 7
Receive buffer descriptor 4 (RXBD4) : %% %% %% %% 8
Receive buffer descriptor 5 (RXBD5) : %% %% %% %% 9
Receive buffer descriptor 6 (RXBD6) : %% %% %% %% 10
Receive buffer descriptor 7 (RXBD7) : %% %% %% %% 11
Transmit buffer descriptor 0 (TXBD0) : %% %% %% %% 12
Transmit buffer descriptor 1 (TXBD1) : %% %% %% %% 13
Transmit buffer descriptor 2 (TXBD2) : %% %% %% %% 14
Transmit buffer descriptor 3 (TXBD3) : %% %% %% %% 15
Transmit buffer descriptor 4 (TXBD4) : %% %% %% %% 16
341
Software Diagnostics Output
1. Device-key address.
342
Software Diagnostics Output
23. The offset value in the descriptors of the last received frame.
26. The offset value in the descriptors of the last transmitted frame.
## 303 LEVEL = 3
Radio software control and status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Current mode parameters (MODE_BACKUP) : %% 4
Current rate parameters (RATE_BACKUP) : %% 5
Current sync parameters (SYNC_BACKUP) : %% 6
Current channel port (CHAN_PORT) : %% 7
Channel status mode (CHAN_MODE) : %% %% 8
Channel driver lock (CHAN_LOCK) : %% 9
Channel signals (CHAN_SIGNAL) : %% 10
Channel access type (CHAN_ACCESS) : %%
Channel driver type (CHAN_TYPE) : %% 11
Channel addresses (CHAN/NEXT/MASK) : %% %% %% 12
Channel status (NOISY) : %% 13
(QUIET) : %%
Channel preset/timers (OVERRIDE) : %% %% 14
(RESOLUTE/QUIET) : %% %%
(SHUTUP) : %% %%
(GRANT) : %% %%
(WARMUP) : %% %%
(TRANSMIT) : %% %%
(HOLDUP) : %% %%
(RESPOND) : %% %%
1. Device-key address.
6. Not relevant.
7. Port number.
8. Configuration mode.
343
Software Diagnostics Output
12. The address to which this site will respond through this port.
14. Preset timers for fields defined in the advanced parameters of Port 3.
TRUNK CHANNEL
## 320
Trunk radio hardware/software last status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Current channel port (CHAN_PORT) : %% 4
Channel status mode (CHAN_MODE) : %% 5
Channel driver lock (CHAN_LOCK) : %% 6
Channel signals (CHAN_SIGNAL): %% 7
Channel access type (CHAN_ACCESS): %%
Channel driver type (CHAN_TYPE) : %% 8
Channel control register (PBCNT) : %% 9
Channel direction register (PBDDR) : %% 10
Channel data register (PBDAT) : %% 11
Current reception empty buffers : %% 12
Current reception ready buffers : %% 13
Current transmission ready buffers : %% 14
Current transmission empty buffers : %% 15
1. Device-key address.
4. Port number.
5. Configuration mode.
344
Software Diagnostics Output
## 321
Trunk radio hardware control and status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Scc configuration register (SCON) : %% 4
Scc mode register (SCM) : %% 5
Scc data sync. register (DSR) : %% 6
Scc event register (SCCE) : %% 7
Scc mask register (SCCM) : %% 8
Scc status register (SCCS) : %% 9
Channel control register (PBCNT): %% 10
Channel direction register (PRDDR): %% 11
Channel data register (PBDAT): %% 12
1. Device-key address.
4. Determines the clock direction (Rx or Tx) and the baud rate
## 322
Trunk radio hardware data buffers status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Receive buffer descriptor 0 (RXBD0) : %% %% %% %% 4
Receive buffer descriptor 1 (RXBD1) : %% %% %% %% 5
Receive buffer descriptor 2 (RXBD2) : %% %% %% %% 6
Receive buffer descriptor 3 (RXBD3) : %% %% %% %% 7
Receive buffer descriptor 4 (RXBD4) : %% %% %% %% 8
Receive buffer descriptor 5 (RXBD5) : %% %% %% %% 9
Receive buffer descriptor 6 (RXBD6) : %% %% %% %% 10
Receive buffer descriptor 7 (RXBD7) : %% %% %% %% 11
345
Software Diagnostics Output
1. Device-key address.
2. H-W registers address.
3. H-W parameters address.
4. Address of frame in descriptor RX 0.
5. Address of frame in descriptor RX 1.
6. Address of frame in descriptor RX 2.
7. Address of frame in descriptor RX 3.
8. Address of frame in descriptor RX 4.
9. Address of frame in descriptor RX 5.
10. Address of frame in descriptor RX 6.
11. Address of frame in descriptor RX 7.
12. Address of frame for transmission in descriptor 0.
13. Address of frame for transmission in descriptor 1.
14. Address of frame for transmission in descriptor 2.
15. Address of frame for transmission in descriptor 3.
16. Address of frame for transmission in descriptor 4.
17. Address of frame for transmission in descriptor 5.
18. Address of frame for transmission in descriptor 6.
19. Address of frame for transmission in descriptor 7.
20. Rx and Tx function code.
21. Maximum received frame length.
22. The reception status of the last received frame.
346
Software Diagnostics Output
23. The offset value in the descriptors of the last received frame.
24. Internal variable of 68302.
25. The status of the last transmitted frame.
26. The offset value in the descriptors of the last transmitted frame.
27. Internal variable of 68302.
## 323
Trunk radio software control and status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Current mode parameters (MODE_BACKUP) : %% 4
Current rate parameters (RATE_BACKUP) : %% 5
Current sync parameters (SYNC_BACKUP) : %% 6
Current channel port (CHAN_PORT) : %% 7
Channel status mode (CHAN_MODE) : %% %% 8
Channel driver lock (CHAN_LOCK) : %% 9
Channel signals (CHAN_SIGNAL) : %% 10
Channel access type (CHAN_ACCESS) : %%
Channel driver type (CHAN_TYPE) : %% 11
Channel addresses (CHAN/NEXT/MASK) : %% %% %% 12
Channel acks (ACK_SLOT) : %% 13
Channel random (RANDOM_REGISTER) : %% 14
Channel status (NOISY) : %% 15
(QUIET) : %% 15
(LATCH) : %% 15
(GRANT) : %% 15
(ACTIVE) : %% 15
(NOACTIVE) : %% 15
Channel preset/timers (OVERRIDE) : %% %% 16
(RESOLUTE/QUIET) : %% %% 16
(SHUTUP) : %% %% 16
(GRANT) : %% %% 16
(WARMUP) : %% %% 16
(TRANSMIT) : %% %% 16
(HOLDUP) : %% %% 16
(RESPOND) : %% %% 16
(RELEASE) : %% %% 16
(RECEIVE/CHECK) : %% %% 16
(REQUEST) : %% %% 16
(SHORT_WARMUP) : %% 16
(SMART_MIN) : %% 16
(SMART_LONG) : %% 16
(SMART_WARM) : %% 16
(OFF_SLOT) : %% 16
1. Device-key address.
347
Software Diagnostics Output
6. Not relevant.
7. Port number.
8. Configuration mode.
12. The address to which this site will respond through this port.
16. Preset timers for fields defined in the advanced parameters of Port 3.
RS232 CHANNEL
## 340
Rs232 hardware/software last status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Current channel port (CHAN_PORT) : %% 4
Channel status mode (CHAN_MODE) : %% 5
Channel driver lock (CHAN_LOCK) : %% 6
Channel signals (CHAN_SIGNAL): %% 7
Channel access type (CHAN_ACCESS): %%
Channel driver type (CHAN_TYPE) : %% 8
Channel control register (PBCNT) : %% 9
Channel direction register (PBDDR) : %% 10
Channel data register (PBDAT) : %% 11
Current reception empty buffers : %% 12
Current reception ready buffers : %% 13
Current transmission ready buffers : %% 14
Current transmission empty buffers : %% 15
1. Device-key address.
4. Port number.
5. Configuration mode.
348
Software Diagnostics Output
## 341
Rs232 hardware control and status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Scc configuration register (SCON) : %% 4
Scc mode register (SCM) : %% 5
Scc data sync. register (DSR) : %% 6
Scc event register (SCCE) : %% 7
Scc mask register (SCCM) : %% 8
Scc status register (SCCS) : %% 9
Channel control register (PBCNT) : %% 10
Channel direction register (PRDDR) : %% 11
Channel data register (PBDAT) : %% 12
1. Device-key address.
4. Determines the clock direction (Rx or Tx) and the baud rate
349
Software Diagnostics Output
## 342
Rs232 hardware data buffers status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Receive buffer descriptor 0 (RXBD0) : %% %% %% %% 4
Receive buffer descriptor 1 (RXBD1) : %% %% %% %% 5
Receive buffer descriptor 2 (RXBD2) : %% %% %% %% 6
Receive buffer descriptor 3 (RXBD3) : %% %% %% %% 7
Receive buffer descriptor 4 (RXBD4) : %% %% %% %% 8
Receive buffer descriptor 5 (RXBD5) : %% %% %% %% 9
Receive buffer descriptor 6 (RXBD6) : %% %% %% %% 10
Receive buffer descriptor 7 (RXBD7) : %% %% %% %% 11
Transmit buffer descriptor 0 (TXBD0) : %% %% %% %% 12
Transmit buffer descriptor 1 (TXBD1) : %% %% %% %% 13
Transmit buffer descriptor 2 (TXBD2) : %% %% %% %% 14
Transmit buffer descriptor 3 (TXBD3) : %% %% %% %% 15
Transmit buffer descriptor 4 (TXBD4) : %% %% %% %% 16
Transmit buffer descriptor 5 (TXBD5) : %% %% %% %% 17
Transmit buffer descriptor 6 (TXBD6) : %% %% %% %% 18
Transmit buffer descriptor 7 (TXBD7) : %% %% %% %% 19
Rxd/Txd function code (R/TFCR): %% 20
Maximum receive buffer length (MRBLR) : %% 21
Current receive buffer status : %% 22
Current receive buffer offset (RBD#) : %% 23
Current receive data pointer : %% %% 24
Current receive byte counter : %% 24
Current receive temp memory : %% 24
Current transmit buffer status : %% 25
Current transmit buffer offset (TBD#) : %% 26
Current transmit data pointer : %% %% 27
Current transmit byte counter : %% 27
Current transmit temp memory : %% 27
1. Device-key address.
23. The offset value in the descriptors of the last received frame.
26. The offset value in the descriptors of the last transmitted frame.
## 343
Rs232 software control and status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Current mode parameters (MODE_BACKUP) : %% 4
Current rate parameters (RATE_BACKUP) : %% 5
Current sync parameters (SYNC_BACKUP) : %% 6
Current channel port (CHAN_PORT) : %% 7
Channel status mode (CHAN_MODE) : %% %% 8
Channel driver lock (CHAN_LOCK) : %% 9
Channel signals (CHAN_SIGNAL) : %% 10
Channel access type (CHAN_ACCESS) : %%
Channel driver type (CHAN_TYPE) : %% 11
Channel addresses (CHAN/NEXT/MASK) : %% %% %% 12
Channel status (NOISY) : %% 13
(QUIET) : %% 13
Channel preset/timers (OVERRIDE) : %% %% 14
(RESOLUTE/QUIET) : %% %% 14
(SHUTUP) : %% %% 14
(GRANT) : %% %% 14
(WARMUP) : %% %% 14
(TRANSMIT) : %% %% 14
(HOLDUP) : %% %% 14
(RESPOND) : %% %% 14
1. Device-key address.
351
Software Diagnostics Output
6. Not relevant.
7. Port number.
8. Configuration mode.
12. The address to which this site will respond through this port.
14. Preset timers for fields defined in the advanced parameters of Port 3.
MODEM CHANNEL
## 360
Modem hardware/software last status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Current channel port (CHAN_PORT) : %% 4
Channel status mode (CHAN_MODE) : %% 5
Channel driver lock (CHAN_LOCK) : %% 6
Channel signals (CHAN_SIGNAL): %% 7
Channel access type (CHAN_ACCESS): %%
Channel driver type (CHAN_TYPE) : %% 8
Channel control register (PBCNT) : %% 9
Channel direction register (PBDDR) : %% 10
Channel data register (PBDAT) : %% 11
Current reception empty buffers : %% 12
Current reception ready buffers : %% 13
Current transmission ready buffers : %% 14
Current transmission empty buffers : %% 15
1. Device-key address.
4. Port number.
5. Configuration mode.
352
Software Diagnostics Output
## 361
Modem hardware control and status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Scc configuration register (SCON) : %% 4
Scc mode register (SCM) : %% 5
Scc data sync. register (DSR) : %% 6
Scc event register (SCCE) : %% 7
Scc mask register (SCCM) : %% 8
Scc status register (SCCS) : %% 9
Channel control register (PBCNT): %% 10
Channel direction register (PRDDR): %% 11
Channel data register (PBDAT): %% 12
1. Device-key address.
4. Determines the clock direction (Rx or Tx) and the baud rate.
353
Software Diagnostics Output
## 362
Modem hardware data buffers status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Receive buffer descriptor 0 (RXBD0) : %% %% %% %% 4
Receive buffer descriptor 1 (RXBD1) : %% %% %% %% 5
Receive buffer descriptor 2 (RXBD2) : %% %% %% %% 6
Receive buffer descriptor 3 (RXBD3) : %% %% %% %% 7
Receive buffer descriptor 4 (RXBD4) : %% %% %% %% 8
Receive buffer descriptor 5 (RXBD5) : %% %% %% %% 9
Receive buffer descriptor 6 (RXBD6) : %% %% %% %% 10
Receive buffer descriptor 7 (RXBD7) : %% %% %% %% 11
Transmit buffer descriptor 0 (TXBD0) : %% %% %% %% 12
Transmit buffer descriptor 1 (TXBD1) : %% %% %% %% 13
Transmit buffer descriptor 2 (TXBD2) : %% %% %% %% 14
Transmit buffer descriptor 3 (TXBD3) : %% %% %% %% 15
Transmit buffer descriptor 4 (TXBD4) : %% %% %% %% 16
Transmit buffer descriptor 5 (TXBD5) : %% %% %% %% 17
Transmit buffer descriptor 6 (TXBD6) : %% %% %% %% 18
Transmit buffer descriptor 7 (TXBD7) : %% %% %% %% 19
Rxd/Txd function code (R/TFCR): %% 20
Maximum receive buffer length (MRBLR) : %% 21
Current receive buffer status : %% 22
Current receive buffer offset (RBD#) : %% 23
Current receive data pointer : %% %% 24
Current receive byte counter : %% 24
Current receive temp memory : %% 24
Current transmit buffer status : %% 25
Current transmit buffer offset (TBD#) : %% 26
Current transmit data pointer : %% %% 27
Current transmit byte counter : %% 27
Current transmit temp memory : %% 27
1. Device-key address.
354
Software Diagnostics Output
23. The offset value in the descriptors of the last received frame.
26. The offset value in the descriptors of the last transmitted frame.
355
Software Diagnostics Output
## 363
Modem software control and status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Current mode parameters (MODE_BACKUP) : %% %% %% %% %% %% %% %% 4
: %% %% %% %% %% %% %% %%
Current rate parameters (RATE_BACKUP) : %% 5
Current sync parameters (SYNC_BACKUP) : %% 6
Current channel port (CHAN_PORT) : %% 7
Channel status mode (CHAN_MODE) : %% %% 8
Channel driver lock (CHAN_LOCK) : %% 9
Channel signals (CHAN_SIGNAL) : %% 10
Channel access type (CHAN_ACCESS) : %%
Channel driver type (CHAN_TYPE) : %% 11
Channel addresses (CHAN/NEXT/MASK) : %% %% %% 12
Channel status (NOISY) : %% 13
(QUIET) : %% 13
Channel preset/timers (OVERRIDE) : %% %% 14
(RESOLUTE/QUIET) : %% %% 14
(SHUTUP) : %% %% 14
(GRANT) : %% %% 14
(WARMUP) : %% %% 14
(TRANSMIT) : %% %% 14
(HOLDUP) : %% %% 14
(RESPOND) : %% %% 14
1. Device-key address.
6. Not relevant.
7. Port number.
8. Configuration mode.
12. The address to which this site will respond through this port.
14. Preset timers for fields defined in the advanced parameters of Port 3.
356
Software Diagnostics Output
## 380 LEVEL = 0
# of entries in the service table (actual) : %% 1
Maximum # of entries in the service table : %% 2
# of time units passed from last task running : %% 3
The limit # of time units passed without activating task : %% 4
1. The number of timer services (in the specific Instance) currently in use.
3. The number of time units (depending on the timer resolution) that have elapsed since the last
execution.
4. The maximum number of time units that will elapse without activating the instance, until an error
message reports instance timer delay.
TIME-TAG (T_TAG)
## 400 LEVEL = 0
time_tag
The start pointer in queue : %% 1
The writer pointer in queue : %% 2
The read pointer in queue : %% 3
The end pointer in queue : %% 4
# of free bytes in queue : %% 5
The last event in queue is an i/o event : %% 6
There is at least 1 i/o event in queue : %% 7
Queue was full at least one time : %% 8
Queue is locked : %% 9
6. Whether the last element in the queue is COS (Change of State) of I/O.
357
Software Diagnostics Output
CO-PROCESSOR (MC68882)
## 420 LEVEL = 0
The mc6888 coprocessor is connected and is OK
All floating point and double precision calculations are
performed by the mc68882 coprocessor.
## 421 LEVEL = 0
The mc68882 coprocessor is connected and is OK , but is not active.
All floating point and double precision calculations are emulated
by software, as requested by software.
## 422 LEVEL = 0
The mc68882 coprocessor is connected, but is faulty.
All floating point and double precision calculations are
emulated by software.
## 423 LEVEL = 0
The mc68882 coprocessor is not connected !!!
All floating point and double precision calculations are
emulated by software.
DI
## 500 LEVEL = 1
Di : priority=%% , eirq=%% , test=%% , di_pol=%% , cntr=%% , sr=%%
1 2 3 4 5 6
0 38 msec
358
Software Diagnostics Output
1 19
2 9.5
3 4.75
4 2.4
5 1.2
6 0.6
8DO
## 501 LEVEL = 1
Do : init=%% 1 , one submodule: sub_module=%%: 2
mode2.refresh=%% 3 , sub_priority=%% 4 , sub_test=%% 5
mode0 : irq_en=%% 6 , no_clk1=%% 7 , sr=%% 8
mode1 : no_clk=%% 9 , wdt_sel=%% 10 , bi_int=%% 11 , ext_int=%% 12
ref_sel=%% 13 , ocs=%% 14
2. Submodule 0 or 1
3. Refresh trigger
0 38 msec
1 19
2 9.5
3 4.75
4 2.4
5 1.2
6 0.6
13. Refresh start : 0 - no refresh of DO , 1 - 1.1 sec refresh, 2 - 4.5 sec refresh, 3 - 18 sec refresh
359
Software Diagnostics Output
## 502
Do : init=%% 1 , two submodules: sub_module=%%: 2
mode2.refresh=%% 3 , sub_priority=%% 4 , sub_test=%% 5
mode0 : irq_en=%% 6 , no_clk1=%% 7 , sr=%% 8
mode1 : no_clk=%% 9 , wdt_sel=%% 10 , bi_int=%% 11 , ext_int=%% 12
ref_sel=%% 13 , ocs=%% 14
sub_module=%%:
mode2.refresh=%% , sub_priority=%% , sub_test=%%
mode0 : irq_en=%% , no_clk1=%% , sr=%%
mode1 : no_clk=%% , wdt_sel=%% , bi_int=%% , ext_int=%%
ref_sel=%% , ocs=%%
2. Submodule 0 or 1
3. Refresh trigger
0 38 msec
1 19
2 9.5
3 4.75
4 2.4
5 1.2
6 0.6
13. Refresh start : 0 - no refresh of DO , 1 - 1.1 sec refresh, 2 - 4.5 sec refresh, 3 - 18 sec refresh
## 503 LEVEL = 1
Ai : priority=%% 1 , irq_ctrl=%% 2 , eom_fifo=%% 3 , tx_fifo=%% 4
filter_rank=%% 5
5. Filter Rank : 1 , 2 , 4 or 8
## 504 LEVEL = 1
Ao : ao_swap=%% 1 , ao_rate=%% 2 , ao_ref_sel 3 , ao_refresh=%% 4
irq_priority=%% 5 , eirq=%% 6 , ai_irq_en=%% 7 ,
di_irq_en=%% 8
spi_control=%% 9 , spi_cs_control=%% 10
smc_byte=%% 11 , wamst=%% 12
MIX
## 505 LEVEL = 1
Mixed i/o : ro_wdt=%% 1 , ro_ck=%% 2 , ro_ref=%% 3
di_fc_en=%% 4 , di_cos_en=%% 5 , di_sr=%% 6
di_enc=%% 7 , ai_rate=%% 8 , ai_make_delay=%% 9 ,
ai_start_delay=%% 10
ai_filter_rank=%% 11
irq_priority=%% 12, eirq=%% 13, ai_irq_en 14 ,
di_irq_en=%% 15 spi_control=%% 16 , spi_cs_control=%% 17
smc_byte=%% 18 , wamst=%% 19
361
Software Diagnostics Output
0 38 msec
1 19
2 9.5
3 4.75
4 2.4
5 1.2
6 0.6
Count of AI fail or loss of synchronization (Information only: the problem is corrected by software).
362
Software Diagnostics Output
## 507 LEVEL = 1
Dsp : di_pol=%% 1 , cb_pol=%% 2 , di_fc_en=%% 3 , di_cos_en=%% 4
ga_eirq=%% 5 , ga_eirq_with_irq=%% 6 , ga_eirq_without_irq=%% 7
sr=%% 8 , sr_with_irq=%% 9 , sr_without_irq=%% 10
ga_prior=%% 11 , di_irq_en=%% 12
dsp_prior=%% 13 , dsp_eirq=%% 14 , dsp_irq_en=%% 15
ro_ref_rate=%% 16 , ro_duration=%% 17 , ro_type=%% 18
div_en=%% 19 , div_ratio=%% 20
dsp_mode=%% 21 , host_mode=%% 22
dsp_wd_rate=%% 23 , dsp_wd_irq_en=%% 24 , dsp_wd_en=%% 25
0 38 msec
1 19
2 9.5
3 4.75
4 2.4
5 1.2
6 0.6
16. RO refresh rate : 0 - 1 sec , 1-4 sec , 2-9 sec, 3-18 sec
363
Software Diagnostics Output
17. RO pulse duration (ML) : 0 - 17 msec , 1-35 msec, 2-128 msec, 3-500 msec
21. DSP DMA mode : 0 - Host Read IRQ , 1 - Host Write IRQ , 2 - Read - Write IRQ , 3 - Read 8 bit
DMA , 4 - Read 16 bit DMA , 5 - Write 8 bit DMA , 6 - Write 16 bit DMA
23. DSP WDT rate : 0-64 msec, 1-250 msec, 2-1 sec , 3-4 secs
364
Software Diagnostics Output
##510
Dsp: Loadable Code - address=%% 1, length=%% 2
P MEM: Code - address=%% 3, length=%% 4
X MEM: Data - address=%% 5, length=%% 6
##511
Dsp: AO Image: Number of AO locations in use=%% 1
Location Value
##513
Dsp: Num error calls to dsp_init()=%% 1
##518
Auto IO Recognition: %% 1
##519
Number of IO Modules: %% 1
List of All IO Module Types: 2
365
Software Diagnostics Output
RS485
## 520
Rs485 hardware/software last status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Current channel port (CHAN_PORT) : %% 4
Channel status mode (CHAN_MODE) : %% 5
Channel driver lock (CHAN_LOCK) : %% 6
Channel signals (CHAN_SIGNAL): %% 7
Channel access type (CHAN_ACCESS): %%
Channel driver type (CHAN_TYPE) : %% 8
Channel control register (PBCNT) : %% 9
Channel direction register (PBDDR) : %% 10
Channel data register (PBDAT) : %% 11
Current reception empty buffers : %% 12
Current reception ready buffers : %% 13
Current transmission ready buffers : %% 14
Current transmission empty buffers : %% 15
1. Device-key address.
4. Port number.
5. Configuration mode.
366
Software Diagnostics Output
## 521
Rs485 hardware control and status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Scc configuration register (SCON) : %% 4
Scc mode register (SCM) : %% 5
Scc data sync. register (DSR) : %% 6
Scc event register (SCCE) : %% 7
Scc mask register (SCCM) : %% 8
Scc status register (SCCS) : %% 9
Channel control register (PBCNT) : %% 10
Channel direction register (PRDDR) : %% 11
Channel data register (PBDAT) : %% 12
1. Device-key address.
4. Determines the clock direction (Rx or Tx) and the baud rate.
367
Software Diagnostics Output
## 522
Rs485 hardware data buffers status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Receive buffer descriptor 0 (RXBD0) : %% %% %% %% 4
Receive buffer descriptor 1 (RXBD1) : %% %% %% %% 5
Receive buffer descriptor 2 (RXBD2) : %% %% %% %% 6
Receive buffer descriptor 3 (RXBD3) : %% %% %% %% 7
Receive buffer descriptor 4 (RXBD4) : %% %% %% %% 8
Receive buffer descriptor 5 (RXBD5) : %% %% %% %% 9
Receive buffer descriptor 6 (RXBD6) : %% %% %% %% 10
Receive buffer descriptor 7 (RXBD7) : %% %% %% %% 11
Transmit buffer descriptor 0 (TXBD0) : %% %% %% %% 12
Transmit buffer descriptor 1 (TXBD1) : %% %% %% %% 13
Transmit buffer descriptor 2 (TXBD2) : %% %% %% %% 14
Transmit buffer descriptor 3 (TXBD3) : %% %% %% %% 15
Transmit buffer descriptor 4 (TXBD4) : %% %% %% %% 16
Transmit buffer descriptor 5 (TXBD5) : %% %% %% %% 17
Transmit buffer descriptor 6 (TXBD6) : %% %% %% %% 18
Transmit buffer descriptor 7 (TXBD7) : %% %% %% %% 19
Rxd/Txd function code (R/TFCR): %% 20
Maximum receive buffer length (MRBLR) : %% 21
Current receive buffer status : %% 22
Current receive buffer offset (RBD#) : %% 23
Current receive data pointer : %% %% 24
Current receive byte counter : %% 24
Current receive temp memory : %% 24
Current transmit buffer status : %% 25
Current transmit buffer offset (TBD#) : %% 26
Current transmit data pointer : %% %% 27
Current transmit byte counter : %% 27
Current transmit temp memory : %% 27
1. Device-key address.
23. The offset value in the descriptors of the last received frame.
26. The offset value in the descriptors of the last transmitted frame.
## 523
Rs485 software control and status :-
Internal software data (key) (DATA) : %% 1
Internal hardware registers (IREG) : %% 2
Internal hardware parameters (IRAM) : %% 3
Current mode parameters (MODE_BACKUP) : %% 4
Current rate parameters (RATE_BACKUP) : %% 5
Current sync parameters (SYNC_BACKUP) : %% 6
Current channel port (CHAN_PORT) : %% 7
Channel status mode (CHAN_MODE) : %% %% 8
Channel driver lock (CHAN_LOCK) : %% 9
Channel signals (CHAN_SIGNAL) : %% 10
Channel access type (CHAN_ACCESS) : %%
Channel driver type (CHAN_TYPE) : %% 11
Channel addresses (CHAN/NEXT/MASK) : %% %% %% 12
Channel status (NOISY) : %% 13
(QUIET) : %% 13
Channel preset/timers (OVERRIDE) : %% %% 14
(RESOLUTE/QUIET) : %% %% 14
(SHUTUP) : %% %% 14
(GRANT) : %% %% 14
(WARMUP) : %% %% 14
(TRANSMIT) : %% %% 14
(HOLDUP) : %% %% 14
(RESPOND) : %% %% 14
1. Device-key address.
369
Software Diagnostics Output
6. Not relevant.
7. Port number.
8. Configuration mode.
12. The address to which this site will respond through this port.
14. Preset timers for fields defined in the advanced parameters of Port 3.
## 600 LEVEL = 0
Pointer to entries : %% 1
Number of entries : %% 2
Flash start address : %% 3
Flash end address : %% 4
Flash length : %% 5
Flash number of burns: %% 6
370
Software Diagnostics Output
LEVEL = 2
Disabled blocks for type- %%1
Block- 0 : %%2
Block- 1 : %%2
1. The block type (block id). For the FLASHDB device (application flash), there can be up to 50
blocks . For FLSEXT1 (logging flash), the user can define up to five blocks (0-4).
2. The status of the blocks in the application or logging flash can be one of: 0 (block enabled) or 1
(block disabled).
• Supported only by versions < 3.70. Previous versions support 20 types of blocks.
In order to receive diagnostics on block number 0 , use LEVEL = 20.
In order to receive diagnostics on block number 5 , use LEVEL = 25.
• From versions ≥ V3.70 on, at LEVEL = 1 the system displays a table that includes all of this data for
all block IDs.
371
Software Diagnostics Output
## 620
Low byte : %%
Message : %%
‘send message’ : %%
‘comm established’ flag : %%
‘message exist’ flag : %%
Warmup not done : %%
Dial number : %%
Physical key : %%
Mini - session key : %%
Unformatted heap key : %%
## 640 LEVEL = 0
Physical device key : %% 1
Physical pin’s table : %% 2
Async dial physical device key : %% 3
Async dial physical pin’s table : %% 4
Interval between phone call retries (sec) : %% 5
# of phone call retries : %% 6
# of times to call the physical_receive
before hanging up (indicator) : %% 7
# of times to call the physical_receive
before hanging up (responser) : %% 8
‘wait for call’ interval in (milli - sec) : %% 9
## 641 LEVEL = 1
Ldialer current state : : %% 1
Current hang up counter : %% 2
Last / current dialed phone number : %% 3
Previous dialed phone number : %% 4
Last / current partner site id : %% 5
Is initiator : %% 6
372
Software Diagnostics Output
(ML_DL)
## 645 LEVEL = 0
# of dial links (preset) : %% 1
Network key : %% 2
Pointer to links table : %% 3
373
Software Diagnostics Output
## 646 LEVEL = 1
# of dial links (current) : %% 1
Last failed link used : %% 2
Port status partner link_key ldialer_key
------------------------------------------------------
3 4 5 6 7
##660 LEVEL = 0
Port name : %% 1
Connection to : %% 2
Appl. code area : %% 3
Appl. code length : %% 4
Appl RAM area : %% 5
Appl. RAM len : %% 6
Number of retries : %% 7
Number of polls : %% 8
No response timeout : %% 9
# of idles timeout : %% 10
# of diag errors : %% 11
Load module vers : %% 12
Load module rev : %% 13
Load module name : %% 14
Load module diag : %% 15
Diagnostics for third party protocol port defined as connected ‘TO PLC’.
## 661 LEVEL = 1
Parm 1 : %%
Parm 2 : %%
Parm 3 : %%
Parm 4 : %%
Parm 5 : %%
Parm 6 : %%
Parm 7 : %%
Parm 8 : %%
Parm 9 : %%
Parm 10 : %%
• Diagnostics for driver specific parameters for port connected ‘TO PLC’
• These parameters are actually the driver specific parameters (‘TO PLC’ port). The parameters can be
defined in the PLC expert parameter screen. Currently these parameters are not in use.
## 670 LEVEL = 0
Port name : %% 1
Connection to : %% 2
Appl. code area : %% 3
Appl. code len : %% 4
Appl RAM area : %% 5
Appl. RAM len : %% 6
# of diag errors : %% 7
Local plc reply timeout : %% 8
Remote reply timeout : %% 9
Mode of translation : %% 10
No response timeout : %% 11
#of idles timeout : %% 12
Load module vers : %% 12
Load module rev : %% 13
Load module name : %% 14
Load module diag : %% 15
2. Master computer.
375
Software Diagnostics Output
7. Number of errors.
## 671 LEVEL = 1
Parm 1 : %%
Parm 2 : %%
Parm 3 : %%
Parm 4 : %%
Parm 5 : %%
Parm 6 : %%
Parm 7 : %%
Parm 8 : %%
Parm 9 : %%
Parm 10 : %%
• Diagnostics for driver specific parameters for port connected ‘TO MASTER’
• These parameters are actually the driver specific parameters (‘TO MASTER’ port). The parameters
can be defined in the PLC expert parameter screen. Currently these parameters are not in use.
SWITCHER
## 680 LEVEL = 0
Maximum number of plc ports : %% 1
Actual number of plc ports : %% 2
376
Software Diagnostics Output
## 681 LEVEL = 1
Plc port connected to link device name
1 2 3
2. SLAVE / MASTER
## 682 LEVEL = 2
Number of switcher_push_reply calls : %% 1
Number of switcher_push_control calls : %% 1
Number of switcher_push_frame calls : %% 1
Number of switcher_send_control calls : %% 1
Number of userrom_push_reply calls : %% 1
Number of userrom_push_control calls : %% 1
Number of tmuxsend_frame calls : %% 1
Number of plcs_s2m_send_reply calls : %% 1
Number of plcs_m2s_send_control calls : %% 1
Number of errors : %% 2
FRAME - SEQ
## 700
application identity : %% 1
maximum buffers in ready queue : %% 2
Number of buffers in list : %% 3
Time (in sec) to flush rx frames : %% 4
# rx frames thrown under flush : %% 5
1. Application ID number.
5. The number of frames which were flushed from the received queue.
377
Software Diagnostics Output
BURST - SEQ
## 710
application identity : %% 1
maximum buffers in ready queue : %% 2
Number of buffers in list : %% 3
1. Application ID number.
ROUTER (X25_RTR)
## 720 LEVEL = 0
Router mode : %% 1
Num slave : %% 2
X25 address : %% 3
‘self’ digits : %% 4
‘route’ digits : %% 5
‘ignore’ digits : %% 6
Is bad address : %% 7
No. of tables : %% 8
No of lcn in slave : %% 9
Slave diagnostics : %% 10
3. X.25 address - 14 digits and characters that contain: ‘self’, ‘rout’, ‘ignore’ digits
4. Master only. Distinguish between its slave address and public address.
8. The number of logical channels tables, usually three. (Four if two X.25 ports)
10. Master or slave. Pointer to diagnostics data in RAM for each slave.
378
Software Diagnostics Output
## 722 LEVEL = 1
Num_entry ptr_entry search port_id x25_key
• X.25 KEY : X.25 Device key over LAPB or X.25 over MDLC.
• STATUS : 0 - free
1 - occupy
2 - wait for call confirm
3 - wait for clear confirm
• EMPTY: Number of times sessions could not be opened because there were no
free channels.
379
Software Diagnostics Output
## 900 LEVEL = 0
id flags state busy
## 901 LEVEL = 1
id gn cn state ps pr pa w q_len cong.+ cong.- Tx Rx
• CONG.-: When number of packets in TX queue falls below this number, send
RR to peer.
## 902 LEVEL = 2
id flg init pvc d_bit upcnf t11 t12 t13 rnr pack clreq intr acc_m
380
Software Diagnostics Output
• INIT: 0 - Log channel was not initiated. 1 - Log channel was initiated.
## 903 LEVEL = 3
id flg_2 t09 ackrt cong. busy busycos i_ack
• BUSY: 1 - Cannot route frame through L4. Respond with RNR to data frames.
• I_ACK: 1 - In X.25 over MDLC (no ACK mode), this is a pointer to last
transmitted frame. It can be tested to ensure all frames transmitted.
LAPB (X251L)
## 920 LEVEL = 0
flg vs vr va rc state t1 n1 n2 inactive
For each link on the port (usually only one link), the following information:
381
Software Diagnostics Output
• INACTIVE: If value of that timer is not 0, the MOSCAD will initiate SABM to
establish the link.
## 921 LEVEL = 1
Tx_i Tx_rr Tx_rnr Tx_rej Tx_frmr
For each link (again , usually number of links is one), the following TX information :
## 922 LEVEL = 2
Rx_i Rx_rr Rx_rnr Rx_rej Rx_frmr ns_err
382
Software Diagnostics Output
## 923 LEVEL = 3
Tx fail : %% Tx full: %% Tx lock : %% Tx else : %%
Tx error counter : %%
##940
Start at flash : %% 1
Number of entries : %% 2
##941
Site Id Phone Numbers:
383
Software Diagnostics Output
TIMER EVENT
##960
Timers max. value (in 10msc units) : %% 1
Max. number of events / timers in buffer : %% 2
Current number of events / timers in buffer : %% 3
# of heap_aloc_buf failed : %% 4
1. The maximum number of timers that can be set by SetTmr to a specific event.
2. The maximum number of events and timers that can be managed simultaneously by the timer event
device. (They are managed by the heap.)
4. The number of failed attempts to allocate buffers from the events’ and timers’ heap. (Its size as in 2.)
##961
Is device running ? : %% 1
Events enabled ? : %% 2
Last written heap buffer : %% 3
Current 10ms index : %% 4
Last read index : %% 5
1. Whether the device is running. (Does not run during load and reset load.)
• The above indexes are in a cyclic array that return a pointer per 10 msec. Every such pointer points to
the list of events that were received in those last 10 msec.
384
Software Diagnostics Output
POOLMNGR
## 1130
Pool address : %% 1
Pool size (in bytes) : %% 2
Pool end address : %% 3
First free chunk address : %% 4
Largest free chunk address : %% 5
Sum of all free memory : %% 6
# of times that allocation
failed (from last diag) : %% 7
Was enough space for 2 aloc : %% 8
## 1131
Chunk address Chunk size Is free?
------------- ---------- --------
1 2 3
• A table of all of the chunks that were allocated in the pool (some were freed and therefore marked
free).
## 1132
Is Check- Check-
Chunk addr Chunk size free? Bits Word
---------- ---------- ----- ----- -----
1 2 3 4 5
• A table of all of the chunks that were allocated in the pool manager (some were freed and therefore
marked free).
385
Software Diagnostics Output
## 1140
Is pool clobbered? : %% 1
1. If Check-Bits or Check-Words are set, the validity check will report if one chunk in the pool has
overlapped another’s boundaries.
OCOMM LEVEL = 0
## 1400
ocomm key variables
--------------------------
Heap device key : %% 1
Physical device key : %% 2
Rtu to RTU station address : %% 3
Rtu to RTU system address : %% 4
Rtu to RTU Rxlo : %% 5
Rtu to RTU Rxhi : %% 5
INTRAC Rxlo : %% 6
INTRAC Rxhi : %% 6
Maximum time units for a frame to be in reception queue [sec]: %% 7
Repeater mode (Yes / No): %% 8
Control opcode to execute by transmit thread : %% 9
Answer of execution from receive thread : %% 9
Pointer to plug-in diagnostic buffer : %% 10
General: Ocomm is the module in charge of transmission and reception of wide MEIC MDLC and
INTRAC frames.
1. The key to the heap from where buffers are taken for transmission.
2. The key to the physical layer that is used for transmission/reception (Adapter).
3. The Station Address of the unit in the wide MEIC MDLC network.
4. The System Address of the unit in the wide MEIC MDLC network.
386
Software Diagnostics Output
7. The amount of time a received frame (INTRAC or wide MEIC MDLC) can wait in the reception
queue. If the Ladder or C application does not retrieve it from there (by RxIntr function or by
RxWdth) the frame will be erased at the end of this time.
8. If Yes, then frames received by radio are transmitted to the line and vise versa.
10. A pointer to the buffer received from Piggyback after being diagnosed (levels 41, 40 , 20).
## 1401 LEVEL = 1
ocomm key variables (continue)
---------------------------------------
Radio transmit queue pointer : %% 1
Radio transmit queue size [frames] : %% 2
Line transmit queue pointer : %% 3
Line transmit queue size [frames] : %% 4
Rtu to RTU reception queue pointer : %% 5
Rtu to RTU reception queue size [frames] : %% 6
INTRAC reception queue pointer : %% 7
INTRAC reception queue size [frames] : %% 8
Was RTU to RTU reception queue pulled ? (Yes / No): %% 9
Was INTRAC reception queue pulled ? (Yes / No): %% 10
Transmission state : %% 11
Will radio transmit queue be first ?(Yes / No) : %% 12
Is transmit thread at physical_transmit ( ) ? : %% 13
Is transmit thread at physical_wait ( ) ? : %% 13
Is transmit thread waiting for ack ? : %% 13
Was trunk radio configured : %% 14
Is trunk channel being warmed up with high priority ? : %% 15
5. The memory address of the wide MEIC MDLC frame reception queue.
6. The number of frames in the wide MEIC MDLC frame reception queue.
10. Yes - The application called the RxIntr/UpIntr (in Ladder language).
11. The transmission state (to line, radio, piggyback or not at all).
387
Software Diagnostics Output
15. If working with trunk radio, Yes means access to trunk channel in high priority, if Low access to
trunk channel in low priority.
## 1410
The number of times the following operations were executed
LEVEL : 10 (zeros the counters after diagnostics)
LEVEL : 11 (does not zero the counters)
1. The transmission was not carried out because there were no buffers in the transmission heap.
2. The number of times the frame was transmitted (to line/radio or piggyback).
5. The number of times ACK (configuration/diagnostics) message or error was received from
piggyback.
9. The number of received frames without hardware error but with invalid CRC.
10. The number of received invalid frames with addresses out of range (which were erased).
388
Software Diagnostics Output
11. The number of received frames with valid addresses that were erased, because the application did not
try to receive before that time.
12. The number of received frames with valid addresses, but were erased after timeout because the
application did not try to receive during this time.
13. The number of times the transmission of a received frame (in repeater mode) failed because the heap
was empty.
## 1420 LEVEL = 20
plug - in modem config. parameters
Pre - emphasize enable : %% 1
De - emphasize enable : %% 2
Radio channel monitor or txen polarity : %% 3
Radio indication or Rxen polarity : %% 4
Radio reception condition : %% 5
Radio gain level : %% 6
Line gain level : %% 7
Maximum received frame size : %% 8
A.g.c enable : %% 9
3. Comm. radio - The Channel Monitor polarity; Trunk - The TxEn polarity.
5. Reception conditions :
Channel Monitor : Begin reception when C.M. active.
Tone Detect : Begin reception when there is a tone from the radio.
Channel Monitor and Tone Detect : Begin reception when both of the above occur.
(in use for regular radio).
RxEn and Tone Detect : Begin reception when there is an active RxEn and tone.
(in use for Trunk radio only)
## 1430
Failed to communicate with plug-in modem
A ToolBox message shown when piggyback (level 41, 40, 20) diagnostics fail. The message means that
communications with piggyback failed.
389
Software Diagnostics Output
## 1431
Previous diagnostic operation to plug-in modem was not terminated - try again
A ToolBox message shown when piggyback diagnostics fail. The meaning of the message is that the
diagnostics failed (levels 20, 40, 41) because of current transmission (or access) to channel, radio or line.
Diagnostics will be allowed at the end of the current transmission.
## 1440
plug-in modem statistical information
Number of spikes received at last reception : %% 1
Total number of spikes received : %% 2
Number of illegal received frames (till 225) : %% 3
1. The number of spikes received the last time reception was operated.
3. From piggyback version 1.2 and on, the size of the maximum transmission buffer of piggyback (up to
32 bits).
FSKADP (OCOMC)
## 1500 LEVEL = 0
Line Configuration parameters :
Override Time on busy line-channel mS : %% 1
Quiet Time on free line-channel mS : %% 2
Wait for Channel-Access Timeout Sec : %% 3
Line-channel warmup Time mS : %% 4
Transmission Timeout Sec : %% 5
Wait for Holdup Timeout Sec : %% 6
Line-channel Holdup Time mS : %% 7
Line-channel Shutup Time mS : %% 8
Current status of line :
Line-channel quiet time mS : %% 9
Line-channel busy time mS : %% 10
390
Software Diagnostics Output
1. During transmission, if “Channel busy” is detected, this parameter will determine the waiting time
(in msec) before forcing transmission onto a channel (even if the channel is still busy). Setting this
parameter to "0", will terminate the option.
2. Quiet channel period (in msec) before transmission. Setting this parameter to "0", will terminate the
waiting time and transmission will start immediately after the "free channel" detection.
3. Maximum waiting time (in msec) for available channel for transmission. If at the end of this period,
the channel is not available, the system provides a failure notice and the transmission attempts will
be terminated.
4. Transmits a constant tone during this period (in msec), before data transmission starts.
5. The maximum time frame (in seconds) for data transmission. Transmission over this time will be
terminated, and a failure will be declared. The transmission always ends (normally or forced) with a
constant tone for holdup time.
6. During this period (in msec), the system allows the plug-in modem to transmit the contents of its
internal buffer, after the MOSCAD RTU has finished data transmission. It is not recommended to
change this parameter.
7. The amount of time (in msec) a constant tone transmission is continued after the end of transmission.
8. The minimum waiting time (in msec) between one frame transmission and the next. It is measured
from the end of the constant tone of the last transmission.
• The receiving line status:
9. The amount of quiet time on the line (msec).
10. The amount of busy time on the line, meaning Line Tone Detect is active.
## 1501 LEVEL = 1
Radio Configuration parameters :
Override Time on busy radio-channel mS : %% 1
Quiet Time on free radio-channel mS : %% 2
Wait for radio-channel-access Timeout Sec : %% 3
Radio-channel warmup time mS : %% 4
Transmission timeout Sec : %% 5
Wait for Holdup timeout Sec : %% 6
Radio-channel Holdup Time mS : %% 7
Radio-channel Shutup Time mS : %% 8
Radio-channel is kept busy by : %% 9
Current status of radio :
Radio-channel quiet time mS : %% 10
Radio-channel busy time mS : %% 11
1. During transmission, if “Channel busy” is detected, this parameter will determine the waiting time
(in msec) before forcing transmission onto a channel (even if the channel is still busy). Setting this
parameter to "0", will terminate the option.
2. Quiet channel period (in msec) before transmission. Setting this parameter to "0", will terminate the
waiting time and transmission will start immediately after the "free channel" detection.
3. Maximum waiting time (in msec) for available channel for transmission. If at the end of this period,
the channel is not available, the system provides a failure notice and the transmission attempts will
be terminated.
391
Software Diagnostics Output
4. Transmits a constant tone during this period (in msec), before data transmission starts.
5. The maximum time frame (in seconds) for data transmission. Transmission over this time will be
terminated, and a failure will be declared. The transmission always ends (normally or forced) with a
constant tone for holdup time.
6. During this period (in msec), the system allows the plug-in modem to transmit the contents of its
internal buffer, after the MOSCAD RTU has finished data transmission. It is not recommended to
change this parameter.
7. The amount of time (in msec) a constant tone transmission is continued after the end of transmission.
8. The minimum waiting time (in msec) between one frame transmission and the next. It is measured
from the end of the constant tone of the last transmission.
11. The amount of busy time on the radio, meaning Radio Tone Detect is active.
## 1502 LEVEL = 2
Trunk Radio Configuration parameters :
Is trunk radio configured ? : %% 1
No trunk-channel time before requesting TxEn (Low) : %% 2
No trunk-channel time before requesting TxEn (High) : %% 3
Quiet Trunk-channel time before requesting TxEn (High) : %% 4
TxEn-request PTT active time mS : %% 5
TxEn-request PTT non-active time mS : %% 5
Wait for trunk-channel-access timeout Sec : %% 6
Warmup trunk-channel time mS : %% 7
Transmission timeout Sec : %% 8
Wait for holdup timeout Sec : %% 9
Trunk-channel holdup time mS : %% 10
Trunk-channel shutup time mS : %% 11
Current status of trunk :
Trunk-channel quiet time mS : %% 12
Trunk-channel busy time mS : %% 13
Channel does not exist time mS : %% 14
Is txen active ? : %% 15
Is PTT pressed and txen requested ? : %% 16
Time remaining for PTT pressing or reset mS : %% 17
1. YES - Trunk has been defined in configuration. Radio transmissions are via trunk.
NO - Trunk not used (regular radio transmission).
2. When the channel does not exist, this parameter determines the allotted time (in msec), to ask for
TxEn (transmit enable). This parameter is relevant if one of the functions, TxWdth or TxIntr was
called with Tx_Lnk=1 (Tx_Lnk=LoTrnk or Radio).
3. When the channel does not exist, this parameter determines the allotted time (in msec), to ask for
TxEn (transmit enable). This parameter is relevant if one of the functions, TxIntr or TxWdth was
called with Tx_Lnk=11.
392
Software Diagnostics Output
4. When the channel exists and is quiet, this parameter determines the time (in msec) until asking for
TxEn (transmit enable). This parameter is relevant if one of the functions, TxWdth or TxIntr has
been called with Tx_Lnk=11 (Tx_Lnk=HiTrnk).
5. These two parameters, are used to determine the PTT active time (pressed) and PTT release time
after the transmit enable TxEn request (both in msec).
6. Maximum waiting time (in msec) for available channel for transmission. If at the end of this period,
the channel is not available, the system provides a failure notice and the transmission attempts will
be terminated.
7. Transmits a constant tone during this period (in msec), before data transmission starts.
8. The maximum time frame (in seconds) for data transmission. Transmission over this time will be
terminated, and a failure will be declared. The transmission always ends (normally or forced) with a
constant tone for holdup time.
9. During this period (in msec), the system allows the plug-in modem to transmit the contents of its
internal buffer, after the MOSCAD RTU has finished data transmission. It is not recommended to
change this parameter.
10. The amount of time (in msec) a constant tone transmission is continued after the end of transmission.
11. The minimum waiting time (in msec) between one frame transmission and the next. It is measured
from the end of the constant tone of the last transmission.
12. Period (in msec) during which the trunk channel was quiet (RxEn but no tone),
13. Period (in msec) during which a transmission took place in trunk (both tone and RxEn).
14. Period (msec) during which a trunk channel was not available (no RxEn).
17. If TxEn is requested: The time (in msec) remaining for re-pressing/releasing the PTT. If TxEn was
not requested, the value is 0.
• In order to begin transmission, the user should request TxEn from central unit. This is done by
pressing PTT for 4 msec. and releasing it for 5 msec. If someone else is transmitting, this request
interrupts the transmission, and therefore should be avoided.
• Access to channel is available in low priority and then the waiting time is 1 msec during which there
is no channel (RxEn is not active and no one is transmitting) until requesting TxEn (for transmitting).
If during this time someone receives permission to transmit, RxEn will become active and again the
user should wait for it to become inactive.
• Access to channel is also available in high priority and then the waiting time is either 2 msec, as
before, during which RxEn is not active until requesting TxEn, or 3 msec during which RxEn is active
and the channel is quiet (there is no Tone) before requesting TxEn.
393
Software Diagnostics Output
## 1503 LEVEL = 3
Control channel Configuration parameters:
Wait for control - channel - access timeout Sec : %% 1
Warmup control - channel time mS : %% 1
Transmission timeout Sec : %% 1
Wait for holdup timeout Sec : %% 1
Holdup control - channel time mS : %% 1
Shutup control - channel time mS : %% 1
Current status of control channel : 2
Is transmission enabled : %% : %% 2
1. The piggyback control channel access parameters used for its diagnostics and configuration. The
meaning of the parameters is the same as in Line, Radio or Trunk.
## 1504 LEVEL = 4
fskadp device - current state variables
Did plug - in modem fail test ? - %% 1
Is trunk radio configured ? - %% 2
Is channel monitor LED on ? - %% 3
Is driver waiting for CTS at grant state ? - %% 4
Is task suspended on Tx_start_1 ? - %% 5
Is task suspended on Tx_start_2 ? - %% 6
Is task suspended on hc11_end_of_Tx ? - %% 7
Current module state : %% 8
Time remaining for current state mS : %% 9
Current transmitted channel : %% 10
Current accessed channel : %% 11
Current channel quiet time mS : %% 12
Current channel busy time mS : %% 13
Trunk channel status :
How long does channel not exist mS : %% 14
Is transmission enabled ? (Is TxEn Active) : %% 15
Is PTT pressed when asking for TxEn : %% 16
How much time remains for PTT pressing or reset mS : %% 17
Next warmup will be performed on channel : %% 18
Next warmup will be performed with priority : %% 19
• General parameters of FSKADP (or DEVICE OCOM) module state. Notice that parameters related to
trunking are relavant if “ Is trunk radio configured” is set to “Yes”. :
3. Yes: LED, CM3 are on. (There is reception from one of the channels).
4. Yes: Waiting for CTS from piggyback, after completing Channel Access process, in order to begin
transmitting.
394
Software Diagnostics Output
7. Yes: OCOMM module is waiting for end of current piggyback transmission. (UART of CPU has
finished transmitting).
8. Transmission state: Init, Grant (executing Channel Access), Warmup (transmitting Tone) and so on.
10. The name of the channel that is currently being transmitted to.
12. The amount of time the current channel was quiet before transmission or channel access.
13. The amount of time the current channel was busy before transmission or channel access.
14. Period (msec) during which a trunk channel was not available (no RxEn).
17. If TxEn is requested: The time (in msec) remaining for re-pressing/releasing the PTT. If TxEn was
not requested, the value is 0.
19. Access priority of the channel that will execute Channel Access the next time. When executing
Channel Access the channel has priority. That is because the access to trunk channel can be in high or
low priority. Therefore when accessing other channels the following priorities are available: Conv.
Radio, Line , Sci (internal). When not accessing channel, this field shows “No Channel Access”.
## 1510
Transmission failure error counters
Number of times CTS signal was stuck : %% 1
Number of times channel was busy and could not be accessed : %% 2
Number of times transmission timeout occurred : %% 3
Number of times ‘Wait for Holdup’ timeout occured : %% 4
1. The number of times a channel was available for transmission (Channel Access ended successfully),
but piggyback did not enable the beginning of transmission (did not execute CTS). This can occur
because of hardware difficulties or because the transmission buffer was full for too long.
2. The number of times transmission failed because the channel was busy (Channel Access failed).
3. The number of times the transmission was stopped because it was too long.
4. The number of times the waiting for the end of piggyback modem transmission was stopped because
it took too long.
395
Software Diagnostics Output
GPS
## 1600
GPS module parameters
Heap key : %% 1
UART key : %% 2
Update System flags function pointer : %% 3
Read Ladder time offset function pointer : %% 4
Period to Get time from GPS [sec] : %% 5
Local offset to UTS time : %% mSec.%%:%%:%%6
Local offset time at Reserved Values Table : %% mSec 7
Last PPS occurred at : %% mSec.%%:%%:%% 8
Last PPS (before GPS - frame) occurred at : %% mSec.%%:%%:%%9
Time sent from GPS : %% mSec.%%:%%:%% 10
Date sent from GPS : %%...%%:%%:%% 11
Elapsed time from last PPS when saving it : %% mSec... %%:%%:%% 12
Time that GPS frame was encoded : %% mSec... %%:%%:%% 13
Current calculated local time : %% mSec... %%:%%:%% 14
Current calculated local date : %% :%%:%% 15
Is GPS connected to MOSCAD CPU ? : %% 16
Is GPS time valid ? : %% 17
Has GPS recovered from warm - restart : %% 18
The GPS module works with the GPS receiver, configures it, receives its satellite timings and updates the
DATE & TIME table accordingly. Works above UART.
2. Pointer to the UART key that transmits and receives with GPS.
4. Pointer to the function that returns time offset from System Values.
8. The MOSCAD time when there is an event 1pps (every second) from GPS.
9. When a frame is received, saves the last of the 1pps event time (what was in 8).
12. The amount of time that passed between frame receiving event to 9 (less than a second).
396
Software Diagnostics Output
13. When the GPS frame was encoded and calculated in local time. Because it is correct for 9, 10 is to be
added.
## 1601 LEVEL : 1
Current MOSCAD Time
Time in TICKS register : %% : %% : %% 1
Date in TICKS register : %% : %% : %% 2
Time in Real time Clock : %% : %% : %% 3
Date in Real time Clock : %% : %% : %% 4
Time in GPS receiver : %% : %% : %% 5
Date in GPS receiver : %% : %% : %% 6
Is GPS connected to MOSCAD CPU ? : %% 7
Is GPS time valid ? : %% 8
1. The MOSCAD time (updated only if clocks have been updated or the update is from GPS).
9. This is the flag that is set to YES whenever there is a 1pps interrupt from GPS. Subsequently
MOSCAD changes it to NO in order to diagnose whether GPS disconnected. If receiving reception
timeout of 2 sec and this flag is NO, the system knows that the GPS has been disconnected and will
wait for reconnection, and then it will reconfigure it. If a timeout occurred and the flag is set to YES,
GPS is connected and therefore will try to receive again. Therefore this flag varies according to
system needs and does not really indicate whether GPS is connected or not.
397
Software Diagnostics Output
## 1610
GPS statistical information
How many 2 seconds timeout occurred during reception ? : %% 1
How many valid frames were received : %% 2
Number of invalid frames received (total) : %% 3
Number of received frames that got timeout in the middle : %% 4
Number of received frames with size less than 4 chars : %% 5
Number of received frames that got invalid 2 prefix bytes : %% 6
Number of received frames that got invalid 2 opcode bytes : %% 7
Number of received frames with length more than required : %% 8
Number of received frames that got invalid 2 suffix bytes : %% 9
Number of received frames that got invalid checksum : %% 10
Number of frames that were handled long time after pps : %% 11
How many valid frames were received with error status byte ? : %% 12
1. The number of two second timeouts during which no frame was received from GPS.
2. The number of times a valid frame was received from GPS.
3. The number of times an invalid frame was received from GPS.
4. The number of times a timeout was received during reception of a frame.
5. The number of times the frame was too short.
6. The number of times the frame had an invalid prefix.
7. The number of frames that had an invalid opcode.
8. The number of frames that were too long.
9. The number of frames that had an invalid suffix.
10. The number of frames that had an invalid checksum.
11. The number of frames that were received after their 1pps time (more than a second).
12. The number of frames that were supposedly valid, but their status determined that they were not
satellite times.
CAPPL
## 1650 LEVEL = 0
The ‘C’ application Block ID : %% 1
The address of our jump-table to access the aplic : %% 2
Number of ‘C’ blocks in the flash (chain) : %% 3
Number of relevant ‘C’ blocks : %% 4
Number of expected ‘C’ functions : %% 5
Number of found ‘C’ functions : %% 6
1. The block number that is designed for programming the ‘C’ application, in this case 10. For every
type of item that is programmed into the site there is a set block ID.
398
Software Diagnostics Output
2. The address of the Jumptable that coordinates between the ‘C’ application and the system services in
the RTU. The purpose of the Jumptable is to enable linkage during Runtime.
3. The number of ‘C’ blocks currently found in the flash.
4. The number of active ‘C’ blocks currently found in the flash.
5. The number of functions expected by the Ladder.
6. The number of functions that are currently found and with them linkage was executed in Runtime.
## 1651 LEVEL = 1
Expected Functions.
Func Func
Index Name
------ -----
• The list of functions expected by the Ladder and their names, as they appear in the flash after
download of the Ladder and/or C block.
## 1652 LEVEL = 2
List of the relevant blocks (starting from 1)
Block Num RAM Address
---------- ------------
• The list of the active blocks in the flash and their RAM addresses (all globals and statics).
## 1653 LEVEL = 3
Func Block Block Block Func
Addr RAM RAM Size Number Name
----- ----- -------- ------ -----
• The list of functions, their address in flash, the Block RAM beginning address, its size in RAM, the
block number and their names.
• In case the function is not found then it points to an empty function address in the system and is
marked block = 0. These values are useful when debugging the application.
## 1654 LEVEL = 4
Block Block Block Block Block User RAM RAM Lib
Cntr Ver Status Address len JT Size Address JT
----- ----- ------ ------- ----- ---- ---- ------- ---
• The list of all the blocks in flash (either active or not), the version of the block, the status of block
(active or not), the address of the block, and length of the block, (the size of the whole block without
the header). the address of the user’s Jumptable, and the amount of RAM needed by the block,
address of RAM needed and address of the library (system) Jumptable.
399
Software Diagnostics Output
## 1655 LEVEL = 5
Func Block Func
Addr RAM Name
----- ------ ----
• The list of all of the functions expected by the Ladder including the memory address and the RAM
beginning address for each function. The global static variables are relative to the RAM beginning
address.
## 1730 LEVEL = 0
Start of SFlash : %% 1
Last Flash address : %% 2
Num of segments : %% 3
Num of regions : %% 4
Max Prog Wait (mics) : %% 5
Max Erase Wait (mics) : %% 6
Max Suspend Time (mics): %% 7
Max Erase Time Secs : %% 8
Max Prog Time (mics) : %% 9
3. Number of Segments.
4. Number of Regions.
7. Maximum time (# of microseconds) to suspend the task which programs the flash memory.
## 1731 LEVEL = 1
Num of segments: %%
Start_Seg End_Seg Region Boot?
• In what region is the segment? ( System region is 0 and User region is 1).
400
Software Diagnostics Output
## 1732 LEVEL = 2
Num of Regions: %% Chip Information
Num_ Chip_ Elt_ ID_ ID_
Chips Width Size Manu Dvc
## 1733 LEVEL = 3
Num of regions: %% Routines in RAM:
Erase Program Read_ID Busy_Wait_Micro
• Z corresponds to the I/O Module Type selected in Site Configuration, I/O, i.e. A (analog input), E
(electrically energized), M (mixed I/O), D (discrete input), R (relay ).
## 2000 LEVEL = 0
MOSCAD-L DI Init:
## 2001 LEVEL = 0
MOSCAD-L RO Init:
## 2002 LEVEL = 0
MOSCAD-L AI : no_eoc_err_cnt : %%, is_normal_calibration : %%
401
Software Diagnostics Output
## 2003 LEVEL = 1
MOSCAD-L AI Init: verno : %%, ai_analog_range : %%,
ai_ioclk : %%, ai_filter_rank : %%, is_temperature : %%,
is_m20not4 : %%, is_ai_ref_val : %%
## 2004 LEVEL = 0
MOSCAD-L MOD Init: dly : %%, freeze_input : %%, freeze_output : %%,
relays_1_8 : %%, relays_9_16 : %%
## 2005 LEVEL = 0
MOSCAD-L ALL Init: ac_range.max : %%, ac_range.min : %%,
ser_clk_div : %%, ro_wdt : %%, pw : %%, ref : %%,
io_frequency : %%, ac_div : %%
## 2006 LEVEL = 0
MOSCAD-L SPI Init: spi_mod : %%, idle : %%, rx_pol : %%,
tx_pol : %%, phase : %%
## 2007 LEVEL = 0
MOSCAD-L EE Contents:
## 2013 LEVEL = 0
MOSCAD-L CTRL : batt_level (static) : %%
## 2014 LEVEL = 1
MOSCAD-L CTRL : batt_level (in hardware) : %%
402
Software Diagnostics Output
## 2020 LEVEL = 0
GAUart 's Hardware Internal Registers :-
------------------------------------------
Internal software data (key) (DATA) : %% 1
General Status Register (GSR) : %% 2
General reset Register (GRR) : %% 3
Events Register (ER) : %% 4
Events Mask Register (EMR) : %% 5
Max idles Register (MX_IDL) : %% 6
Close Character : %% 7
baud rate read register low (BRR_L) : %% 8
baud rate read regiaster high (BRR_H) : %% 9
Mode register (MR) : %% 10
control 1 register (CC1) : %% 11
control 2 register (CC2) : %% 12
external pins register : %% 13
Receive Ready control Register(RR_x) : %% 14
Receive Status control Registe(RS_x) : %% 15
transmit control register (TC_x) : %% 16
Receive Ready control Register(RR_x) : %% 17
Receive Status control Registe(RS_x) : %% 18
transmit control register (TC_x) : %% 19
1. Device key.
4. Events Register.
7. Close Character
403
Software Diagnostics Output
## 2021 LEVEL = 1
GAUART's Software descriptors :-
--------------------------------------
Head (offset) software receive descriptor: %% 1
tail (offset) software receive descriptor: %% 2
Head (offset) software transmit descriptor: %% 3
tail (offset) software transmit descriptor: %% 4
empty software receive descriptor: %% 5
ready software receive descriptor: %% 6
empty software transmit descriptor: %% 7
ready software transmit descriptor: %% 8
404
Software Diagnostics Output
##2022 LEVEL = 2
GAUART's Internal RAM data-Device Key :-
------------------------------------------
Current mode parameters (MODE_BACKUP): %% 1
Current rate parameters (RATE_BACKUP): %% 2
Current sync parameters (SYNC_BACKUP): %% 3
Address mask parameters (MASK_BACKUP): %% 4
Address data parameters (ADRS_BACKUP): %% %% %% %% 5
Current channel's name (CHAN_BACKUP): %% 6
Current channel's data (CHAN_DATA) : %% 7
Current channel's code (CHAN_CODE) : %% 8
Current heap's name (HEAP_BACKUP): %% 9
Current heap's name (HEAP_DATA) : %% 10
Current heap's data (HEAP_CODE) : %% 11
Current channel's port (GAUART_PORT): %% 12
Reception data lock (RXBD_LOCK) : %% 13
Transmission data lock (TXBD_LOCK) : %% 14
Reception data head (RXBD_HEAD) : %% 15
Transmission data tail (TXBD_TAIL) : %% 16
Communication signals (GAUART_SIGNAL): %% 17
Communication buffers (GAUART_TYPE) : %% %% 18
Communication uart lock (GAUART_LOCK) : %% 19
Communication time lock (TIME_LOCK) : %% 20
Communication time data (TIME_DATA) : %% 21
Communication status (NOISY): %% 22
(QUIET): %% 23
Communication preset/timers (GRANT): %% %% 24
(QUIET): %% %% 25
4. Not relevant.
5. The addresses to which this site will respond through this port.
9. Heap name.
405
Software Diagnostics Output
24. GRANT-TIME for channel access: The time the site will wait to obtain a transmission channel until
it decides that a channel is not available.
## 2040 LEVEL = 0
Index Name Pointer
----- ----- -------
All saved names and pointers to blocks used until now. The names are created with the function
MOSCAD_bind_name()and pointers are created with MOSCAD_get_named_ptr() for the purpose of
keeping historical data on the block.
SITTBL
## 2060 LEVEL = 0
Dynamic Site-Table :
Index ID Link ComFal
----- ---- ---- ------
The Dynamic Site Table as determined by C functions such as init_site_table(), new_site_table(), and
Set_site_table(). Includes Site ID, Link ID, and status of the ComFal bit.
## 2061 LEVEL = 1
Static Site-Table :
Index ID Link ComFal
----- ---- ---- ------
The Site Table as defined in the Ladder of the Application Programmer. Includes Site ID, Link ID, and
status of the ComFal bit.
406
Software Diagnostics Output
IPLINK LINxL
## 2200 LEVEL = 0
Iplink device key
--------------------
Heap key : %% 1
Network key : %% 2
Network pin table : %% 3
Site ID : %% 4
Link ID : %% 5
IP port number : %% 6
IP address : %% 7
Enable RCP : %% 8
Port is in Fail : %% 9
Group IP address : %% 10
All RTU Simulation: %% 11
Enable IPModem : %% 12
Learn IP Address : %% 13
Check failed sites : %%14
Max echoes to send : %%15
Max sec between echoes: %%16
Max sec to check alive: %%17
When Port is defined as MDLC Over IP (Astro, iDEN,Tetra, Terminal server or Standard Modem).
3. A pointer which allows “cabling” between two devices during run time.
4. Site ID.
5. Link ID.
9. Status of Link.
11. YES if the Addr. range response for 'All RTU simulation' (Network Layer Advanced Parameter) was
set to non zero.
13. YES if the port’s IP address will be retrieved during run time, e.g. from the iDEN modem.
14. YES if the sites that are failed will be checked before transmitting to them. If the site does not reply,
transmissions will be routed to an alternative path (if such exists.) A site is considered failed when
407
Software Diagnostics Output
transmission to it results in an ICMP:Dest Unreach error message, or when the ‘check alive’ test
fails. Use of this parameter makes MLDC over IP more reliable when transmitting to failed sites.
15. If ‘Check failed sites’ is YES, this specifies the number of retries of the ‘check alive’ test to the
failed site, before the message is routed to an alternative path (if such exists) and asserting that it is
still failed.
16. If ‘Check failed sites’ is YES, this specifies the timeout in seconds between retries of the ‘check
alive’ test.
17. If ‘Check failed sites’ is YES, this specifies the timeout in seconds in which no message was
received from a site before declaring it as unknown. Any new transmission to the site will first cause
a ‘check alive’ test as explained above. This parameter is extends the ‘check alive’ test to sites
which are not failed, but have been idle for some time. If this parameter is set to 0, no ‘check alive’
test will be performed for idle sites.
## 2201 LEVEL = 1
Iplink socket status
---------------------
Socket number : %%
Socket state : %%
Socket timeout : %%
Socket open latest result : %%
Socket send latest result : %%
Socket recv latest result : %%
Status of the socket on the link. For system software developers only.
## 2202 LEVEL = 2
Iplink status
--------------------------
Queue size : %%1
Is transmission thread waits for new buffer : %%2
If transmission thread waits for socket to be opened : %%3
Is transmission thread waits for socket to transmit data : %%4
Is reception thread waits for socket to received new data : %%5
Last transmitted site ID : %%6
Last transmitted IP address : %%7
Last received site ID : %%8
Last received IP address : %%9
2. Not relevant.
3. Not relevant.
4. Not relevant.
5. Not relevant.
408
Software Diagnostics Output
## 2203 LEVEL = 3
Iplink conversion table
------------------------
Maximum entries allowed : %%1
Number of actual entries : %%2
Next entry for setcall : %%3
3. Not relevant.
• Site ID
• IP Address
• Echo Send Number of polls sent to site during check alive test.
• Average Delay Each poll bears the site timestamp. When the site replies, an average delay is
recalculated.
• Failed time[sec] Time in seconds from which the site was first declared as failed.
• Echo left An xx/yy where xx notes number of polls left and yy represents the number of seconds
remaining until the next poll. If xx is 0, then yy denotes the number of seconds remaining until the
‘check alive’ test (see parameter 17 in #2200 above.)
409
Software Diagnostics Output
1. Not relevant.
4. Not relevant.
5. Not relevant.
6. Not relevant.
7. Not relevant.
9. Not relevant.
10. Number of times that a radio control frame could not be processed (Astro Spectra only).
11. Number of times that a radio data frame could not be sent to the network, usually because the
network is busy (Astro Spectra only).
410
Software Diagnostics Output
14. Reason for failure to push received radio data frame to network (as in 11 above.)
15. Number of times transmission was attempted to a destination site with the same IP address as the
RTU. As a result, transmission failed.
16. Number of times an ICMP:Host Unreachable message was received after transmission. As a result,
destination site has become failed.
18. Number of valid MDLC frames received from peer MOSCAD sites that could not be processed by
the RTU. This is because of an MDLC version mismatch. The message has been reported back to the
peer site.
19. Last peer Site ID to have sent a message that could not be processed. The message has been reported
back to the peer site.
20. The number of times that transmission failed because the queue was full. This prevents over-
consuming MDLC heap resources when transmitting large blocks of data.
21. The number of times that synchronization was transmitted to all sites.
23. The number of times that data was transmitted to a site which is either failed or its status is currently
unknown. Usually a site like this is polled before transmitting, but in order to free heap resources,
data was transmitted to it and may have been lost. (relevant only when Check failed sites is set to
YES in #2200 parameter 17)
26. Number of polls sent to other sites. (includes both 2 and 24)
411
Software Diagnostics Output
SLIP LINxSlp
## 2300 LEVEL = 0
Slip port parameters
---------------------
formater key : %%1
port mode : %%2
port rate : %%3
port from : %%4
port flow control : %%5
Is device down : %%6
Is char being received : %%7
Is driver wait during transmission: %%8
Char that is being received : %%9
Has device went up ? : %% 10
Is driver being stopped ? : %% 11
Is reception from port being held? : %% 12
Is driver PPP ? : %%13
Maximal no reception time to declare disconnect [sec]: %%14
Time elapsed since last Slip/PPP reception [sec] : %%15
Is driver being stopped : %%16
Is driver being started/connected : %%17
Last error when started driver (HEX) : %%18
Is disconnected driver on ? : %%19
Was AT response been received when driver was up ? : %%20
Send optional String : %%21
Is driver being freezed ? : %%22
1. Not relevant.
2. Not relevant.
4. Not relevant.
6. Not relevant.
7. Not relevant.
8. Not relevant.
9. Not relevant.
Note: 11 and 12 are YES when initializing modem (e.g. iDEN) using AT commands.
412
Software Diagnostics Output
14. Timeout in seconds in which no data was received and disconnecting/reactivating SLIP/PPP.
15. Time elapsed in seconds since the last received SLIP/PPP data from port.
20. Was an AT response noted when receiving data in SLIP/PPP mode? An AT response can be
ERROR, +CME ERROR, AT, ATH, etc. It indicates that the modem has moved to command mode
and therefore the driver needs to be disconnected.
## 2301 LEVEL = 1
PPP Status
---------------
LCP Layer Status: %%1
IPCP Layer Status: %%2
PAP Layer Status: %%3
CHAP Layer Status: %%4
PPP State
---------------
LCP Layer State: %%5
IPCP Layer State: %%6
PAP Layer State: %%7
CHAP Layer State: %%8
413
Software Diagnostics Output
5. Not relevant.
6. Not relevant.
7. Not relevant.
8. Not relevant.
16. PPP Protocol compression option of myself/peer and negotiated one. 1 if this is required.
17. PPP Address compression option of myself/peer and negotiated one. 1 if this is required.
19. TCP header compression protocol of myself, peer and negotiated one.
20. TCP header compression maximal slot of myself, peer and negotiated one.
21. TCP header compression slot of myself, peer and negotiated one.
414
Software Diagnostics Output
## 2302 LEVEL = 2
PPP log information
-------------------
Last protocol received : %%1
LCP protocol received : %%2
LCP code received : %%3
LCP id received : %%4
LCP message length : %%5
LCP message received : %%6
Time received last LCP : %%7
Number of Nak received : %%8
Number of Rej received : %%9
415
Software Diagnostics Output
2. Not relevant.
416
Software Diagnostics Output
417
Software Diagnostics Output
1. Number of frames successfully sent from the RTU to the Radio/Link over SLIP line.
2. Number of frames unsuccessfully sent from the RTU to the Radio/Link over SLIP line.
418
Software Diagnostics Output
5. Not relevant.
7. Number of rejected transmissions of datagrams when the driver was paused. The driver is paused
when initializing modem (e.g. iDEN) using AT commands.
10. Number of times got AT response (such as ERROR, +CME ERROR, AT, ATH) when Slip/PPP was
connected. This denotes a modem error, which forces RTU to disconnect Slip/PPP.
14. Number of times failed alloc LCP message. Denotes lack of internal resources.
15. Number of times failed alloc IPCP message. Denotes lack of internal resources.
17. Number of times bad PPP frames with invalid CRC received.
19. Number of times failed to obtain an IP Address from the modem when connecting.
20. Number of times got bad ICMP message from the modem (with source IP Address 0). (Tetra bug)
21. Number of bytes currently available in internal heap for TCP/IP stack (sockets/PPP, etc.)
22. Last time received Slip/PPP message from port. Relevant when driver is connected or trying to
connect.
25. Last time transmitted Slip/PPP message from port. Relevant when driver is connected or trying to
connect.
419
Software Diagnostics Output
## 2398
PPP is not created on this port
User has tried issue level 1 or 2 for SLIP port (##2301 or ##2302). Port is not PPP.
## 2399
PPP was not initialized yet try again later
User has tried issue level 1 or 2 for PPP port (##2301 or ##2302). Port is still initializing and cannot
provide data. Try again later.
IPLINK LINxL
1. IP address of radio.
3. If radio is encrypted, this parameter will be Yes. If radio is in clear, this parameter will be No.
1. If RTU is configuring radio (radio startup, RTU startup or when making connection), this will be yes.
In this case, the data will remain pending until it can be transmitted.
2. Whether the configuration of the radio has failed. If so, data cannot be transmitted by way of the
link/radio.
7. Whether data service is unavailable (This might be the reason for failure to register in infrastructure.)
8. Whether network is unreachable (This might be the reason for failure to register in infrastructure.)
9. Not relevant.
Not relevant.
421
Software Diagnostics Output
Indicates if there is a contradiction between the radio’s actual encryption mode and the encryption mode
according to the RTU.
3. Number of replies from the radio (should match the number of requests.)
6. Number of reports from the radio which cannot be deciphered by the RTU.
13. Number of messages received from radio that ICMP Network is unreachable.
14. Number of Acknowledgements from the infrastructure on message that were sent.
422
Software Diagnostics Output
1. YES if the port’s IP address is to be retrieved during run time, e.g. from iDEN modem.
6. The subnet mask address of the modem’s configured RTU as stored in the modem.
7. The home agent configured for the modem (to be used as the RTU’s default IP address.)
11. Timeout in milliseconds to wait for the modem to succeed in registration (if needed) and go online.
12. Timeout in milliseconds to wait for the modem to be configured. To be used when transmitting while
the modem is being configured. If this time elapses, transmission will fail. Refer to Modem
configuration timeout parameter in the Site Configuration Advanced Link Layer.
423
Software Diagnostics Output
13. Optional AT command string to send to modem before dialing. Used by the RTU to override default
settings in the modem. Refer to technical support if needed.
14. Radio sampling time in milliseconds that RALP will poll the radio registration status. Relevant only
if RALP is enabled.
15. Device to which the RTU is connected (iDEN,Tetra, Standard Modem, or Null Modem).
16. YES, if the RTU should disconnect Slip/PPP when getting an ICMP:Destination Unreach message.
17. YES, if the modem supports abort sequence. An abort sequence is +++ issued after a pause of 1
second and followed by another pause of 1second. If YES, the modem should switch to command
mode when this sequence is issued by the RTU. The modem may or may not disconnect from PD
channel. Tetra or Novatell (CDPD) for example do not support it, but most modems do (for example
iDEN or G18).
18. Never, if CD is being polled constantly. This includes the time while Slip/PPP is being connected and
when the connection is established. When CD drops, the modem will be disconnected by the RTU.
Always, if CD is never checked. It is assumed that it is active all the time, so its state does not denote
Slip/PPP state.
When connecting, if CD is ignored during Slip/PPP connection but polled when connection is
established.
19. Maximal Rx idle time to disconnect in seconds. If no data is received from the port for this period of
time, Slip/PPP will be disconnected. If this parameter is 0, it will never be checked.
1. YES if modem is in the process of being configured. In this case, it operates in command mode, and
it cannot transmit data.
2. Connected and Registered should be displayed if the modem is online. In online mode, the modem
can transmit data.
3. YES if the CD pin is active. If YES, the modem is connected and is in online mode.
424
Software Diagnostics Output
6. If last modem configuration failed, display the reason for the failure.
7. The last AT command which was sent to the modem when configuring it.
8. If modem configuration has failed, display the last response from the modem that caused this failure
(No Response if there was none).
9. Time in milliseconds that it took to configure the modem last time. Relevant only if modem
configuration has succeeded. Note that it does not denote the actual time the modem has been in
command mode, just the last cycle.
11. Marks the time that last started to configure the modem. Along with 9, this denotes the time Slip/PPP
has been reconnected.
12. The last command sent to the modem causing it to fail and issue parameter 6.
1. Time in milliseconds to wait for a response from the iDEN modem to a RALP command. Refer to
Modem diagnose reply timeout parameter in the Site Configuration Advanced Link Layer.
5. YES if the modem has enabled RALP communication with the RTU.
425
Software Diagnostics Output
1. Modem status.
2. Modem type.
426
Software Diagnostics Output
The parameters are obtained via RALP from modem. Only the important parameters are described
below:
2. Number of messages sent over the air towards the MDG/iDEN system. Not including the number of
retries in #3 and 4.
3,4. Number of retries for messages sent over the air towards the MDG.
5. Number of messages received from the MDG. Not including the number of retries in #6.
10. Number of bytes received over the air from the MDG.
All other parameters denote communication problems over the air. Contact system
administrator/technical support if not 0.
Note: After executing diagnostics, these parameters are reset in the modem.
Refer to iDEN documentation such as iDEN Protocol Manual 68P81129E10-B for an explanation of the
LAPi protocol and meaning of parameters.
427
Software Diagnostics Output
1. Number of datagrams transmitted by the RTU to the modem including RALP/diagnostics of the
modem as well as over the air data.
3. Number of valid datagrams received over the air from the MDG.
4. Number of valid datagrams transmitted by the RTU to the modem including RALP/diagnostics of
modem as well as over the air data.
6. Size of largest datagram sent to the RTU. Datagram may be either MDLC data or RALP diagnostics.
7. Size of largest datagram sent over the air to the MDG/iDEN system. (data only)
9. Number of valid UDP datagrams received in the modem from the RTU or from the MDG. This does
not include the RTU’s over the air data.
10. Number of valid UDP datagrams discarded by the modem. This does not include the RTU’s over the
air data.
11. Number of UDP datagrans sent by the modem (usually RALP) towards the RTU. This does not
include the RTU’s over the air data.
12,13,14. Number of times succeeded, denied, and retried mobile IP registration with the MDG.
Note: After executing diagnostics, these parameters are reset in the modem.
428
Software Diagnostics Output
2. Color code.
3. Carrier code.
1. Number of times CD became inactive, e.g. the modem was disconnected or went offline (command
mode).
3. Number of times the modem was online and got deregistered from the infrastructure.
4. Number of times the configuration timeout elapsed. This may happen when configuration takes
longer than the time specified by the user in the Modem configuration timeout parameter in the Site
429
Software Diagnostics Output
Configuration Advanced Link Layer. If data was transmitted while the modem was being configured,
that data may have been lost.
6. Number of times that configuration failed. When failed, the RTU keeps reconfiguring the modem in
cycles until it succeeds. This number denote how many configuration cycles have failed.
7. Number of times the RTU failed to register the modem because it is not data packet capable. (The
modem is probably not registered in the infrastructure database.)
9. Number of times the RTU deregistered and reregistered the modem by force.
10. Number of times the RTU restarted the modem (usually because of registration problems).
11. Last event that caused the port to be failed: Modem configuration failed, or modem became
deregistered from the infrastructure.
14. Number of times the Slip/PPP connection was disconnected because it failed to respond for RALP
requests. Relevant for iDEN.
16. Number of times failed to issue ATH (disconnect) command to modem (there was no response).
Note: Activating this message with level 110 will reset these parameters.
430
Software Diagnostics Output
3. Number of times aborted RALP when waiting for a reply from the modem.
4. Number of times a response was received for RALP requests from the modem.
5. Number of times unsolicited alarms weres received from the modem (registration/software etc).
9,10,11- Number of software alarms received from the modem, and specific parameters of the last one
received.
12,13,14,15. Number of registration alarms received from the modem, and specific parameters of the last
one received.
16. Number of times an alarm was received denoting that a RALP request was invalid.
17. Number of times invalid messages were received via RALP socket from the modem.
18. Number of times that responses which were received from the modem were ignored.
19. Number of times that alarms which were received from the modem were ignored.
20. Number of times the modem failed to execute a RALP request sent from the RTU.
431
Software Diagnostics Output
When a Standard Modem is used, this level shows obtained variables as set in the downloadable IP
Modem file.
The Variable column shows the variable name, and the Value column shows its contents.
##2598
Failed communicate with radio
Indication that communication with radio has failed. (Occurs when response from the radio times out.)
##2599
Communication with radio already in progress - please try again
Occurs when configuring modem, and it cannot be diagnosed using RALP over SLIP (SLIP has not been
initiated).
##2700 LEVEL = 0
Dmap27 information :
Partner site :%%1
Net key :%%2
Link key :%%3
Imap27 key :%%4
432
Software Diagnostics Output
433
Software Diagnostics Output
##2750 LEVEL = 0
**********************
* MPT1327 DEVICE KEY *
**********************
---------------------------
sync part of the data table
---------------------------
sync_mode (hdlc mode) : %%1
sync_rate (data rate) : %%2
sync_chan_backup_ptr (pointer to channel device name): %%3
sync_chan_data_ptr (pointer to channel device data): %%4
sync_signal (sync communication signal) : %%5
sync_time_lock (sync SYNCRONIZATION latch lock): %%6
sync_time_data (sync SYNCRONIZATION latch data): %%7
sync_holdup_time (replaces the holdup parameter in the radio model):%%8
sync_max_tx_empty_wait (max time to wait until TXD_EMPTY will occur):%%9
sync_rts (sync RTS mode automatic "0" or on "1" ):%%10
sync_sync_delay (syncs Channels Delay in Msec Units): %%11
----------------------------
async part of the data table
----------------------------
async_rate (CONTROL RATE) : %%12
async_signal (async communication signal) : %%13
async_mode (ASYNC MODE) : %%14
async_tx_grant (ASYNC tx grant): %%15
------------------------------
general part of the data table
------------------------------
sync (Number of idles to close reception): %%16
working_mode (SYNC_MODE "1" or ASYNC_MODE "0" ) : %%17
channel_valid_flag (channel open "1" channel close "0"): %%18
heap_data_ptr (pointer of heap device data): %%19
mask_backup (mpt1327 communication device mask) : %%20
syst_backup (mpt1327 communication device syst) : %%21
unit_backup (mpt1327 communication device unit) : %%22
null_backup (mpt1327 communication device null) : %%23
user_backup (mpt1327 communication device user) : %%24
sync_max_rx_quiet (max rx quiet): %%25
434
Software Diagnostics Output
8. Sync holdup time. Replaces the holdup parameter in the radio model. Its purpose is to set holdup
time in the transmit mechanism.
13. Signal parameter, contains the status of the system (UART mode).
14. UART mode register values (later on downloaded to SCM1 (Mode register)).
18. This parameter indicates if the voice channel is open or not (channel open="1" channel close="0").
The following parameters are received from the link layer and stored here for backup; They are used in
the change mode routine.
435
Software Diagnostics Output
##2751 LEVEL = 1
******************************
* MPT1327 hardware registers *
******************************
CURRENT MODE (from device key) : %%1
ASYNC_MODE=0 , SYNC_MODE=1
*****************************
* PORT A REGISTERS (PORT 3) *
*****************************
PACNT (PORT A Control register) : %%8
ASYNC_MODE = 0373 h
SYNC_MODE = 0373 h
The contents of each hardware register are shown. For each register, the preset value is displayed
for both ASYN (MAP27) and SYNC (HDLC) modes. The user should verify the current state of
the system (Async or Sync) before comparing the contents of the register to one of the preset
values.
1. CURRENT MODE of operation.(ASYNC_MODE=0 , SYNC_MODE=1)
436
Software Diagnostics Output
8. PACNT (PORT A Control register parameters) (See MC68302 Manual Page 3-33)
9. PADDR (PORT A Direction register parameters) (See MC68302 Manual Page 3-35)
##2752 LEVEL = 2
********************************************
* MPT1327 SPECIFIC PARAMETERS (ASYNC MODE) *
********************************************
MAX_IDL (Maximum IDLE Characters (Receive)) : %%1
IDLC (Temporary Receive IDLE Counter) : %%2
BRKCR (Break Count Register (Transmit)) : %%3
---------------------------------------------------
PAREC (Receive Parity Error Counter) : %%4
FRMEC (Receive Framing Error Counter) : %%5
NOSEC (Receive Noise Counter) : %%6
BRKEC (Receive Break Condition Counter) : %%7
---------------------------------------------------
UADDR1 (UART ADDRESS Character 1) : %%8
UADDR2 (UART ADDRESS Character 2) : %%9
---------------------------------------------------
RCCR (Receive Control Character Register): %%10
CHARACTER1 (CONTROL Character 1) : %%11
CHARACTER2 (CONTROL Character 2) : %%12
CHARACTER3 (CONTROL Character 3) : %%13
CHARACTER4 (CONTROL Character 4) : %%14
CHARACTER5 (CONTROL Character 5) : %%15
CHARACTER6 (CONTROL Character 6) : %%16
CHARACTER7 (CONTROL Character 7) : %%17
CHARACTER8 (CONTROL Character 8) : %%18
437
Software Diagnostics Output
##2753 LEVEL = 2
*******************************************
* MPT1327 SPECIFIC PARAMETERS (SYNC MODE) *
*******************************************
C_MASK_L (Constant see book) : %%1
C_MASK_H (Constant see book) : %%2
TCRC_L (Temp Trasmit CRC low) : %%3
TCRC_H (Temp Trasmit CRC High) : %%4
---------------------------------------------------
DISFC (Discard Frame Counter) : %%5
CRCEC (CRC Error counter) : %%6
ABTSC (Abort Sequence Counter) : %%7
NMARC (Nonmatching Address Received Counter : %%8
RETRC (Frame Retransmission Counter) : %%9
---------------------------------------------------
MFLR (Max Frame Length Register) : %%10
MAX_cnt (Max Length Counter) : %%11
---------------------------------------------------
HMASK (User-Defined Frame Address MASK) : %%12
HADDR1 (User-Defined Frame Address) : %%13
HADDR2 (User-Defined Frame Address) : %%14
HADDR3 (User-Defined Frame Address) : %%15
HADDR4 (User-Defined Frame Address) : %%16
Mode of operation : %% 1
TimeAuth device key (HEX) : %% 2
TimeAuth handle : %% 3
Authentication stamp offset : %% 4
438
Software Diagnostics Output
20. Offset of Authentication stamp within the buffer for authenticated SYNC frames only.
439
Software Diagnostics Output
##2754 LEVEL = 3
*******************************
* MPT1327 DESCRIPTORS STATUS *
*******************************
RECEIVE INDEX (RECEPTION INDEX) : %%1
TRANSMIT INDEX (TRASMITION INDEX) : %%2
-----------------------------------------------
RECEIVE ! STATUS ! LENGTH ! BUFFER
-----------------------------------------------
(RXBD0) : %% ! %% ! %%3
(RXBD1) : %% ! %% ! %%4
(RXBD2) : %% ! %% ! %%5
(RXBD3) : %% ! %% ! %%6
(RXBD4) : %% ! %% ! %%7
(RXBD5) : %% ! %% ! %%8
(RXBD6) : %% ! %% ! %%9
(RXBD7) : %% ! %% ! %%10
----------------------------------------------
-----------------------------------------------
TRANSMIT ! STATUS ! LENGTH ! BUFFER
-----------------------------------------------
(TXBD0) : %% ! %% ! %%11
(TXBD1) : %% ! %% ! %%12
(TXBD2) : %% ! %% ! %%13
(TXBD3) : %% ! %% ! %%14
(TXBD4) : %% ! %% ! %%15
(TXBD5) : %% ! %% ! %%16
(TXBD6) : %% ! %% ! %%17
(TXBD7) : %% ! %% ! %%18
----------------------------------------------
3. #3-#10 Receive descriptors (See MC68302 Manual Pages 4-66 to 4-70, 4-88 to 4-91.)
4. #11-#18 Transmit descriptors (See MC68302 Manual Pages 4-71 to 4-80, 4-92 to 4-96.)
440
Software Diagnostics Output
6. Counter which measures if the Async receive descriptors are full. This number should be zero. If
not, there might be a problem with the values of the radio’s timers. This should be checked
using the RSS of the radio)
7. Counter which measures if the Async transmit descriptors are full. This number should be zero. If
not, there might be a problem with the values of the radio’s timers. This should be checked
using the RSS of the radio)
IMAP27
##2800 LEVEL = 0
Imap27 information :
Map27 state :%%1
IMap27 mode :%%2
Link ready :%%3
##2801 LEVEL = 1
Imap27 States information :
Map27 state :%%1
IMap27 mode :%%2
Init done :%%3
Initiator bit :%%4
Warmup done :%%5
New convtable :%%6
Link ready :%%7
Failed transmit frame:%%8
Last site id :%%9
Last imap27 addr :%%10
Max txpacket size :%%11
Last txpacket size :%%12
Initiator hang count :%%13
Responder hang count :%%14
Hang count :%%15
Retry hang count :%%16
Initiate dial count :%%17
Connect2Start tx wait:%%18
Last transmitted Map27 frame:19
441
Software Diagnostics Output
4. Indication that this site is the initiator of the call. (1 = yes, 0 = no)
5. Indication that the IMAP27 warmup process was done (dialing). (1 = yes, 0 = no)
6. Indication that a new MAP27 (to Site ID) conversion table exists.
8. Indication that the attempt to transmit a frame in MAP27 protocol has failed. (1 if failed, 0 if
succeeded)
10. Last MAP27 address that the RTU was talking to.
18. Time interval between “connected” message to the transmit begin, in order to overcome MPT1327
signaling delays.
##2802 LEVEL = 2
Map27 address convert table:
Number of entries in table :%%1
Location of current entry :%%2
Site ID Ident Prefix
======= ===== ======
%%3 %%3 :%%3
442
Software Diagnostics Output
12. Number of times the call (line) was cleared during the call or at the end.
16. Number of times failed to get a new buffer for MAP27 protocol usage.
443
Software Diagnostics Output
DESx
##2900 LEVEL = 0
%%#1 %%#2
##2901 LEVEL = 1
Size of an encryption key alias: %%1
Number of encryption keys possessed: %%2
Currently active encryption key set: %%3
Number of encryption keys in each set:%%4
##2902 LEVEL = 2
%%
Encryption device status messages. One of two messages will appear. Either:
• The specific encryption device whose serial number appears in ##2900/Level 0 is not currently
active.
OR
• No encryption key aliases were defined. I.e. the encryption device is active, but the user has only
defined keys not aliases for that device.
##2903 LEVEL = 2
Encryption key aliases:
Index Key Alias
===== =========
This information represents the list of key aliases that were defined by the user in the network
configuration for a given device. In order to identify the specific DES device, see Software Diagnostics
for AUSYNC Level 2 and get the Link Device Key for the relevant Link ID. Go to TMAUTH Level 1
and get the serial number associated with the Link Device Key. Next check all DESx Level 0 diagnostic
until you see the relevant serial number.
444
Software Diagnostics Output
AUSYNC
##3000 LEVEL = 0
Operation mode:
Is synchronized (1=YES, 0=NO): %%1
SYNC interval (seconds): %%2
Number of links (includes zones): %%3
Number of authenticated links: %%4
Server SiteID: %%5
Server LinkID: %%6
Server link index: %%7
Maximum drift (seconds): %%8
RX SYNC interval (seconds): %%9
TX SYNC REQUEST interval (seconds): %%10
TX AFTER RESTART retry (seconds): %%11
Maximum network delay (MSEC): %%12
RX SYNC timer (seconds): %%13
TX AFTER RESTART timer (seconds): %%14
TX SYNC REQUEST timer (seconds): %%15
Requested signals (HEX): %%16
Link device interface function (HEX): %%17
8. Maximum number of seconds by which the timestamp of an incoming message can differ from the
RTU clock.
445
Software Diagnostics Output
##3001 LEVEL = 1
Device keys:
MiniSession device key (HEX): %%1
Stock device key (HEX): %%2
Heap device key (HEX): %%3
TimeAuth device key (HEX) : %%4
##3002 LEVEL = 2
Link basis information
Index LinkID Flags Timer TX SYNC Link device key
===== ====== ===== ===== ======= ===============
##3010 LEVEL = 10
Counters:
Number of requests arrived: %%1
Number of requests handled: %%2
Number of requests sent: %%3
Number of responses arrived: %%4
Number of invalid response: %%5
Number of SYNC arrived: %%6
Number of invalid messages: %%7
7. Count of the number of invalid messages which have which have been received.
446
Software Diagnostics Output
##3011 LEVEL = 11
Counters:
Number of requests arrived: %%1
Number of requests handled: %%2
Number of requests sent: %%3
Number of responses arrived: %%4
Number of invalid response: %%5
Number of SYNC arrived: %%6
Number of invalid messages: %%7
7. Count of the number of invalid messages which have which have been received.
TMAUTH
##3100 LEVEL = 0
Number of registered devices: %%1
Maximum number of registered device: %%2
AuthSync device key (HEX): %%3
3. Identifier for the AUTHSYNC device which enables communication between the TMAUTH and
AUTHSYNC devices (in Hexadecimal format).
##3101 LEVEL = 1
Encryption device basis information
Flags Device-key Link-key SerNum Stamp-interval Stamp-timer MaxDrift
StampInx NumOfENCFail NumOfRXAuthFail
447
Software Diagnostics Output
DUART
##3230 LEVEL = 0
Duart 's Hardware Internal Registers :-
------------------------------------------
Internal software data (key) (DATA) : %%1
DTR Register pointer (DTR) : %%2
DTR Mask (DTR Mask) : %%3
RTS Register pointer (RTS) : %%4
RTS Mask (RTS Mask) : %%5
CONTROL Register pointer (CONTROL) : %%6
RX Register pointer (RX) : %%7
TX Register pointer (TX) : %%8
MRBLR - Max RX Length (MRBLR) : %%9
CONTROL Register Data (*CONTROL) : %%10
DTR Register Data (*DTR) : %%11
RTS Register Data (*RTS) : %%12
RX Register Data (*RX) : %%13
TX Register Data (*TX) : %%14
Close Char (Close Char): %%15
Max idles Counter (MX_IDL) : %%16
448
Software Diagnostics Output
##3231 LEVEL = 1
Duart's Software descriptors :-
--------------------------------------
Head (offset) software receive descriptor: %%1
tail (offset) software receive descriptor: %%2
Head (offset) software transmit descriptor: %%3
tail (offset) software transmit descriptor: %%4
empty software receive descriptor: %%5
ready software receive descriptor: %%6
empty software transmit descriptor: %%7
ready software transmit descriptor: %%8
RX Descriptor[0].flag : %%9
RX Descriptor[0].p_buffer : %%10
RX Descriptor[0].offset : %%11
RX Descriptor[1].flag : %%12
RX Descriptor[1].p_buffer : %%13
RX Descriptor[1].offset : %%14
RX Descriptor[2].flag : %%15
RX Descriptor[2].p_buffer : %%16
RX Descriptor[2].offset : %%17
RX Descriptor[3].flag : %%18
RX Descriptor[3].p_buffer : %%19
RX Descriptor[3].offset : %%20
RX Descriptor[4].flag : %%21
RX Descriptor[4].p_buffer : %%22
RX Descriptor[4].offset : %%23
RX Descriptor[5].flag : %%24
RX Descriptor[5].p_buffer : %%25
RX Descriptor[5].offset : %%26
RX Descriptor[6].flag : %%27
RX Descriptor[6].p_buffer : %%28
RX Descriptor[6].offset : %%29
RX Descriptor[7].flag : %%30
RX Descriptor[7].p_buffer : %%31
RX Descriptor[7].offset : %%32
Tx Descriptor[0].length : %%33
Tx Descriptor[0].p_buffer : %%34
Tx Descriptor[0].offset : %%35
Tx Descriptor[1].length : %%36
Tx Descriptor[1].p_buffer : %%37
Tx Descriptor[1].offset : %%38
Tx Descriptor[2].length : %%39
Tx Descriptor[2].p_buffer : %%40
Tx Descriptor[2].offset : %%41
Tx Descriptor[3].length : %%42
Tx Descriptor[3].p_buffer : %%43
Tx Descriptor[3].offset : %%44
Tx Descriptor[4].length : %%45
Tx Descriptor[4].p_buffer : %%46
Tx Descriptor[4].offset : %%47
Tx Descriptor[5].length : %%48
Tx Descriptor[5].p_buffer : %%49
Tx Descriptor[5].offset : %%50
Tx Descriptor[6].length : %%51
Tx Descriptor[6].p_buffer : %%52
Tx Descriptor[6].offset : %%53
Tx Descriptor[7].length : %%54
Tx Descriptor[7].p_buffer : %%55
Tx Descriptor[7].offset : %%56
449
Software Diagnostics Output
5. #9-#32 For each Receive buffer (0-7), a flag indicating if the buffer is in use, empty or has errors, a
pointer to the buffer, and the number of bytes that were received.
6. #33-#56 For each Transmit buffer (0-7) the number of bytes to be transmitted, a pointer to the buffer,
and the number of bytes that were transmitted by the driver so far.
##3232 LEVEL = 2
Duart's Internal RAM data-Device Key :-
------------------------------------------
Current mode parameters (MODE_BACKUP): %%1
Current rate parameters (RATE_BACKUP): %%2
Current sync parameters (SYNC_BACKUP): %%3
Address mask parameters (MASK_BACKUP): %%4
Address data parameters (ADRS_BACKUP): %% %% %% %%5
Current channel's name (CHAN_BACKUP): %%6
Current channel's data (CHAN_DATA) : %%7
Current channel's code (CHAN_CODE) : %%8
Current heap's name (HEAP_BACKUP): %%9
Current heap's name (HEAP_DATA) : %%10
Current heap's data (HEAP_CODE) : %%11
Current channel's port (DUART_PORT) : %%12
Reception data head (RXBD_HEAD) : %%13
Transmission data tail (TXBD_TAIL) : %%14
Communication signals (DUART_SIGNAL): %%15
Communication buffers (DUART_TYPE) : %% %%16
Communication status (NOISY): %% 17
(QUIET): %% 18
Communication preset/timers (GRANT): %% %%19
(QUIET): %% %%20
4. Not relevant.
##3233 LEVEL = 3
Duart's external dialup modem parameters :-
------------------------------------------
Functional Mode (FUNCTIONAL) : %%1
Reception Data lock (RXBD_LOCK) : %%2
Transmission Data lock (TXBD_LOCK) : %%3
Modem Command Lock (COMMAND_LOCK) : %%4
Incoming call Status (INCOMING_CALL) : %%5
Incoming call Counter (SECOND_COUNTER) : %%6
Get line lock Status (GET_LINE_LOCK) : %%7
Connection Status (LINE_LOCK) : %%8
2. Not in use.
3. Not in use.
451
Software Diagnostics Output
##3234 LEVEL = 10
Duart's Diagnostic's Transmit/Receive :-
------------------------------------------
No. of Transmitted Frames : %%
No. of Received Frames : %%
No. of Received Frames with errors : %%
Mask of Error in the received frames : %%
##3235 LEVEL = 11
Duart's Diagnostic's Transmit/Receive :-
------------------------------------------
No. of Transmitted Frames : %%
No. of Received Frames : %%
No. of Received Frames with errors : %%
Mask of Error in the received frames : %%
452
Software Diagnostics Output
DRS485
##3245 LEVEL = 0
Rs485 hardware/software last status :-
--------------------------------------
Internal software data (key) : %%1
Current mode parameters (MODE_BACKUP): %%2
Current rate parameters (RATE_BACKUP): %%3
Current sync parameters (SYNC_BACKUP): %%4
Current channel port (CHAN_PORT) : %%5
Channel status mode (CHAN_MODE) : %%6
Channel driver lock (CHAN_LOCK) : %%7
Channel signals (CHAN_SIGNAL): %%8
Channel access type (CHAN_ACCESS): %%9
Physical tx_descriptorsize : %%10
DNP Min Random : %%11
DNP Max Random : %%12
DNP Master Bit : %%13
Channel driver type (CHAN_TYPE) : %%14
DNP random register : %%15
Channel Phys Key : %%16
Channel I2Phys Key : %%17
Time Driver Key : %%18
7. Channel is busy.
453
Software Diagnostics Output
##3246 LEVEL = 1
Rs485 hardware control and status :-
--------------------------------------
PORT D Direction : %%
PORT D Data : %%
PORT D Pull up : %%
PORT D Select : %%
PORT F Data : %%
RTS Register : %%
Control Register : %%
RTS Data Register : %%
Control Data Register : %%
##3247 LEVEL = 2
Rs485 software control and status :-
--------------------------------------
Channel addresses (BASE/CHAN/NEXT/MASK) : %% %% %% %%1
Channel Ack Slot : %%2
Channel status (NOISY): %%3
(QUIET): %%3
Channel preset/timers (OVERRIDE): %% %%4
(RESOLUTE/QUIET): %% %%5
(SHUTUP): %% %%6
(GRANT): %% %%7
(WARMUP): %% %%8
(TRANSMIT): %% %%9
(HOLDUP): %% %%10
(RESPOND): %% %%11
454
Software Diagnostics Output
DHDLC
##3300 LEVEL = 0
Dhdlc 's Hardware Internal Registers :-
------------------------------------------
Internal software data (key) (DATA) : %%1
RTS Register pointer (RTS) : %%2
Interrupt Register pointer (INTP) : %%3
Receive Register pointer (RX) : %%4
Transmit Register pointer (TX) : %%5
Test Register pointer (TEST> : %%6
Control Register pointer (CONTROL) : %%7
Sample Register pointer (SAMPLE) : %%8
RTS Mask (RTS Mask) : %%9
Current mode parameters (MODE_BACKUP) : %%10
Current rate parameters (RATE_BACKUP) : %%11
Current sync parameters (SYNC_BACKUP) : %%12
Address mask parameters (MASK_BACKUP) : %%13
Address data parameters (ADRS_BACKUP) : %% %% %% %%14
Current channel's data (CHAN_DATA) : %%15
Current heap's name (HEAP_DATA) : %%16
Current channel's port (DHDLC_PORT) : %%17
RTS Register Data (RTS) : %%18
14. The addresses to which this site will respond through this port.
455
Software Diagnostics Output
456
Software Diagnostics Output
##3301 LEVEL = 1
Dhdlc's Software descriptors :-
--------------------------------------
Head (offset) software receive descriptor: %%1
tail (offset) software receive descriptor: %%2
Head (offset) software transmit descriptor: %%3
tail (offset) software transmit descriptor: %%4
empty software receive descriptor: %%5
ready software receive descriptor: %%6
empty software transmit descriptor: %%7
ready software transmit descriptor: %%8
RX Descriptor[0].flag : %%9
RX Descriptor[0].p_buffer : %%10
RX Descriptor[0].offset : %%11
RX Descriptor[1].flag : %%12
RX Descriptor[1].p_buffer : %%13
RX Descriptor[1].offset : %%14
RX Descriptor[2].flag : %%15
RX Descriptor[2].p_buffer : %%16
RX Descriptor[2].offset : %%17
RX Descriptor[3].flag : %%18
RX Descriptor[3].p_buffer : %%19
RX Descriptor[3].offset : %%20
RX Descriptor[4].flag : %%21
RX Descriptor[4].p_buffer : %%22
RX Descriptor[4].offset : %%23
RX Descriptor[5].flag : %%24
RX Descriptor[5].p_buffer : %%25
RX Descriptor[5].offset : %%26
RX Descriptor[6].flag : %%27
RX Descriptor[6].p_buffer : %%28
RX Descriptor[6].offset : %%29
RX Descriptor[7].flag : %%30
RX Descriptor[7].p_buffer : %%31
RX Descriptor[7].offset : %%32
Tx Descriptor[0].length : %%33
Tx Descriptor[0].p_buffer : %%34
Tx Descriptor[0].offset : %%35
Tx Descriptor[1].length : %%36
Tx Descriptor[1].p_buffer : %%37
Tx Descriptor[1].offset : %%38
Tx Descriptor[2].length : %%39
Tx Descriptor[2].p_buffer : %%40
Tx Descriptor[2].offset : %%41
Tx Descriptor[3].length : %%42
Tx Descriptor[3].p_buffer : %%43
Tx Descriptor[3].offset : %%44
Tx Descriptor[4].length : %%45
Tx Descriptor[4].p_buffer : %%46
Tx Descriptor[4].offset : %%47
Tx Descriptor[5].length : %%48
Tx Descriptor[5].p_buffer : %%49
Tx Descriptor[5].offset : %%50
Tx Descriptor[6].length : %%51
Tx Descriptor[6].p_buffer : %%52
Tx Descriptor[6].offset : %%53
Tx Descriptor[7].length : %%54
Tx Descriptor[7].p_buffer : %%55
Tx Descriptor[7].offset : %%56
457
Software Diagnostics Output
9. #9-#32 For each Receive buffer (0-7), a flag indicating if the buffer is in use, empty or has errors, a
pointer to the buffer, and the number of bytes that were received.
10. #33-#56 For each Transmit buffer (0-7) the number of bytes to be transmitted, a pointer to the buffer,
and the number of bytes that were transmitted by the driver so far.
##3302 LEVEL = 10
Dhdlc's Diagnostic's Transmit/Receive :-
------------------------------------------
No. of Transmitted Frames : %%1
No. of Received Frames : %%2
No. of Received Frames with errors : %%3
Mask of Error in the received frames : %%4
##3303 LEVEL = 11
Dhdlc's Diagnostic's Transmit/Receive :-
------------------------------------------
No. of Transmitted Frames : %%
No. of Received Frames : %%
No. of Received Frames with errors : %%
Mask of Error in the received frames : %%
458
Software Diagnostics Output
DRADIO
##3310 LEVEL = 0
Dradio Channel Parameters :-
--------------------------------------
Internal software data (key) : %%1
Current mode parameters (MODE_BACKUP): %%2
Current rate parameters (RATE_BACKUP): %%3
Current sync parameters (SYNC_BACKUP): %%4
Current channel port (CHAN_PORT) : %%5
Channel driver lock (CHAN_LOCK) : %%6
Channel signals (CHAN_SIGNAL): %%7
Channel access type (CHAN_ACCESS): %%8
6. Channel is busy.
459
Software Diagnostics Output
##3311 LEVEL = 1
Dradio hardware control and status :-
--------------------------------------
RTS Register : %%1
Control Register : %%2
Interrupt Register : %%3
Modem Control0 Register : %%4
Modem Control1 Register : %%5
RTS Mask : %%6
Modem Control0 Mask : %%7
Modem Control1 Mask : %%8
Warmup type0 : %%9
Warmup type1 : %%10
Preamble type0 : %%11
Preamble type1 : %%12
Radio Default Channel : %%13
Modem type : %%14
Radio type : %%15
Is Internal : %%16
Cm_rssi : %%17
Tx_level : %%18
Is_Agc_on : %%19
Rxa_rssi : %%20
Tx_float : %%21
Diff_ptt_Tx : %%22
Diff_ptt_Rx : %%23
Rssi_level : %%24
Cm_polarity : %%25
4. Contents of the register which contains Modem Control0 status. Modem Control0 is one of the
lines from the microprocessor (pin PK4) which control the output data from the FPGA's modem
to the radio.
5. Contents of the register which contains Modem Control1 status. Modem Control1 is one of the
lines from the microprocessor (pin PK3) which control the output data from the FPGA's modem
to the radio.
data.
Stop at DC 1 0 When the RTS line is asserted, the FPGA transmits
DC until the status of the control lines is changed.
Stop at sinus 1 1 When the RTS line is asserted the FPGA transmits
DC for 30mSec. Then it starts transmitting a sinus
wave until the RTS line is lowered.
6. The mask of the RTS.
9. Selects the transmit mode of Modem control 0, when performing warmup in channel access in
port 3.
10. Selects the transmit mode of Modem control 1, when performing warmup in channel access in
port 3.
11. Selects the transmit mode of Modem control 0, when performing preamble in channel access in
port 3.
12. Selects the transmit mode of Modem control 1, when performing preamble in channel access in
port 3.
13. When the MOSCAD-M is configured to work with an internal Mobat radio on Port 3, this
parameter indicates the default channel (1-7) that the radio is programmed to transmit and
receive from. This channel could be changed by the ‘C’ application or by downloading a new
configuration with a new default channel.
14. This indicates the type of modem that is downloaded to the FPGA. The type can be one of:
15. This indicates to the system what type of radio is connected to Port 3 of the MOSCAD-M. This
value can either be Internal Radio or a variety of external radios.
16. This indicates whether the radio connected to Port3 of the MOSCAD-M is an internal or external
radio.
17. This bit indicates the channel busy indication from the radio.
18. This field determines the TxA signal Level (The analog signal from the modem to the radio). The
higher the number in this field, the higher the deviation will be. This is a 6 bit parameter.
19. Indicator from FPGA controlled in FPGA out train via SPI 2.
20. This indicates which line from the internal radio connector is routed to the RSSI mechanism.
• 0 - GND is not connected to External Radio Tx line for external radios that require low
impedance between the TX_line and the ground in order to transmit.
• 1 - GND is connected to External Radio Tx line.
22. This bit determines the differential on the Tx_Line in Transmit mode when using external radios.
This will cause external radios that are sensitive to differential on their Tx line to start
transmitting.
• 1 - OFF
• 0 - ON
24. This parameter determines the comparator level to the RSSI input from the radio.
25. This bit is programmed by the CPU according to the radio's CM polarity which is configured in
the site configuration. It affects both the translation of Carrier Squelch and RSSI / CM to the
CPU.
• 0 - CM polarity in site configuration was programmed to Active Low. That means that the
FPGA recognizes level low on RSSI/SQE as channel active. The signal is inverted in this
mode before being transferred to the CPU.
• CM polarity in site configuration was programmed to Active High. That means that the
FPGA recognizes level high on RSSI/SQE pin as channel active. This signal is NOT inverted
in this mode before being transferred to the CPU.
462
Software Diagnostics Output
##3312 LEVEL = 2
Dradio software control and status :-
--------------------------------------
Channel addresses (BASE/CHAN/NEXT/MASK) : %% %% %% %%1
Channel Ack Slot : %%2
Channel status (NOISY) : %%3
(QUIET) : %%3
Channel preset/timers (OVERRIDE) : %% %%4
(RESOLUTE/QUIET) : %% %%5
(SHUTUP) : %% %%6
(GRANT) : %% %%7
(WARMUP) : %% %%8
(TRANSMIT) : %% %%9
(HOLDUP) : %% %%10
(RESPOND) : %% %%11
(PREAMBLE): %% %%12
LOGFLAS
##3360 LEVEL = 0
LOGFLASH status
---------------
Last completed operation: %%1
Chain ID: %%2
Block #: %%3
Result: %%4
1. The last operation performed on the logging flash which completed. One of: Erase (0) , Program (1)
or Disable (2).
463
Software Diagnostics Output
2. The last chain (block type) handled out of the five possible block types that can be defined by the
user.
##3361 LEVEL = 1
LOGFLASH queue header
---------------------
start %%1
end %%2
head %%3
tail %%4
element size %%5
num elements %%6
free elements %%7
3. The head of the LOGFLASH operation queue (the next operation on the LOGFLASH queue to be
performed.)
4. The tail of the LOGFLASH operation queue (the last operation on the LOGFLASH queue to be
performed.)
##3362 LEVEL = 2
LOGFLASH queue elements
-----------------------
Operation Data Len ChainID Block_#
Operation The operation to be performed on the logging flash. One of: Erase (0) , Program (1) or
Disable (2).
Data The pointer to the data to be written to the logging flash if the operation is Program.
Chain ID The identifier of the chain (block type) on which the logging flash operation is to be
performed. Up to five block types can be defined by the user.
Block_# The block number within the chain on which the logging flash operation is to be
performed.
464
Software Diagnostics Output
465
Error Messages
The description which follows the error messages, provides one or more possible causes for the error
and possible solutions.
Error #23: Can Not Get a New ACK Buffer, increase # of ACK Buffers – Device %%
For each link layer, 8 acknowledge buffers are defined. If all those buffers
are full and the link intends to prepare another acknowledgment for
transmission, this message is displayed and there will be a retry on behalf of
the transmitting side. Usually, this may occur in Nodes. Consult product
group.
Error #25: Can Not Get a New ACK Buffer, ACKs Buffer was corrupted – Device: %%
This message appears due to a memory overwrite in the heap of the
acknowledgments in the link layer.
467
Error Messages
468
Error Messages
Error #111: From Site : %%Link : %% can not communicate with current unit
Communication was initiated by a site which is not defined in the Site table.
469
Error Messages
Error #117: Can't talk with master because unit was not defined as Slave !! OR flag
Master is Set but Unit was not defined as Master !!
For system software developers only. Consult product group.
Error #140: Invalid Link ID, network layer: %%, Dest Site: %%,
Dest Link: %%, Dest Port: %%
The network layer in a RTU is asked to transfer a communication buffer to
the Dest Site, Dest Link & Dest port but the specific link is not known to
this RTU (since other links are defined).
Error #141: Can not find Link ID in network configuration, network layer: %% Dest Site:
%%, Dest Link: %%, Dest Port: %%
The network layer in a RTU is asked to transfer a communication buffer to
the Dest Site, Dest Link & Dest port but there is no route defined in the
network configuration, which the communication can be transferred
through.
Error #142: Destination=Default Central, Network layer: %%, Dest Site: %%, Dest Link:
%%, Dest Port: %%
Network is trying to transfer a buffer to Default central before the last one
communicate with the transmitting site at least once.
470
Error Messages
Error #144: Transparent Network layer !! Can not route via other Link ID network layer:
%%
For system software developers only. Consult product group.
Error #160: Timer service is not activated since timer is defined with 0 time units, device:
%%
The data of the timers device is corrupted. Trying to operate a timers routine
with no time units.
Error #161: # of time units passed without activating timer service is %%, device: %%
The timers task can not start its operation in a time interval which is bigger
than the time interval that was allocated for it in the device creation. This
message may indicate either a long scan time (above 500 msec) or an
infinite loop in the user application.
471
Error Messages
472
Error Messages
Error #234: NOT enough Space for Differentiators (%% Bytes). Application DISABLED.
Each application needs at least 256 bytes, which are not available, for
differentiators.
Error #239: No Delta COS Area Was Allocated To Column #%% in Table #%%
Trying to read COS of a column that does not have COS area. Improper use
of DB_Map application.
Error #243: One of the following calls: Txintrc, Txwidth, Rxintrc, Rxwidth, Rxiupd failed
getting pointer to value at intrac system table
May indicate system software problem. Consult product group.
Error #244: Txintrc was called with ITxStt=0 or Txwidth was called with Tx_len=0
Illegal value set in application.
Error #245: #the 'Load' option was used to download the application, however the
number of diffrentiators were changed.
You should use the 'Reset Load' option instead and then do Download.
473
Error Messages
Error #251: Module type does not match site configuration, module: %%
Incompatible module type. Configuration definition and physical module
are different.
Error #253: Digital output module: %%, desired values in gate array are not equal to
image in memory.
The gate array data and the image in the RTU do not match.
Error #254: Digital output module: %%, actual values of relays are not equal to desired
values in gate array.
The gate array data and the image in the RTU do not match.
474
Error Messages
Error #263: I/O module: %% analog input calib. succeeded with borderline input.
Calibration succeeded but one of the measurements is out of range.
Error #267: Module %%, Scale Factor or Threshold Changed From User Requested
Value.
Incompatibility between desired and actual status in AO.
Error #273: Unoperational PHYSICAL Internal LOOP on: PORT #%% CONTROL=%%
STATUS=%%
When checking the port (HDLC or UART), the RTU turns into a self loop
mode, sends a frame and receives it. This message is displayed if the
received frame is not equal to the one that was sent, and the port is port3.
475
Error Messages
Error #274: Unoperational PHYSICAL External LOOP on: PORT #%% CONTROL=%%
STATUS=%%
When checking the port (HDLC or UART), the RTU turns into an internal
loop mode, sends a frame and receives it. This message is displayed if the
received frame is not equal to the one that was sent, and the ports are 1 or 2.
Error #283: Unoperational CHANNEL Internal LOOP on: PORT #%% CONTROL=%%
STATUS=%%
Incompatibility between the frame that was sent and received by the internal
loop.
Error #284: Unoperational CHANNEL External LOOP on: PORT #%% CONTROL=%%
STATUS=%%
Incompatibility between the frame that was sent and received by the
external loop.
476
Error Messages
Error #287: No response from internal DPSK modem on: port #%% command=%%
data=%%
Problem in the internal modem-piggyback plug in Port Type unit for Port 3.
Piggyback ID Description
1 Spread Spectrum (Aironet) R202
2 Spread Spectrum (Aironet) R100
3 Spread Spectrum (Aironet) R202 AND DPSK interface
4 Spread Spectrum (Aironet) R100 AND DPSK interface
Other Unknown, invalid or no piggiback
For Spread Spectrum radio only (MOSCAD-L only).
Error #289: Could not program the spread spectrum (aironet) radio successfully. The
readback registers value was different from the written ones.
Piggyback cannot be programmed. Switch or fix piggyback.
Error #290: A fault has occurred in the spread spectrum (aironet) radio. The system has
checked the radio registers and found that their values are different from the
expected ones. The system tried to correct the problem by reinitializing the
radio unsuccessfully. A power restart of the CPU and the radio may resolve
the problem.
Try to do a restart.
Error #301: MTE WARNING: The MTE_VLD Lowest Priority Task in The System Was
Not Reached For %% Ticks. System is Either Overloaded Or Some Process
is in Infinite Loop !!!! . Maximum Allowed Time At Which The Lowest Task
May Not Activate is %% Ticks.
A task is in infinite loop. Consult product group.
477
Error Messages
Error #304: MTE: The CONTROL procedure of devices was not started, because the
type of control parameter is out of range !!
Type of requested control was : %%
The last valid control entry is : %%
Internal error. May indicate system software problem. Consult product
group.
Error #305: MTE: The MTE CONTROL procedure of devices failed !!!
Device Name : %%
Control Type : %%
Number of successive fails : %%
The control procedure of one of the devices has failed. May indicate system
software problem. Consult product group.
Error #350: Session layer: in function %% remove slice failed. Remove slice failed.
May indicate system software problem. Consult product group.
Error #351: Session layer: in function %% get slice failed. Get slice failed.
For system software developers. Consult product group.
Error #352: Session layer: in function %% allocation of formatted buffer failed. Allocation
of a buffer failed.
May indicate system software problem. Consult product group.
478
Error Messages
Error #354: Session layer: in function %% no more room for error buffers.
May indicate system software problem. Consult product group.
Error #355: Session layer: in function %% received not error buffer, while in tx.
May indicate system software problem. Consult product group.
Error #356: Session layer: in function %% format error. Protocol found error.
May indicate system software problem. Consult product group.
Error #400: Presentation layer: in function %% remove slice failed. Remove slice failed.
May indicate system software problem. Consult product group.
Error #401: Presentation layer: in function %% get slice failed. Get slice failed.
May indicate system software problem. Consult product group.
Error #402: Presentation layer: in function %% push byte in fbuf failed. Push byte failed.
May indicate system software problem. Consult product group.
Error #403: Presentation layer: in function %% pull byte from fbuf failed. Pull byte failed.
May indicate system software problem. Consult product group.
Error #404: Presentation layer: in function %% push block in fbuf failed. Push block
failed.
May indicate system software problem. Consult product group.
Error #405: Presentation layer: in function %% pull block from fbuf failed. Pull block
failed.
May indicate system software problem. Consult product group.
479
Error Messages
Error #410: Presentation layer: in function %% the len of tx structure is out of range.
May indicate system software problem. Consult product group.
Error #411: Presentation layer: in function %% general format error. Protocol format
error.
May indicate system software problem. Consult product group.
Error #412: Presentation layer: in function %% format error, compression not supported.
Format error. Compression is not supported.
May indicate system software problem. Consult product group.
Error #413: Presentation layer: in function %% format error, encryption not supported.
Encryption and compression are not supported.
May indicate system software problem. Consult product group.
Error #414: Presentation layer: in function %% format error, control number out of range.
Protocol format error.
May indicate system software problem. Consult product group.
Error #416: Presentation layer: in function %% the rx applic, buffer size is too small.
May indicate system software problem. Consult product group.
Error #417: Presentation layer: in function %% no more rooms for error buffers.
May indicate system software problem. Consult product group.
Error #450: Stock set: the stock buffer is locked for too much time
For system software developers. Consult product group.
Error #451: Stock get: the stock buffer is locked for too much time
For system software developers. Consult product group.
480
Error Messages
Error #562: The check validity or test of MC68882 device failed due to MTE_TSTNSET
locking. Software problem.
May indicate system software problem. Consult product group.
Error #563: The MC68882 RAM jump table is too short !!! Software problem.
May indicate system software problem. Consult product group.
Error #565: Fatal !!!! The %% operation is not executed correctly !!!
May indicate system software problem. Consult product group.
Error #602: The call to prv_userrom_pph_timer from timer 10 ms is to late !!! PPH may
have lost pulses !!!!!!!!!
May indicate system software problem. Consult product group.
Error #603: The PPH structure is CORRUPTED !!! The PPH calculations may be wrong
!!!
May indicate system software problem. Consult product group.
481
Error Messages
Error #604: Fatal !!! CPY Not Performed due to border problems !!!
Trying to use the CPY function with illegal parameters.
Error #605: Fatal !!! Division by 0 in rungs while performing the MODULO operation. The
result is undefined !!
Dividing by 0 in user application.
Error #606: Fatal !!! Division by 0 in rungs while performing the divide operation. The
result is undefined !!
Dividing by 0 in user application.
Error #640: Fatal !!! Not enough work space for Monitor application !!
Available space transferred for the Monitor – %% bytes.
Minimum space required for Monitor – %% bytes.
May indicate system software problem. Consult product group.
Error #730: Device TOPLC,Function %%, Port Name %% : Illegal Request from
application.
May indicate system software problem. Consult product group.
Error #731: Device TOPLC,Function %%, Port Name %% : Unable To Unpack F-Buffer.
May indicate system software problem. Consult product group.
482
Error Messages
Error #734: Device TOPLC,Function %%, Port Name %% : Unable to Push A Block In F-
UF Buffer. Push block failed.
May indicate system software problem. Consult product group.
Error #735: Device TOPLC,Function %%, Port Name %% : Unable To Alloc Uf Buffer.
Allocation problem.
May indicate system software problem. Consult product group.
Error #736: Device TOPLC,Function %%, Port Name %% : Unable To Unpack Uf Buffer.
Unpack Uf Buffer failed.
May indicate system software problem. Consult product group.
Error #737: Device TOPLC,Function %%, Port Name %% : Unable To Alloc Buffer.
Allocation problem.
Empty heap. Consult product group.
Error #738: Device TOPLC,Function %%, Port Name %% : The Port to PLC is busy.
The port is busy.
Error #739: Device TOPLC,Function %%, Port Name %% : Not enough memory for the
application !!
May indicate system software problem. Consult product group.
Error #740: Device TOPLC,Function %%, Port Name %% FATAL, State EQ Waiting
Control but f_buf NE NULL !! Software problem.
May indicate system software problem. Consult product group.
Error #741: Device TOPLC, Function %%, Port Name %% : Fbuf Must Be NULL !!
May indicate system software problem. Consult product group.
Error #744: Device TOPLC, Function %%, Port Name %% : Not found the loaded
software for the port. This port is not operational.
The third-party protocol port is not operational.
483
Error Messages
Error #746: Device TOPLC, Function %%, Port Name %% Received a control from the
SWITCHER while there is no software loaded for the PLC port. The received
f_buf (control) has been freed.
The RTU has to switch frames while the protocol is not loaded in the
FLASH memory.
Error #760: Device TOSCADA, Function %% Port Name %% : Illegal Request from
application.
May indicate system software problem. Consult product group.
Error #764: Device TOSCADA, Function %% Port Name %% : Unable to Push a Block
In F-UF Buffer. Push block failed.
May indicate system software problem. Consult product group.
Error #767: Device TOSCADA, Function %% Port Name %% : Unable To Alloc Buffer.
Allocation of buffer failed.
Empty heap. Consult product group.
Error #768: Device TOSCADA, Function %% Port Name %% : The Port to SCADA is
busy.
The port is busy.
Error #769: Device TOSCADA, Function %% Port Name %% : The f_buf is missing !!
May indicate system software problem. Consult product group.
484
Error Messages
Error #770: Device TOSCADA, Function %% Port Name %% : Cannot find site index
and port.
There is a problem in PLC table or site table definition.
Error #771: Device TOSCADA, Function %% Port Name %% : Not enough memory for
the application.
Memory problem. Consult product group.
485
Error Messages
487
Error Messages
a) PLCBIT
b) PLCVAL
c) PLCFLT
Error #861: The phone connection was established, but the RTU doesn't respond
Different Site ID of the addressed phone number.
Error #862: ML_Dial: TX fail, probably the phone line was disconnected.
Can not transmit due to disconnected phone line.
Error #875: Status is 'wait for call' but the line is active.
The RTU software status and phone line status do not match; the line will
be disconnected.
Error #876: The TX thread did not hang up the phone line as the RX thread asked.
For system software developers. Consult product group.
Error #878: Modem refuses to dial this phone number (too long, invalid command, or
answer mode only):
Invalid command (internal problem).
488
Error Messages
489
Error Messages
490
Error Messages
492
Error Messages
493
Error Messages
494
Error Messages
495
Error Messages
Error #1101: Local port #%% was not found. destination Address is : %%
X25 address contains unidentified port.
Can not switch since local port is not available.
Error #1105: Router table #%% does not contain logical channel #%%
Illegal logic channel.
The logic channel does not exist. May indicate system software problem.
Consult product group.
496
Error Messages
Error #1110: Self Site ID is not defined in X.25 Addresses Table. Please add it to your
Addresses Table.
Modify X.25 Addresses Table.
Error #1150: Bad Primitive – Msg Id: %% Child Id: %% Msg Type: %% Child State: %%
The operation does not match the status table.
X25 MSG TYPE :
X25 STATE :
LAPB STATE :
497
Error Messages
498
Error Messages
Error #1230: Chnltest -RX task got err Frame When Called From Trnsintr.
buf_f_get() Returned: %%
May indicate system software problem. Consult product group.
Error #1231: Chnltest -Received tested frame too small. Length of frame is %%
Frame lacks its header.
May indicate system software problem. Consult product group.
Error #1232: Chnltest -Tx Task Could not get a new buffer from heap.
Ret: %%
No buffer for transmission.
Error #1233: Chnltest -Tx Task has Frame area too small for tested frame.
Frame Area Size is %%
Frame size is less than the user's definition in the test's setup. May indicate
system software problem. Consult product group.
Error #1235: Chnltest -Tx Task Failed Getting indx of tested_link in sites_table. Err code
%%
Could not get tested link id's index in site table prior to transmitting a frame.
May indicate system software problem. Consult product group.
Error #1236: Chnltest -Cannot Handle Control Frame. Another Opcode Already Exist
May indicate system software problem. Consult product group.
Error #1237: Chnltest -Received Control Frame (pres_get_struct) too small to decode.
Length of Frame is %%
May indicate system software problem. Consult product group.
Error #1238: Chnltest -Control Frame too Small for answer. Length is %%
May indicate system software problem. Consult product group.
Error #1239: Chnltest -Received aplic structure with invalid size. Size is %% Length
bigger than buffer or Length small to contain opcode.
May indicate system software problem. Consult product group.
499
Error Messages
Error #1261: Tmrevent: Events/Timers were Ignored – NO 'Get Event' for %% msec
DI events and/or related timers were not checked (by GtEvnt function in
rungs) during a time interval longer than the maximum time that was
defined in the expert screens, and therefore were ignored.
Error #1450: Ladder or C application needs I/O modules with DI, but Configuration I/O
modules do not have the expected amount of DI
Define more DI modules in Site Configuration.
Error #1505: ‘TxIntrc’ or ‘ TxWdth’ was called with invalid link ‘Tx_Lnk’ %%
This error occurs when you call the TxIntrc or TxWdth functions with the
wrong Tx_Lnk variable. See Intrac Protocols chapter in Advanced Features
in the Application Programmer manual.
500
Error Messages
Error #1509: Received frame with invalid length %% from INTRAC/MEIC port
In the INTRAC case, the frame length is 4 bytes. In the MEIC case the
frame length is 5-16 bytes. Any other length is invalid.
ID Description
160 Piggyback got control frame from 68302 with invalid opcode
161 Piggyback got characters from 68302 not between 0A and 0D
162 Piggyback got from 68302 control frame too large
163 Piggyback got from 68302 overrun byte in rxsci
164 Piggyback got from 68302 character when cyclic buffer full
165 Piggyback tried to close frame with invalid framelength
166 Piggyback has buffer with invalid ID
167 Piggyback has buffer with invalid temporary length
168 Piggyback has pulled empty buffer which is not last in frame
169 Piggyback has watchdog reset
170 Piggyback has clock fail reset
171 Piggyback has a spike
172 Piggyback has idle line
173 Piggyback got from 68302 frame error
174 Piggyback got from 68302 noise error
175 Piggyback Config register not programmed properly
ID Description
100 RTU received irrelevant config/diagnostics ACK from piggyback
101 RTU received irrelevant config/diagnostics ACK from piggyback
102 Piggyback failed to write parameters to its internal eeprom
103 RTU did not receive answer about config/diagnostics from piggyback
501
Error Messages
ID Description
0 0comm module failed physical_transmit()
1 0comm module failed physical_wait(EOTX)
10 Fskadp could not transmit because CTS signal is stuck. It means that
the piggyback internal buffer is full.
11 Fskadp could not transmit because the channel was busy
12 UART transmission timeout occurred at Fskadp module
13 ‘Wait for Holdup’ transmission timeout occurred af Fskadp
14 fskadp_warmup() was called with illegal piggyback
Error #1638: INTRAC system table: invalid radio warmup time (R_Ptt) %%
Invalid R_Ptt value in the INTRAC system tables (database builder).
Error #1639: INTRAC system table: invalid radio override time (ROvrid) %%
Invalid ROvrid value in the INTRAC system tables (database builder).
Error #1640: INTRAC system table: invalid radio quiet time (RQuiet) %%
Invalid RQuiet value in the INTRAC system tables (database builder).
502
Error Messages
Error #1641: INTRAC system table: invalid line warmup time (L_Ptt) %%
Invalid L_Ptt value in the INTRAC system tables (database builder).
Error #1642: INTRAC system table: invalid line override time (LOvrid) %%
Invalid LOvrid value in the INTRAC system tables (database builder).
Error #1643: INTRAC system table: invalid line quiet time (LQuiet) %%
Invalid LQuiet value in the INTRAC system tables (database builder).
Error #1763: 'C' Block version is higher than system 'C' application version.
Consult product group.
Error #1764: 'C' block no. %% contain invalid name %% in the user_jumptable.
Check the function names entered in the user_jumptable. An invalid name
is one whose length is more than six characters or one which contains a
blank or other invisible character.
Error #1770: The Downloadable "C" function is running too long. Could not delete it from
table.
Occurs as a result of error in one of the “C” blocks loaded to the RTU.
503
Error Messages
Error #1810: Could not abort the master sessions. The master channels are not stopped.
Problem with C master session during Download.
Error #1900: Cannot push into queue - it has reached maximal size
Error in MDLC over IP. Buffers for transmission are coming into queue
faster than port can take them. Up to 255 messages may be stored in
transmission queue prior to transmission from SLIP line. This error occurs
if trying to transmit more than this.
Error #1907: IP address in conversion table for this CPU is %% instead of the configured
%%
Error in MDLC over IP. Mismatch in IP Conversion Table between the IP
address of this RTU and the one configured in the table. Correct either the
table or the Site ID.
504
Error Messages
Error #1912: Modem not configured for Packet data properly (error code %%)
Modem packet data parameters are not appropriate, e.g. no Home Agent IP
address, or no RTU IP address as expected by the infrastructure.
505
Error Messages
still specify this string and others by using a Standard Modem configuration
through a downloaded IP Modem file.
Error #1920: %%
This error is set when there was a problem reading/executing a command
from the IP Modem file. The IP Modem file is read when configuring a
Standard Modem for Slip/PPP port.
Error #1950: Failed to push buffer to the reception queue of the dowloaded protocol driver
May indicate system software error. Consult product group.
Error #1951: Failed to get character(s) from the reception queue of the dowloaded
protocol driver
May indicate system software error. Consult product group.
Error #1952: The reception queue of the dowloaded protocol driver is full
Driver of second protocol is not emptying frames from queue fast enough.
Error #2000: No SYNC server list was found in flash. Authentication was not activated.
An Authentication information table should be defined in the Network
Configuration tool.
Error #2001: An invalid SYNC server list was found in flash. Authentication was not
activated.
A new Authentication information table should be defined in the Network
Configuration tool.
Error #2002: Warning: Link ID %% was denoted as an authenticated one but an error
occurred while trying to use authentication on this Link.
Authentication was not possible on the specified Link ID. Recheck the
network configuration and the port.
Error #2003: Number of Links reported to AuthSync does not match the number of Links
known to the Network layer.
Recheck the network configuration and the ports.
Error #2004: Warning: User has denoted to activate authentication but this could not be
done due to invalid parameters.
Be aware that Authentication is not currently active. Check Authentication
parameters in the Network Configuration tool.
506
Error Messages
507
Error Messages
Error #5 Compiler does not support this application version. Please upgrade.
For example, under the compiler option ≥ V3.70 you cannot compile an
application that has been developed under ToolBox version V1.61.
Error #6 <Element> cannot be used in this application version. Please upgrade: <rung
name>.
For example compiler version < 3.70 does not support CALC. The solution
is to upgrade to a version above 3.70 and to use the option above 3.70.
508
Error Messages
Error #16 Error: Application space overflow. Only <# of bytes> were allocated.
Not enough memory for compiling the application.
Error #18 Bit not in byte boundary: <symbol name> <rung name>
The operation requires this bit to be in the beginning of the byte.
Note: B,0 or B,1 as a byte notation is applicable only for the MOVE/MOVH
functions. In any other bit function, B,0 is identified as the first bit in a
series, bit B,1 as the second, and so forth. Bit,8 is the first bit in the second
byte.
Error #19 JMP is valid only in the same process <rung name>
JMP is allowed only between rungs within the same process.
Error #22 JMP-JSP-RUNP to rung which does not exist: <rung name which does not
exist> <rung name>
JMP-JSP-RUNP outputs are allowed to existing rungs/processes.
Error #23 JMP-JSP-RUNP longer than 32K bytes is not supported in this compiler
option. Try to relocate Rungs/Process or to upgrade <rung name>
509
Error Messages
Error #27 Cannot use more than 1024 differentiators up/down <rung name>
This error happens when executing compilation in version < 3.70.
Error #28 Differentiator requires input on the left side <rung name>
This element cannot appear at the beginning of a rung.
Error #31 Cannot use timer ON&OFF in same timer: <symbol name><rung name>
It is not allowed to use DON and DOF operators on the same timer.
Error #32 Index value is too large: <symbol name> <rung name>
The defined index value (<IN,18>, for example) is greater than the last
index row in the multiple-column table. Correct the last index row or the
rung.
Error #33 Bad mapping: <map symbol name> index value is too large: <map
destination>
The defined index value (<IN,18>, for example) is greater than the last
index row in the multiple-column table. Correct the last index row or the
rung.
Error #34 Cannot change index using another index: <rung name>
It is not allowed to move one index variable to another. For example, to
define: MOVE,I to J (where I and J are defined as index variables).
Error #35 Cannot mix bit & value operands in OR, XOR, AND operators: <rung name>
It is not allowed to mix bit and value data types in Boolean operations:
AND, OR, and XOR.
Error #36 Cannot use indexed bit operand in this operation: <rung name>
It is not allowed to use an indexed bit variable (BIT,I for example) in this
operation.
510
Error Messages
Error #37 Output column length must be as long as input column length: <rung name>
Input(s) column length(s) should be as long as the output column length (for
example, in order to carry out MOVE operation of BIT1 and BIT2 to BIT3,
column index rows of BIT1, BIT2, and BIT3 should be the same).
Error #38 Index or indexed operand cannot mix with bit in this operation: <rung name>
In this operation it is not allowed to mix a symbol name which is an index
or an indexed symbol name with bits. For example, to MOVE bit to I, or
IN,I to bit.
Error #39 Use MOVE (instead of MOVH) in bit to bit & value to value operations: <rung
name>
Use MOVE output operator (and not MOVH) to MOVE bit to bit, and value
to value operations.
Error #40 Cannot mix bit & float operands in this operation: <rung name>
It this operation it is not allowed to mix float and bit operands.
Error #41 Cannot mix value & float operands in this operation: <rung name>
It this operation it is not allowed to mix float and value operands.
Error #45 Error: Cannot use float or bit operand as length in CPY
The length parameter cannot be of float or bit type.
Error #47 Cannot use port with no matching line in ports table
Using one of the CALL functions on a row that does not exist in the User
Ports table.
511
Error Messages
Error #51 Incompatible depts between duplicate & source columns: <column name>
<Table number>
Error #58 Error: In SEND – Index does not exist: <Index name> <rung name>
The index variable is not defined. For example, when using <IN,I> symbol
name, I is not defined. Return to the index table to define the index variable
and then compile.
Error #59 Error: In CALC - Cannot handle so many functions in a formula: <rung
name>
Error #60 Error: In SEND – Name does not exist: <symbol name> <rung name>
Variable name is not defined in data base tables (IN, for example). Return
to data base builder to define the symbol name and then compile.
Error #61 Error: In CALC - Cannot handle so many symbols in a formula: <rung name>
Error #62 Error: In SEND – Simple table with index: <symbol name> <rung name>
It is not allowed to use a variable of a single-column table with index. Use
multiple-column table and define the symbol name.
Error #63 Error: In CALC - Cannot use float operands with logic operation: <rung
name>
Error #64 Error: In SEND – Index value too large: <symbol name> <rung name>
The defined index value (<IN,18>, for example) is greater than the last
index row in the multiple-column table. Correct the last index row and then
return to the rung.
512
Error Messages
Error #66 Error: In SEND – Number exceeds size of vector: <rung name>
When the SEND operator uses the following format: '100<IN>, it means
that 100 values should be sent under <IN> vector. This operation is not
allowed if the last index row in the multiple-column table is less than 100.
Error #67 Error: In CALC - Cannot CALL into an index: <rung name>
Error #68 Error: In SEND – Cannot operate on bits vector: <rung name>
SEND operator (in ASCII) is not applicable for a data base table of bits.
Error #70 Error: In SEND - Cannot use more than 10 variable strings in message:
<rung name>
Up to 10 string variables can be used in SEND.
Error #72 Error: In SEND - Not enough space for message: <rung name>
Not enough memory to process all the text in SEND.
Error #73 Error: In I/O link - Fail to open I/O link, reoperate I/O link phase
Problem in I/O link file open (*.L4). Try closing applications that open
files.
Error #74 Error: In I/O link - Application does not match I/O link file, reoperate I/O link
phase
Recreate the I/O link file.
Error #75 Error: In I/O link - Not enough memory, reoperate I/O link phase
Error #76 Error: In I/O link - Error while reading I/O link file, reoperate I/O link phase
The I/O link file is corrupted. Recreate the file.
Error #77 Error: In I/O link - Fail to count I/O times, reoperate I/O link phase
The I/O link file is disrupted. Recreate the file.
Error #78 Internal error in in rung - re-write the rung <rung name>
Earlier versions contained an infrequent bug, and the new version of the
compiler checks for it. If this message appears, just re-write the rung.
Error #79 Error: In I/O link - Fail to load modtype.txt, reoperate I/O link pahse
The modtype.txt file is missing. Reinstall ToolBox.
513
Error Messages
Error #80 Error list was truncated – cannot display more errors
This error appears when the list exceeds 1,000 errors.
Warning List
1 Warning: JMP to same rung: <rung name>
2 Warning: JSP to same process: <rung name>
3 Warning: Undefined I/O LINK value
4 Warning: Undefined mapped field: table #<TAB NUMBER> column #<COL
NUMBER>
5 Warning: This function is not implemented yet: <rung name>
6 Warning: No SCAN operation
7 Warning: Use MOVE to change element in Time & Date Table
8 Warning: Compiler ignores rungs without output element: <rung name>
9 Warning: The same UCALL function uses different parameters
NUMBER/ORDER/TYPE: <function name> <rung name>
10 Warning: DON without input is not an effective operation: <rung name>
514