LP0631
CRIMSON 2
SER M ANUAL
U
ODULAR C ONTROLLER
M
Copyright © 2003-2006 Red Lion Controls.
All Rights Reserved Worldwide.
The information contained herein is provided in good faith, but is subject to change without
notice. It is supplied with no warranty whatsoever, and does not represent a commitment on
the part of Red Lion Controls. Companies, names and data used as examples herein are
fictitious unless otherwise stated. No part of this document may be reproduced or transmitted
in any form or by any means, electronic or mechanical, without the express written
permission of Red Lion Controls.
All trademarks are acknowledged as the property of their respective owners.
Written by Mike Granby and Jesse Benefiel.
GETTING STARTED TABLE OF CONTENTS
TABLE OF CONTENTS
GETTING STARTED ........................................................................................... 1
SYSTEM REQUIREMENTS ..................................................................................... 1
INSTALLING THE SOFTWARE ................................................................................. 1
CHECKING FOR UPDATES ..................................................................................... 1
INSTALLING THE USB DRIVERS ............................................................................ 2
QUICK START .................................................................................................. 3
OVERVIEW ...................................................................................................... 3
MODULES ........................................................................................................ 3
COMMUNICATIONS ............................................................................................ 4
MAPPING DATA ................................................................................................ 4
DOWNLOADING ................................................................................................ 7
CONNECT THE TWO ........................................................................................... 8
CRIMSON BASICS ............................................................................................. 9
MAIN SCREEN ICONS ......................................................................................... 9
MODULES .......................................................................................................................................9
COMMUNICATIONS ............................................................................................................................9
DATA TAGS ................................................................................................................................... 10
USER INTERFACE ............................................................................................................................10
PROGRAMMING ..............................................................................................................................10
DATA LOGGER ...............................................................................................................................10
WEB SERVER .................................................................................................................................10
SECURITY MANAGER ....................................................................................................................... 11
SELECTING THE MODULAR CONTROLLER ............................................................... 11
USING BALLOON HELP ...................................................................................... 12
WORKING WITH DATABASES .............................................................................. 12
DOWNLOADING TO THE MASTER ......................................................................... 12
CONFIGURING THE LINK ...................................................................................................................12
VERIFYING THE USB LINK ................................................................................................................13
SETTING THE IP ADDRESS ................................................................................................................ 13
SENDING THE DATABASE ..................................................................................................................13
EXTRACTING DATABASES .................................................................................................................. 14
MOUNTING THE COMPACT FLASH ........................................................................................................14
FORMATTING THE COMPACT FLASH ......................................................................................................15
SENDING THE TIME AND DATE ........................................................................................................... 16
UPDATING VIA COMPACT FLASH ........................................................................... 16
MODULE CONFIGURATION ............................................................................... 17
WORKING WITH MODULES ................................................................................ 17
INSERTING MODULES ......................................................................................................................17
MOVING MODULES ......................................................................................................................... 17
EDITING MODULES .........................................................................................................................17
CSPID – PID MODULE P ROGRAMMING................................................................ 18
THE GENERAL TAB .......................................................................................................................... 18
THE CONTROL TAB .........................................................................................................................20
REVISION 6 PAGE I
TABLE OF CONTENTS CRIMSON U SER M ANUAL - M ODULAR C ONTROLLER
THE POWER TAB ............................................................................................................................ 22
THE ALARMS TAB ...........................................................................................................................23
THE OUTPUTS TAB .........................................................................................................................26
AUTO -TUNING ...............................................................................................................................27
AVAILABLE DATA ............................................................................................................................ 30
CSSG – STRAIN G AGE I NPUT PID MODULE P ROGRAMMING....................................... 34
THE GENERAL TAB .......................................................................................................................... 34
THE CONTROL TAB .........................................................................................................................36
THE POWER TAB ............................................................................................................................ 38
THE ALARMS TAB ...........................................................................................................................40
THE OUTPUTS TAB .........................................................................................................................42
AUTO -TUNING ...............................................................................................................................43
AVAILABLE DATA ............................................................................................................................ 46
CSTC/CSRTD – TEMPERATURE I NPUT M ODULE P ROGRAMMING................................. 51
THE CONFIGURATION TAB ................................................................................................................51
AVAILABLE DATA ............................................................................................................................ 52
CSINI/CSINV – ANALOG I NPUT M ODULE P ROGRAMMING......................................... 53
THE CONFIGURATION TAB ................................................................................................................53
THE LINEARIZATION TAB .................................................................................................................. 54
AVAILABLE DATA ............................................................................................................................ 55
CSOUT – ANALOG O UTPUT M ODULE P ROGRAMMING............................................... 56
THE CONFIGURATION TAB ................................................................................................................56
THE INITIAL OUTPUT TAB ................................................................................................................57
AVAILABLE DATA ............................................................................................................................ 58
CSDIO – DIGITAL I/O MODULE P ROGRAMMING..................................................... 60
THE CONFIGURATION TAB ................................................................................................................60
THE LOGIC EDITOR TAB ................................................................................................................... 60
AVAILABLE DATA ............................................................................................................................ 62
CONFIGURING COMMUNICATIONS ..................................................................... 65
SERIAL PORT USAGE ........................................................................................ 65
SELECTING A PROTOCOL ................................................................................... 65
PROTOCOL OPTIONS ........................................................................................ 66
WORKING WITH DEVICES .................................................................................. 66
ETHERNET CONFIGURATION ............................................................................... 67
IP PARAMETERS............................................................................................................................. 67
IP ROUTING .................................................................................................................................67
PHYSICAL LAYER ............................................................................................................................67
REMOTE UPDATE ............................................................................................................................ 68
PROTOCOL SELECTION ..................................................................................................................... 68
MAPPING DATA ............................................................................................... 69
MAPPING ITEMS TO A BLOCK ............................................................................................................. 70
ACCESSING INDIVIDUAL BITS ............................................................................................................70
READ /WRITE VARIABLES .................................................................................................................. 71
PROTOCOL CONVERSION ................................................................................... 71
MASTER AND SLAVE ........................................................................................................................71
MASTER AND MASTER ......................................................................................................................72
WHICH WAY AROUND ?....................................................................................................................72
DATA TRANSFORMATION ................................................................................... 72
PAGE II http://www.redlion.net/controller
GETTING STARTED TABLE OF CONTENTS
ADVANCED COMMUNICATIONS ......................................................................... 75
USING EXPANSION CARDS ................................................................................. 75
SHARING SERIAL PORTS ................................................................................... 76
ENABLING TCP/IP..........................................................................................................................76
SHARING THE REQUIRED PORT .......................................................................................................... 76
CONNECTING VIA ANOTHER PORT ...................................................................................................... 77
CONNECTING VIA ETHERNET .............................................................................................................77
PURE VIRTUAL PORTS ..................................................................................................................... 78
LIMITATIONS .................................................................................................................................79
USING ELECTRONIC MAIL .................................................................................. 79
CONFIGURING SMTP ......................................................................................................................79
CONFIGURING SMS ........................................................................................................................81
THE ADDRESS BOOK .......................................................................................................................82
WORKING WITH MODEMS ................................................................................. 83
SOME TYPICAL APPLICATIONS ........................................................................................................... 83
ADDING A DIAL -IN CONNECTION ........................................................................................................ 84
ADDING A DIAL -OUT CONNECTION .....................................................................................................86
ADDING AN SMS CONNECTION ..........................................................................................................87
SMS MESSAGE P ROCESSING .............................................................................................................88
USING MULTIPLE INTERFACES ...........................................................................................................88
CHECKING THE MODEM STATUS ......................................................................................................... 89
MODEM INITIALIZATION SEQUENCE ....................................................................................................90
TROUBLESHOOTING MODEM COMMUNICATION ...................................................................................... 91
OPC C OMMUNICATION ..................................................................................... 93
OPC SERVER S ETTINGS ...................................................................................................................93
OPC AND SCADA .......................................................................................................................... 94
OPC LINK (R ED L ION P RODUCTS D ATA E XCHANGE) ............................................................................... 94
USING TIME MANAGEMENT ................................................................................ 95
CONFIGURING THE TIME MANAGER ..................................................................................................... 96
SELECTING AN SNTP SERVER ............................................................................................................97
TIME -ZONE CONFIGURATION ............................................................................................................ 98
CONFIGURING THE SYNCHRONIZATION MANAGER (FTP CLIENT ) ................................. 98
SYNCHRONIZATION MANAGER SETTINGS .............................................................................................. 98
AUTOMATIC LOG SYNCHRONIZATION ...................................................................................................99
ADVANCED FTP EXCHANGE FUNCTIONS ............................................................................................. 100
CONFIGURING THE FTP SERVER ........................................................................100
FTP SERVER S ETTINGS.................................................................................................................. 101
FTP SECURITY ............................................................................................................................ 101
ACCESSING THE SERVER ................................................................................................................. 102
CONFIGURING DATA TAGS ............................................................................. 102
ALL ABOUT TAGS ...........................................................................................102
TYPES OF TAGS ............................................................................................................................ 102
WHY USE TAGS ?.......................................................................................................................... 104
CREATING TAGS ............................................................................................105
EDITING TAGS ..............................................................................................106
EDITING PROPERTIES ......................................................................................106
EXPRESSION PROPERTIES ............................................................................................................... 106
TRANSLATABLE STRINGS ................................................................................................................ 107
REVISION 6 PAGE III
TABLE OF CONTENTS CRIMSON U SER M ANUAL - M ODULAR C ONTROLLER
COLOR PROPERTIES ...................................................................................................................... 108
EDITING FLAG TAGS ...................................................................................... 108
THE DATA TAB (VARIABLES ) ........................................................................................................... 109
THE DATA TAB (FORMULAE ) ........................................................................................................... 110
THE DATA TAB (ARRAYS )............................................................................................................... 110
THE FORMAT TAB .........................................................................................................................112
THE COLORS TAB ......................................................................................................................... 112
THE ALARMS TAB .........................................................................................................................113
THE TRIGGERS TAB ...................................................................................................................... 114
EDITING INTEGER TAGS .................................................................................. 114
THE DATA TAB (VARIABLES ) ........................................................................................................... 115
THE DATA TAB (FORMULAE ) ........................................................................................................... 116
THE DATA TAB (ARRAYS )............................................................................................................... 117
THE FORMAT TAB .........................................................................................................................117
THE COLORS TAB ......................................................................................................................... 119
THE ALARM TABS .........................................................................................................................119
THE TRIGGERS TAB ...................................................................................................................... 120
EDITING MULTI TAGS ..................................................................................... 121
THE DATA TAB (VARIABLES ) ........................................................................................................... 121
THE DATA TAB (FORMULAE ) ........................................................................................................... 122
THE DATA TAB (ARRAYS )............................................................................................................... 122
THE FORMAT TAB .........................................................................................................................123
THE COLORS TAB ......................................................................................................................... 124
THE ALARM TABS .........................................................................................................................125
THE TRIGGERS TAB ...................................................................................................................... 125
EDITING REAL TAGS ...................................................................................... 126
EDITING STRING TAGS ................................................................................... 126
THE DATA TAB (VARIABLES ) ........................................................................................................... 126
THE DATA TAB (FORMULAE ) ........................................................................................................... 127
THE DATA TAB (ARRAYS )............................................................................................................... 127
THE FORMAT TAB .........................................................................................................................128
THE COLORS TAB ......................................................................................................................... 129
MORE THAN TWO ALARMS ............................................................................... 129
VALIDATING TAGS ......................................................................................... 130
EXPORTING TAG MAPPINGS .............................................................................. 130
LOGGING EVENT MESSAGES ............................................................................. 130
NOTES FOR EDICT USERS ................................................................................ 130
CONFIGURING THE MONOCHROME VIRTUAL HMI.............................................. 133
CONTROLLING THE VIEW ................................................................................. 133
OTHER VIEW OPTIONS ..................................................................................................................133
USING THE PAGE LIST .................................................................................... 134
DISPLAY EDITOR TOOLBOXES ........................................................................... 134
THE DRAWING TOOLBOX ................................................................................................................ 134
THE FILL FORMAT TOOLBOX ........................................................................................................... 134
THE LINE FORMAT TOOLBOX ........................................................................................................... 134
THE TEXT FORMAT TOOLBOX .......................................................................................................... 135
THE FOREGROUND TOOLBOX ........................................................................................................... 135
THE BACKGROUND TOOLBOX ........................................................................................................... 135
PAGE IV http://www.redlion.net/controller
GETTING STARTED TABLE OF CONTENTS
ADDING DISPLAY PRIMITIVES ............................................................................135
SMART ALIGNMENT ....................................................................................................................... 135
KEYBOARD OPTIONS .....................................................................................................................136
LOCK INSERT MODE ...................................................................................................................... 136
SELECTING PRIMITIVES ...................................................................................136
MOVING AND RESIZING ...................................................................................137
REORDERING PRIMITIVES .................................................................................137
EDITING PRIMITIVES .......................................................................................138
PRIMITIVE DESCRIPTIONS ................................................................................138
THE LINE PRIMITIVE ..................................................................................................................... 138
THE SIMPLE GEOMETRIC PRIMITIVES ................................................................................................ 138
THE TANK PRIMITIVES ................................................................................................................... 139
THE SIMPLE BAR -GRAPH PRIMITIVES ................................................................................................. 139
THE FIXED TEXT PRIMITIVE ............................................................................................................140
THE AUTO TAG PRIMITIVE .............................................................................................................. 141
THE TAG TEXT PRIMITIVES ............................................................................................................. 142
EDITING THE UNDERLYING TAG ....................................................................................................... 144
THE TIME AND DATE PRIMITIVE ....................................................................................................... 145
THE RICH BAR -GRAPH PRIMITIVES ................................................................................................... 146
THE SYSTEM PRIMITIVES ................................................................................................................ 148
DEFINING PAGE PROPERTIES ............................................................................149
DEFINING SYSTEM ACTIONS .............................................................................150
DEFINING KEY BEHAVIOR .................................................................................150
ENABLING ACTIONS ........................................................................................151
ACTION DESCRIPTIONS ....................................................................................151
THE GOTO PAGE ACTION ............................................................................................................... 151
THE PUSH BUTTON ACTION ............................................................................................................152
THE CHANGE INTEGER VALUE ACTION ............................................................................................... 152
THE RAMP INTEGER VALUE ACTION ..................................................................................................153
THE PLAY TUNE ACTION ................................................................................................................ 153
THE USER DEFINED ACTION ........................................................................................................... 154
BLOCK DEFAULT ACTION ................................................................................................................ 154
CHANGING THE LANGUAGE ...............................................................................155
ADVANCED TOPICS .........................................................................................155
ACTION PROCESSING .....................................................................................................................155
DATA AVAILABILITY ...................................................................................................................... 156
CONFIGURING THE COLOR VIRTUAL HMI ........................................................ 157
CONTROLLING THE VIEW .................................................................................157
ZOOM FUNCTION .......................................................................................................................... 157
OTHER VIEW OPTIONS ..................................................................................................................158
USING THE PAGE LIST .....................................................................................158
WORKING WITH THE GRID ...............................................................................159
THE DRAWING TOOLBOX .................................................................................159
ADDING DISPLAY PRIMITIVES ............................................................................160
SMART ALIGNMENT ....................................................................................................................... 160
KEYBOARD OPTIONS .....................................................................................................................161
REVISION 6 PAGE V
TABLE OF CONTENTS CRIMSON U SER M ANUAL - M ODULAR C ONTROLLER
LOCK INSERT MODE ...................................................................................................................... 161
USING THE IMAGE LIBRARY .............................................................................. 161
SELECTING PRIMITIVES ................................................................................... 162
MOVING AND RESIZING ................................................................................... 162
ALIGNING PRIMITIVES .................................................................................... 163
SPACING PRIMITIVES ...................................................................................... 163
REORDERING PRIMITIVES ................................................................................ 163
GROUPING PRIMITIVES ................................................................................... 164
EDITING PRIMITIVES ...................................................................................... 164
DEFINING COLORS ......................................................................................... 164
DEFINING FILL PATTERNS ................................................................................ 165
DEFINING ACTIONS ........................................................................................ 166
ENABLING ACTIONS ....................................................................................... 166
ACTION DESCRIPTIONS ................................................................................... 166
THE GOTO PAGE ACTION ............................................................................................................... 167
THE PUSH BUTTON ACTION ............................................................................................................168
THE CHANGE INTEGER VALUE ACTION ............................................................................................... 169
THE RAMP INTEGER VALUE ACTION ..................................................................................................169
THE PLAY TUNE ACTION ................................................................................................................ 170
THE USER DEFINED ACTION ........................................................................................................... 170
USING DEFAULT SETTINGS .............................................................................. 171
PRIMITIVE DESCRIPTIONS ................................................................................ 171
THE LINE PRIMITIVE ..................................................................................................................... 171
THE SIMPLE GEOMETRIC PRIMITIVES ................................................................................................ 171
THE TANK PRIMITIVES ................................................................................................................... 172
THE SIMPLE BAR PRIMITIVES .......................................................................................................... 172
THE BAR -GRAPH PRIMITIVES .......................................................................................................... 173
THE SCATTER GRAPH PRIMITIVE ......................................................................................................174
THE SCALE PRIMITIVES .................................................................................................................. 177
THE FIXED TEXT PRIMITIVE ............................................................................................................178
THE AUTO TAG PRIMITIVE .............................................................................................................. 180
THE TAG TEXT PRIMITIVES ............................................................................................................. 180
EDITING THE UNDERLYING TAG ....................................................................................................... 183
THE MULTI -LINE TEXT PRIMITIVES ...................................................................................................184
THE TIME AND DATE PRIMITIVE ....................................................................................................... 184
THE RICH BAR PRIMITIVES ............................................................................................................. 186
THE RICH SLIDER PRIMITIVES .........................................................................................................188
THE ALARM VIEWER PRIMITIVE ....................................................................................................... 190
THE ALARM TICKER PRIMITIVE ........................................................................................................ 195
THE EVENT VIEWER PRIMITIVE ........................................................................................................ 197
THE FILE VIEWER PRIMITIVE ........................................................................................................... 197
THE REMOTE DISPLAY PRIMITIVE ..................................................................................................... 198
THE CAMERA PRIMITIVE ................................................................................................................. 199
THE TRENDING PRIMITIVES ............................................................................................................ 200
THE GENERAL BUTTON PRIMITIVE ....................................................................................................203
THE RICH BUTTON PRIMITIVE ......................................................................................................... 205
THE SELECTOR PRIMITIVES ............................................................................................................. 207
PAGE VI http://www.redlion.net/controller
GETTING STARTED TABLE OF CONTENTS
THE PICTURE PRIMITIVE ................................................................................................................ 209
THE CF IMAGE PRIMITIVE ..............................................................................................................213
THE DIAL GAUGE PRIMITIVES .......................................................................................................... 214
SYSTEM PRIMITIVES .......................................................................................216
THE TOUCH TEST PRIMITIVE ........................................................................................................... 217
THE TOUCH CALIBRATION PRIMITIVE ................................................................................................ 217
DEFINING PAGE PROPERTIES ............................................................................218
DEFINING SYSTEM ACTIONS .............................................................................219
ADDITIONAL SYSTEM PROPERTIES ......................................................................219
SELECTING LANGUAGES ...................................................................................221
CHANGING THE LANGUAGE ...............................................................................222
SIMULATING LANGUAGES IN CRIMSON .................................................................222
DEFINING KEY BEHAVIOR .................................................................................223
BLOCKING DEFAULT ACTIONS ............................................................................223
DATA AVAILABILITY ........................................................................................224
NOTES FOR EDICT USERS .................................................................................224
CONFIGURING PROGRAMS ............................................................................. 225
USING THE PROGRAM LIST ...............................................................................225
EDITING PROGRAMS .......................................................................................225
PROGRAM PROPERTIES ....................................................................................225
ADDING COMMENTS ........................................................................................227
RETURNING VALUES ........................................................................................228
HERE BE DRAGONS ! ...................................................................................................................... 228
PASSING ARGUMENTS ......................................................................................228
PROGRAMMING TIPS .......................................................................................229
MULTIPLE ACTIONS ....................................................................................................................... 229
IF STATEMENTS ........................................................................................................................... 230
SWITCH STATEMENTS .................................................................................................................... 231
LOCAL VARIABLES ......................................................................................................................... 232
LOOP CONSTRUCTS ....................................................................................................................... 232
NOTES FOR EDICT USERS .................................................................................234
CONFIGURING DATA LOGGING ....................................................................... 237
BATCH LOGGING ............................................................................................237
CONTROLLING A BATCH ................................................................................................................. 238
CREATING DATA LOGS .....................................................................................238
USING THE LOG LIST ......................................................................................238
DATA LOG PROPERTIES ...................................................................................239
LOG FILE STORAGE .........................................................................................240
THE LOGGING PROCESS ...................................................................................241
ACCESSING LOG FILES .....................................................................................241
USING WEB SYNC ...........................................................................................242
WEB SYNC SYNTAX ........................................................................................................................ 242
OPTIONAL SWITCHES .................................................................................................................... 242
EXAMPLE USAGE ........................................................................................................................... 243
REVISION 6 PAGE VII
TABLE OF CONTENTS CRIMSON U SER M ANUAL - M ODULAR C ONTROLLER
NOTES FOR EDICT USERS ................................................................................ 243
CONFIGURING THE WEB SERVER .................................................................... 245
WEB SERVER PROPERTIES ............................................................................... 245
ADDING WEB PAGES ...................................................................................... 247
USING A CUSTOM WEB SITE ............................................................................ 247
CREATING THE SITE ...................................................................................................................... 248
EMBEDDING DATA ........................................................................................................................ 248
DEPLOYING THE SITE ....................................................................................................................248
COMPACT FLASH ACCESS .................................................................................. 248
ACCESSING THE WEB SERVER ........................................................................... 248
USING ETHERNET ......................................................................................................................... 249
USING MODEMS ........................................................................................................................... 249
WEB SERVER SAMPLES ................................................................................... 250
USING THE SECURITY SYSTEM ........................................................................ 255
SECURITY BASICS .......................................................................................... 255
OBJECT -BASED SECURITY ............................................................................................................... 255
NAMED USERS ............................................................................................................................. 255
USER RIGHTS .............................................................................................................................. 255
ACCESS CONTROL ......................................................................................................................... 256
WRITE LOGGING ..........................................................................................................................256
DEFAULT ACCESS ......................................................................................................................... 256
ON -DEMAND LOGON ..................................................................................................................... 257
MAINTENANCE ACCESS .................................................................................................................. 257
SECURITY SETTINGS ...................................................................................... 257
CREATING USERS .......................................................................................... 258
SPECIFYING TAG SECURITY .............................................................................. 259
SPECIFYING PAGE SECURITY ............................................................................ 259
THE SECURITY MANAGER PRIMITIVE .................................................................. 259
SECURITY RELATED FUNCTIONS ........................................................................ 259
WRITING EXPRESSIONS ................................................................................ 260
DATA VALUES ............................................................................................... 260
CONSTANTS ................................................................................................................................260
TAG VALUES ................................................................................................................................ 261
COMMUNICATIONS REFERENCES ....................................................................................................... 262
SIMPLE MATH ............................................................................................... 262
OPERATOR PRIORITY ...................................................................................... 262
TYPE CONVERSION ........................................................................................ 262
COMPARING VALUES ...................................................................................... 263
TESTING BITS .............................................................................................. 263
MULTIPLE CONDITIONS ................................................................................... 264
CHOOSING VALUES ........................................................................................ 264
MANIPULATING BITS ...................................................................................... 265
AND , OR AND XOR ...................................................................................................................... 265
SHIFT OPERATORS ........................................................................................................................ 265
BITWISE NOT ............................................................................................................................. 265
PAGE VIII http://www.redlion.net/controller
GETTING STARTED TABLE OF CONTENTS
INDEXING ARRAYS ..........................................................................................266
INDEXING STRINGS ........................................................................................266
ADDING STRINGS ...........................................................................................266
CALLING PROGRAMS .......................................................................................266
USING FUNCTIONS .........................................................................................266
PRIORITY SUMMARY .......................................................................................266
NOTES FOR EDICT USERS .................................................................................267
WRITING ACTIONS ....................................................................................... 269
CHANGING PAGE ............................................................................................269
CHANGING NUMERIC VALUES ............................................................................269
SIMPLE ASSIGNMENT ..................................................................................................................... 269
COMPOUND ASSIGNMENT ............................................................................................................... 269
INCREMENT AND DECREMENT ..........................................................................................................269
CHANGING BIT VALUES ....................................................................................269
RUNNING PROGRAMS ......................................................................................270
USING FUNCTIONS .........................................................................................270
OPERATOR PRIORITY ......................................................................................270
NOTES FOR EDICT USERS .................................................................................270
USING RAW PORTS ...................................................................................... 271
CONFIGURING A SERIAL PORT ...........................................................................271
CONFIGURING A TCP/IP SOCKET .......................................................................271
READING CHARACTERS ....................................................................................272
READING ENTIRE FRAMES ................................................................................272
SENDING DATA ..............................................................................................273
NOTES FOR EDICT USERS .................................................................................273
SYSTEM VARIABLE REFERENCE ....................................................................... 275
HOW ARE SYSTEM VARIABLES USED ....................................................................275
ACTIVE ALARMS ..............................................................................................276
COMMS ERROR ...............................................................................................277
DISP BRIGHTNESS ...........................................................................................278
DISP CONTRAST .............................................................................................279
DISP COUNT ..................................................................................................280
DISP UPDATES ...............................................................................................281
IS SIREN ON ..................................................................................................282
PI..............................................................................................................283
TIME ZONE ...................................................................................................284
TIME ZONE MINS .............................................................................................285
USE DST......................................................................................................286
PROGRAMMING REFERENCE ........................................................................... 287
EXPRESSION OPERATORS .................................................................................287
ACTION OPERATORS .......................................................................................288
PROGRAMMING STATEMENTS .............................................................................289
REVISION 6 PAGE IX
TABLE OF CONTENTS CRIMSON U SER M ANUAL - M ODULAR C ONTROLLER
FUNCTION REFERENCE .................................................................................. 291
NOTES FOR EDICT USERS ................................................................................ 291
ABS (
VALUE
)................................................................................................. 292
ACOS(
VALUE
) ............................................................................................... 293
ALARM ACCEPT ALL ()....................................................................................... 294
ASIN(
VALUE
) ................................................................................................ 295
ATAN(
VALUE
) ............................................................................................... 296
ATAN2(
BEEP (
A, B
) ................................................................................................ 297
FREQ, PERIOD
) ..................................................................................... 298
CLEAR EVENTS ()............................................................................................ 299
CLOSE FILE (
FILE
)........................................................................................... 300
COMMIT AND RESET () ..................................................................................... 301
COMPACT FLASH EJECT () .................................................................................. 302
COMPACT FLASH STATUS ()................................................................................ 303
CONTROL DEVICE (
COPY (
DEST, SRC, COUNT
COS(
THETA
CREATE DIRECTORY (
CREATE FILE (
DATA TO TEXT (
DATE (
Y, M, D
DEC TO TEXT (
DEG 2 RAD (
DELETE DIRECTORY (
DELETE FILE (
DEV CTRL (
DEVICE, FUNCTION, DATA
DISABLE DEVICE (
DEVICE, ENABLE
).................................................................... 304
) ............................................................................... 305
)................................................................................................. 306
NAME
) .............................................................................. 307
NAME
) ....................................................................................... 308
DATA, LIMIT
)............................................................................. 309
) ............................................................................................. 310
DATA, SIGNED, BEFORE, AFTER, LEADING, GROUP
THETA
) ......................................................................................... 312
NAME
) .............................................................................. 313
FILE
) ......................................................................................... 314
) ............................... 311
) ................................................................. 315
DEVICE
)................................................................................. 316
DISP OFF () .................................................................................................. 317
DISP ON () ................................................................................................... 318
DRV CTRL (
EMPTY WRITE QUEUE (
ENABLE DEVICE (
PORT, FUNCTION, DATA OR VALUE
DEV
).............................................................................. 320
DEVICE
).................................................................................. 321
???
) .................................................. 319
END BATCH ()................................................................................................ 322
EXP(
VALUE
) ................................................................................................. 323
EXP10(
VALUE
) .............................................................................................. 324
FILL (
ELEMENT, DATA, COUNT
FIND (
STRING,CHAR,SKIP
FIND FILE FIRST (
DIR
) ...................................................................................... 327
).......................................................................... 325
)................................................................................ 326
FIND FILE NEXT () ........................................................................................... 328
FIND TAG INDEX (
LABEL
)................................................................................... 329
FORMAT COMPACT FLASH () ............................................................................... 330
PAGE X http://www.redlion.net/controller
GETTING STARTED TABLE OF CONTENTS
FTP GET FILE (
FTP PUT FILE (
GET ALARM TAG (
SERVER, LOC, REM, DELETE
SERVER, LOC, REM, DELETE
INDEX
)....................................................................................333
) ............................................................331
) ............................................................332
GET BATCH ().................................................................................................334
GET CAMERA DATA (
GET DATE (
TIME
GET DISK FREE BYTES (
GET DISK FREE PERCENT (
GET DISK SIZE BYTES (
GET FORMATTED TAG (
GET INTERFACE STATUS (
GET INT TAG (
GET MONTH DAYS (
GET NET GATE (
GET NET ID (
GET NET IP (
PORT
GET NET MASK (
PORT, CAMERA, PARAM
)...........................................................335
) AND FAMILY ...........................................................................336
DRIVE
).............................................................................337
DRIVE
) .........................................................................338
DRIVE
) .............................................................................339
INDEX
).............................................................................340
PORT
)...........................................................................341
INDEX
)........................................................................................342
Y, M
) ...................................................................................343
PORT
) ......................................................................................344
PORT
) ..........................................................................................345
)...........................................................................................346
PORT
) ......................................................................................347
GET NOW ()...................................................................................................348
GET NOW DATE ()............................................................................................349
GET NOW TIME () ............................................................................................350
GET PORT CONFIG (
GET REAL TAG (
GET STRING TAG (
GET TAG LABEL (
GET UP DOWN DATA (
GET UP DOWN STEP (
GOTO PAGE (
PORT, PARAM
INDEX
)......................................................................................352
INDEX
)...................................................................................353
INDEX
) ....................................................................................354
DATA, LIMIT
DATA, LIMIT
NAME
) .........................................................................................357
) .......................................................................351
).......................................................................355
) .......................................................................356
GOTO PREVIOUS () ..........................................................................................358
HAS ACCESS (
RIGHTS
) .....................................................................................359
HIDE POPUP () ...............................................................................................360
INT TO TEXT (
IS DEVICE ONLINE (
IS WRITE QUEUE EMPTY (
LEFT (
LEN (
STRING
LOAD CAMERA SETUP (
LOG (
VALUE
LOG10 (
DATA, RADIX, COUNT
DEVICE
STRING, COUNT
) ...............................................................................362
DEV
) ....................................................................................364
).....................................................................361
).............................................................................363
) ................................................................................................365
PORT, CAMERA, INDEX, FILE
) .................................................366
) .................................................................................................367
VALUE
)..............................................................................................368
LOG SAVE ()...................................................................................................369
MAKE FLOAT (
MAKE INT (
VALUE
) .......................................................................................370
VALUE
)...........................................................................................371
REVISION 6 PAGE XI
TABLE OF CONTENTS CRIMSON U SER M ANUAL - M ODULAR C ONTROLLER
MAX (A, B)................................................................................................... 372
MEAN (
ELEMENT, COUNT
MID (
STRING, POS, COUNT
) ................................................................................ 373
).............................................................................. 374
MIN (A, B) ................................................................................................... 375
MUL DIV (
A, B, C
) .......................................................................................... 376
MUTE SIREN ()............................................................................................... 377
NEW BATCH (
NAME
) ........................................................................................ 378
NOP () ........................................................................................................ 379
OPEN FILE (
NAME, MODE
)................................................................................. 380
PI ()........................................................................................................... 381
PLAY RTTTL(
POP DEV (
PORT CLOSE (
PORT GET CTS(
PORT INPUT (
PORT PRINT (
PORT READ (
PORT SET RTS(
PORT WRITE (
POST KEY (
POWER (
RAD 2 DEG (
RANDOM (
READ DATA (
READ FILE (
READ FILE LINE (
RENAME FILE (
RIGHT (
SAVE CAMERA SETUP (
SCALE (
SEND FILE (
SEND MAIL (
SET (
TAG, VALUE
SET INT TAG (
SET LANGUAGE (
SET NET CONFIG (
SET NOW (
SET PORT CONFIG (
SET REAL TAG (
SGN (
VALUE
SHOW MENU (
TUNE
) ....................................................................................... 382
ELEMENT, COUNT
PORT
) ........................................................................................ 384
PORT
PORT, START, END, TIMEOUT, LENGTH
PORT, STRING
PORT, PERIOD
PORT, STATE
PORT, DATA
CODE, TRANSITION
VALUE, POWER
THETA
) ......................................................................................... 393
RANGE
) .......................................................................................... 394
DATA, COUNT
FILE, CHARS
FILE
HANDLE, NAME
STRING, COUNT
DATA, R
1
,
R
RCPT, FILE
RCPT, SUBJECT, BODY
) ............................................................................. 383
) ..................................................................................... 385
) .............................................. 386
) ............................................................................. 387
).............................................................................. 388
)............................................................................ 389
)............................................................................... 390
).......................................................................... 391
).................................................................................. 392
)............................................................................... 395
).................................................................................. 396
) ...................................................................................... 397
)........................................................................... 398
).................................................................................. 399
PORT, CAMERA, INDEX, FILE
2
,
E
1
,
E
2
).......................................................................... 401
) ................................................. 400
).................................................................................... 402
) .................................................................... 403
) .......................................................................................... 404
INDEX, VALUE
CODE
PORT, ADDR, MASK, GATE
TIME
) ............................................................................................ 408
PORT, PARAM, VALUE
INDEX, VALUE
) ............................................................................. 405
)..................................................................................... 406
) ......................................................... 407
) ............................................................. 409
)............................................................................ 411
) ................................................................................................ 412
NAME
) ....................................................................................... 413
PAGE XII http://www.redlion.net/controller
GETTING STARTED TABLE OF CONTENTS
SHOW POPUP (
SIN(
THETA
NAME
) .......................................................................................414
) ..................................................................................................415
SIREN ON () ..................................................................................................416
SLEEP (
PERIOD
) .............................................................................................417
SQRT (
VALUE
)................................................................................................418
STD DEV (
ELEMENT, COUNT
) ..............................................................................419
STOP SYSTEM ()..............................................................................................420
STRIP (
TEXT, TARGET
SUM (
ELEMENT, COUNT
TAN(
THETA
) .................................................................................................423
TEST ACCESS (
TEXT TO ADDR (
TEXT TO FLOAT (
TEXT TO INT (
TIME (
H, M, S
STRING, RADIX
) ..............................................................................................428
USE CAMERA SETUP (
) .....................................................................................421
)...................................................................................422
RIGHTS, PROMPT
ADDR
)......................................................................................425
STRING
)...................................................................................426
).........................................................................424
) ............................................................................427
PORT, CAMERA, INDEX
) ..........................................................429
USER LOG OFF () .............................................................................................430
USER LOG ON () ..............................................................................................431
WAIT DATA (
WRITE FILE (
WRITE FILE LINE (
DATA, COUNT, TIME
FILE, TEXT
)...................................................................................433
FILE, TEXT
).............................................................................434
).......................................................................432
TROUBLESHOOTING ...................................................................................... 435
GENERAL .....................................................................................................435
CRIMSON MESSAGES .......................................................................................438
SERIAL COMMUNICATION .................................................................................439
ETHERNET COMMUNICATION .............................................................................440
PROGRAMS ...................................................................................................441
WEB SERVER ................................................................................................442
REVISION 6 PAGE XIII
CRIMSON 2
SER M ANUAL
U
MODULAR CONTROLLER
GETTING STARTED SYSTEM REQUIREMENTS
GETTING STARTED
Welcome to Crimson 2—the latest configuration package from Red Lion Controls. Crimson
is designed to provide quick and easy access to the features of the Modular Controller and
Data Station series, while still allowing the advanced user to take advantage of high-end
features, such as Crimson’s unique programming support.
SYSTEM REQUIREMENTS
Crimson 2 is designed to run on PCs with the following specifications…
• A Pentium class processor as required by the chosen operating system.
• RAM and free disk space as required by the chosen operating system.
• An additional 50MB of disk space for software installation.
• A display of at least 800 by 600 pixels, with 256 or more colors.
• An RS-232 or USB port for downloading.
Crimson 2 is designed to operate with all versions of Microsoft Windows from Windows 95
upwards. If you want to take advantage of the USB port provided by the Master module, you
will need to use, as a minimum, Windows 98. If you intend to use the USB port to remotely
access the Master’s CompactFlash card, we recommend that you use Windows 2000 or
Windows XP. While Windows 98 is capable of accessing the card, the later versions of the
operating system provide more robust operation, and are much better about when they choose
to lock the card, thereby preventing the C2 runtime from writing data.
INSTALLING THE SOFTWARE
If you downloaded the Crimson software from Red Lion’s website, simply execute the
download file, and follow the instructions. If you received a copy of Crimson on CD, place
the CD in your system’s CDROM drive, and follow the instructions that will appear. If no
instructions appear, you may have auto-run disabled. In that case, select the Run option from
the Start menu, and enter
follow the resulting instructions, and the software will be installed.
x:\setup, where x is the drive letter of your CDROM drive. Again,
CHECKING FOR UPDATES
If you have an Internet connection, you can use the Check for Update command in the Help
menu to scan Red Lion’s web site for a new version of Crimson. If a later version than the
one you are using is found, Crimson will ask if it should download the upgrade and update
your software automatically. You may also manually download the upgrade from Red Lion’s
website by visiting the Downloads page within the Support section. Either way, when the
upgrade package executes, be sure to select the Repair option to update your installation.
REVISION 6 PAGE 1
INSTALLING THE USB DRIVERS CRIMSON U SER M ANUAL - M ODULAR C ONTROLLER
INSTALLING THE USB DRIVERS
When you first connect a Master module to your PC using a USB cable, Windows will
prompt you for the location of the drivers for the device. The default location for these drivers
is C:\Program Files\Red Lion Controls\Crimson 2.0\Device. When the Hardware Setup
Wizard appears, choose the Browse option, and either point the Wizard at that location or
whatever other location you specified during installation of the software. It is important that
you perform this step correctly, or you may have to manually remove the drivers using the
Device Manager, and repeat the installation once more. Windows XP users should note that
Crimson’s USB drivers have not been digitally signed by Microsoft, and you will therefore a
dialog offering you the chance to stop the installation. You should be sure to select the
Continue option to indicate that you do indeed wish to install the drivers.
PAGE 2 http://www.redlion.net/controller
QUICK START OVERVIEW
QUICK START
The Modular Controller is a versatile platform, truly requiring a 300+ page manual. However,
you’ll no doubt want to jump right into programming before reading it in its entirety. The
following section provides you with enough information to develop a working system.
OVERVIEW
For the simplest of applications, only the first two icons eg. Modules and Communications,
are necessary. The former configures the system, allowing you to add, delete and edit
modules, while the latter allows module data to be mapped to an external device(s).
MODULES
The first step in the configuration of a database is to create and configure the various modules
used in the application. This is done under the Modules window of Crimson.
To insert a module into the system, double click on the blank base. You will be prompted to
choose the type of module to insert. You may also provide a descriptive name for the module.
REVISION 6 PAGE 3
COMMUNICATIONS CRIMSON U SER M ANUAL - M ODULAR C ONTROLLER
Edit the individual module’s properties by double-clicking it. Each module and its properties
are explained in detail in later sections.
COMMUNICATIONS
Next, you’ll want to configure a port to communicate data to your PLC, PC, etc. The ports are
configured under the Communications window of the software. Click the Edit button in the
driver selection area to choose a protocol.
In the example below, Allen Bradley DF1 Master has been selected as the protocol. By doing
so, a device called PLC1 has been created. You should verify that the driver properties eg.
parity, baud rate, address, etc. make sense for your application.
MAPPING DATA
To map data between the Modular Controller and an external device, you’ll need to create
two so-called Gateway Blocks; one for moving module data into your device, and one for
getting module data from your device.
PAGE 4 http://www.redlion.net/controller
QUICK START MAPPING DATA
To create a Gateway Block, click PLC1 , and then click the Add Gateway Block button on the
right hand pane. This creates a single gateway block for mapping data…
Next, you’ll need to identify the register locations that you wish to map data to or from,
starting with a register address. Click the Edit button to see the registers supported by
Crimson for the selected protocol…
Enter the desired number of registers in the Block Size property, as well as the desired
direction using the Direction property.
In our example below, registers N7:0 through N7:16 have been allocated.
REVISION 6 PAGE 5
MAPPING DATA CRIMSON U SER M ANUAL - M ODULAR C ONTROLLER
To map module data, select one of the registers. A list of available data will be shown in the
right hand pane…
To map items from the right hand pane to the items on the left, simply double click them, one
at a time. The cursor will automatically move to the next consecutive register, allowing you to
quickly map all of the items. Instead of clicking the data in the right hand pane, you may also
drag and drop the data onto specific registers.
PAGE 6 http://www.redlion.net/controller
QUICK START DOWNLOADING
In the example above, each of the first module’s input values have been mapped to registers
N7:0 through N7:7. The direction of the arrows indicates that the Modular Controller will
write these values into the PLC.
Next, another block is created to move data from the PLC to the Modular Controller. This is
done by changing the block’s Direction property to Device to MC. In the example below,
Module1’s offset values are mapped to registers N11:0 through N11:7. The Direction
property indicates that the MC will get the value from the PLC registers, and write them into
the module’s offset values.
DOWNLOADING
To download to the Master via serial is trivial. Simply make sure you’ve selected the proper
COM port under Link-Options.
REVISION 6 PAGE 7
CONNECT THE TWO CRIMSON U SER M ANUAL - M ODULAR C ONTROLLER
If you plan to use the USB port to download to the Master, you should take the time to read
the section titled Installing the USB Drivers
. The Ethernet port isn’t configured from the
factory, so it can’t be used as a means to download an initial database.
CONNECT THE TWO
That’s it. Connect the device to the MC, and if you’ve selected a master protocol, the
Modular Controller will do the rest. Simply look at the target registers, and you should see the
data being written to them. Try changing the registers that have been set for Device to MC,
and the modules should respond accordingly.
If you’ve configured the Modular Controller to act as a slave, you’ll have to initialize
whatever it is you’re using to communicate with the MC, and read and write the data
accordingly.
PAGE 8 http://www.redlion.net/controller
CRIMSON BASICS MAIN SCREEN ICONS
CRIMSON BASICS
To run Crimson, select the Crimson icon from the Red Lion Controls folder on the Programs
section of your Start Menu. The main C2 screen will appear, showing the icons that are used
to configure the various aspects of the Modular Controller’s behavior…
The software is designed such that the first three icons are the only ones required for the
majority of simple applications. The remainder of the icons provide access to the Master’s
more advanced features, such as programming, data logging and the web server.
MAIN SCREEN ICONS
The sections below provide an overview of each icon in turn…
M
ODULES
This icon is used to configure the modules within the system. Modules may
be added, deleted, or have their order on the rail modified. Each module may
then be accessed in order to configure their specific properties.
C
OMMUNICATIONS
This icon is used to specify which protocols are to be used on the Master’s
serial ports and on the Ethernet port. Where master protocols are used (ie.
protocols by which the Master module initiates data transfer to and from a
remote device) you can also use this icon to specify one or more devices to
be accessed. Where slave protocols are used (ie. protocols by which the
Master receives and responds to requests from remote devices or computer systems) you can
specify which data items are to be exposed for read or write access. You can also use this icon
to move data between one remote device and another via Crimson’s protocol converter.
REVISION 6 PAGE 9
MAIN SCREEN ICONS CRIMSON U SER M ANUAL - M ODULAR C ONTROLLER
DATA TAGS
This icon is used to rename data items from the modules, as well as to define
items be accessed within the remote devices. It also allows the creation of
internal data items to store information within the Master itself. Each tag has
a variety of properties associated with it. The most basic property is
formatting data, which is used to specify how the data held within a tag is to
be shown on the Master’s virtual HMI, and on such things as web pages. By specifying this
information within the tag, Crimson removes the need for you to re-enter formatting data each
time a tag is displayed. More advanced tag properties include alarms that may activate when
various conditions relating to the tag occur, or triggers, which perform programmable actions
on similar conditions.
U
SER I NTERFACE
This icon is used to create and edit display pages of the virtual HMI, and to
specify what actions should be taken when the HMI’s keys are pressed,
released or held down. The page editor allows you to display various
graphical items known as primitives. These vary from simple items, such as
rectangles and lines, to more complex items that can be tied to the value of a
particular tag or expression. By default, such primitives use the formatting information
defined when the tag was created, but this information can be overridden if required.
P
ROGRAMMING
This icon is used to create and edit programs using C2’s unique C-like
programming language. These programs can perform complex decision
making or data manipulation operations based upon any data items within
the system. They serve to extend the functionality of Crimson beyond that of
the standard functions included in the software, thereby ensuring that even
the most complex applications can be tackled with ease.
D
ATA L OGGER
This icon is used to create and manage data logs, each of which can record
any number of variables to the Master’s CompactFlash card. Data may be
recorded as quickly as once per second. The recorded values will be stored
in CSV (comma separated variable) files that can easily be imported into
applications such as Microsoft Excel. The files can be accessed by
swapping-out the CompactFlash card, by mounting the card as a drive on a PC connected on
the Master’s USB port, or by accessing them via Crimson’s web server via the Ethernet port.
W
EB S ERVER
This icon is used to configure Crimson’s web server and to create and edit
web pages. The web server is capable of providing remote access to the
Master via a number of mechanisms. First, you can use Crimson to create
automatic web pages which contain lists of tags, each formatted according to
the tag’s properties. Second, you can create a custom site using a third party
PAGE 10 http://www.redlion.net/controller
CRIMSON BASICS SELECTING THE MODULAR CONTROLLER
HTML editor such as Microsoft FrontPage, and then include special text to instruct Crimson
to insert live tag values. Finally, you can enable C2’s unique remote access and control
feature, which allows a web browser to view the Master’s virtual HMI and control its
keyboard. The web server can also be used to access CSV files from the Data Logger.
S
ECURITY M ANAGER
This icon is used to create and manage the various users of the panel, as well
as the access rights granted to them. Real names may also be given, which
allows the security logger to record not only what data was changed and
when, but also by whom the data was changed. The rights required to
modify a particular tag, or to access a page, are set via the security
properties of the individual item.
SELECTING THE MODULAR CONTROLLER
When Crimson first starts, it will assume that you are continuing to work with the same Red
Lion device as was used by the last loaded database. If Crimson has not been previously
executed, it will assume you are working with a G303 HMI. To configure the Modular
Controller, select the New command from the File menu. The following dialog will appear…
The dialog lists the devices supported by the current version of the software, providing a
description of each. Selecting a device will create a blank database, and reconfigure Crimson
to work with that specific product.
REVISION 6 PAGE 11
USING BALLOON HELP CRIMSON U SER M ANUAL - M ODULAR C ONTROLLER
USING BALLOON HELP
Crimson provides a useful feature called Balloon Help...
This feature allows you to see help information for each icon in the main menu, or for each
field in a dialog box or window. It is controlled via the icon at the right-hand edge of the
toolbar, and can be configured to three modes, namely “Do Not Display”, in which case
balloon help is disabled; “When Mouse Over”, in which case help is displayed when the
mouse pointer is held over a particular field for a certain period of time; or “When Selected”,
in which case help is always displayed for the currently selected field.
WORKING WITH DATABASES
Crimson stores all the information about a particular device’s configuration in what is called a
database file. These files have the extension of
CD2, although Windows Explorer will hide
this extension if it is left in its default configuration. Crimson database files differ from those
used by previous Red Lion products, in that they are text files which are thus far easier to
recover in the case of accidental corruption. Databases are manipulated via the commands
found on the File menu. These commands are standard for all Windows applications, and
need no further explanation. The exception is Save Image, which will be covered later.
DOWNLOADING TO THE MASTER
Crimson database files are downloaded to the Master by means of the Link menu. The
download process typically takes only a few seconds, but can take somewhat longer on the
first download if Crimson has to update the firmware in the Master, or if the Master does not
contain an older version of the current database. After this first download, however, Crimson
uses a process known as incremental download to ensure that only changes to the database are
transferred. This means that changes can be made in seconds, thereby reducing your
development cycle time and simplifying the debugging process.
C
ONFIGURING THE LINK
The programming link between the PC and the Master is made using an RS-232 serial port, a
USB port or a TCP/IP connection. While TCP/IP connections are typically made via the
PAGE 12 http://www.redlion.net/controller