Cripson

Download as pdf or txt
Download as pdf or txt
You are on page 1of 350

Crimson® 3.

1
User Manual
LP1044-F | January 2019
COPYRIGHT
©2017-2019 Red Lion Controls, Inc. All rights reserved. Red Lion, the Red Lion logo, and Crimson are
registered trademarks of Red Lion Controls, Inc. All other company and product names are trademarks of
their respective owners.

Red Lion Controls, Inc.


20 Willow Springs Circle
York, PA 17406

CONTACT INFORMATION:
Inside US: +1 (877) 432-9908
Outside US: +1 (717) 767-6511

Website: www.redlion.net
Email: support@redlion.net
TABLE OF CONTENTS REVISED 2019-1-15
DRAWING NO. LP1044-F

Table of Contents
Preface  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Disclaimer  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Purpose  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Audience  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Trademark Acknowledgments   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Document History and Related Publications  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  xx
Publication History  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  xx
Related Documents  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  xx
Additional Product Information   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  xx
Document Comments  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  xx
Getting Started   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  1
Supported Devices  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  1
System Requirements  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  1
Installing the Software  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  1
Registration  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  2
Checking for Updates  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  2
Installing the USB Drivers  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  2
Troubleshooting  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  3
Getting Assistance  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  4
The Next Steps  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  4
Moving from Crimson 3.0   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5
Importing Databases  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5
Symbol Selection  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  6
Model Conversion  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  6
Converting from Graphite  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  6
Converting from G3  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  7
Converting from G3 Kadet  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  7
Converting from Data Station Plus  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  7
Converting from Other Devices   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  7
Custom Web Sites  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  8
New Features  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  8
 Zero Config  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  8
OPC UA Server  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  8
New Primitives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  8
Symbol Library  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Web Server  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
IEC‐61131  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Crimson Basics   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Window Layout  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
The Navigation Pane  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
The Resource Pane  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
The Editing Pane  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Collapsing Panes  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
The Categories  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
 

Crimson® 3.1 Software Manual -i-


TABLE OF CONTENTS REVISED 2019-1-15
DRAWING NO. LP1044-F

Communications  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Data Tags  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Display Pages  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Programs  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Web Server  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Data Logger  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Security  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
SQL Queries  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Control  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
I/O Modules  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Getting Around  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Back and Forward  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Category Shortcuts  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Item Shortcuts  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Navigation Lists  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  17
Working with Folders  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  17
Sorting Lists and Folders   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  17
Drag and Drop Operations   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Searching in Lists  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Private Items  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Undo and Redo  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Global Searching  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Working with Databases  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Importing from Crimson 2.0   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Importing from Crimson 3.0   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Database Identifiers  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  20
Saving an Image  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  20
Database Protection  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Converting a Database  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Finding Database Errors   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Downloading to a Device  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Configuring the Link  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Sending the Database  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Extracting Databases  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Sending the Time and Date  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
The Memory Card  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  25
Mounting the Card  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  25
Formatting the Card  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  25
Remote Monitoring  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  26
System Menu  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  26
Using Communications   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  27
Network Configuration  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  27
Zero Config  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  27
Ethernet Settings  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Port Settings  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
DNS Settings  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Physical Layer  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
 

Crimson® 3.1 Software Manual -ii-


TABLE OF CONTENTS REVISED 2019-1-15
DRAWING NO. LP1044-F

Maximum Segment Size  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Multiple Ports  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
TLS‐SSL Settings  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Settings  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Trusted Roots  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Routing Settings  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Routing Mode  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Routing Table  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Download Settings  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Remote Update  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Unit Addressing  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Adding Ports  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Protocol Selection  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Using Virtual Ports  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Serial Port Selection  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Selecting a Protocol  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Protocol Options  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Working with Devices  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Advanced Settings  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Creating Tags  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Port and Device Usage  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Using Expansion Modules  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Slave Protocols  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Selecting the Protocol  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Adding Gateway Blocks  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  37
Adding Items to a Block  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  37
Accessing Individual Bits   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Protocol Conversion  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Master and Slave  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Master and Master  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Which Way Around?  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Controlling Master Blocks  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Data Transformation  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Disabling Communications  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Working with Tags   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
All About Tags  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Data Sources  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Types of Tags  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Tag Key  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Tag Attributes  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Advantages of Tags  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Editing Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  45
Expression Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  45
Selecting a Tag  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  45
Creating a Tag  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  45
Comms References  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Editing an Expression  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
 

Crimson® 3.1 Software Manual -iii-


TABLE OF CONTENTS REVISED 2019-1-15
DRAWING NO. LP1044-F

Complex Expressions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  47
Translatable Strings  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  47
Two‐Way Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Action Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Color Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  49
Log Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  50
Creating Tags  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  50
Duplicating Tags  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  50
Editing Multiple Tags  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  51
Using Copy From  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  51
Using Paste Special  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  51
Property Selections  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  51
Importing and Exporting  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  52
Finding Tag Usage  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  52
Numeric Tags  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  53
Data Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  53
Data Source  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  53
Data Scaling  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  55
Data Simulation  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  55
Data Actions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  56
Data Setpoint  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  56
Format Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  56
Data Labels  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  56
Format Type  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  56
Data Limits  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  57
Color Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  57
Color Type  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  57
Alarm Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
For Each Alarm  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Trigger Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
For Each Trigger  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Plot Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Security Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Flag Tags  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  62
Data Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  62
Data Source  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  62
Data Simulation  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Data Actions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Data Setpoint  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Format Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Data Labels  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Format Type  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Color Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Color Type  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Alarm Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
For Each Alarm  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

Crimson® 3.1 Software Manual -iv-


TABLE OF CONTENTS REVISED 2019-1-15
DRAWING NO. LP1044-F

Trigger Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  67
For Each Trigger  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Security Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
String Tags  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Data Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Data Source  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Data Simulation  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  70
Data Actions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  70
Format Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Data Labels  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Format Type  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Color Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Color Type  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  72
Security Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  72
Basic Tags  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  73
Data Value  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  73
Data Simulation  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  73
Data Labels  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  73
Advanced Topics  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  74
Array Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  74
Tag Data Flow  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  74
Numeric Tag Read Process  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  74
Numeric Tag Write Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  75
Using On Write  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  75
Using Formats   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  76
Format Types  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  76
General Format  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Linked Format  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Numeric Format  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Fixed Data Format  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Dynamic Data Format  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  78
Format Units  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  78
Scientific Format  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  78
Fixed Data Format  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  79
Dynamic Data Format  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  79
Format Units  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  79
Time and Date Format  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  79
Format Mode  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  79
Time Format  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Date Format  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
IP Address Format  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Two‐State Format  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
The Multi‐State Format  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Format Control  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Format States  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Format Commands  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

Crimson® 3.1 Software Manual -v-


TABLE OF CONTENTS REVISED 2019-1-15
DRAWING NO. LP1044-F

The String Format  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  82
Using Colorings   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Types of Coloring   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
General Coloring  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Linked Coloring  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Fixed Coloring  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Two‐State Coloring  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Multi‐State Coloring  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Format Control  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Format States  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Color Commands  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Creating Display Pages   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Editor Basics  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Working with Pages  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Changing the Zoom Level   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
The Resource Pane  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  87
Primitives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  87
Symbol Library  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  87
Data Tags  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Adding Items to a Page  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Working with Primitives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Selecting Primitives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Buried Primitives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Using the Quick Bar  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Moving Primitives Between Pages  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Moving Primitives Between Databases   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Changing the Size of Primitives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Rotating and Reflecting Primitives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Using Layout Handles  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Smart Alignment  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Quick Alignment  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Using the Grid  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Aligning Primitives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  92
Spacing Primitives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  92
Reordering Primitives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  92
Duplicating Primitives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Editing Multiple Primitives   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Using Copy From  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Using Paste Special  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Property Selections  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Jumping to Other Items  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  94
Primitive Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Showing or Hiding Primitives   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Defining Primitive Colors  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Defining Flashing Colors   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  97
Defining 2‐State Colors  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  97
 

Crimson® 3.1 Software Manual -vi-


TABLE OF CONTENTS REVISED 2019-1-15
DRAWING NO. LP1044-F

Defining 4‐State Colors  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Defining Blended Colors   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Defining Tank Fills  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Defining Fill Formats  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Legacy Fill Formats  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Defining Edge Formats  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Defining Edge Trim  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Legacy Edge Formats  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Recoloring Symbols  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Using Groups  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Making and Breaking Groups   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Editing Within Groups  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Nested Group Editing  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Expanding Groups  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Adding Movement to Primitives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Adding Text to Primitives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Text Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
More Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Adding Data to Primitives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Data Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
More Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Entry Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Format Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Color Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Adding Actions to Primitives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Protecting Actions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Enabling Actions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
The Goto Page Action  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
The User Defined Action   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
The Push Button Action  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
The Change Value Action  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
The Ramp Value Action  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
The Play Tune Action  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
The Log On User Action  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
The Log Off User Action  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
The Hide Popup Action  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
The Hide All Popups Action  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Adding Actions to Icons  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Editing Page Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
General Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
More Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Action Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Security Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
User Interface Settings  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Global Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Global Actions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Global Timeouts  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Popup Position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
 

Crimson® 3.1 Software Manual -vii-


TABLE OF CONTENTS REVISED 2019-1-15
DRAWING NO. LP1044-F

Diagnostics  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Languages  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Entry Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Keypad Options  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Data Entry Mode  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Miscellaneous  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Images Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Images  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Maintenance  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Fonts Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Maintenance  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Icons Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Managing Images  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Managing Fonts  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Advanced Topics  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Defining Color Expressions   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Building Colors  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Splitting Colors  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Choosing Colors  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Blending Colors  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Responding to Touch  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Primitive Types   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Core Primitives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Geometric Primitives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Basic Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Other Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
The Line Primitive  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Line Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Edge Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Text and Data Primitives   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
The Image Primitive  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Defining Images  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Adjusting Images  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
The Bevel Primitive  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Figure Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Line Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
The Button Primitives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Gauge Primitives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Gauge Concepts  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Types  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Bugs  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Bands  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Styles  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Naked Gauges  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Gauge Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Format Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
 

Crimson® 3.1 Software Manual -viii-


TABLE OF CONTENTS REVISED 2019-1-15
DRAWING NO. LP1044-F

Layout Properties for Radial Gauges  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Layout Properties for Linear Gauges  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Style Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Band Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Bug Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Bar and Line Graphs  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
The Bar Graph Primitives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Option Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Figure Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Scatter Graph Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Line Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Option Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Figure Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Action Buttons  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Illuminated Buttons  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Indicators  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
2‐State Toggles  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Switch Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Advanced Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
3‐State Toggles  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Switch Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Advanced Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
2‐State Selectors  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
3‐State Selectors  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
System Primitives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Viewer Format  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
The Alarm Viewer  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Option Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Actions Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Time Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Color Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
The Alarm Ticker  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Options Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
The Event Viewer  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Options Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Enables Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Time Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
File Viewer  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Options Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
User Manager  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Trend Viewer  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Options Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Format Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Buttons Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Time Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Pen Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Fill Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
 

Crimson® 3.1 Software Manual -ix-


TABLE OF CONTENTS REVISED 2019-1-15
DRAWING NO. LP1044-F

Touch Calibration  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Touch Tester  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
PDF Viewer  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Option Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Camera  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Option Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Figure Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Legacy Primitives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Scale Primitive  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Data Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Figure Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Limit Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Format Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Localization   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Selecting Languages  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Configuring Auto‐Translation   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Translating Your Database  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Entering Translations  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Global Auto‐Translation   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Exporting and Importing   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Applying a Lexicon  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Previewing Translations  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Switching Languages  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Using Widgets   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Creating a Widget  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Summary  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  174
Why This Matters  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  174
Down to Details  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Widget Data Definitions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Filing Widgets  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  176
Folder Binding  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Advanced Binding  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Class Matching  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Binding Prefixes  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Using Bind To  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Using Periods  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Using Carets  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Special Name  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Details Widgets  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Enabling Details Creation   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Defining Data Items  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Results of Binding  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Multiple Details Pages  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

Crimson® 3.1 Software Manual -x-


TABLE OF CONTENTS REVISED 2019-1-15
DRAWING NO. LP1044-F

Using the Data Logger   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Creating Data Logs  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Setup Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Contents Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Monitor Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Batch Logging  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Controlling a Batch  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Digital Signatures  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Log File Storage  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
The Logging Process  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Accessing Log Files  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Using the Web Server   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Switching Versions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Web Server Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Control Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Feature Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Security Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Advanced Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Adding Webpages  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Working with Certificates  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Using Certificates  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Obtain a Commercial Certificate   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Use a Local Certification Authority   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Use a Self‐Signed Certificate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Use the Default Certificate  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Beyond the Subnet  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Don’t Bother  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Using a Custom Website  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Creating Custom Websites   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Naming  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Resources  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Server Commands  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Server Include  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Cache Control  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Embedded Data  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Tag Data  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Global Data  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Data Index Data  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Data View Data  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
AJAX Updates  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Reading Tags  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Writing Tags  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Site Deployment  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201

Crimson® 3.1 Software Manual -xi-


TABLE OF CONTENTS REVISED 2019-1-15
DRAWING NO. LP1044-F

Using the Security System   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Security Basics  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Object‐Based Security  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Named Users  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
User Rights  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Access Control  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Write Logging  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Default Access  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
On‐Demand Logon  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Maintenance Access  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Check Before Operate  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Security Settings  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
Creating Users  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Specifying Tag Security  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Specifying Page Security  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Security Related Functions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Using SQL Queries   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Configuring the Server  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Creating Queries  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Filtering the Results  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Checking the SQL Code  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Creating Columns  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Mapping Tags  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Using IEC‐61131   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Why Use Control?  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Learning IEC‐61131  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Working with Programs  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Types of Program  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Creating Programs  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Editing Programs  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
The Structured Text Editor  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
The Function Block Diagram Editor  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
The Ladder Diagram Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
The Instruction List Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Converting Programs  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Program Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Using Variables  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Creating Variables  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Variable Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Parameters  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Project Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Project Rebuilding  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
IEC‐61131 Debugging  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

Crimson® 3.1 Software Manual -xii-


TABLE OF CONTENTS REVISED 2019-1-15
DRAWING NO. LP1044-F

Using Connectors   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Configuring Connectors  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Common Settings  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Network Options  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
Device Data Options  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Tag Data Options  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Triggered Mode  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Connector Diagnostics  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Data Buffering  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
JSON Data Layout  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Connector Options  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Connection Status  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Device Data  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Tag Data  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Site Naming  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
The Generic MQTT Connector  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Connector Settings  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Connector Operation  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
The Amazon MQTT Connector   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Connector Settings  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Connector Operation  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
The Azure MQTT Connector   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Connector Settings  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Connector Operation  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
The Google MQTT Connector   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Connector Settings  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Connector Operation  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
The Sparkplug MQTT Connector  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Connector Settings  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Connector Operation  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Using Services   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Using the OPC UA Server  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Configuring the Service  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Service Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Data Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Data Presentation  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Historic Data  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Using Time Management  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Configuring the Service  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Time Server  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Time Client  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Time Stamps  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Choosing an SNTP Server  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Time‐Zone Configuration  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Using the FTP Server  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Configuring the Service  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252

Crimson® 3.1 Software Manual -xiii-


TABLE OF CONTENTS REVISED 2019-1-15
DRAWING NO. LP1044-F

FTP Security  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Using the OPCWorx Proxy  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Configuring the Service  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Using File Synchronization  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Configuring the Service  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
FTP Client  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Log Synchronization  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Using Electronic Mail  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Adding Contacts  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Configuring SMTP  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Configuring SMS  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Using SQL Sync  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Configuring the Service  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Sharing Ports   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Enabling TCP/IP  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Sharing the Required Port  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Connecting via Another Port  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Connecting via Ethernet  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Pure Virtual Ports  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Limitations  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Using Modems   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Adding a Dial‐In Connection   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Adding a Dial‐Out Connection  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Adding an SMS Connection  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
SMS Message Processing  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Modem Expansion Cards  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Checking the Modem Status  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  270
Using Multiple Interfaces  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Interface Selection  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Default Route  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  272
Using the USB Host   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  273
Memory Stick Support  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  273
General Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  273
Transfer Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  274
Keyboard Support  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  274
Mouse Support  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  274
Using Programs   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
The Program List  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Finding Program Usage  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Editing Programs  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  276
Getting Help  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  276
The Resource Pane  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  276
Program Data Types  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Program Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Adding Comments  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
 

Crimson® 3.1 Software Manual -xiv-


TABLE OF CONTENTS REVISED 2019-1-15
DRAWING NO. LP1044-F

Returning Values  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Avoiding Pitfalls  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Passing Arguments  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Programming Tips  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Multiple Actions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
If Statements  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Switch Statements  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Local Variables  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Loop Constructs  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
The While Loop  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
The For Loop  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
The Do Loop  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Loop Control  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Writing Expressions   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Data Values  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Constants  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Integer Constants  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Character Constants  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Logical Constants  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Floating‐Point Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
String Constants  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Tag Values  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Tag Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
Page Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
Comms References  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
Simple Math  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Operator Priority  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Type Conversion  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Comparing Values  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Testing Bits  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Multiple Conditions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Choosing Values  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Manipulating Bits  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
And, Or and XOR  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
Shift Operators  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
Bitwise NOT  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
Indexing Arrays  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
Indexing Strings  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
Adding Strings  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Calling Programs  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Using Functions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
 Priority Summary  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293

Crimson® 3.1 Software Manual -xv-


TABLE OF CONTENTS REVISED 2019-1-15
DRAWING NO. LP1044-F

Writing Actions   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Changing Page  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Changing Numeric Values  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Simple Assignment  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Compound Assignment  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Increment and Decrement   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Changing Bit Values  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Running Programs  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Using Functions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Graphite I/O Modules   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
Selecting Modules  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
The GMPID PID Modules  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
General Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Operation  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Units  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Initialization  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
SmartOnOff  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
Slope and Offset Example  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Control Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Setpoint  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Auto‐Tune Settings  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
User PID Settings  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Power Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
Power Transfer  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
Transfer Graph  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
Alarm Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
Alarm Behavior Chart  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
Heater Current  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
Input Fault  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Output Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Digital Outputs  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Linear Output (GMPID1 Only)   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
Auto‐Tuning  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
Invoking Auto‐Tune  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
Available Data  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
Loop Status  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Loop / Control  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Loop / Power  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Loop / Alarms  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Loop / PID  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Loop / Profile  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Outputs / Cycle Times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Outputs / Remote Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Outputs / Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
 The GMSG Strain Gauge Input Module  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
General Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
 

Crimson® 3.1 Software Manual -xvi-


TABLE OF CONTENTS REVISED 2019-1-15
DRAWING NO. LP1044-F

Inputs  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Operation  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Initialization  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
SmartOnOff  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Control Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Power Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Alarm Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
Output Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
Auto‐Tuning  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
Available Data  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
Loop / Status  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
Loop / Control  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
Loop / Alarms  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
Loop / Power  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
Loop / ScaleInput1  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
Loop / ScaleInput2  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
Loop / PeakValley  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
Loop / Tare  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
Outputs / Cycle Times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
Outputs / Remote Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
Outputs / Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
 The GMTC and GMRTD Temperature Modules   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
Configuration Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
General  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
Inputs  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
Millivolt Properties (GMTC Only)   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
General  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
Millivolt Scaling  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
Available Data  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Input / Status  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Input / Control  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Input / ScaleMvInputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
The GMINI and GMINV Analog Input Modules   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
Configuration Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
General  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
Inputs  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
Available Data  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Input / Status  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Input / Control  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
 The GMOUT Analog Output Module  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
Configuration Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
Output 1 to Output 4  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
Initial Output Properties   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
Initialization  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
Output Action  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
Available Data  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Data  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
 

Crimson® 3.1 Software Manual -xvii-


TABLE OF CONTENTS REVISED 2019-1-15
DRAWING NO. LP1044-F

Scaling  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Alarms  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
The GMDIO Digital I/O Module  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
Configuration Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
Available Data  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
Variables / Inputs  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
Variables / Outputs  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
 The GMUIN Universal Input Module  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
Input Properties  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
Operation  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
Units  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
Available Data  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
Input / Status  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
Input / Control  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328

Crimson® 3.1 Software Manual -xviii-


REVISED 2019-1-15 PREFACE
DRAWING NO. LP1044-F DISCLAIMER

Preface

Disclaimer
This user manual provides guidance on how to use Crimson® 3.1 to develop powerful and attractive Crimson
device solutions for supported Red Lion devices. It is not intended as a step-by-step guide or a
complete set of all procedures necessary and sufficient to complete all operations.
While every effort has been made to ensure that this document is complete and accurate at the time of release, the
information that it contains is subject to change. Red Lion Controls, Inc is not responsible for any additions to or
alterations of the original document. Industrial networks vary widely in their configurations, topologies, and traffic
conditions. This document is intended as a general guide only. It has not been tested for all possible applications,
and it may not be complete or accurate for some situations.
Users of this document are urged to heed warnings and cautions used throughout the document.

Purpose
This manual gives specific information on how to apply and use the functions provided by Crimson 3.1 to more
efficiently develop robust and attractive Crimson device solutions.

Audience
This manual is intended to be used by personnel responsible for configuring and commissioning Crimson devices
for use in visualization, monitoring, and control applications.

Trademark Acknowledgments
Red Lion Controls, Inc acknowledges and recognizes ownership of the following trademarked terms used in this
document.

• Microsoft®, Windows®, Windows NT®, and Windows Vista™ are either registered trademarks or trade-
marks of Microsoft Corporation in the United States and/or other countries.
All other company and product names are trademarks of their respective owners.

Crimson® 3.1 Software Manual - xix -


PREFACE REVISED 2019-1-15
DOCUMENT HISTORY AND RELATED PUBLICATIONS DRAWING NO. LP1044-F

Document History and Related Publications
The hard copy and electronic media versions of this document are revised only at major releases and therefore,
may not always contain the latest product information. Documentation Notes and/or Product Bulletins will be
provided as needed between major releases to describe any new information or document changes.
The latest online version of this document can be accessed through the Red Lion web site at http://
www.redlion.net/search/node/crimson%203.1%20language%3Aen%2Cund.

Publication History
The following information lists the recent release history of this document.

Issue/Revision Release Date Content Description

10-3-2017/Build 3100.000 March 2017 Initial release of Crimson 3.1 Software Manual
Added support for Graphite HMIs/Controllers and
1-24-2018/Build 3100.008 January 2018
CR1000 HMIs
3-19-2018/Build 3100.010 March 2018 Added additional support for CR1000 HMIs
Document reformatted and edited for alignment with
4-30-2018/Revision C April 2018
updated Red Lion documentation standards
9-17-2018/Revision D September 2018 Added Using Connectors information.
Added Converting from Data Station Plus, and modified
11-05-2018/Revision E November 2018
Auto Initiate property description.

Related Documents
Available documents related to this product can be accessed at http://www.redlion.net/search/node/
crimson%203.1%20language%3Aen%2Cund.

Additional Product Information
Additional product information can be obtained by contacting the local sales representative or Red Lion through the
contact numbers and/or e-mail addresses listed on the inside of the front cover.

Document Comments
Red Lion appreciates all comments that will help us improve our documentation quality. The user can submit
comments through the Red Lion Customer Service. Simply email us at support@redlion.net.

- xx - Crimson® 3.1 Software Manual


REVISED 2019-1-15 GETTING STARTED
DRAWING NO. LP1044-F SUPPORTED DEVICES

Chapter 1 Getting Started

Welcome to Crimson® 3.1, the latest version of Red Lion’s widely-acclaimed Crimson device configuration
software. If you have used an earlier version of Crimson, you will soon notice that Crimson 3.1 provides a huge
number of improvements while retaining all the power that you have grown used to. If you are new to Crimson, be
sure to read at least the first few chapters of this manual to get an introduction to how the software works. Either
way, you will soon find out how Crimson 3.1 makes it easier and quicker for you to design powerful and attractive
Crimson device solutions.

1.1 Supported Devices
Crimson 3.1 supports only those Red Lion products that have the memory capacity and processor performance
necessary to implement the additional features that the software provides. This means that while the Graphite
family of HMIs and controllers can be configured with Crimson 3.1, the G3 HMI and G3 Kadet families are not
supported. It is our expectation that you will migrate your G3 HMI and Kadet applications to the new CR3000 and
CR1000 series, respectively. The currently available versions of the Data Station Plus, the Modular Controller and
the ProducTVity Station are likewise not supported by the Crimson 3.1 software. You must therefore use Crimson
3.0 to configure these devices until updated versions become available.

1.2 System Requirements
Crimson 3.1 is designed to run on any version of Microsoft Windows from Windows Vista onwards. Memory
requirements are modest and any system that meets the minimum system requirements for its operating system
will be able to run Crimson 3.1. About 600MB of free disk space will be needed for installation, and you should
ideally have a display with sufficient resolution to allow the editing of display pages without having to scroll.

1.3 Installing the Software
Crimson 3.1 is supplied as an executable or exe file. You will typically have downloaded this file from Red Lion’s
website, but if you have downloaded it from another source, please check that Windows is satisfied with the
package’s digital signature so that you are assured of receiving genuine Red Lion software:

As shown above, the publisher should show as Red Lion Controls, Inc., and you should optionally be able to use
the Show Details option to further verify the integrity of the digital signature. Once you are happy with the package,
press Yes to start the installation.

Crimson® 3.1 User Manual 1-1


GETTING STARTED REVISED 2019-1-15
REGISTRATION DRAWING NO. LP1044-F

The installation process is standard and ought to proceed without much interaction beyond your specifying the
target directory. Once the process complete, look at your Start Menu and find the Red Lion folder. Click the
Crimson 3.1 icon to start the software.

1.4 Registration
When you first run Crimson 3.1, you will be offered a chance to register your software:

While registration is optional, we strongly recommend that you take the opportunity to provide us with your contact
details so that we can keep you informed about updates to Crimson 3.1 and the associated products. Since
registration requires an Internet connection, you may skip the process if so do not have such a connection
available. Crimson 3.1 will periodically remind you if you are running an unregistered copy of the software.

1.5 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 website for a new version of Crimson 3.1. 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.

1.6 Installing the USB Drivers
If you’ve followed the instructions that came with your target hardware, you will not yet have connected the
hardware to your PC. Now that you have completed the Crimson 3.1 installation, you may safely connect the
device using a standard USB cable. After some churning, Windows should indicate that it has found the drivers for
the new hardware and that it is ready for operation. No further user intervention should be required.

1-2 Crimson® 3.1 User Manual


REVISED 2019-1-15 GETTING STARTED
DRAWING NO. LP1044-F TROUBLESHOOTING

1.7 Troubleshooting
If you connected the target device to your PC before installing Crimson, it is possible that an aborted installation
has made it impossible for you to install the drivers correctly. To check for this, open the Windows Device Manager
by finding the My Computer icon, right-clicking and selecting the Manage command. A window like the one below
should appear:

The exact process for getting to this point will vary from one operating system to another, but the basic idea is the
same: Find the My Computer icon, either on the desktop or on your start menu, right-click it and select Manage. If
that doesn’t work, select the System option from the Control Panel, and activate the Device Manager from the
Hardware tab.
If you have a problem with your USB drivers, you will see a yellow icon carrying an exclamation point under the
Universal Serial Bus controllers category. The name of the icon may be HMI or Loader or something similar. The
broken driver is shown in close-up below:

 
To fix the problem, right-click on the broken device and select Uninstall from the menu:

After asking for confirmation, Windows will remove the device from your system. You can now power the Crimson
3.1 target device off. After a couple of seconds, reapply power and Windows will start the driver installation process
once again.
As mentioned above, Crimson 3.1 actually uses distinct device drivers for the boot loader and for the Crimson
runtime. You may have to repeat this repair process for each driver, although it is unlikely that things got beyond
the boot loader if that install failed.

Crimson® 3.1 User Manual 1-3


GETTING STARTED REVISED 2019-1-15
GETTING ASSISTANCE DRAWING NO. LP1044-F

1.8 Getting Assistance
If you hit a problem or need assistance, several resources are available.

Balloon Help
Crimson 3.1 contains a very useful feature called Balloon Help:

This feature allows you to see help information for each item within Crimson 3.1. It is controlled via the icon at the
right-hand edge of the toolbar or via options on the Help menu. The default mode allows the help text to be
displayed by pressing the F1 key, providing a quick way of getting information if you are unsure of the settings for a
given field. Keep this in mind, and your life will be a lot easier!

Technical Support
Technical assistance is available on the web at:

www.redlion.net/support.html
Or, we can be contacted via email at:

support@redlion.net
You may also call +1 (717) 767-6511 and ask for the HMI Support Team.

Online Forums
A number of online forums exist to support users of PLCs and HMIs. Red Lion recommends the Q&A forum at
http://www.plctalk.net/qanda/. The discussion board is populated by many experts who are willing to help,
and Red Lion’s own technical support staff monitors this forum for questions relating to our products.

1.9 The Next Steps
If you are migrating from Crimson 2, we recommend that you give the next chapter a cursory reading to learn about
the new user interface. We also suggest that you look at the chapters on tags and display page configuration, as
some of the concepts used by Crimson 2 have been simplified, and many things can be achieved through easier
methods. If you are completely new to Crimson 3.1, please read at least as far as the chapter on Widgets.

Good luck, and have fun!

1-4 Crimson® 3.1 User Manual


REVISED 2019-1-15 MOVING FROM CRIMSON 3.0
DRAWING NO. LP1044-F IMPORTING DATABASES

Chapter 2 Moving from Crimson 3.0

This chapter provides a quick guide on how to migrate your database from Crimson 3.0 to Crimson® 3.1, and lists
some of the new features that you are likely to want to use. It also explains some of the differences between the
hardware supported by the two versions and how these will impact database import. If you are a new user, you
may skip this chapter and move straight on to the chapter on Crimson Basics.

2.1 Importing Databases
Databases created by Crimson 3.0 can be opened directly by Crimson 3.1 by changing the file type selection in the
bottom right-hand corner of the File Open dialog box. When you come to save the database, Crimson will note that
the file must be saved in Crimson 3.1 format and will ask you where you wish to save it and under what name. The
new name will typically be the old one with the cd3 extension replaced with cd31. Crimson 3.0 databases may also
be opened via the File Import command, which essentially performs the same operation but without any need to
change the selected file type.

If you open or import a Crimson 3.0 database that was designed for a product not supported by Crimson 3.1, you
will be asked to which device you wish to convert the file. You may be offered several options, depending on which
products are best capable of supporting the display resolution of the original device.

If the target device’s display resolution does not match that of the original device, you may be offered several
options relating to how display pages will be converted. Options labeled as Scaled take each display page and
resize its contents to the new display format, adjusting font sizes where possible. Options labeled as Centered
leave the display page contents unchanged but center them within the new display size, leaving either vertical bars
or a frame around them. Options labeled as Emulated switch the target device’s display into a mode where it
scales its display output to emulate the original device’s resolution. Where the scaling is by an integral factor, this
will typically produce a clear display but with larger and thus more noticeable pixels. Where a non-integral factor is
used, you should assess the results to see if you consider the resulting display quality to be acceptable.

Crimson® 3.1 User Manual 2-5


MOVING FROM CRIMSON 3.0 REVISED 2019-1-15
SYMBOL SELECTION DRAWING NO. LP1044-F

2.2 Symbol Selection
When you import a Crimson 3.0 database, the symbol library will continue to supply the database with old-style
symbols that do not contain the smoother edges and more subtle shading that characterize new-style versions.
The images below illustrate the difference, with the tank on the left being obviously the old-style version:

 
You may switch your database to use new-style symbols by going to the Display Pages category and selecting the
Pages item in the root of the navigation list. On the Images tab, edit the Symbol Library property to select the
preferred symbol set. While most old-style symbols have a new equivalent, it is possible that the rendering will not
be precisely the same, with, for example, a symbol being one pixel narrower or wider. If this makes a difference in
your database, you may have to decide between manually adjusting each of your pages and continuing to use the
old-style symbols.

2.3 Model Conversion
Crimson 3.1 does not support all the models supported by Crimson 3.0. To offer the features that our customers
were demanding, we had to leave behind support for older, less powerful hardware and target only devices with
sufficient memory and processing power to handle the demands of more modern software.

2.3.1  Converting from Graphite
All Graphite HMIs and Graphite Controllers are supported by Crimson 3.1, so converting your database is as
simple as completing the import process described above.

2-6 Crimson® 3.1 User Manual


REVISED 2019-1-15 MOVING FROM CRIMSON 3.0
DRAWING NO. LP1044-F MODEL CONVERSION

2.3.2  Converting from G3
The migration path from the G3 to the CR3000 series is complicated by the differences in screen resolution
between the two ranges. The table below describes the options available when converting between various
models:

G3 Model CR3000 Model Description


G306A 7-inch The G306A’s 320 x 240 display can be hardware or software
scaled to fit the CR3000’s 800 x 480 display. Hardware scal-
ing converts each pixel to a 2 x 2 block of pixels, while soft-
ware scaling adjusts the size of the primitives to the new
format. Software scaling may need you to edit the pages to
adjust font sizes, line widths etc.
G308, G310 10-inch The G308 and the G310 both have 640 x 480 displays which
can be hardware or software scaled to fit the CR3000’s 800 x
600 display. Hardware scaling blends adjacent pixels and
therefore may not produce perfect results. Software scaling
may require you to edit the pages to adjust font sizes, line
widths etc.
G315 15-inch The G315 can be imported directly with no screen adjust-
ments.

The other issue you may encounter is that the CR3000 has neither the MENU key nor the softkeys provided by the
G3. You must therefore remove any functionality from these keys and replace it with on-screen buttons and other
elements that achieve the same result. We recommend that you do this in Crimson 3.0 before converting to
Crimson 3.1.

2.3.3  Converting from G3 Kadet
In terms of screen resolution, the G304K2 can be imported directly into a CR1000 4-inch model and a G307K2 can
likewise be directly imported into a CR1000 7-inch model. There are however some differences between the two
ranges in terms of serial ports. Specifically, the CR1000 models have a single RS-232 programming port and a
dual-mode RS-232 or RS485 communications port. The G304K has one dual-mode port and one RS-485 port. If
your application needs two RS-485 ports, you must use an adapter. The G307K has one RS-232 programming port
and two dual-mode ports. If your application needs three serial links, the CR1000 will not be suitable and you must
use a CR3000 model instead.

2.3.4  Converting from Data Station Plus
The DSPLE can be imported directly into a DA10, however this model has a single RS-232 programming port and
a dual-mode RS-232 or RS-485 communications port. If your application requires three serial links, the DA10 will
not be suitable and you must use a DA30 model instead.
The DSPSX, DSPGT and DSPZR models can be converted directly into the DA30 model with the native virtual 
display resolutions and same serial communcations port layout supported. However, you may encounter the 
same issue described for G3 where MENU and softkeys are not supported in the DA30. You must therefore 
remove any functionality from these keys and replace it with on‐screen buttons and other elements that achieve 
the same result. We recommend that you do this in Crimson 3.0 before converting to Crimson 3.1

2.3.5  Converting from Other Devices
The Modular Controller and the ProducTVity Station do not currently support Crimson 3.1 and you must therefore
continue to use Crimson 3.0 to program these products. Red Lion Controls, Inc. will be releasing updated hardware
that will allow you to make the transition to Crimson 3.1. Please check the Red Lion website for details.

Crimson® 3.1 User Manual 2-7


MOVING FROM CRIMSON 3.0 REVISED 2019-1-15
CUSTOM WEB SITES DRAWING NO. LP1044-F

2.4 Custom Web Sites
If you have developed a custom website in Crimson 3.0, you may find that it does not operate in precisely the same
way when it is transferred to Crimson 3.1. Consulting the chapter on creating custom websites and considering
how the newly-available features can help you harmonize your site with the standard Crimson 3.1 pages is
recommended.

2.5 New Features
Crimson 3.1 provides many new features and improvements. Lots of changes have been made to increase
usability, to decrease the amount of time it takes to create a database, and a number of major features have been
added.

2.5.1   Zero Config
• Crimson 3.1 supports a zero-configuration network option that allows a device to be connected to your
network and referenced by name from your PC without the need to add DNS or HOST file entries.
Crimson 3.1 will also create a webserver SSL certificate using that name, allowing error-free develop-
ment of secure websites.

2.5.2  OPC UA Server
• Crimson 3.1 provides an OPC UA server in mid-range and high-end units. This server exposes
selected tags via the OPC UA protocol, allowing suitable clients to browse the tag folder structure, and
to read and write tag values. Subscription support allows clients to receive updates only when tags
change by the specified deadband value.

2.5.3  New Primitives
• Crimson 3.1 provides more attractive primitives with smoother edges:

• Newer primitives can be filled with a greater variety of graduated patterns, including patterns that sim-
ulate cylindrical containers or metallic surfaces.

2-8 Crimson® 3.1 User Manual


REVISED 2019-1-15 MOVING FROM CRIMSON 3.0
DRAWING NO. LP1044-F NEW FEATURES

• Newer primitives can be filled with a variety of texture from the Symbol Library, allowing natural or
man-made materials to be represented.

• Newer primitives support edges of any thickness, providing a better quality of display on high-resolu-
tion devices where one pixel is very small. These edges may be a solid color, but they may also be
filled with any of the graduated patterns or textures used to fill the figure itself. A solid line may be
applied to the inside or outside of the edge, better delineating it from other display elements.

• Crimson 3.1 provides a richer line primitive that can be an arbitrary width. The line can be filled and
edged just as for other primitives. Lines may thus be filled with graduated fills and textures and may
have edges applied to their outline. Lines may also have a variety of end styles applied, allowing
arrows to be easily created.

• Crimson 3.1 provides more flexible rounded, beveled and filleted figures, with the ability to omit the
corner effect on any set of corners. This permits greater flexibility in creating custom shapes.

• Crimson 3.1 supports new primitives for triangles, parallelograms and trapeziums, with proportional
handles allowing the figures to be adjusted in a manner that is invariant under scaling. Crimson 3.1
also provides a new more flexible arrow primitive with several handles to adjust its appearance.

Crimson® 3.1 User Manual 2-9


MOVING FROM CRIMSON 3.0 REVISED 2019-1-15
NEW FEATURES DRAWING NO. LP1044-F

2.5.4  Symbol Library
• Symbols have smoother edges and more subtle shading.

• Symbols can be recolored dynamically at runtime to represent state information.

• Symbols can be recolored dynamically at runtime using a tank fill, allowing for example the Tank Cut-
away symbols to be used with the Tank symbols to create attractive visualizations of tank level infor-
mation.

2-10 Crimson® 3.1 User Manual


REVISED 2019-1-15 MOVING FROM CRIMSON 3.0
DRAWING NO. LP1044-F NEW FEATURES

2.5.5  Web Server
• The web server has been completely reworked to provide a more useful appearance based on the
Bootstrap and JQuery libraries. The page layouts automatically adjust for use on mobile devices.

• The web server now supports secure HTTPS operation, and allows for the provision of certificates to
indicate the server identity. HTTP redirect is also supported, avoiding the need for your clients to type
the https prefix.
• The web server now provides form based authentication for secure connections, proving a better log
on experience, including redirection to previously selected pages. The web server now supports indi-
vidual security descriptors for each feature and for each tag-driven page. This allows finer granularity
of access control.
• The web server now supports input directly from the keyboard when using the remote-control facility.
The user no longer needs to press the buttons on the popup keypad with the mouse. Typing the data
enters it into the field.
• The web server now includes an updated remote view and remote control feature that operates far
more smoothly and sends only a small fraction of the data required by the previous implementation,
while increasing color depth from 8 to 16 bits.

• The web server now uses AJAX technology to update tag-driven pages, providing much faster updates
without any flicker and with only minimal data usage. The same techniques are made available for in
custom webpages.
• The web server now supports reply compression. Together with the last two features, this vastly
reduces data requirements. This is especially important cellular operation, both for performance and
billing control.
• The web server allows custom stylesheets and JavaScript to be included in every page, allowing
modification of the site’s appearance and behavior.

Crimson® 3.1 User Manual 2-11


MOVING FROM CRIMSON 3.0 REVISED 2019-1-15
NEW FEATURES DRAWING NO. LP1044-F

2.5.6  IEC‐61131
• The control engine now supports more deterministic execution, ensuring that scan times and I/O
updates are not disrupted by page updates and other activity.
• The control editor now supports online debugging, allowing the execution of a program in a remote
device to be monitored in real time.
• The control editor support for offline simulation has been improved, allowing navigation between pages
without leaving simulation mode.
• The control editor now supports clipboard and drag-and-drop operations, allowing programs and
variables to be moved around within Crimson 3.1, and even between Crimson databases.
• The control editor has been optimized to provide a more fluid navigation experience, and avoiding
some of the pauses that could previously be seen.
• The control editor allows initial values to be defined for variables, ensuring that they are correctly ini-
tialized upon system start-up.

2-12 Crimson® 3.1 User Manual


REVISED 2019-1-15 CRIMSON BASICS
DRAWING NO. LP1044-F WINDOW LAYOUT

Chapter 3 Crimson Basics

To run Crimson® 3.1, select the Crimson 3.1 icon in the Red Lion Controls, Inc. section of your Start Menu. After a
couple of seconds, Crimson will appear. If you are a Crimson 2 user, the first thing you will notice is the updated
user interface that we have adopted. This new interface allows quicker navigation and faster database
construction.

3.1 Window Layout
The main Crimson 3.1 window comprises three sections, as shown in the following figure.

3.1.1  The Navigation Pane
The left-hand portion of the window is called the Navigation Pane. It is used to move between different categories
of items within a Crimson 3.1 configuration file. Each category is represented by a bar at the base of the pane, and
clicking on that bar will navigate to that section. The top section of the Navigation Pane shows the available items
in the current category, and provides a toolbar to allow those items to be manipulated. If you want to make the top
section larger, you can pick up and drag the dividing line between it and the category bars.

3.1.2  The Resource Pane
The right-hand portion of the window is called the Resource Pane. It is used to access various items that are of use
when editing the current category. Just like the Navigation Pane, it contains a number of categories which can be
accessed via the category bars. Items in a given resource category can be drag-and-dropped to the places where
you wish to use them. For example, a data tag can be picked up from the Resource Pane and dropped on a
configuration field to make that field dependent on the value of the selected tag. Many items can also be double-
clicked, thereby setting the current field to that item.

3.1.3  The Editing Pane
The central portion of the window is used to edit the currently selected item. Depending on the selection, it may
contain a number of tabs, each showing a given set of the properties for that item, or it may contain an editor
specific to the item that you are working on.
 

Crimson® 3.1 User Manual 3-13


CRIMSON BASICS REVISED 2019-1-15
THE CATEGORIES DRAWING NO. LP1044-F

3.1.4  Collapsing Panes
Either or both of the Navigation Pane and Resource Pane can be collapsed to the edge of the main window in
order to free-up more space for the Editing Pane. To close a pane, click on the ‘x’ in the top left-hand corner of its
title bar. It will then be replaced by a smaller bar marked with arrows. Clicking this bar will expand the associated
pane. Clicking on the pushpin icon of a temporarily expanded pane will lock it in place.

3.2 The Categories
The main categories in a Crimson 3.1 database are described in this section.

3.2.1  Communications
This category specifies which protocols are to be used on the target device’s serial ports and Ethernet
ports. Where master protocols are used (i.e. protocols in which the Red Lion hardware 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 (i.e. protocols in which the Red Lion hardware receives and
responds to requests from other systems) you can specify which data items are to be exposed for read or write
access. You can also use this category to move data between remote devices via the protocol converter, to
configure expansion cards and to configure services.

3.2.2  Data Tags
This category defines the data items that are to be used to be access data within the remote devices, or
to store information within the target device. Each tag has a variety of properties, including formatting
data, which specifies how the data held within a tag is to be shown on the device’s display or in other
contexts such as webpages. By specifying this information within the tag, Crimson removes the need for
you to reenter 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 when
those conditions are met.

3.2.3  Display Pages
This category is used to create and edit display pages. 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 to an expression. By default, such
primitives use the formatting information defined when the tag was created, although this information can
be overridden if required. You may also use the editor to specify what actions should be taken when keys or
primitives are pressed, released or held down.

3.2.4  Programs
This category is used to create and edit programs using Crimson’s unique C-like programming language.
These programs can perform complex decision-making or data manipulation operations based upon 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. Programs can call upon a variety of system functions to perform common operations.

3-14 Crimson® 3.1 User Manual


REVISED 2019-1-15 CRIMSON BASICS
DRAWING NO. LP1044-F THE CATEGORIES

3.2.5  Web Server
This category is used to configure Crimson 3.1’s web server and to create and edit webpages. The web
server can provide remote access to the target device via several mechanisms. First, you can use
Crimson to create automatic webpages which contain lists of tags, with each formatted per the tag’s
properties. Second, you can create a custom site using a third-party HTML editor and then include
directives to instruct Crimson to insert live tag values. Finally, you can enable Crimson’s unique remote access and
control feature, which allows a web browser to view the target device’s display and control its keyboard. The web
server can also be used to access files from the Data Logger.

3.2.6  Data Logger
This category is used to create and manage data logs, each of which can record any number of variables
to the target device’s memory 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 memory card, by
mounting the card as a drive on a PC connected on the target device’s USB port, or by accessing them via
Crimson’s web or FTP servers using an Ethernet port or a modem. Log files can be protected via cryptographic
signatures to ensure that they have not been tampered with since they were written to the memory card.

3.2.7  Security
This category is used to create and manage the various users of the target device, as well as the access
rights granted to each. 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 rights required to modify a particular tag or to
access a page are set via the security properties of the individual item. Rights can also be assigned to
allow or deny access to the FTP server or the web server.

3.2.8  SQL Queries
This category is used to create and manage queries written in SQL that will be used to extract data from
a Microsoft SQL Server database and transfer it into a set of Crimson tags. Multiple queries can be
created, with each column of the returned data being mapped to a set of tags that represent the rows of
that data. Queries may be executed periodically or on demand, allowing, for example, production
scheduling information to be passed on to a controller responsible for machine operation.

3.2.9  Control
This category allows the creation and editing of IEC-61131 programs in the various languages defined in
that standard. The programs may be called periodically or on demand, and may interface with any
Crimson tags or I/O devices to provide control functionality beyond that supported by Crimson’s own
programming language. Full online monitoring is provided, together with offline simulation to allow you to
debug the behavior of your programs without the need to connect a remote device.

3.2.10  I/O Modules
This category is available only when configuring a Graphite HMI or another device that supports Graphite
modules. It allows you to configure the I/O modules that you have directly connected to the device or that
you have connected via an expansion or tethered rack. Note that only I/O modules are configured via this
category. Modules that are used for comms are configured via the Communications category using a
mechanism detailed in the Using Communications chapter.

Crimson® 3.1 User Manual 3-15


CRIMSON BASICS REVISED 2019-1-15
GETTING AROUND DRAWING NO. LP1044-F

3.3 Getting Around
The easiest way to get around a Crimson 3.1 database is to click on the category bars in the Navigation Pane, and
then click on the item you want to edit. However, a number of shortcuts exist to allow quicker movement and
greater productivity. Most of these shortcuts can be accessed via the Go menu, or via associated key
combinations.

3.3.1  Back and Forward
The first icon on the toolbar or the ALT+LEFT key combination can be used to move back to items that you had
previously selected. The next icon or the ALT+RIGHT key combination can then be used to move forward again,
returning to the item you first started with. This facility is very useful when switching between database categories.

3.3.2  Category Shortcuts
Each category is allocated a shortcut key sequence, comprising the CTRL key and a number indicating the category’s
position in the Navigation Pane. For example, the Communications section can be accessed directly by using the
CTRL+1 combination. You can also move up and down in the category list by using the ALT+PGUP and ALT+PGDN key
combinations.

3.3.3  Item Shortcuts
If you are working in the Editing Pane, you can switch between items by using the ALT+UP and ALT+DOWN key
combinations. Crimson will move to the previous or next item in the item list, and will try to keep the currently-
selected data field the same. This is very useful if you want to change the same field on several items, as you do
not have to keep navigating back to that field or switching to the Navigation Pane in order to change items.

3-16 Crimson® 3.1 User Manual


REVISED 2019-1-15 CRIMSON BASICS
DRAWING NO. LP1044-F NAVIGATION LISTS

3.4 Navigation Lists
Several categories in Crimson contain lists of items. For example, selecting the Data Tags category will cause the
Navigation Pane to show a list of all the data tags in your database, allowing them to be selected and edited:

Items within these Navigation Lists can be manipulated in various ways:


• To quickly find an item, type the first few letters of its name. Crimson will select the first item that
matches the characters you have entered. Typing more characters will make the selection more spe-
cific, while pressing ESC will allow a new sequence of search characters to be entered.
• To create an item, click on the New button in the Navigation Pane toolbar. For those lists that support
only a single type of item, you may also use the ALT+INS key combination. The New button on the toolbar
may offer a list of available items, allowing you to choose the type of the item you wish to create.
• To delete an item, either use the Delete icon in the Navigation Pane toolbar, or press the ALT+DEL key
combination. If you delete a folder, all of the items within that folder will be deleted, too. Warnings are
provided for multiple deletes, although they can always be reversed via the Undo command.
• To rename an item, select it and press F2. You may then enter the new name and press ENTER. Alterna-
tively, select the item and then single-click on the name once more to activate editing. Again, press
ENTER when you are finished.

3.4.1  Working with Folders
Some lists support the grouping of items into folders. Folders can be created using the New Folder icon in the
Navigation Pane toolbar, and can be renamed and deleted just like more conventional items. Creating an item with
a folder selected will place that item in the selected folder. Folders can be nested up to any reasonable depth.

3.4.2  Sorting Lists and Folders
An entire Navigation List or the contents of a folder may be sorted by right-clicking on the root item or the folder as
appropriate, and selecting one of the Sort commands. Items may be sorted in ascending or descending alphabetic
order. Folders are always placed before other items, no matter which sort order is applied.

Crimson® 3.1 User Manual 3-17


CRIMSON BASICS REVISED 2019-1-15
UNDO AND REDO DRAWING NO. LP1044-F

3.4.3  Drag and Drop Operations
Items in Navigation Lists can be drag-and-dropped within the list to change their position or to move them between
folders. Holding down the CTRL key while dragging will result in a copy of the original item being created. The left-to-
right position of an item may sometimes be used to decide where to place an item in the folder hierarchy. If the item
is being dropped into the wrong folder, try moving left or right to get to the correct position.
Database items such as tags and display pages may also be dragged between database files by opening two
copies of Crimson and dragging the items in question from the source database’s Navigation Pane to that of the
target database. If the appropriate category in the target is not already selected, temporarily holding the item that is
being dragged over the required category bar for a second or so will select that category, thereby avoiding the need
to abort and repeat the drag operation.

3.4.4  Searching in Lists
While the shortcut detailed above is useful for jumping directly to a single item, you may sometimes want to find all
the items that have names containing a particular string. This can be accomplished using the Find Item command
shown on the Navigation Pane’s toolbar. This command will search the current list, and place all the matching
items in the Global Search Results List. You can step through this list using the F4 and SHIFT+F4 key combinations, or
display the list in its entirety by pressing F8. For more information on the global search functions, refer to the section
later in this chapter.

3.4.5  Private Items
Tags and certain other items in navigation lists may be marked as having Private Access by right-clicking and
selecting the appropriate item from the menu. Such items can be edited and manipulated normally until the
database protection is set to Private Access, at which point their contents will not be visible unless the database
password is provided. The items will still exist and can still be referenced in the usual way, but they cannot be
edited or viewed. This mechanism is designed to allow OEMs to provide databases to their customers without
revealing important intellectual property or while protecting key items from editing. Refer to the Database
Protection section below for more information.

3.5 Undo and Redo
Crimson 3.1 implements a universal undo and redo structure. This means that you can load a database, edit it for
hours, and then return it to its original state by simply holding down the CTRL+Z key combination. You can then re-
apply your changes by holding down CTRL+Y. All your actions are remembered, and Crimson will navigate between
items and categories automatically when reversing or re-implementing changes.

3-18 Crimson® 3.1 User Manual


REVISED 2019-1-15 CRIMSON BASICS
DRAWING NO. LP1044-F GLOBAL SEARCHING

3.6 Global Searching
Crimson 3.1 provides several options for searching within a database. At the simplest level, you can search for a
text string anywhere in the database by pressing the CTRL+SHFIT+F key combination. Alternatively, as you will see later,
you may search for expressions which contain errors, or for items that reference a tag or a communications device.
All of these search operations place their output in the Global Search Result List, allowing you to review the results,
or to navigate back and forth between the items that have been located.
The results list can be displayed at any time by pressing the F8 key.

The title bar of the window describes the search operation that produced the list, while each line contains the
description of an item that matched the search criteria. In the example above, right-clicking on a communications
device and selecting the Find Usage command listed all the locations where the device was referenced. Double-
clicking a given entry will jump directly to that item, while the F4 and SHIFT+F4 key combinations can be used to step
back and forth through the list. The commands associated with this feature may also be accessed via the Find
Global commands on the Edit menu.

3.7 Working with Databases
Crimson 3.1 stores all the information about a device’s configuration in what is called a database file. These files
have the extension of cd31, although Windows Explorer will hide this extension if it is left in its default configuration.
While Crimson 3.1 databases are still essentially text files, they are compressed and in some cases encrypted, and
they therefore cannot be directly edited using a text editor like Notepad. Databases are manipulated via the
standard commands found on the File menu.

3.7.1  Importing from Crimson 2.0
Importing from Crimson 2.0 is not directly supported by Crimson 3.1. If you need to convert such a database,
please contact Red Lion technical support for assistance. They will be able to process the database for you. You
may alternately use Crimson 3.0 to import the database, and then convert the resulting file to Crimson 3.1 as
described below.

3.7.2  Importing from Crimson 3.0
Databases created by Crimson 3.0 can be opened directly by Crimson 3.1 by changing the file type selection in the
bottom right-hand corner of the File Open dialog box. When you come to save the database, Crimson will note that
the file must be saved in Crimson 3.1 format and will ask you where you wish to save it and under what name. The
new name will typically be the old one with the cd3 extension replaced with cd31. Crimson 3.0 databases may also
be opened via the File Import command, which essentially performs the same operation but without any need to
change the selected file type.

                                                                                                                                                                              
 

Crimson® 3.1 User Manual 3-19


CRIMSON BASICS REVISED 2019-1-15
WORKING WITH DATABASES DRAWING NO. LP1044-F

If you open or import a Crimson 3.0 database that was designed for a product not supported by Crimson 3.1, you
will be asked to which device you wish to convert the file. You may be offered several options, depending on which
products are best capable of supporting the display resolution of the original device.

If the target device’s display resolution does not match that of the original device, you may be offered several
options relating to how display pages will be converted. Options labeled as Scaled take each display page and
resize its contents to the new display format, adjusting font sizes where possible. Options labeled as Centered
leave the display page contents unchanged but center them within the new display size, leaving either vertical bars
or a frame around them. Options labeled as Emulated switch the target device’s display into a mode where it
scales its display output to emulate the original device’s resolution. Where the scaling is by an integral factor, this
will typically produce a clear display but with larger and more noticeable pixels. Where a non-integral factor is used,
you should assess the results to see if you consider the resulting display quality to be acceptable.

3.7.3  Database Identifiers
Each database created by Crimson 3.1 is given a unique identifier. This identifier is used upon download of a new
database to determine if the target device should clear its internal memory and delete any log files recorded to the
device’s memory card. If the identifier matches that of the database already in the device, the database is assumed
to be merely a different version of the same file, so the data is retained. Conversely, if the identifiers are different,
the data is cleared. When you use the Save As command on the File menu to save a copy of a database file,
Crimson will ask if you want to allocate a new identifier. Select Yes if this is going to be a new project, and select No
if you are just saving a backup copy of what is essentially the same database. This will ensure that the target
device’s retentive data is handled appropriately.

3.7.4  Saving an Image
A Crimson-specific item on the File menu is Save Image. This command allows the creation of a file that can
subsequently be used to update the database in a terminal via a memory card or USB memory stick. The file
contains a non-editable form of the database, plus any firmware and boot loader updates required for execution.
Placing an image file called image.ci3 in the root directory of the target device’s memory card and then resetting
the device will update the boot loader, firmware and database using the image file contents. Note that image files
can optionally contain upload information, thereby allowing an editable version of the database file to be extracted
from a terminal.

3-20 Crimson® 3.1 User Manual


REVISED 2019-1-15 CRIMSON BASICS
DRAWING NO. LP1044-F WORKING WITH DATABASES

3.7.5  Database Protection
Databases can be password-protected using the Protection command on the File menu:

The Default Access parameter is used to define what level of access will be permitted without first entering the
database password. Various settings are available:
• Full Access will allow the database to be opened and edited without any password being entered. This
is the default setting.
• Read-Only Access will allow the database to be opened, but will not allow changes to the database to
be made or saved.
• Private Access will allow the database to be opened, but will not allow items flagged for Private Access
to be viewed or edited.
• Download Only Access will allow the database to be opened, but will not allow any items to be viewed
or edited. Download will still be supported.
• No Access will prevent all access without the password.
Lost passwords can be recovered by Red Lion for free, or for a nominal fee if you make a habit of it! Note that for
security reasons, the recovered password will only be sent to the Recovery Email configured in the protection
dialog box. Be sure to set this to a valid email address or you may find yourself unable to recover your password.

3.7.6  Converting a Database
A database designed for one target device may be converted for use on another by using the Save Conversion
command on the File menu. The conversions that can be performed depend on the original target device, but most
combinations are supported.

The conversion process is started by selecting the new target device using the dialog shown above. You will then
be prompted for a new filename, and the converted database will be saved to disk. To avoid accidental destruction

Crimson® 3.1 User Manual 3-21


CRIMSON BASICS REVISED 2019-1-15
DOWNLOADING TO A DEVICE DRAWING NO. LP1044-F

of existing databases, you may not convert a database without first saving it under a new name. Once the
converted database has been saved, it will automatically be opened for editing and review.
The conversion process resizes any display pages to fit the new display format, and remaps communications
devices to the appropriate ports on the new device based upon whether they use the RS-232 or RS-485 physical
layer. It may not be possible to convert a database in its entirety if, for example, the new device has fewer
communications ports than the original. Therefore, you may have to perform a few adjustments after the
conversion.

3.7.7  Finding Database Errors
Certain operations may produce errors in your database. For example, you may delete a communications device,
or you may set a tag equal to an expression based on itself, thereby producing a circular reference. Crimson 3.1
will warn you about any such errors by means of a red balloon that will appear above the status bar:

The balloon will fade after a few seconds, but the red indication in the status bar will remain to remind you of the
error condition. Clicking on the indicator will search for all errors or circular references, and place them on the
Global Search Results List so that you may review them using the standard F4 and SHIFT+F4 key combinations. You
may also right-click the indicator to access commands to recompile the whole database, or to optimize the way in
which device communications are organized. Manual database recompilation is rarely needed, as Crimson 3.1 will
typically perform the necessary steps without user intervention.

3.8 Downloading to a Device
Crimson 3.1 database files are downloaded to the target device 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 device, or if the device does not contain an older version of the current database. After this first
download, Crimson uses a process known as incremental download to ensure that only changes to the database
are transferred. This means that updates can be made in seconds, thereby reducing your development cycle time
and simplifying the debugging process.

3-22 Crimson® 3.1 User Manual


REVISED 2019-1-15 CRIMSON BASICS
DRAWING NO. LP1044-F DOWNLOADING TO A DEVICE

3.8.1  Configuring the Link
The programming link between the PC and the target device can be made using an RS-232 port, a USB port or a
TCP/IP connection. While TCP/IP connections are typically made via the panel’s Ethernet port, they may also be
established via a dial-in link. Before downloading, use the Link-Options command to ensure that you have the
correct method selected:

Note that this dialog does not provide any method to select the target IP address when using TCP/IP for download.
This information is stored in the database file and is configured via the Download tab of the Network configuration
item. This method makes it easier to switch between multiple databases without having to re-configure the target IP
every time. Note also that Crimson 3.1 maintains distinct download settings when working with multiple product
families. This makes it easier to use USB for downloading to those products that support it, while falling back to
serial download for less capable devices.

3.8.2  Sending the Database
Once the link is configured, the database can be downloaded using either the Link-Send or Link-Update
commands. The former will send the entire database, whether or not individual objects within the file have
changed. The latter will only send changes, and will typically take a much shorter period of time to complete. The
Update command is typically the only one that you will need, as Crimson 3.1 will automatically fall back to a
complete send if the incremental download fails for any reason. As a shortcut, you can access Link-Update via the
lightning bolt symbol on the toolbar, or via the F9 key on the keyboard.

Note that downloading via TCP/IP to some models relies on a memory card being installed if the device’s firmware
is to be upgraded. Since you may want to perform such upgrades at some point in time, it is highly recommended
that you install a memory card in any device to which TCP/IP downloads are likely to be performed. Note also that
the TCP/IP download option must be enabled via the Network settings in the Communications category.

Crimson® 3.1 User Manual 3-23


CRIMSON BASICS REVISED 2019-1-15
DOWNLOADING TO A DEVICE DRAWING NO. LP1044-F

3.8.3  Extracting Databases
The Link-Support Upload command can be used to include the information necessary to support database upload
when sending a database to a target device. This setting is stored in the database and can be configured on a per-
file basis. Enabling database upload will slow the download process somewhat and may fail with extremely large
databases containing many embedded images, but it will ensure that, should you lose your database file, you will
be able to extract an editable image from the device.

Note that if you lose your database file and you do not have upload support enabled, you will not be able to
reconstruct your file without starting from scratch. To extract a database from a panel, use the Link-Extract
command. This command will upload the database, and prompt you for a name under which to save the file. The
file will then be opened for editing. If the database was password-protected, you may be required to enter the
password before it can be opened. In other words, enabling upload will not circumvent password protection.

3.8.4  Sending the Time and Date
The Link-Send Time command can be used to set the target device’s clock to match that of the computer on which
Crimson 3.1 is executing. This command also sends the current time zone and Daylight Savings Time settings to
the target device, allowing the advanced features of the Time Manager to be used. Note that an accurate clock
setting is required for certain features to work reliably, most notable those associated with SSL-TLS security.

3-24 Crimson® 3.1 User Manual


REVISED 2019-1-15 CRIMSON BASICS
DRAWING NO. LP1044-F THE MEMORY CARD

3.9 The Memory Card
If your target device has a memory card, several additional functions are available.

3.9.1  Mounting the Card
If you are connected to a suitable device via the USB port, you can instruct Crimson 3.1 to mount the device’s
memory card as a drive within Windows Explorer. You can use this functionality to save files to the card or to read
information from the Data Logger. The drive is mounted and dismounted by sending commands using the Mount
Flash and Dismount Flash options on the Link menu. Once a command has been sent, the target device will be
reset, and Windows will refresh the appropriate Explorer windows.

Note that some caution is required when mounting the memory card:
• When the card is mounted, the target device will periodically inform the PC if data on the card has
been modified. This means that both the PC and the device will suffer a minor performance hit if the
card is mounted during data logging operations for longer than necessary.
• If you write to the memory card from your PC, the target device will not be able to access the card until
Windows releases its lock on the card. This may take several seconds, and will restrict data logging
operations during that time, and prevent access to custom webpages. Crimson 3.1 will use the
device’s RAM to ensure that no data is lost, but if too many writes are performed such that the card is
kept locked for four minutes or more, data may discarded.
• You should never attempt to use Windows to format a memory card that you have mounted via
Crimson 3.1, whether it be via Explorer or from the command prompt. Windows does not correctly lock
the card during format operations, and the resulting format may be unreliable and lead to subsequent
data loss. See below for details of how to format a card in a reliable manner.

3.9.2  Formatting the Card
The only supported method of formatting a card is via the Format Flash command on the Link menu. Selecting this
command will explain that the formatting process will destroy all the data stored on the memory card and offer you
a chance to cancel the operation. If you elect to continue, the operator panel will be instructed to format the card.
Note that this process may take several minutes for a large card. Slow formats on panels that are performing data
logging may therefore result in gaps in the recorded data.

Crimson® 3.1 User Manual 3-25


CRIMSON BASICS REVISED 2019-1-15
REMOTE MONITORING DRAWING NO. LP1044-F

3.10 Remote Monitoring
Crimson 3.1 supports a so-called Watch List that allows you to view the contents of the tags and mapping blocks
contained within your database. The Watch List is displayed in the Watch Window. This can be shown or hidden
using the F7 key or the command on the View menu.

When first displayed, the Watch Window will show the simulated data that was defined when the tags were
created. Pressing the View Online button will ensure that the current database matches that in the target device,
and will then begin showing live data. The tag data will be displayed according to the appropriate format object.
Items can be added to the Watch List by right-clicking and selecting the appropriate menu command. One or more
tags can be added at once, as can the content of a mapping block. A command also exists to add all the tags
referenced by a specific display page, thereby allowing easier debugging of the page you are working on. The
buttons at the top of the Watch Window can be used to remove one item or all of the items from the Watch List.

3.11 System Menu
The Crimson 3.1 runtime has been extended so that HMIs running Crimson now support a system mode that can
be used to perform various maintenance functions. These include:
• Clearing the database;
• Loading the database from the memory card;
• Calibrating or testing the touchscreen;
• Formatting the memory card;
• Formatting the USB stick; and
• Setting the real-time clock.
The system menu is accessed by holding down the small, recessed pushbutton on the back of the unit while
powered-up. Continue to hold the button until the menu appears. Within the system menu, the default touchscreen
calibration values are used to ensure that recovery can be performed even if the calibration is grossly incorrect. To
ensure accurate operation with an incorrectly calibrated touchscreen, an extra level of confirmation is required to
select an option. Specifically, when the screen is pressed, the selected button will turn red. If the device has
detected the correct button, hold the button until it turned red, at which point releasing it will select the associated
option. If the system has detected the wrong button, release it immediately to cancel the selection and try again.
For a description of system menu functions, refer to Technical Note TNOI46, available for download on the Red
Lion website.

3-26 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING COMMUNICATIONS
DRAWING NO. LP1044-F NETWORK CONFIGURATION

Chapter 4 Using Communications
The first stage of creating a Crimson® 3.1 database is to configure the communications ports of the target device to
specify which protocols you want to use and which remote devices you want to access. These operations are
performed from the Communications category.

As can be seen, the Communications category lists the unit’s available ports in the form of a tree structure. The
example shown above has two Ethernet ports configured via the Network section and initial support for four TCP/IP
protocols. It also has three primary serial ports, with the option to add further ports in the form of expansion
modules.

4.1 Network Configuration
The target device’s IP network configuration is edited via the Network icon in the Navigation Pane. When the icon
is selected, the Editing Pane will show several tabs, each of which allows a given set of properties to be configured.

4.1.1 Zero Config
The first tab is used to configure Crimson 3.1’s new Zero Config networking support:

Zero Config allows a unit to obtain an IP address via DHCP and then be referenced by a simple name from
anywhere on the local subnet. For example, if you name your unit test and leave the rest of Crimson’s settings at
their default values, your unit will obtain an IP address and then respond to name resolution requests for the name
test.local from anywhere on the local subnet. You may open a command prompt on your PC and type ping
test.local to confirm the unit’s IP address, or you may go to your web browser and type test.local into the
address bar to visit the unit’s default website—although note that Chrome and perhaps some other browsers need
the http:// prefix to be used!
 

Crimson® 3.1 User Manual 4-27


USING COMMUNICATIONS REVISED 2019-1-15
DRAWING NO. LP1044-F USING COMMUNICATIONS

Zero Config is controlled via the following properties:


• The Local Name property is used to define the name by which the unit will be referenced. The name
should be unique on the local subnet. If you do not enter a name, the unit will respond to red-xx-yy-
zz.local, where each letter pair is replaced with digits from the last half of the MAC address. A unit
with a MAC address of 00-05-E4-05-39-62 will therefore respond to red-05-39-62.local.
• The Responders property is used to define the local name resolution protocols to which the unit will
respond. You should ideally leave all available protocols enabled to ensure that clients have the best
chance of finding your device.
• The Install Crimson Local Root link is used to install a root certificate that will validate the default SSL
certificate that Crimson 3.1 will automatically generate for its webserver when operating in secure
mode. With this root certificate installed, your PC will trust any Crimson-generated certificates, but only
for names ending in.local. Refer to the chapter on the web server for more information.
Note again that Zero Config only works on a single subnet. If your unit has an IP address of 192.168.1.200 and a
netmask of 255.255.255.0, it is on the 192.168.1.0 subnet and devices on other subnets will not be able to reach it
via its local name. Note also that local name resolution is not recommended for production deployment.

4.1.2 Ethernet Settings
The next one or two tabs configure the target device’s Ethernet ports:

4.1.2.1 Port Settings
The Port Mode field controls whether the port is enabled, and the method by which the port is to obtain its IP
configuration. If DHCP mode is selected, the target device will attempt to obtain an IP address and associated
parameters from a DHCP server on the network. If DHCP fails, an IP address will be allocated automatically using
APIPA.
Note that if the unit offers any services to the network, DHCP will only make sense if Zero Config is being used to
allow named access from the local subnet, or if the DHCP server is configured to allocate a well-known IP address
to the unit’s MAC address. For operator panels, you also have the option of using the GetNetIP() function to
display the unit’s IP address on the screen, allow reference directly by that address or the creation of a HOSTS file
entry.

4-28 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING COMMUNICATIONS
DRAWING NO. LP1044-F NETWORK CONFIGURATION

If Manual Configuration mode is selected, the IP Address, Network Mask and Gateway fields must be filled out with
the appropriate information. The default values provided for these fields will almost never be suitable for your
application! Be sure to consult your network administrator when selecting appropriate values, and be sure to enter
and download these values before connecting the target device to your network. If you do not do this, it is possible
that you will cause problems on your network.
Selecting IEEE 802.3 Only mode will enable the port for low-level communications, but will not allocate an IP
address or allow TCP or UDP to operate. This mode only makes sense when using drivers that use raw Ethernet,
such as certain building automation protocols.

4.1.2.2 DNS Settings
The DNS Settings configure the device’s ability to resolve host names. While most of Crimson 3.1 works with IP
addresses, some configuration options can be set to host names instead. To convert these host names to IP
addresses, access to one or more DNS servers is required. The servers may be specified manually or obtained
from the DHCP server. The default manual selections are Google’s public DNS servers at 8.8.8.8 and 8.8.4.4.

4.1.2.3 Physical Layer
The Physical Layer options control the type of connection that the device will attempt to negotiate with the hub or
switch to which it is connected. Generally, these options can be left in their default states, but if you have trouble
establishing a reliable connection, especially when connecting directly to a PC without an intervening hub or
switch, consider turning off both Full Duplex and High Speed operation to see if this solves the problem.

4.1.2.4 Maximum Segment Size
The Maximum Segment Size options control the MSS settings for TCP send and receive. You should not generally
have to change these settings as the default values are suitable for virtually all applications and all networks.

4.1.3 Multiple Ports
If you are using more than one Ethernet port, note that only a single port should have a default gateway defined
and that each port should have a distinct network address. Crimson 3.1 will only send a given IP packet to a single
interface, so a configuration that, for example, defines the first Ethernet port as 192.168.100.1 and the second as
192.168.100.2 will result in all packets for the 192.168.100.0 network going to the first port, thereby preventing the
second port from operating correctly.

4.1.4 TLS‐SSL Settings
The next tab configures support for the TLS and SSL protocols that are used to provide secure connections over
TCP/IP links.

Crimson® 3.1 User Manual 4-29


USING COMMUNICATIONS REVISED 2019-1-15
DRAWING NO. LP1044-F USING COMMUNICATIONS

These protocols are required if you intend to use HTTPS with Crimson’s web server, or if you intend to access
secure mail servers.

4.1.4.1 Settings
The Protocol Support option is used to enable or disable SSL support. By default, the protocol is enabled and there
is very little reason to consider turning it off.

4.1.4.2 Trusted Roots
When Crimson connects to a remote server using TLS-SSL, it can optionally validate the server identity by
checking the server’s certificate against a collection of trusted root certificates. If you intend to use certificate
validation, you must provide these root certificates. The Certificate Source setting is used to select how they are to
be specified. You have the option of specifying a file that contains one or more certificates, or instructing Crimson
to use the trusted roots currently installed on your PC. This last option is a quick way of providing a validated set of
root certificates that will work in most situations.

4.1.5 Routing Settings
The next tab configures TCP/IP routing options, as shown.

4.1.5.1 Routing Mode
The IP Routing option is used to enable or disable packet routing between interfaces. If this option is enabled, IP
packets received on an Ethernet or modem port that are destined for devices connected to another port will be
forwarded as required. Disabling this option will prevent such forwarding. The required setting will be dependent on
your network topology.

4-30 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING COMMUNICATIONS
DRAWING NO. LP1044-F NETWORK CONFIGURATION

4.1.5.2 Routing Table
The routing table defines additional static routes for Crimson 3.1’s TCP/IP stack.

In the example above, a single route has been specified, telling Crimson to forward any packets destined for IP
addresses starting with 192.168.3 to the router located on the local network at address 192.9.200.8. Once again,
the exact settings required will be dependent on the topology of the network to which the target device is
connected.

4.1.6 Download Settings
The next tab is used to configure downloads to the target device over TCP/IP.

4.1.6.1 Remote Update
The IP Download option is used to enable or disable TCP/IP downloads, while the Port Number option specifies
which TCP port should be used for such downloads. The default value of 789 should be used unless you have a
good reason to use something else. The Download to Different Port option is used to let Crimson 3.1 know that
while the target device will be listening on the port specified under Port Number, it should send to a different port as
there is an intervening router that is performing port mapping.

4.1.6.2 Unit Addressing
These settings are used to specify the IP address to be used by the Crimson 3.1 configuration software when the
TCP download method is selected in the Link-Options dialog box:

Crimson® 3.1 User Manual 4-31


USING COMMUNICATIONS REVISED 2019-1-15
DRAWING NO. LP1044-F USING COMMUNICATIONS

• Auto Local Name mode uses the local name defined on the Zero Config tab to reference the unit. This
will only operate correctly if a name has been entered and if you are connected to the same subnet as
the unit.
• Auto Ethernet mode will use the IP address configured for the selected Ethernet port. Obviously, the
port must be manually configured for this to make sense, and otherwise the software will not know the
IP address ahead of time!
• Manual mode will allow an IP address to be entered via the Remote Address field.
Note that this information is saved as part of the database, allowing you to easily switch between units on the same
network as you navigate from database to database, or if you have multiple instances of Crimson 3.1 open at the
same time.

4.1.7 Adding Ports
The final tab can be used to add additional network protocols.

Pressing the Create New Network Port button will add a further network protocol, up to the maximum number of
ports supported by the target device. Pressing the Create New Virtual Port button performs a similar operation, but
will add a port capable of emulating a serial connection over TCP/IP. Either type of port can be deleted by selecting
it in the Navigation Pane and by pressing ALT+DEL or by selecting the delete toolbar option.

4.1.8 Protocol Selection
Once the network has been configured, you can select the protocols that you wish to use for communications using
the method describe below. Several protocols may be used at once, and many of these protocols will support
multiple remote devices. This means that you have several options as to how to mix protocols and devices to
achieve the results you want.
For example, suppose you want to connect to two remote slave devices using Modbus over TCP/IP. Your first
option is to use two network protocols, configuring both as Modbus masters with a single device attached to each.
For most protocols, this will produce higher performance, as it will allow simultaneous communications with the two
devices. It will, however, consume two of the available protocols, limiting your ability to connect via additional
protocols in complex applications.
Your second option is to use a single protocol configured as a Modbus TCP/IP Master, but to add a further device
so that both slaves are accessed via the same driver. This will typically produce slightly reduced performance, as
Crimson 3.1 will poll each device in turn, rather than talking to both devices at the same time. It will, however,
conserve network protocols, allowing more complex applications without running out of resources.

4-32 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING COMMUNICATIONS
DRAWING NO. LP1044-F SERIAL PORT SELECTION

4.1.9 Using Virtual Ports
As mentioned above, Crimson 3.1 supports the addition of virtual ports to the network configuration. A virtual port
looks to Crimson’s communications system just like a serial port, but sends and receives its data over a TCP/IP
link. Virtual ports may be configured in either active mode or passive mode. In the former case, Crimson will
attempt to open a TCP/IP connection to a specified remote device, while in the latter case, Crimson will listen on a
specific TCP/IP port for incoming connections. Virtual ports are typically used to communicate with devices via
remote serial servers: A standard serial protocol is employed, but that protocol’s data is encapsulated within TCP/
IP packets.

4.2 Serial Port Selection
When deciding which of the target device’s serial ports to use for communications, note that some devices and
certain option cards multiplex a single serial controller between multiple ports. This implies that if either port is used
for a slave protocol, the other port will be unavailable. Similarly, if a token-passing protocol such as DH-485 is
employed, the other port will likewise be disabled. Crimson 3.1 will warn you if you attempt to create a configuration
that breaks these rules.
Note also that a target device’s programming port may be used as an extra communications port, but that it will not
be available for download in these circumstances. This is not an issue provided the unit also has a USB port
available. The USB-based method is highly recommended in the event you want to connect devices via the
programming port. If you want to use the programming port for both download and communications, you will have
to provide a method to re-enable serial downloads by executing the StopSystem() command in response to some
user action.

4.3 Selecting a Protocol
To select a protocol for a port, click on that port’s icon in the Navigation Pane, and press the Pick button next to the
Driver field in the Editing Pane. The following dialog box will appear:

Select the appropriate manufacturer and driver, and press the OK button to close the dialog box. The port will then
be configured to use the appropriate protocol and a single device icon will be created in the Navigation Pane. If you
are configuring a serial port, the various Port Settings fields (Baud Rate, Data Bits, Stop Bits and Parity) will be set
to default values appropriate to the protocol in question. You should check these settings to make sure that they
correspond to the settings for the device to be addressed.

4.4 Protocol Options
Some protocols require additional configuration of parameters specific to that protocol. These appear in the Editing
Pane when the corresponding port icon is selected. The following example shows the additional parameters for the
Allen-Bradley DF-1 driver, which appear under the Driver Settings section of the Editing Pane:
 

Crimson® 3.1 User Manual 4-33


USING COMMUNICATIONS REVISED 2019-1-15
DRAWING NO. LP1044-F USING COMMUNICATIONS

4.5 Working with Devices
As mentioned above, when a communications protocol is selected, a single device is created under the
corresponding port icon. In the case of a master protocol, this represents the initial remote device to be addressed
via the protocol. If the protocol supports access to more than one device, you can use the Add Additional Device
button included in the Editing Pane to add further target devices. You may also use the New Comms Device
command, accessed via the Navigation Pane toolbar. Each device is represented via an icon in the Navigation
Pane, and, depending on the protocol, may have a number of properties to be configured.

In the example above, the Modbus Universal Master protocol has been selected, and three additional devices have
been created, indicating that a total of four remote devices are to be accessed. The Editing Pane shows the
properties for each device. The Enable Device property is present for all devices, while the balance of the fields are
specific to the protocol that has been selected. Note that the devices are given default names by Crimson 3.1 when
they are created. These names may be changed by selecting the appropriate icon in the Navigation Pane, pressing
F2 and then typing the new device name.

4-34 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING COMMUNICATIONS
DRAWING NO. LP1044-F ADVANCED SETTINGS

4.6 Advanced Settings
In addition to the device settings mentioned above, certain master devices will also offer a number of advanced
settings that can be used to optimize communications behavior:
• The Spanning Reads option specifies whether Crimson 3.1 will optimize read operations by reading
blocks of data, even if those blocks span registers that are not currently on the comms scan or refer-
enced in the database. For example, with spanning reads enabled for a database that references reg-
isters D1, D2 and D4, a single comms command will be issued to read four registers from D1 onwards.
Disabling spanning reads will results in two read operations, one for two registers from D1, and one for
a single register from D4.
• The Transactional Writes options specifies whether a series of changes to a data value in Crimson 3.1
should result in a corresponding series of write operations, or whether only the last written value will be
transferred. Transactional writes make, for example, pushbutton replacement easier.
• The Preempt Other Devices option specifies whether reads from other devices should be interrupted
for writes to this device to be processed. Enabling this option will decrease write performance at the
cost of less predictable data updates from other devices.
• The Favor UI Writes option specifies whether to give priority to write operations that directly result from
user actions. This is useful when working with a database that performs a lot of background communi-
cations as a result of protocol conversion or programmatic activity.
• The Comms Delay option specifies a delay that will be inserted between any two comms transactions
for this device. It is useful when working with remote devices that are unable to keep up with Crimson
3.1’s performance, or when a lower communications priority is to be given to a device.

4.7 Creating Tags
Some drivers provide an option to create tags within Crimson that correspond to the data items that exist in the
remote device. This option is accessed via the Make Data Tags link on the device configuration page. The exact
operation is driver-dependent, but typically you will be asked to select a configuration file that has been exported by
the device’s programming software. The import process will delete any tags from a previous import of the same
device, but will preserve tag settings such as formats, triggers, security and so on.

4.8 Port and Device Usage
You can find all the items that refer to a given communication device or to any of the devices connected to a
particular port by right-clicking that item in the Navigation Pane and selecting the Find Usage command. The
resulting items will be placed on the Global Search Results List, and can be accessed by means of the F4 and
SHIFT+F4 key combinations. The list itself can be shown or hidden by pressing F8.

4.9 Using Expansion Modules
Some devices support the installation of external communications modules to provide additional communications
facilities. Several cards are available, including models to support bus protocols such as CANOpen, Profibus or
DeviceNet. These modules may be mounted to the device itself or attached via an expansion rack. Devices that
support these modules will have a section called Comms Modules within the Navigation List of their
Communications section. For example, the device shown below supports six directly-connected modules and the
option to add tethered expansion racks:

Crimson® 3.1 User Manual 4-35


USING COMMUNICATIONS REVISED 2019-1-15
DRAWING NO. LP1044-F USING COMMUNICATIONS

To select the module to be installed in a specific slot, select that slot and press the Pick button next to the Module
property in the Module Selection section. A dialog like the one shown below will be displayed:

Selecting the appropriate module will add one or more icons to the Navigation Pane, representing the additional
port or ports that are made available by the card. The additional ports can be configured in the usual way, following
the instructions in the previous sections. Note that the drivers available for a port will depend on the connection
type it supports. For example, the CANOpen expansion card shows a port that will only support drivers designed
for the CAN communication standard.
If you have an expansion rack connected to your target device, you may configure this by clicking on the Tethered
Rack option in the navigation tree and then selecting the Expansion Rack option under the New button in the top-
left corner of the Navigation Pane. Icons will be added to represent the rack and the slots that it provides. These
can be configured just as for the slots of the target device itself.

4.10 Slave Protocols
For master protocols (i.e. those where the Crimson device initiates communication) there is no further configuration
required under the Communications category. For slave protocols (i.e. those where the Crimson device receives
and responds to remote requests), the process is slightly more complex, as you must also indicate what data you
wish to expose.

4.10.1 Selecting the Protocol
As with master protocols, the first stage is to select the protocol for the communications port that you wish to use.
The example below shows the target device’s RS-485 port configured for operation with the Modbus ASCII Slave
protocol:
 

4-36 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING COMMUNICATIONS
DRAWING NO. LP1044-F SLAVE PROTOCOLS

Note that a single device has been created for the protocol. In the case of master protocols, this represents the
remote device that Crimson will access. In this case, though, the device represents the Modbus slave that the
hardware will itself embody. This means that only a single device is required, and that things such as the station
number to which the hardware will respond are normally configured via the port settings rather than those of the
device.

4.10.2 Adding Gateway Blocks
Having configured the protocol, you must now decide what range of addresses you want the slave protocol to
expose. In this example, we want to use Modbus registers 40001 through 40008 to allow read and write access to
certain data items in our database. We begin by selecting the device icon in the Navigation Pane, and clicking the
Add Gateway Block button in the Editing Pane. An icon representing the block will appear under the device:

In the example above, we have configured the Start Address to 40001 to indicate that this is where we want the
block to begin. We have also configured the Block Size to eight to allocate one Modbus register for each tag we
want to expose, and we have configured the Direction as Device to Crimson, to indicate that we want remote
devices to be able to read and write data items exposed via this block. Finally, we have left the Tag Data property at
its default setting of Use Scaled Values, indicating that we want any scaling to be applied to tag data before that
data is transferred to the gateway block.

4.10.3 Adding Items to a Block
Once the block has been created and its size defined, entries appear in the Navigation Pane to represent each of
the registers that the block exposes to remote access. When one of these entries is selected, an expanded

Crimson® 3.1 User Manual 4-37


USING COMMUNICATIONS REVISED 2019-1-15
DRAWING NO. LP1044-F USING COMMUNICATIONS

Resource Pane appears and provides access to available data items. These items comprise both tags from within
your database, and data registers from any master communications devices that you have configured.

To indicate that you want a register within your gateway block to correspond to a specified data item, simply drag
that item from the Resource Pane to the Navigation Pane, dropping it on the appropriate gateway block entry. The
example above shows how the first four registers in the block have been mapped to tags called Tag1 through Tag4,
indicating that accesses to 40001 through 40004 should be mapped to the respective variables.

4.10.4 Accessing Individual Bits

If your application requires it, you can expand individual elements within a Gateway Block to their constituent bits,
and map a different data item to each bit. To do this, right-click on the element in question, and select Expand Bits
from the resulting menu. The Navigation Pane will be updated to show the individual bits that make up the register,
and these can be mapped using the drag-and-drop process described above.

4-38 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING COMMUNICATIONS
DRAWING NO. LP1044-F PROTOCOL CONVERSION

4.11 Protocol Conversion
In addition to exposing internal data tags via slave protocols, Gateway Blocks can also be used to expose data that
is obtained from other devices, or to move data between two master devices. This unique protocol conversion
feature allows much tighter integration between elements of your control system, even when using simple, low-cost
devices.

4.11.1 Master and Slave

Exposing data from other devices over a slave protocol is simply an extension of the mapping process described
above, except this time, instead of dragging a tag from the Resource Pane, you should select the Comms Devices
category, expand the appropriate master device, and drag across the icon that represents the registers that you
want to expose. You will then be asked for a start address in the master device, and the number of registers to
map, and the mappings will be created as shown.
In this example, registers N7:0 through N7:3 in an Allen-Bradley PLC have been exposed for access via Modbus
as registers 40001 through 40004. Crimson will automatically ensure that these data items are read from the Allen-
Bradley PLC to fulfill Modbus requests, and will automatically convert writes to the Modbus registers into writes to
the PLC. If you select a TCP/IP slave protocol, this mechanism allows even the simplest legacy device to be
connected to an Ethernet network.

4.11.2 Master and Master
To move data between two master devices, simply select one of the devices, and create a Gateway Block for that
device. You can then add references to the other device’s registers just as you would when exposing data on a
slave protocol. Again, Crimson will automatically read or write the data as required, transparently moving data
between the devices. The example above shows how to move data from a Modbus device into an SLC-500.

4.11.3 Which Way Around?
One question that may occur to you is whether you should create the Gateway Block within the Allen-Bradley
device, as in this example, or within the Modbus device. The first thing to note is that there is no need to create
more than a single block to perform transfers in a single direction. If you create a block in AB to read from MOD,
and a block in MOD to write to AB, you’ll simply perform the transfer twice and slow everything down! The second
observation is that the decision as to which device should own the Gateway Block is essentially arbitrary. In
general, you should create your blocks to minimize the number of blocks in the database. This means that if the
registers in the Allen-Bradley lay within a single range, but the registers in the Modbus device are scattered all over

Crimson® 3.1 User Manual 4-39


USING COMMUNICATIONS REVISED 2019-1-15
DRAWING NO. LP1044-F USING COMMUNICATIONS

the PLC, the Gateway Block should be created within the Allen-Bradley device to remove the need to create
multiple blocks to access the different ranges of the Modbus address space.

4.11.4 Controlling Master Blocks
Gateway blocks within master devices have several additional properties.

• As with slave blocks, the Tag Data property selects how data tags are mapped to and from the block.
As you will discover in the next chapter, a tag data can be subject to various stages of transformation.
This property selects where in the transformation process the gateway block will obtain and inject its
data.
• The Update Policy property is used to define how the block updates. The default setting of Automatic
will cause read blocks to update continuously, and write blocks to transfer only those values that have
changed. A setting of Continuous will cause all blocks to update continuously. A setting of Timed will
cause all blocks to update at the rate defined by the Update Period property, with the entire contents of
a write block being written each time.
• The Request and Acknowledge properties are used to control the timing of block updates via tags or
other data items. If the Acknowledge property is left empty, Request will act as an enable field, with a
zero value disabling the block and a non-zero value allowing it to operate. If the Acknowledge is
defined, the Request and Acknowledge will operate as a standard two-wire handshake, with the block
updating once on each rising edge of the Request, and the Acknowledge being set after the transac-
tion completes.

4.12 Data Transformation
You may also use Gateway Blocks to perform math operations that your PLC might not otherwise be able to
handle. For example, you may want to read a register from the PLC, scale it, take the square root, and write it back
to another PLC register. To accomplish this, refer to the section on Data Tags, and create a mapped tag to
represent the input value that will be read from the device. Then, create a tag to represent the output value, setting
the expression to perform the required math. You can then create a Gateway Block targeted at the required output
register, and drag the formula across to instruct Crimson to write the derived value back to the PLC.

4-40 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING COMMUNICATIONS
DRAWING NO. LP1044-F DISABLING COMMUNICATIONS

4.13 Disabling Communications
Crimson provides the option to disable all driver-based communications by means of a property contained in the
top-level item of the Communication category.

Disabling communications can be useful during development when you do not have the necessary target devices
available. When operating in disabled mode, Crimson initially sets all tags equal to their simulated values, and then
allows them to be changed just as if they were being written to the associated devices. If you find your
communications has stopped for no reason, make sure you do not have this setting set to disabled!

Crimson® 3.1 User Manual 4-41


REVISED 2019-1-15 WORKING WITH TAGS
DRAWING NO. LP1044-F ALL ABOUT TAGS

Chapter 5 Working with Tags

Once you have configured the communications options for your database, the next step is to define the data items
that you want to display or otherwise manipulate. This is done by selecting the Data Tags category in the
Navigation Pane. Tags can be created, deleted and otherwise manipulated using the standard operations referred
to earlier in this manual.

5.1 All About Tags
Data Tags are named entities that represent data items.

5.1.1 Data Sources
Tags may get their data from three possible sources:

• A tag may be mapped to one or more registers in a remote device, in which case Crimson® 3.1 will
automatically read the corresponding register when the tag is referenced or displayed. Similarly, if you
change a mapped tag, Crimson will automatically write the new value to the device.
• A tag may be internal, in which case it represents one or more data elements within the Crimson-
based device. Internal tags can be marked as retentive, in which case they will keep their values
through a power-cycle, or non-retentive, in which case they will be reset to zero on power-up.
• A tag may be an expression, in which case it represents a calculation based upon other data items,
optionally using mathematical operators and one or more of Crimson’s internal or user-defined func-
tions. Expression tags can calculate derived values for internal use or for transfer to remote devices.

5.1.2 Types of Tags
Crimson supports three main types of tags:
• Numeric Tags represent integer or floating point values.
• Flag Tags represent an on-or-off value.
• String Tags represent strings of Unicode characters.
Each of the three main tag types can represent a single value or an array of values. An array is a collection of items
with similar properties that are grouped together and accessed via an index value. Mapped arrays correspond to
multiple registers in the target device.
A fourth type of tag is the Basic Tag. This is a simplified version of a tag that can only represent string or numeric
expressions. It lacks many of the powerful features of the standard tags. It is typically used to encode simple data
items like constants.

Crimson® 3.1 User Manual 5-42


WORKING WITH TAGS REVISED 2019-1-15
ALL ABOUT TAGS DRAWING NO. LP1044-F

5.1.3 Tag Key
The following graphic shows the tag keys available in Crimson 3.1 and describes their usage:

5.1.4 Tag Attributes
Tags within Crimson are rich objects that define various common properties:
• A tag’s label is a translatable, human-readable string used to automatically label data fields referring to
this data item. It is also used by the Web Server and the Data Logger to label associated data items.
• A tag’s description is a non-translatable string used to provide an annotation as to the tag’s purpose. It
is not normally viewed by the user of the target device, but can be displayed for diagnostic purposes.
• A tag’s format is a collection of settings that define the method by which the tag data is to be presented
for display. The format may be left as General, in which case Crimson will use default formatting rules,
or may be set to one of many formatting types. For example, a numeric value may be displayed in sci-
entific format, or may be used to select a number of different text strings.

5-43 Crimson® 3.1 User Manual


REVISED 2019-1-15 WORKING WITH TAGS
DRAWING NO. LP1044-F ADVANTAGES OF TAGS

• A tag’s coloring is a collection of settings that define how the tag’s text is to be displayed or what colors
are to be used to represent the state of the tag. Again, a number of different colorings exist, allowing a
tag to change its appearance based upon a variety of conditions. Foreground and background colors
are defined in pairs, and can be accessed individually by display primitives.
• A tag’s security descriptor defines the access rules to be used when changing the tag, and whether or
not those changes are to be logged.
Basic tags lack format, coloring and security information. In addition, numeric and flag tags define alarms and
triggers, respectively allowing alarms to be activated or actions to be taken based on certain conditions.

5.2 Advantages of Tags
Since Crimson allows you to place a PLC register directly on a display page without going to the trouble of defining
data tags, it is worth spending a moment pointing out the benefits of the minimal extra work that is involved with
using tags:
• Tags allow you to name data items, so you know which data item within the PLC you are referring to.
Further, if the data in the PLC moves or if you decide to switch to an entirely different family of PLC,
you can simply re-map the tags, and avoid having to make any other changes to your database.
• Tags allow you to avoid re-entering the same information again and again. When you create a tag, you
specify how the tag is to be displayed. In the case of a numeric tag, this means you tell Crimson how
many decimal places are to be used, and what units, if any, are to be appended to the value. When
you place a tag on a display page, Crimson knows how to format it without you having to do anything
further. Similarly, if you decide to change the formatting, and perhaps switch from one set of units to
another, you can do this in one place, without having to edit each display page in turn.
• Tags are used as one basic method for color animation. The various colors that are defined for a tag
can be used to specify the way in which other animation primitives will be displayed. While there are
other methods, tags provide a simple way of changing the color of display primitives.
• Tags are the key to implementing slave protocols. Crimson treats these protocols as mechanisms for
exposing data items within the target device. This allows the same data to be accessed via multiple
ports, so that, for example, a machine setting could be changed by both a local SCADA package and a
similar package working over Ethernet from a remote site. Without tags, there would be nothing to
expose, and this mechanism could not be implemented!
• Tags are used within Crimson to implement many advanced features. If you want to use functionality
such as alarms, triggers, data logging or the web server, you will have to use tags, period. The format-
ting data from the tag definition is typically required by all these features, so tags are mandatory for
their operation.
In other words, tags will automate many tasks during programming, saving you time. Even if you decide not to use
tags, many of the subsequent chapters of this manual refer to concepts discussed in this chapter. You should read
them thoroughly before proceeding.

Crimson® 3.1 User Manual 5-44


WORKING WITH TAGS REVISED 2019-1-15
EDITING PROPERTIES DRAWING NO. LP1044-F

5.3 Editing Properties
Most properties are edited in ways that are self-evident to users familiar with the Windows operating system. For
example, you may be required to enter a numeric value, or to select an item from a drop-down list. Certain types of
property, though, provide more complex editing options and these are described below.

5.3.1 Expression Properties
Expression properties are capable of being set to:
• A constant value.
• The contents of a data tag.
• The contents of a register in a remote communications device.
• A combination of such items linked together using various math operators.
• The return value of a local program.
In its default state, the arrowed button immediately after the label of the property shows that the field is in General
mode. The edit box to the right of the button may show a grayed-out string that indicates the default behavior of the
property. An example of an empty expression property without a default value is shown below:

If you are familiar with Crimson’s expression syntax you can edit the property by typing an expression directly into
the edit box. A complete description of this syntax can be found in the Writing Expressions chapter. Expression
properties may also be set to a variety of other items, each of which is typically accessed via the list displayed
under the arrowed button. You can access this list in the usual way by pressing the button, or with the button
selected, you can press the spacebar to show the menu. You may also press the initial character of the item that
you wish to select, avoiding the need to show the list at all. For example, pressing T with the button selected is
equivalent to showing the menu and selecting the Tag option.

5.3.1.1 Selecting a Tag
To set an expression property to an existing tag, you have four options. First, you can ensure that the target field is
selected and then double-click the required tag in the Resource Pane. Second, you can drag the tag from the
Resource Pane and drop it on the target field. Third, you can select Tag from the drop-down menu activated by the
arrowed button and be reminded that you could just have dragged the target to the field in the first place! Finally,
you can just do it the old fashioned way and type the tag name into the expression property.

5.3.1.2 Creating a Tag
To set an expression property to a new tag, you have three options. First, for expressions that define the source of
a data item, you can select the New Tag option in the drop-down menu activated by the arrowed button. Second, if
you already have a tag selected, you can press the Pick button and select New Tag from the resulting dialog box.
Finally, you can enter the name of the new tag as part of an expression, and have Crimson prompt you via a dialog
similar to that shown below:

5-45 Crimson® 3.1 User Manual


REVISED 2019-1-15 WORKING WITH TAGS
DRAWING NO. LP1044-F EDITING PROPERTIES

In this example, an expression referencing Tag1 has been entered, but no such tag exists within the database.
Crimson spots the error, and asks if you would like to create this tag automatically. The dropdown list can be used
to select the type of the new tag, and will contain options appropriate for the context in which the tag was used. The
Yes to All button can be used to tell Crimson to use the default data type to create any other missing tags contained
within this expression without any further prompting.

5.3.1.3 Comms References
To select a register from a comms device, select a device from the drop-down menu. A dialog box will be displayed,
allowing you to choose a register within that remote communications device. The various communications devices
are listed at the end of the menu in the order in which they were created. You may also select the Next option from
the drop-down menu, thereby setting the current tag equal to the last-used PLC register plus the number of
registers mapped to that address. For example, mapping a 32-bit tag to Modbus register 40001 and then selecting
Next will map the subsequent tag to 40003.

5.3.1.4 Editing an Expression
As mentioned above, general expressions are typically edited directly in the edit box of the property. However, they
can also be edited by pressing the Edit button next to the field, thereby activating a dedicated dialog box that allows
more of the expression to be seen, as follows:

The editor used in this dialog box is the same as is used for creating global programs. It therefore provides syntax
coloring. You can also access help information on system functions by placing your cursor in or at the end of the
function name and pressing F1.

Crimson® 3.1 User Manual 5-46


WORKING WITH TAGS REVISED 2019-1-15
EDITING PROPERTIES DRAWING NO. LP1044-F

5.3.1.5 Complex Expressions
If your expression is too complex to fit into a single line—or if you would simply rather write it as a program—you
may select the Complex option from the drop-down menu, thereby allowing a local program to be created, as
follows:

The return statement is used provide the value of the expression, just as if you had called a global program. Note
once again that the program editor is used, providing syntax coloring and auto-indent facilities, and that the F1
mechanism described above can be used to consult help information on system functions. The Description text
allows you to make a quick note of the program’s function. This will be displayed next to the property for reference.
For information on writing and editing programs, refer to later chapters.

5.3.2 Translatable Strings
Crimson databases are designed to support multilingual operation, whereby any string that will be presented to the
user of the target device is capable of being displayed in one of many different languages. To allow you to define
these translations, properties that contain such strings have a button labeled Translate to their right-hand side.

5-47 Crimson® 3.1 User Manual


REVISED 2019-1-15 WORKING WITH TAGS
DRAWING NO. LP1044-F EDITING PROPERTIES

To enter the translations, click the button and the following dialog box will appear:

The languages listed in the dialog are defined at the database level. Refer to the chapter on Localization for
information on how they are selected, on the operation of the Auto-Translate function, and on how to switch the
language at runtime. Note that if you do not enter text for a language and that language is subsequently selected
by the operator, Crimson will use the text from the default language instead.
Translatable strings are also capable of being defined as expressions, thereby allowing them to change at runtime.
For example, while an alarm name would typically be set during configuration, a database designer might want the
alarm to contain the value of the tag that triggered the alarm. Expressions can be entered by prefixing them with an
equals sign, just as one would do when editing a spreadsheet, as follows:

Note the use of the AsText property of the tag to allow its value to be accessed as a string according to its format
setting. Refer to the Writing Expressions chapter for more details.

5.3.3 Two‐Way Properties
Properties such as translatable strings that are capable of being set to a constant value or an expression are called
two-way properties. As well as accepting expressions prefixed with an equals sign, they can be set to tag values by
simply dragging the appropriate tag from the Resource Pane and dropping it on the field.

5.3.4 Action Properties
Action properties are used within tags to define the action to be performed when triggered conditions are met, or
when a tag value is changed. They are edited by a drop-down and edit box similar to those used for editing
expressions, as follows:

Crimson® 3.1 User Manual 5-48


WORKING WITH TAGS REVISED 2019-1-15
EDITING PROPERTIES DRAWING NO. LP1044-F

As with expressions, the Edit button can be used to invoke a larger editing window, and complex actions can be
created by means of local programs.

5.3.5 Color Properties
Color properties within tags represent a pair of colors, these being the foreground and the background color to be
used when displaying the tag’s state in textual form. The following example shows a color pair being edited:

The drop-down menu contains the following colors:


• The sixteen standard VGA colors.
• Thirty-two shades of gray between black and white.
• Any other colors used in the database, up to a limit of twenty-four.
The More option at the bottom of the list can be used to invoke the color selection dialog, as follows:

This dialog offers several ways of defining a color. You can pick from the palette, pick from the “rainbow” window, or
enter the explicit HSL or RGB parameters. If the color selected has not previously been used in the database and
is not one of the standard colors or grays, it will be added to the custom colors shown in the drop-down menu.

5-49 Crimson® 3.1 User Manual


REVISED 2019-1-15 WORKING WITH TAGS
DRAWING NO. LP1044-F LOG PROPERTIES

5.4 Log Properties
When you first enter the Data Tags category of the Navigation Pane, you will notice a number of properties relating
to event logging. These properties control if and how events generated by tags or by their alarms will be saved to
the memory card. They are analogous to the properties defined by data logs, and you are referred to the Using the
Data Logger chapter later in this manual for more information on how they can be used.

5.5 Creating Tags
Data tags are created and otherwise manipulated via the usual methods in the Navigation Pane. You will notice
that you can create folders to organize your tags, and that the New button in the toolbar contains a drop-down
arrow to allow you to select the type of tag to be inserted. The left-hand side of the New button will create a tag of
the same type as the last one you created, making it easier to create multiple tags without using the drop-down.

5.6 Duplicating Tags
The Smart Duplicate command on the Edit menu can be used to create a new copy of an existing tag,
automatically incrementing its data source to refer to the next data element.
The definition of “next” depends on the exact type of the data element, with Crimson being able to select the next
register in a comms device, the next member of an array, or the next tag in a sequence. For example, using Smart
Duplicate on a 16-bit tag mapped to Modbus register 40001 will produce a tag mapped to 40002, while using it on a
tag mapped to Array[2] will produce a tag mapped to Array[3].
This facility makes it much easier to create sets of tags referring to sequential data items.

Crimson® 3.1 User Manual 5-50


WORKING WITH TAGS REVISED 2019-1-15
EDITING MULTIPLE TAGS DRAWING NO. LP1044-F

5.7 Editing Multiple Tags
You may want to edit the properties of several tags at once. Crimson supports this operation by having you edit one
tag, and then allowing you to set the properties of the other tags equal to those of the one that you first edited.
Crimson provides two methods to do this, both of which rely on the same underlying mechanism.

5.7.1 Using Copy From
The Copy From command can be used to copy the selected properties of a given tag to one or more tags in the
Navigation List. To use the command, select the target tags, and then rightclick to access the context menu. (Note
that the Navigation List for tags supports multiple selection via the usual SHIFT and CTRL key combinations.) Select one
of the Copy From commands, and the cursor will change to allow you to select the tag from which the copy
operation should be performed. Depending on the command that was selected, one or more properties from the
source tag will then be applied to the target tags.

5.7.2 Using Paste Special
The Paste Special command can be used to achieve the same result, but via a different method that also allows
properties to be copied between databases or between multiple instances of Crimson. First, select the source tag
and use the Copy command to put it and its properties on the Clipboard. Next, select the target tags in the
Navigation List, again noting that multiple selections can be made. Finally, right-click the selection to access the
context menu, and select the Paste Special command. The following dialog box will appear:

The selected properties from the source tag will be applied to the target tags.

5.7.3 Property Selections
Both methods detailed above allow you to define which properties are to be copied:
• Mapping copies the Source property. It also copies all the properties that control that tag’s
communications options, such as the Extent, Access, and all the other properties that are contained in
the Data Source section.
• Scaling copies the Scale To property and the associated scaling limits.
• Format copies the Format Type, and the associated Format object.
• Coloring copies the Coloring Type, and the associated Coloring object.
• Alarms copies all the properties of Alarm 1 and Alarm 2.
• Triggers copies all the properties of Trigger 1 and Trigger 2.
• Security copies all the properties from the tag’s Security page.

5-51 Crimson® 3.1 User Manual


REVISED 2019-1-15 WORKING WITH TAGS
DRAWING NO. LP1044-F IMPORTING AND EXPORTING

In addition, the Selective option can be used to select the properties to copy, as follows:

The list contains a hierarchical presentation of all the properties defined by the source tag, organizing them
according to the layout used when editing the tag, and showing the value assigned to each. The properties or
groups of properties can be selected or deselected using the associated checkboxes. Only the checked properties
will be applied, providing you with low-level control of what gets copied from one tag to another.

5.8 Importing and Exporting
Selecting the Data Tags item in the Navigation List provides access to buttons that can be used to export and
import the data tags in your database. Tags may be exported to either Unicode text files or ANSI comma separate
variable files, with either capable of being edited via applications such as Microsoft Excel. The export file is divided
into sections based upon tag type, format type and coloring type. Each section contains several columns, the
meanings of which can be determined by consulting the sections below.
Note that certain communications drivers can import, for example, a PLC configuration file and create data tags
that correspond to the PLC registers. This facility is accessed via the device configuration page using the Make
Data Tags command.

5.9 Finding Tag Usage
You can find all the items that refer to a given tag by right-clicking that item in the Navigation Pane and selecting
the Find Usage command. The resulting items will be placed on the Global Search Results List, and can be
accessed by means of the F4 and SHIFT+F4 key combinations. The list itself can be shown or hidden by pressing F8.

Crimson® 3.1 User Manual 5-52


WORKING WITH TAGS REVISED 2019-1-15
NUMERIC TAGS DRAWING NO. LP1044-F

5.10 Numeric Tags
A numeric tag represents one or more integer or floating point values. Crimson performs all internal calculations
using either 32-bit signed integers or single-precision floating point, so all data will be converted to one of these
forms before processing. (Certain functions exist to allow 64-bit math to be performed via pairs of 32-bit array
elements. Refer to the Reference Manual for more information.) Mapped numeric tags support several
transformations that occur between the raw data and the data that will be used by Crimson. The exact process is
defined in detail later in this chapter.

5.10.1 Data Properties
A numeric tag has the following properties on its Data tab:

5.10.1.1 Data Source
• The Source property defines where the tag gets its data. The default setting results in an internal tag,
but the drop-down list may be used to select a general expression, another data tag or an item from a
remote device.
• The Extent property is used to choose between a single element tag or an array. If you select an array,
you must enter the required number of elements. Arrays are not permitted for tags whose source is an
expression. For mapped items, the number of registers to be read from the remote device depends
upon the data type defined for the address. For example, an array of two elements that was mapped to
a register of type Word as Long will result in four registers being accessed, with two words being
needed for each long value. A similar array mapped to a data type of Word as Word will only need two
registers.

5-53 Crimson® 3.1 User Manual


REVISED 2019-1-15 WORKING WITH TAGS
DRAWING NO. LP1044-F NUMERIC TAGS

• The Manipulation property defines the first-stage transformation that is applied as comms data is being
transferred into a mapped tag. The following options may be available, depending on the exact data
type being used:

Manipulation Description
None The data will not be changed.
Invert Bits Each bit in the data will have its state inverted.
Reverse Bits The most significant bit in the data will be swapped
with the least significant bit, with intermediate bits
being treated in a similar fashion.
Reverse Bytes The most significant byte in the data will be swapped
with the least significant byte and so on. Only
available for data items of 16 bits or more in size.
Reverse Words The most significant word in the data will be
swapped with the least significant word. Only
available for data items of exactly 32 bits in size.
BCD to Binary Each four bit group in the data will be interpreted as
a single decimal digit. Selecting this option will force
the data to an unsigned integer.

• The Treat As property for internal tags defines the tag’s data type. For mapped tags, it defines how the
manipulated data is to be interpreted by Crimson. The property will be set to default based on the
underlying data type when the tag is mapped, but can be changed. Note that for most tags, the Treat
As property does not have the final say on the actual data type of the tag as the scaling properties may
be used to convert the data further. The following options may be available, depending on the exact
data type of the comms data:

Treat As Description
Signed Integer The data will be treated as a 32-bit signed value, with
smaller data values being sign-extended. For
example, a 16-bit value of 0x8000 will be converted
to 0xFFFF8000.
Unsigned Integer The data will be treated as a 32-bit signed value, with
smaller data items being zero-extended. For
example, a 16-bit value of 0x8000 will be converted
to 0x00008000. Only available for data items of less
than 32 bits in size.
Default Integer The data will be either zero-extended or sign-
extended according to the preference of the
communications driver from which the data is
obtained. Only available for data items of less than
32 bits in size.
Floating Point The data will be treated as a 32-bit single-precision
floating point value. Only available for data items of
exactly 32 bits in size.

• The Access property is used for mapped tags to define what kind of communications operations are to
be permitted. Internal tags are always set to read and write access, and expression tags are always
read-only.

Crimson® 3.1 User Manual 5-54


WORKING WITH TAGS REVISED 2019-1-15
NUMERIC TAGS DRAWING NO. LP1044-F

• The Read Mode property is used only for array tags. It defines the elements to be read when the array
is referenced. The following settings can be used:

Read Mode Description


Entire Array All the elements in the array will be read whenever
the array is referenced, and access will be blocked
until the read operation has completed. This will
ensure that data is available, but will produce the
slowest performance.
Manual Mode The array will not be read until a call is made to the
ReadData function to force a one-time manual
update.
On Demand Array elements will be read as they are referenced.
This produces the quickest performance, but stale
data may be returned when an element is first
accessed.
N Either Side On Demand operation will be used, but N registers
either side of the referenced register will be read as
well, thereby making adjacent data available more
quickly.
• The Storage property is used to indicate whether the tag will be retained through a power-cycle of the
target device. This is typically used for internal tags, but mapped write-only tags may also have their
values retained.

5.10.1.2 Data Scaling
• The Scaling property is used for mapped tags to define a final scaling step to be performed on the
data. Data may be scaled to integer or to floating point, irrespective how Crimson is treating the manip-
ulated comms data. For example, an integer value may be scaled to a floating point value, in which
case Crimson will consider the tag to be floating point. Likewise, a floating point value might be con-
verted back to an integer, perhaps without even changing its magnitude.
• The Data From and Data To properties define the domain of the transformation that occurs on read
and the range of the transformation that occurs on write. The values must match the data type speci-
fied in Treat As, such that only data that is being treated as floating point can have non-integral values
entered in these fields. On read, values beyond these limits are still accepted, and will be scaled to
corresponding values beyond the Display limits. In other words, no clipping of the value is performed.
• The Display From and Display To properties define the range of the transformation that occurs on read
and the domain of the transformation that occurs on write. The values must match the data type spec-
ified in Scale To, such that only data that is being scaled to floating point can have non-integral values
entered in these fields. On write, values beyond these limits are still accepted, and will be scaled to
corresponding values beyond the Data limits. In other words, no clipping of the value is performed.

5.10.1.3 Data Simulation
• The Simulate As property defines the assumed value to be used for the tag when working in the dis-
play page editor. Entering a sensible value allows a better representation of the page’s likely appear-
ance. This value is also used as the tag’s default value if communication is globally disabled.

5-55 Crimson® 3.1 User Manual


REVISED 2019-1-15 WORKING WITH TAGS
DRAWING NO. LP1044-F NUMERIC TAGS

5.10.1.4 Data Actions
• The On Write property defines an action that is to be invoked when the tag is changed. The system
variable Data will hold the new data value when the write occurs and when the action is executed. The
use of On Write properties is covered later in this chapter.

5.10.1.5 Data Setpoint
• The Use Setpoint property is used to enable or disable a setpoint for this tag.
• The SP Value property defines an expression or another tag that this tag is nominally meant to follow.
This setpoint can then be used in alarms or in primitives to implement various functions.

5.10.2 Format Properties
A numeric tag has the following properties on its Format tab:

5.10.2.1 Data Labels
• The Label property was discussed above under Tag Attributes.
• The Description property was discussed above under Tag Attributes.
• The Class property is reserved for future expansion.

5.10.2.2 Format Type
• The Format Type property selects the format for this tag. The various types of formats are discussed in
detail in a following chapter, as are the other properties that might appear according to the format type
that you have selected.

Crimson® 3.1 User Manual 5-56


WORKING WITH TAGS REVISED 2019-1-15
NUMERIC TAGS DRAWING NO. LP1044-F

5.10.2.3 Data Limits
• The Minimum Value and Maximum Value properties are used to manually define data entry limits. If no
values are provided, the default values will be based on the Default Limits property described below.
• The Default Limits property defines how the tag’s data entry limits are to be determined if they are not
provided. A setting of Automatic results in the Display Range specified on the Data tab being used as
a primary source, with the format object being used as a fallback if scaling is not enabled. If neither
source can define a range, the maximum supported range for the tag’s data type is used. A setting of
From Format forces the format object to be used.
• The Deadband property is used to define how much the tag’s value must change before updates will
be sent to OPC UA clients. Regular communications drivers do not use this setting and will therefore
process writes as soon as the value changes. The property will not be shown on devices which do not
support the OPC UA Server.

5.10.3 Color Properties
A numeric tag has the following properties on its Colors tab:

5.10.3.1 Color Type
• The Color Type property defines the coloring for this tag. The various types of coloring are discussed in
detail in a following chapter, as are the other properties that might appear according to the option you
have selected.

5-57 Crimson® 3.1 User Manual


REVISED 2019-1-15 WORKING WITH TAGS
DRAWING NO. LP1044-F NUMERIC TAGS

5.10.4 Alarm Properties
A numeric tag has the following properties on its Alarms tab:

5.10.4.1 For Each Alarm
• The Event Mode property is used to indicate the logic that will be used to decide whether the alarm
should activate. The tables below list the available modes.
Mode Alarm will activate when:
Data Match The value of the tag is equal to the alarm’s Value.
Data Mismatch The value of tag is not equal to the alarm’s Value.
Absolute High The value of the tag exceeds the alarm’s Value.
Absolute Low The value of the tag falls below the alarm’s Value.
Rise in Value The value of the tag rises by the alarm’s Value.
Fall in Value The value of the tag falls by the alarm’s Value.
Change in Value The value of the tag changes by the alarm’s Value.

The following modes are only available when a setpoint is defined:


Mode Alarm will activate when:
Deviation High The value of the tag exceeds the tag’s Setpoint by an
amount equal to or greater than the alarm’s Value.
Deviation Low The value of the tag falls below the tag’s Setpoint by
an amount equal to or greater than the alarm’s
Value.
Out of Band The tag moves outside a band, which is equal in
width to twice the alarm’s Value and is centered on
the tag’s Setpoint.
In Band The tag moves inside a band, which is equal in width
to twice the alarm’s Value and is centered on the
tag’s Setpoint.

• The Event Name property defines the name that will be displayed in the alarm viewer or in the event
log when referring to this event.
• The Value property defines either the absolute value at which the alarm will be activated, the deviation
from the setpoint value or the change in value that must occur since the alarm last triggered. The exact
interpretation depends on the event mode as described above.

Crimson® 3.1 User Manual 5-58


WORKING WITH TAGS REVISED 2019-1-15
NUMERIC TAGS DRAWING NO. LP1044-F

• The Hysteresis property is used to prevent an alarm from oscillating between the on and off states
when the process is near the alarm condition. For example, for an absolute high alarm, the alarm will
become active when the tag exceeds the alarm’s value, but will only deactivate when the tag falls
below the value by an amount greater than or equal to the alarm’s hysteresis. Remember that the
property always acts to maintain an alarm once the alarm is activated, and not to modify the point at
which the activation occurs.
• The Enable property defines an expression that enables or disables the alarm. A non-zero or empty
value results in the alarm being enabled, while a zero values results in the alarm being disabled.
• The Trigger property is used to indicate whether the alarm should be edge or level triggered. In the for-
mer case, the alarm will trigger when the condition specified by the event mode first becomes true. In
the latter case, the alarm will remain in the active state while the condition persists. This property can
also be used to indicate that this alarm should be used as an event only. In this case, the alarm will be
edge triggered, but will not result in an alarm condition. Rather, an event will be logged to internal
memory and optionally to the memory card.
• The Delay property is used to indicate how long the alarm condition must exist before the alarm will
become active. In the case of an edge triggered alarm or event, this property also specifies the amount
of time for which the alarm condition must no longer exist before subsequent reactivations will result in
a further alarm being signaled. As an example, if an alarm is set to activate when a speed switch indi-
cates that a motor is not running even when the motor has been requested to start, this property can
be used to provide the motor with time to run-up before the alarm is activated.
• The Accept property is used to indicate whether the user will be required to explicitly accept an alarm
before it will no longer be displayed. Edge triggered alarms must always be manually accepted.
• The Priority property is used to control the order in which alarms are displayed by Crimson’s alarm
viewer. The lower the numerical value of the priority field, the nearer to the top the alarm will be dis-
played.
• The Siren property is used to indicate whether or not the activation of this alarm should also activate
the target device’s sounder. While the sounder is active, the panel’s display will also flash to better
draw attention to the alarm condition.
• The Mail To property specifies the email address book entry to which a message should be sent when
this alarm is activated. Refer to the Using Services chapter for information on configuring email.
• The On Accept, On Active, On Clear and On Event properties are used to specify actions to be exe-
cuted when the change of state occurs. Not all actions will be available, depending on the alarm’s trig-
ger mode and accept type.

5-59 Crimson® 3.1 User Manual


REVISED 2019-1-15 WORKING WITH TAGS
DRAWING NO. LP1044-F NUMERIC TAGS

5.10.5 Trigger Properties
A numeric tag has the following properties on its Trigger tab:

5.10.5.1 For Each Trigger
• The Trigger Mode property is as described for the Alarms tab.
• The Value and Hysteresis properties are as described for the Alarms tab.
• The Delay property is as described for the Alarms tab.
• The Action property is used to indicate what action should be performed when the trigger is activated.
Refer to the Writing Actions chapter for a description of the syntax used to define the various actions
that are available.

5.10.6 Plot Properties
Quick Plot is a feature added to numeric tags which allows for an easy method of graphically tracking tag values.
Once enabled and configured, the tag plot can be added to a display page from the Core Primitives category on the
Resource Pane. Click and drag the Quick Plot primitive onto the desired display page and resize as needed.

Crimson® 3.1 User Manual 5-60


WORKING WITH TAGS REVISED 2019-1-15
NUMERIC TAGS DRAWING NO. LP1044-F

The following properties are on the Plot tab:

• The Mode property is used to set how data is recorded. Continuous mode records in a circular buffer,
discarding old values. Continuous is the most commonly used mode. One-Shot Relative will start
recording when the enable becomes true, and stop when the buffer fills or when enable goes false.
The time value attributed to each sample will be relative to the time when the plot started. OneShot
Absolute is similar, except that all time values are zero-based.
• On Rewind specifies what to do if time goes backwards. While this sounds rather odd, it can occur
since the time base can be a variable and may not be linked to the actual time of day. It may, for exam-
ple, be a position value such that the plot shows the profile traced by part of a machine. The options
are to either clear the data after the time to which we have stepped back, or shift all the data in the buf-
fer so that the old data is retained but is shifted back in time.
• Enable starts and stops the trend.
• Data Valid indicates whether the recorded data is valid. Having this expression go to zero allows gaps
to be recorded in the data without stopping the trend and thereby dropping all the data when it restarts.
• By default, Time Base is the system time. It is used to define the time base. For some applications
(e.g. recording ramp-soak performance from an external controller) it can be an external time base.
And for other applications (e.g. tracking a machining profile) it may not be a time value at all.
• Time Span is the number of time base ticks to record in the buffer. Note that this is typically larger than
the point count and, together with that variable, defines how many ticks each slot will take up.
• Point Count is the number of points to store in the buffer. As the quick plot is designed for a basic dis-
play of a tag’s changes over time, this is typically a smaller value than the number of pixels across the
display.

5.10.7 Security Properties
Refer to the Using Security chapter for details of security descriptors.

5-61 Crimson® 3.1 User Manual


REVISED 2019-1-15 WORKING WITH TAGS
DRAWING NO. LP1044-F FLAG TAGS

5.11 Flag Tags
A flag tag represents one or more on-or-off values and is considered to have an internal data type of integer, no
matter what the type of underlying data. Mapped flag tags allow simple transformations between raw data and the
data that will be used by Crimson.

5.11.1 Data Properties
A flag tag has the following properties on its Data tab:

5.11.1.1 Data Source
• The Source property defines where the tag gets its data. The default setting results in an internal tag,
but the drop-down list may be used to select a general expression, another data tag or an item from a
remote device.
• The Extent property is used to choose between a single element tag or an array. If you select an array,
you must enter the required number of elements. Arrays are not permitted for tags whose source is an
expression. For mapped tags, the exact number of registers to be read from the remote devices
depends upon the type of the registers to which the tag is mapped and the Treat As property.

Crimson® 3.1 User Manual 5-62


WORKING WITH TAGS REVISED 2019-1-15
FLAG TAGS DRAWING NO. LP1044-F

• The Treat As property is used for mapped tags to define how the on-or-off value is to be derived from
the raw comms data and vice versa. The following settings may be available, depending on the under-
lying data type:

Treat As Result
Unsigned Integer The tag will be true if the data is non-zero, or false if it
is zero. A true value will be written as an integer
value of 1, while a false value will be written as zero.
For a mapped array, each array element
corresponds to a single comms data element. This
setting is available for any comms data of 8 bits or
more in size.
Floating Point The tag will be true if the value is non-zero, or false if
it is zero. A true value will be written as a 32-bit
floating point value of 1, while a false value will be
written as zero. For a mapped array, each array
element corresponds to a single comms data
element. This setting is available for comms data of
exactly 32 bits in size.
Bit Array A single bit is extracted from the data. For a single
Little Endian element, the Bit Number field selects the bit, with the
least significant being bit 0. For an array, each
element is a single bit, such that the bits are in effect
packed within the data items. The first element of the
array is the least significant bit, the second is the
next-most significant and so on. An 8 element array
mapped to a byte data type in a PLC will thus read all
8 bits from a single register.
Bit Array As above, except that the bits are reversed, with a Bit
Big Endian Number field of Bit 0 accessing the most significant
bit, and with the first element of an array being
sourced from the most significant bit downwards.

• If you are using either of the Bit Array modes, see the section below on Write Mode regarding the dan-
ger of writing to individual bits within larger data types when other bits in the same value can be
changed by the remote device.
• The Bit Number property extracts a single bit from multi-bit data items for mapped non-array tags. The
property is not used for other configurations.
• The Manipulation property defines the transformation that is applied to the tag state after the Treat As
logic has been performed when reading data, or before the Treat As logic when writing data. The only
option available is to invert the state of the tag. Not a lot else you can do with a single bit value!
• The Access property is used for mapped tags to define what kind of communications operations are to
be permitted. Internal tags are always set to read and write access, and expression tags are always
read-only.
• The Write Mode property is used when a flag tag is mapped to a bit within a larger data type and where
write access is enabled. If you instruct Crimson to write from cached data, the most recently known
value (either from a read or the last write) will be used for the remaining bits in the larger data type. If
you instruct Crimson to perform a read-modify-write operation, the larger data type will be read, the
selected bit will be updated, and the new value will be written back. This operation may occur in a sin-
gle communications transaction if the underlying driver supports it, but will more normally occur as
three individual operations. There is still the chance that the data in the other bits of the underlying type
will change during the operation, causing invalid values to be written back. You should therefore avoid

5-63 Crimson® 3.1 User Manual


REVISED 2019-1-15 WORKING WITH TAGS
DRAWING NO. LP1044-F FLAG TAGS

writing to individual bits in larger data type when the remote device can change other bits in the same
location.
• The Read Mode property is used only for array tags. It defines the elements to be read when the array
is referenced. The following settings can be used:

Read Mode Description


Entire Array All the elements in the array will be read whenever
the array is referenced, and access will be blocked
until the read operation has completed. This will
ensure that data is available, but will produce the
slowest performance.
Manual Mode The array will not be read until a call is made to the
ReadData function to force a one-time manual
update.
On Demand Array elements will be read as they are referenced.
This produces the quickest performance, but stale
data may be returned when an element is first
accessed.
N Either Side On Demand operation will be used, but N registers
either side of the referenced register will be read as
well, thereby making adjacent data available more
quickly.

• The Storage property is used to indicate whether the tag will be retained through a power-cycle of the
target device. This is typically used for internal tags, but mapped write-only tags may also have their
values retained.

5.11.1.2 Data Simulation
• The Simulate As property defines the assumed value to be used for the tag when working in the page
editor. Entering a sensible value allows a better representation of the page’s likely appearance. This
value is also used as the tag’s default value by the target device if communication is globally disabled.

5.11.1.3 Data Actions
• The On Write property defines an action that is to be invoked when the tag is changed. The system
variable Data will hold the new data value when the write occurs and when the action is executed. The
use of On Write properties is covered later in this chapter.

5.11.1.4 Data Setpoint
• The Use Setpoint property is used to enable or disable a setpoint for this tag.
• The SP Value property defines an expression or another tag that this tag is nominally meant to follow.
This setpoint can then be used in alarms or in primitives to implement various functions.

Crimson® 3.1 User Manual 5-64


WORKING WITH TAGS REVISED 2019-1-15
FLAG TAGS DRAWING NO. LP1044-F

5.11.2 Format Properties
A flag tag has the following properties on its Format tab:

5.11.2.1 Data Labels
• The Label property was discussed above under Tag Attributes.
• The Description property was discussed above under Tag Attributes.
• The Class property is reserved for future expansion.

5.11.2.2 Format Type
• The Format Type property selects the format for this tag. A Two-State format is used by default, but a
Linked format may be substituted instead. The various types of formats are discussed in detail in a fol-
lowing chapter, as are the other properties that might appear per the selected format type.

5.11.3 Color Properties
A numeric tag has the following properties on its Colors tab:

5-65 Crimson® 3.1 User Manual


REVISED 2019-1-15 WORKING WITH TAGS
DRAWING NO. LP1044-F FLAG TAGS

5.11.3.1 Color Type
• The Color Type property defines the coloring for this tag. A TwoState coloring is selected by default,
but a General, Linked or Fixed coloring may be substituted. The various colorings are discussed in
detail in a later chapter, as are the other properties that might appear according to the option you have
selected.

5.11.4 Alarm Properties
A flag tag has the following properties on its Alarms tab:

5.11.4.1 For Each Alarm
• The Event Mode property is used to indicate the logic that will be used to activate the alarm. The tables
below list the available modes.

Mode Alarm will activate when:


Active On The tag is true.
Active Off The tag is false.
Change of State The tag changed.

The following modes are only available when a setpoint is defined:

Mode Alarm will activate when:


Not Equal to SP The tag does not equal its setpoint.
Off When SP On The tag does not respond to an ON setpoint.
On When SP Off The tag does not respond to an OFF setpoint.
Equal to SP The tag equals its setpoint.

• The Event Name property defines the name that will be displayed in the alarm viewer or in the event
log, as appropriate. Crimson will suggest a default name based upon the tag’s label, and the event
mode that has been selected.

Crimson® 3.1 User Manual 5-66


WORKING WITH TAGS REVISED 2019-1-15
FLAG TAGS DRAWING NO. LP1044-F

• The Enable property defines an expression that enables or disables the alarm. A non-zero or empty
value results in the alarm being enabled, while a zero values results in the alarm being disabled.
• The Trigger property is used to indicate whether the alarm should be edge or level triggered. In the for-
mer case, the alarm will trigger when the condition specified by the event mode first becomes true. In
the latter case, the alarm will remain in the active state while the condition persists. This property can
also be used to indicate that this alarm should be used as an event only. In this case, the alarm will be
edge triggered, but will not result in an alarm condition. Rather, an event will be logged to internal
memory and optionally to the memory card.
• The Delay property is used to indicate how long the alarm condition must exist before the alarm will
become active. In the case of an edge triggered alarm or event, this property also specifies the amount
of time for which the alarm condition must no longer exist before subsequent reactivations will result in
a further alarm being signaled. As an example, if an alarm is set to activate when a speed switch indi-
cates that a motor is not running even when the motor has been requested to start, this property can
be used to provide the motor with time to run-up before the alarm is activated.
• The Accept property is used to indicate whether the user will be required to explicitly accept an alarm
before it will no longer be displayed. Edge triggered alarms must always be manually accepted.
• The Priority property is used to control the order in which alarms are displayed by Crimson’s alarm
viewer. The lower the numerical value of the priority field, the nearer to the top the alarm will be dis-
played.
• The Siren property is used to indicate whether or not the activation of this alarm should also activate
the target device’s sounder. While the sounder is active, the panel’s display will also flash to better
draw attention to the alarm condition.
• The Mail To property specifies the email address book entry to which a message should be sent when
this alarm is activated. Refer to the Using Services chapter for information on configuring email.
• The On Accept, On Active, On Clear and On Event properties are used to specify actions to be exe-
cuted when the change of state occurs. Not all actions will be available, depending on the alarm’s trig-
ger mode and accept type.

5.11.5 Trigger Properties
A flag tag has the following properties on its Trigger tab:

5-67 Crimson® 3.1 User Manual


REVISED 2019-1-15 WORKING WITH TAGS
DRAWING NO. LP1044-F STRING TAGS

5.11.5.1 For Each Trigger
• The Trigger Mode property is as described for the Alarms tab.
• The Delay property is as described for the Alarms tab.
• The Action property is used to indicate what action should be performed when the trigger is activated.
Refer to the Writing Actions chapter for a description of the syntax used to define the various actions
that are available.

5.11.6 Security Properties
Refer to the Using Security chapter for details on security descriptors.

5.12 String Tags
A string tag represents one or more strings of Unicode characters. While Crimson works in Unicode, it can also
read and write strings from 8-bit sources. Mapped string tags support various encodings, allowing one or more
characters to be extracted from one register.

5.12.1 Data Properties
A string tag has the following properties on its Data tab:

5.12.1.1 Data Source
• The Source property defines where the tag gets its data. The default setting results in an internal tag,
but the drop-down list may be used to select a general expression, another data tag or an item from a
remote device.
• The Extent property is used choose between a single element tag or an array. If you select an array,
you must enter the required number of elements. Arrays are not permitted for tags whose source is an

Crimson® 3.1 User Manual 5-68


WORKING WITH TAGS REVISED 2019-1-15
STRING TAGS DRAWING NO. LP1044-F

expression. For mapped tags, the exact number of registers to be read depends upon the type of the
registers to which the tag is mapped, the length and the Packing setting.
• The Length property defines the length of the string. Non-retentive internal strings do not have to have
a length defined, as they can store a string of any reasonable length.
• The Packing property is used for mapped tags to define how the Unicode string value is to be derived
from the raw comms data and vice versa. The following settings may be available, depending on the
underlying data type:

Packing Result
None Each comms data item is used to source a single
character for the string. 8-bit values will be treated as
ASCII, while values containing 16-bit or more bits will
be treated as Unicode.
ASCII Each 8-bit unit in the data item is used to source a
Big Endian single ASCII character, with the most significant 8
bits being used for the first character. Only available
for data items of 16 bits or greater in size.
ASCII Each 8-bit unit in the data item is used to source a
Little Endian single ASCII character, with the least significant 8
bits being used for the first character. Only available
for data items of 16 bits or greater in size.
Unicode Each 16-bit unit in the data item is used to source a
Big Endian single Unicode character, with the most significant 16
bits being used for the first character. Only available
for data items of 32 bits in size.
Unicode Each 16-bit unit in the data item is used to source a
Little Endian single Unicode character, with the least significant 16
bits being used for the first character. Only available
for data items of 32 bits in size.
Hex String Each 4-bit unit in the data item is used to source a
Little Endian single hex character in the range ‘0’-‘9’ and ‘A’-‘F’,
with the least significant 4 bits being used first.
Writes to strings with this packing method are not
supported.
Hex String Each 4-bit unit in the data item is used to source a
Big Endian single hex character in the range ‘0’-‘9’ and ‘A’-‘F’,
with the most significant 4 bits being used first.
Writes to strings with this packing method are not
supported.
• The Access property is used for mapped tags to define what kind of communications operations are to
be permitted. Internal tags are always set to read and write access, and expression tags are always
read-only.

5-69 Crimson® 3.1 User Manual


REVISED 2019-1-15 WORKING WITH TAGS
DRAWING NO. LP1044-F STRING TAGS

• The Read Mode property is used only for array tags. It defines the elements to be read when the array
is referenced. The following settings can be used:

Read Mode Description


Entire Array All the elements in the array will be read whenever
the array is referenced, and access will be blocked
until the read operation has completed. This will
ensure that data is available, but will produce the
slowest performance.
Manual Mode The array will not be read until a call is made to the
ReadData function to force a one-time manual
update.
On Demand Array elements will be read as they are referenced.
This produces the quickest performance, but stale
data may be returned when an element is first
accessed.
N Either Side On Demand operation will be used, but N registers
either side of the referenced register will be read as
well, thereby making adjacent data available more
quickly.

• The Storage property is used to indicate whether the tag will be retained through a power-cycle of the
target device. This is typically used for internal tags, but mapped write-only tags may also have their
values retained.

5.12.1.2 Data Simulation
• The Simulate As property defines the assumed value to be used for the tag when working in the page
editor. Entering a sensible value allows a better representation of the page’s likely appearance. This
value is also used as the tag’s default value by the target device if communication is globally disabled.

5.12.1.3 Data Actions
• The On Write property defines an action that is to be invoked when the tag is changed. The system
variable Data will hold the new data value when the write occurs and when the action is executed. The
use of On Write properties is covered later in this chapter.

Crimson® 3.1 User Manual 5-70


WORKING WITH TAGS REVISED 2019-1-15
STRING TAGS DRAWING NO. LP1044-F

5.12.2 Format Properties
A string tag has the following properties on its Format tab:

5.12.2.1 Data Labels
• The Label property was discussed above under Tag Attributes.
• The Description property was discussed above under Tag Attributes.
• The Class property is reserved for future expansion.

5.12.2.2 Format Type
• The Format Type property selects the format for this tag. A String format is used by default, but a Gen-
eral or Linked format may be substituted. The various types of formats are discussed in detail in a fol-
lowing chapter, as are the other properties that might appear per the selected format type.

5.12.3 Color Properties
A string tag has the following properties on its Colors tab:

5-71 Crimson® 3.1 User Manual


REVISED 2019-1-15 WORKING WITH TAGS
DRAWING NO. LP1044-F STRING TAGS

5.12.3.1 Color Type
• The Color Type property defines the coloring for this tag. A Fixed coloring is selected by default, but a
General or Linked coloring may be substituted. The various colorings are discussed in detail in a later
chapter, as are the other properties that might appear according to the option you have selected.

5.12.4 Security Properties
Refer to the Using Security chapter for details on security descriptors.

Crimson® 3.1 User Manual 5-72


WORKING WITH TAGS REVISED 2019-1-15
BASIC TAGS DRAWING NO. LP1044-F

5.13 Basic Tags
Basic tags are used to represent constants or expressions:

5.13.1 Data Value
The Data Value property defines the value of the tag. It must be an expression. The tag itself will adopt the data
type of the expression that is used.

5.13.1.1 Data Simulation
• The Simulate As property defines a value to be used as the default for the tag when editing display
pages. Entering a sensible value allows a better representation of the page’s likely appearance. This
value is also used as the tag’s default value by the target device if communication is globally disabled.

5.13.1.2 Data Labels
• The Label property was discussed above under Tag Attributes.
• The Description property was discussed above under Tag Attributes.
• The Class property is reserved for future expansion.

5-73 Crimson® 3.1 User Manual


REVISED 2019-1-15 WORKING WITH TAGS
DRAWING NO. LP1044-F ADVANCED TOPICS

5.14 Advanced Topics
5.14.1 Array Properties
Many of the properties of array tags can be made variable based upon the exact element of the array being
referenced. To achieve this, a system property called i is set to the element index during the evaluation of those
properties. For example, the Label property could be set to =”Element ” + AsText(i+1) to label the array
elements Element 1, Element 2, etc.
This feature can be used with the following properties:
• The tag’s label.
• The tag’s scaling values.
• The tag’s setpoint.
• The tag’s limits.
• The tag’s On Write property.
• The tag’s event labels.
• The tag’s event and trigger values and hysteresis settings.
• The tag’s trigger actions.
Note that triggers and events are evaluated separately for each element of the array for which they are configured,
allowing several events or triggers to be created at once. The only limitation to this feature is that alarms and
events only operate for the first 256 elements of the array. Triggers operate for all elements, regardless of the size
of the array.

5.14.2 Tag Data Flow
As you will have noticed, numeric tags in particular have a number of data transformations that occur between the
comms data and the value actually used by Crimson. These can be configured to handle just about any sort of data
in any way you like, but the exact way in which they operate for numeric tags deserves further attention.

5.14.2.1 Numeric Tag Read Process
When data is read from a device, the following steps occur:
• The comms driver reads a value based on the address setting that has been defined for the source of
the tag. Based on the type of the address, the driver may combine more than one register to create the
data value. For example, reading a single Word as Long value will result in two registers being read
and combined by the driver using its knowledge of the device’s word ordering.
• The comms data is then modified according to the Manipulation property for the tag in question. These
processes perform bit or byte level changes to the data, typically to account for driver incompatibilities
or other situations where the data is not in the form that the comms driver normally expects.
• The manipulated data is then interpreted in conjunction with the tag’s Treat As property, being viewed
as a 32-bit integer or a 32-bit single-precision floating-point value as appropriate. Data items smaller
than 32 bits will be either zero- or sign-extended based, per their configuration. If no scaling is defined,
the result of this step defines the final value and data type of the tag.
• If scaling is defined, the interpreted data is then scaled according to the domain and range defined for
the tag. The result of the scaling may be of a different type from the interpreted data, such that a

Crimson® 3.1 User Manual 5-74


WORKING WITH TAGS REVISED 2019-1-15
ADVANCED TOPICS DRAWING NO. LP1044-F

floating point value may be scaled to an integer or vice versa. Assuming scaling is defined, the result of
this step then defines the final value and data type of the tag.

5.14.2.2 Numeric Tag Write Process
When data is written to a device, the following steps occur:
• If scaling is defined, the domain and range are reversed, converting the data back to an unscaled
value whose data type is defined by the Treat As property.
• If the unscaled data is larger than the comms data, the high-order bits are removed, producing a
stripped version of the data suitable for the next step.
• The stripped data is then modified according to the Manipulation property, reversing the transformation
applied above, producing comms data.
• The comms driver than takes the comms data, and writes it to one or more registers in the target
device according to the type of the address.

5.14.3 Using On Write
A tag’s On Write property contains an action which is executed when a change is made to the tag. While the action
is being executed, a system property called Data is set to the new value, allowing the new data to be examined.
There are three typical uses for this feature:
• Regular read-and-write tags can have an On Write property defined to allow some action to be taken
on demand. For example, a database may need to store the value of a tag in two formats, one being
the original tag format and the other being a transformed version. While there are other ways of doing
this, one method is to use the On Write property to catch the write, and then run a program to calculate
and store the transformed version.
• Read-only tags can be made writable by defining an On Write property. While this seems odd, imagine,
for example, that a PID loop has a read-only property to indicate its current output power, and a read-
write property to define the manual output power. You could define display fields to allow data entry to
the output power when in manual mode, and catch them using the On Write property, thereby writing
the values to the manual output power.
• Complex transformations can be implemented by defining an expression tag to perform the forward
transformation and an On Write action to perform the inverse. For example, a tag could be set to
Sqrt([40001]) to take the square root of a value in a Modbus PLC. Since this is an expression tag, it
is by definition read-only, but writes can be allowed by defining an On Write equal to [40001] =
Data*Data, thereby reversing the square root calculation.

5-75 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING FORMATS
DRAWING NO. LP1044-F FORMAT TYPES

Chapter 6 Using Formats

Numeric tags can have one of various data formats selected, while flag and string tags have their formats fixed to
Two-State and General respectively. Each format type will take a data value and convert it to or from a text string.

6.1 Format Types
The following formats are supported:

• General format provides simple formatting of values, converting numeric values to signed decimal val-
ues, and passing on strings without further processing. The general format has no configuration prop-
erties and is the default format for string tags. It is also implicitly used by basic tags.
• Linked format uses the data format of another tag to format the tag that you are configuring. It is useful
for creating format templates and then applying them to many tags in the same database. This can
avoid repetition, and make it easier to adjust settings such as units or decimal point counts.
• Numeric format takes a floating point or integer value and converts it to a string, using a specific num-
ber base and selecting the required number of digits before and after the decimal point. It can also add
a prefix string and a units string to the value, and handle signed or unsigned values.
• Scientific format takes a floating point or integer value and converts it to exponential format, selecting
the required number of digits after the decimal point. It can also add a prefix string and a units string to
the value.
• Time and Date format takes an integer value and treats it as a number of seconds elapsed since 1st
January 1997. It can display the result as a date value, a time value or both, or treat the value as
elapsed time that can contain more than 24 in its hours value. Date and time formatting options are
provided to allow support for various international standards.
• IP Address format takes an integer value and displays it as four decimal bytes separated by periods.
This allows a 32-bit number to be displayed as an IP address without further configuration.
• Two-State format takes a numeric value and displays one of two strings based on whether the value is
zero or non-zero. This is the default format type for flag tags.
• Multi-State format takes a numeric value and compares it against a table containing values and strings.
Either the string associated with a matching data value is displayed, or the format can be configured to
display the last string with a value not higher than that string’s associated data.
• String format takes a string value and either restricts its length during input or applies a template that
indicates what type of character can be entered at which point in the string. This allows, for example, a
string to be formatted as United State telephone number, with the parentheses and dash being
inserted upon display without the need to store them in the string data.

Crimson® 3.1 User Manual 6-76


USING FORMATS REVISED 2019-1-15
GENERAL FORMAT DRAWING NO. LP1044-F

6.2 General Format
General format has no properties.

6.3 Linked Format
Linked format has the following properties:

• The Format Like property is used to select a tag from which the formatting information for this tag is to
be obtained. For correct operation, a tag of the correct data type should be used, such that, for exam-
ple, a string tag’s format should be based upon another string tag. Failure to observe this requirement
will result in a fallback to the default formatting rules.

6.4 Numeric Format
Numeric format has the following properties:

6.4.1 Fixed Data Format
• The Number Base property defines the radix of the displayed value. The Passcode setting works in
decimal but masks the digits using asterisks. Many of the other options will be disabled when a non-
decimal mode is used.
• The Sign Mode property defines how the data is treated, and how the sign is displayed. A value of
Unsigned will display the value as a 32-bit unsigned number, thereby allowing such values to be dis-
played and entered, even though Crimson cannot perform any math on values that will not fit within a
32bit signed representation. A value of Soft Sign will display a leading minus sign for negative num-
bers and a space for positive numbers, while a value of Hard Sign will display a leading plus sign
rather than the space.
• The Digits Before DP property defines the number of digits to be shown before the decimal point. For
values without decimals, this is the total number of digits to be shown and therefore controls the size of
the data field.
• The Digits After DP property defines the number of digits to be shown after the decimal point. For inte-
ger values, the decimal point is inserted into the integer representation, such that 1234 would be dis-
played and entered as 12.34 if this property were set to two. A value of zero suppresses the decimal
point.
 

6-77 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING FORMATS
DRAWING NO. LP1044-F SCIENTIFIC FORMAT

• The Lead Character property defines how values with leading zeros are formatted. Leading zeros may
either be retained, replaced with spaces or removed completely. Removing them can sometimes
cause values on a display to show unpleasant jitter as they change their number of digits, particularly if
the value is centered within a field.
• The Group Digits property enables the insertion of comma separators every three digits for decimal
numbers, with similar behavior for other number bases.

6.4.2 Dynamic Data Format
• The Dynamic DP property provides a means whereby an expression may be used to define the num-
ber of digits shown after the decimal point, with the limit set by the value defined by the Digits after DP,
described in the Fixed Data Format.

6.4.3 Format Units
• The Prefix property defines a string to be displayed before the numeric value.
• The Units property defines a string to be displayed after the numeric value.

6.5 Scientific Format
Scientific format has the following properties:

Crimson® 3.1 User Manual 6-78


USING FORMATS REVISED 2019-1-15
TIME AND DATE FORMAT DRAWING NO. LP1044-F

6.5.1 Fixed Data Format
• The Mantissa Sign Mode property defines how the sign is displayed on the mantissa. A value of Soft
Sign will display a leading minus sign for negative numbers and a space for positive numbers, while a
value of Hard Sign will display a leading plus sign rather than the space.
• The Exponent Sign Mode property defines how the sign is displayed on the exponent. A value of Soft
Sign will display a leading minus sign for negative values and nothing for positive values, while a value
of Hard Sign will display a leading plus sign for positive values instead.
• The Digits After DP property defines the number of digits to be shown after the decimal point. By defi-
nition, there is always one digit before the decimal in scientific format. A value of zero suppresses the
decimal point.

6.5.2 Dynamic Data Format
• The Dynamic DP property provides a means whereby an expression may be used to define the num-
ber of digits shown after the decimal point, with the limit set by the value defined by the Digits after DP,
described in the Fixed Data Format.

6.5.3 Format Units
• The Prefix property defines a string to be displayed before the numeric value.
• The Units property defines a string to be displayed after the numeric value.

6.6 Time and Date Format
Time and Date format has the following properties:

6.6.1 Format Mode
• The Format Mode property is used to indicate whether the field should display the time, the date or
both. In the last case, this property also indicates in which order the two elements should be shown.
Options are also provided to allow a time value to be treated as an elapsed period of time, rather than
a time that is paired with a date. For example, a value of 25.5 hours will display as 25:30 in an elapsed
mode. In a conventional time mode, it will display 00:30, as the system will assume a time early in the
morning on 2nd January 1997.

6-79 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING FORMATS
DRAWING NO. LP1044-F IP ADDRESS FORMAT

6.6.2 Time Format
• The Time Format property is used to indicate whether 12hour (civil) or 24hour (military) time format
should be used. As with other properties, leaving this set to Locale Default will allow Crimson to pick a
suitable format according to the language selected within the operator panel.
• The Time Separator property is used to select the character that will be placed between the elements
of the time display. The default value will be based upon the current language selection, but can be
overridden as required.
• The AM Suffix and PM Suffix properties are used with 12-hour mode to indicate the text to be
appended to the time field in the morning and afternoon, as appropriate. If you leave the property
undefined, Crimson will use a default.
• The Show Seconds property is used to indicate whether the time field should include the seconds, or
whether it should just comprise hours and minutes.

6.6.3 Date Format
• The Date Format property is used to indicate the order in which the various date elements (i.e. date,
month and year) should be displayed.
• The Date Separator property is used to select the character that will be placed between the elements
of the date display. The default value will be based upon the current language selection, but can be
overridden as required.
• The Show Year property is used to indicate whether the date field should include the year, and if so,
how many digits should be shown for that element.
• The Show Month property is used to indicate whether the month should be displayed as digits (i.e. 01
through 12) or as its short name (i.e. Jan though Dec).

6.7 IP Address Format
IP Address format has no properties.

6.8 Two‐State Format
Two-State format has the following properties:

• The ON State property defines the text to be shown if the value is non-zero.
The OFF State property defines the text to be shown if the value is zero.

Crimson® 3.1 User Manual 6-80


USING FORMATS REVISED 2019-1-15
THE MULTI-STATE FORMAT DRAWING NO. LP1044-F

6.9 The Multi‐State Format
The Multi-State format has the following properties:

6.9.1 Format Control
• The States property defines how many states the multi-state format will contain, up to a maximum of
500 entries. The window displaying the format will update to show the required number of Data and
Text properties.
• The Limit property defines how many states will be used when matching data against this format. It can
be dynamically adjusted, while the absolute number of states is statically defined. This property is use-
ful when the state fields are populated at runtime, as it allows unused fields to be skipped during the
data entry process.
• The Default property defines a string to be displayed if the data cannot be matched against the defined
states. If no value is provided, the numeric representation of the unmatched state will be displayed in
parentheses.
• The Match Type property defines how the data is compared against the various states. If Discrete is
selected, the tag data must match a given state’s data value in order for that state to be used. If
Ranged is selected, Crimson assumes that the state data values are in increasing numerical order,
and will use a state value if the tag data is less than or equal to that state’s data value but greater than
the prior state’s data value. During data entry, ranged format objects assign values equal to the individ-
ual states’ actual data values.

6.9.2 Format States
• The Data and Text properties define the data value and display text for each state in this format. States
with empty text fields are disabled and are ignored.

6.9.3 Format Commands
Multi-state format objects also provide options to allow their various states and the associated properties to be
exported to or imported from Unicode text files. These files can then be edited by an application such as Microsoft
Excel.

6-81 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING FORMATS
DRAWING NO. LP1044-F THE STRING FORMAT

6.10 The String Format
The String Format has the following properties:

 
• The Template property is used to enter an optional “picture” of what the string should look like. A tem-
plate comprises a number of special formatting characters that indicate what type of character is
acceptable at that position. The following formatting characters are supported:
Char‐
Permitted Characters
acter
In 
Tem‐ A‐Z a‐z 0‐9 Space Other
plate
A Yes ‐ ‐ ‐ ‐
a Yes Yes ‐ ‐ ‐
S Yes ‐ ‐ Yes ‐
s Yes Yes ‐ Yes ‐
N Yes ‐ Yes ‐ ‐
n Yes Yes Yes ‐ ‐
M Yes ‐ Yes Yes ‐
m Yes Yes Yes Yes ‐
0 ‐ ‐ Yes ‐ ‐
X Yes Yes Yes Yes Yes
The additional characters referred to by the Other column are:
,.:;+-=!?%/$
Any characters that are not formatting characters are interpreted as literals and displayed without their
having to be present in the underlying data. For example, a template of “(000) 000-0000” will allow
entry of US standard telephone numbers without the user having to enter the punctuation and without
those characters being stored in each string.
• The Max Length property may be used as an alternative to the Template property to allow free-form
entry to a maximum number of characters. Note that the format length and the underlying data length
are independent values, but that the former should not typically be larger than the latter.

Crimson® 3.1 User Manual 6-82


REVISED 2019-1-15 USING COLORINGS
DRAWING NO. LP1044-F TYPES OF COLORING

Chapter 7 Using Colorings

Numeric tags can have one of various so-called colorings selected, while flag and string tags have their colors fixed
to Two-State and General, respectively. Each coloring will take a data value and convert to a foreground and
background color pair.

7.1 Types of Coloring 
The following colorings are supported:

• The General coloring always returns white on black.


• The Linked coloring uses the coloring of another tag to format the tag that you are configuring. It is
useful for creating templates and then applying them to many tags in the same database. This can
avoid repetition, and make it easier to adjust your color settings from a single location. Note that a
Linked coloring uses the data from the original tag and applies the rules defined by the linked tag. This
means that the original tag will not necessarily be the same color as the linked tag, but rather that its
color may depend upon its own data value.
• The Fixed coloring always returns a fixed pair of colors.
• The Two-State coloring takes a numeric value and picks one of two color pairs based on whether the
value is zero or non-zero. This is the permanently defined coloring for flag tags.
• The Multi-State coloring takes a numeric value and compares it against a table containing data values
and color pairs. Either a color pair associated with a matching data value is selected, or the selector
can be configured to use the last color pair with an associated data value not higher than the data.

7.2 General Coloring
The General coloring has no properties.

Crimson® 3.1 User Manual 7-83


USING COLORINGS REVISED 2019-1-15
LINKED COLORING DRAWING NO. LP1044-F

7.3 Linked Coloring
Linked coloring has the following properties:

• The Color Like property is used to select a tag from which the coloring information for this tag is to be
obtained. For correct operation, a tag of the correct data type should be used, such that, for example,
a numeric tag’s coloring should be based upon another numeric tag. Failure to observe this require-
ment will result in a fallback to the default formatting rules.

7.4 Fixed Coloring
The Fixed coloring has the following properties:

• The Colors property defines the colors to be used all the time.

7.5 Two‐State Coloring
The Two-State coloring has the following properties:

• The ON Colors property defines the colors to be used when the tag is non-zero.
• The OFF Colors property defines the colors to be used when the tag is zero.

7-84 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING COLORINGS
DRAWING NO. LP1044-F MULTI-STATE COLORING

7.6 Multi‐State Coloring
The Multi-State coloring has the following properties:

7.6.1 Format Control
• The States property defines how many states the multi-state selector will contain, up to a maximum of
500 entries. The window displaying the selector will update to show the required number of Data and
Text properties.
• The Default Colors property defines the colors to be used if the data cannot be matched against the
defined states.
• The Match Type property defines how the data is compared against the various states. If Discrete is
selected, the tag data must match a given state’s data value in order for that state to be used. If
Ranged is selected, Crimson assumes that the state data values are in increasing numerical order and
will use a state value if the tag data is less than or equal to that state’s data value but greater than the
prior state’s data value.

7.6.2 Format States
• The Data and Colors properties define the data and color values for each state.

7.6.3 Color Commands
Multi-state coloring objects also provide options to allow their states and the associated properties to be exported
to or imported from Unicode text files. These files can then be edited by an application such as Microsoft Excel. An
additional button allows the Data fields of the coloring to be synchronized with the Data fields of a Multi-State
format object configured for the same tag, avoiding your having to enter the same values twice.

Crimson® 3.1 User Manual 7-85


REVISED 2019-1-15 CREATING DISPLAY PAGES
DRAWING NO. LP1044-F EDITOR BASICS

Chapter 8 Creating Display Pages

Selecting the Display Pages category in the Navigation Pane gives access to the new Crimson® 3.1 graphics
editor. This editor is designed to allow the quick and efficient creation of attractive displays, while also providing the
maximum flexibility.

8.1 Editor Basics
The graphics editor is shown below in its initial state:

The Editing Pane shows a representation of the target device, including the display area itself plus any keys and
LED icons. At the lowest zoom level, the entire panel will be shown, even if this means allocating less than one
pixel on your PC’s display for each pixel on the display of the target device. In this situation, pages can still be
viewed and most editing can be performed, but accuracy will be somewhat reduced. A warning message is thus
displayed.

8.1.1 Working with Pages
Manipulation of display pages via the Navigation List is intuitive, and operates as for any other item in a Crimson
database. That said, it is worth reiterating the fact that pages can be copied between databases by simply selecting
them in one database’s Navigation Pane and dragging them to the corresponding category in the target database.
This makes it very easy to build new databases by combining previously used page designs.

8.1.2 Changing the Zoom Level
Zooming in and out is most easily performed using the mouse wheel. If you do not have such a mouse, you can
use the editor’s zoom mode by selecting the magnifying glass from the toolbar. In this mode, left-clicks will zoom in,
and either right-clicks or left-clicks with CTRL held down will zoom out. You may also use the zoom commands on the
View menu.
The first zoom step will take you from the full-panel view to a 1:1 display, centering the target device’s display in
your editing window. Thereafter, zooming is performed to keep the data under your mouse pointer in view, thereby
making it easier to choose which area of the display you wish to examine in more detail.

Crimson® 3.1 User Manual 8-86


CREATING DISPLAY PAGES REVISED 2019-1-15
EDITOR BASICS DRAWING NO. LP1044-F

8.1.3 The Resource Pane
Display pages are typically built from items dragged from the Resource Pane. You can either slide out the
Resource Pane by clicking the arrowed bar to the right-hand side of the window, or you can choose to lock the
Resource Pane in place, perhaps maximizing your window to increase your available workspace. The Resource
Pane has three categories:

8.1.3.1 Primitives

The Primitives category is used to access the key building blocks used to assemble display pages, and is shown to
the left in its various states. You will notice that the top-level contains a number of sub-categories, each of which
provides access to a number of primitives. Clicking on an icon displays a subcategory and its primitives. Clicking
on a given primitive displays versions of that primitive in predefined colors. The icons in the toolbar can be used to
move between sub-categories, to move up to a higher level or to change the number of primitives displayed per
row. The primitives are described in the next chapter.

8.1.3.2 Symbol Library

8-87 Crimson® 3.1 User Manual


REVISED 2019-1-15 CREATING DISPLAY PAGES
DRAWING NO. LP1044-F EDITOR BASICS

The Symbol Library category operates in a manner that is very similar to the Primitives category, providing access
to a number of sub-categories, each of which contains a number of predefined symbols. Clicking on a given symbol
provides a number of pre-colored versions of that symbol, although this facility is used less often than it is with
primitives. Take some time to explore the Symbol Library—it contains many thousands of possible images, and its
correct use can produce more attractive and easy-to-use databases.

8.1.3.3 Data Tags

The Data Tags category contains a tree view of all the data tags in the current database. It is used both to drag tags
directly on to a display page, and to provide access to tags while configuring the primitive properties. Dragging a
tag onto a page will create a data box that is bound to that tag, with all the formatting properties based on the
properties defined by the tag itself. You may also select and drag multiple tags by using the SHIFT and CTRL keys in the
usual way. These facilities make it very quick and easy to add data to a page.

8.1.4 Adding Items to a Page
As mentioned above, the various items in the Resource Pane can be dragged onto the editor, thereby adding them
to a display page. Suitable primitives will be created for tags and images. The example below shows how, after
clicking on the Core Primitives selection in the Primitives category, a rectangle primitive can be dragged onto the
page:

Crimson® 3.1 User Manual 8-88


CREATING DISPLAY PAGES REVISED 2019-1-15
WORKING WITH PRIMITIVES DRAWING NO. LP1044-F

8.2 Working with Primitives
The following sections describe how to perform common operations on primitives.

8.2.1 Selecting Primitives
To select a display primitive, simply move your mouse pointer over the primitive in question, and perform a left-
click. You will notice that while your pointer is hovering over a primitive, a bounding rectangle is drawn in blue to
help show what will be selected. When the actual selection is performed, the rectangle will change to red, and
handles will appear, to allow you to resize the primitive as required.
To select several primitives, either drag out a selection rectangle around the primitives you want to select, or select
each primitive in turn, holding down the SHIFT key to indicate that you want each primitive to be added to the
selection. If multiple primitives are selected, the red rectangle will surround all of the primitives, and the handles
can then be used to resize the primitives as a group. The relative size and position of the primitives will be
maintained, as long as Crimson can do so without violating minimum size requirements.

8.2.2 Buried Primitives
If you find that the primitive you want to select is hidden below another primitive, press the CTRL key to allow the
selection to be made. Alternatively, right-click to access the context menu, and choose the Select submenu. This
will list the all primitives that are beneath the mouse pointer, ordering them from back to front. Each command will
select the corresponding primitive, making it easy to ensure that you have selected the correct element.

8.2.3 Using the Quick Bar
The Quick Bar is a floating toolbar that appears to the top-right of the current selection:

The bar will at first appear in a faded form, and will become more solid as you move your mouse towards it. Moving
away from it will hide the bar, after which it will not reappear until the selection process is repeated, or the scroll-
wheel button on your mouse is pressed. The Quick Bar allows easy access to a number of commonly-used
features while minimizing mouse movement. The bar can be enabled or disabled using a command on the View
menu.

8.2.4 Moving Primitives Between Pages
Primitives can be dragged around a display page in the usual way, but can also be copied from one page to
another. To do this, select the primitive you wish to copy and drag it towards the Navigation Pane. If the pane is
hidden, hover over the arrowed bar and the pane will slide into view. Hover over the target page, and that page will
be selected. Now drag the primitive back into the editor and drop it on the new page. Holding down CTRL will change
the copy operation to a move.

8-89 Crimson® 3.1 User Manual


REVISED 2019-1-15 CREATING DISPLAY PAGES
DRAWING NO. LP1044-F WORKING WITH PRIMITIVES

8.2.5 Moving Primitives Between Databases
Dragging primitives between databases is just as easy. Simply select the items you wish to copy, and drag them to
another copy of Crimson that contains the new database. This will work with entire pages, groups of primitives or
just a single item.

8.2.6 Changing the Size of Primitives
Resizing primitives is performed in the intuitive manner of grabbing one of the sizing handles and moving it in the
required direction. The CTRL key can be held down to restrict the sizing operation such that the primitive’s width and
height are equal. The SHIFT key can be held down to allow the sizing to operate from the “middle out” rather than
from one edge.

8.2.7 Rotating and Reflecting Primitives
Certain primitives can be rotated in increments of 90° and can be reflected about their horizontal or vertical axes.
The settings that control the primitive’s orientation can be accessed directly via the primitive’s properties dialog
box, or can be modified using the commands on the Transform menu. Shortcut keys are also available, with
CTRL+ALT+LEFT and CTRL+ALT+RIGHT rotating the selected primitive in the positive (i.e. counterclockwise) and negative (i.e.
clockwise) directions, and with CTRL+ALT+UP and CTRL+ALT+DOWN reflecting the selected primitive about its vertical and
horizontal axes. When a suitable primitive is selected, icons to perform these operations will also appear on the
Quick Bar.

8.2.8 Using Layout Handles
Certain primitives have internal handles that can be moved to change their layout. For example, the rounded
rectangle shown below has a single layout handle in its top left-hand corner. The handle is marked with a diamond
whenever the primitive is selected:

In this case, moving the handle changes the radius of the rectangle’s corners:

The function of each handle depends on the specific primitive, but is usually intuitive.

8.2.9 Smart Alignment
If you have the Smart Align features of the View menu enabled, Crimson will provide you with guidelines during a
move or size operation. These will help align a primitive with existing primitives, or with the center of the display.

Crimson® 3.1 User Manual 8-90


CREATING DISPLAY PAGES REVISED 2019-1-15
WORKING WITH PRIMITIVES DRAWING NO. LP1044-F

With a little practice, this feature can make it very easy to align primitives as they are created, without the need to
go back and “tweak” your display pages to get the various figures into alignment.
In the example shown below, a circle is being aligned with two squares:

Guidelines are present at both the edges of the figures, showing that both are aligned. The red rectangle is
highlighting the primitive that is being manipulated, while the blue rectangles are highlighting the primitives to which
the guidelines have been drawn.

8.2.10 Quick Alignment
Crimson’s Quick Alignment features allow primitives to be aligned to other primitives without the need to bring up a
dialog box. To use this feature, simply select the primitive you want to move, and right-click to bring up the context
menu. Select the Align submenu, and then select one of the various “With...Of” options, marked with the rectangle-
and-cursor symbol. The mouse pointer will change to indicate that you now need to click on the primitive to which
you wish to align.

As soon as you click, the alignment will be performed.

8.2.11 Using the Grid
The Grid button on the toolbar can be used to control the behavior and the display of the alignment grid. Clicking
on the left-hand side of the button will show or hide the grid. Clicking on the drop-down portion will allow the
operations for which the grid is used to be configured. You may separately enable or disable the grid for creation,
sizing and movement operations, or you may use the All or None options to enable or disable it globally. You may
also control whether the grid is used when editing within groups.

8-91 Crimson® 3.1 User Manual


REVISED 2019-1-15 CREATING DISPLAY PAGES
DRAWING NO. LP1044-F WORKING WITH PRIMITIVES

8.2.12 Aligning Primitives
While the Smart Alignment and Quick Alignment options discussed above allow many alignment operations to be
performed, there are times that you will want to use a more traditional approach. To do this, select a number of
primitives, and use the Align Selection command on the Arrange menu to display the following dialog box:

The Horizontal and Vertical settings can be used to indicate what type of alignment is to be performed, while the
Reference setting defines which primitive is used as the reference for the alignment operation. In the example
above, Auto mode will use the left-most primitive as a reference as we are performing a left alignment. Other
alignment modes work in a similar way. The alternative mode uses the first selected item as a reference. This item
can be identified by the larger square at its center.

8.2.13 Spacing Primitives
If you have a number of primitives that you wish to space equally on the page, you may use the Space Equally
Vertical or Space Equally Horizontal commands on the Arrange menu. The commands work on the currently
selected primitives, and attempt to reallocate the free space between the items to achieve equal spacing. The two
outer primitives will be left in their current positions. Note that the command may fail if an inappropriate set of
primitives are selected, and may not achieve perfect spacing if the available space is too limited.

8.2.14 Reordering Primitives
Primitives on a display page are stored in what is known as a z-order. This defines the sequence in which the
primitives are drawn, and therefore whether or not a given primitive appears to be in front of or behind another. In
the first example below, the blue square is at the bottom of the z-order and is thus shown behind the red squares.
In the second example, it has been moved to the top of the order and it now appears on top of the other figures.

   
To move items in the z-order, select the items, and then use the various commands on the Arrange menu. The
Move Forward and Move Backward commands move the selection one step in the indicated direction, while the
Move To Front and Move To Back commands move the selection to the indicated end of the z-order. Alternatively,
if you have a mouse that is equipped with a wheel, the wheel can be used to move the selection by moving the
wheel with the CTRL key held down. Scrolling up moves the selection to the back of the z-order; scrolling down
moves the selection to the front.

Crimson® 3.1 User Manual 8-92


CREATING DISPLAY PAGES REVISED 2019-1-15
WORKING WITH PRIMITIVES DRAWING NO. LP1044-F

8.2.15 Duplicating Primitives
The CTRL+D key combination or the Smart Duplicate command on the Edit menu can be used to make a copy of the
current primitive, adjusting its properties such that the primitive gets its controlling data from the next data item. The
definition of “next” depends on the exact type of the data, with Crimson being capable of selecting the next register
in a comms device, the next member of an array, or the next tag in a sequence. As an example, repeatedly using
Smart Duplicate with a button mapped to Array[0] will produce a sequence of buttons mapped to Array[1],
Array[2] and so on until the whole screen is filled.

8.2.16 Editing Multiple Primitives
You may on occasion want to edit the properties of multiple primitives. Crimson supports this by having you edit
one primitive, and then allowing you to set the properties of a number of other primitives equal to those of the one
that you first edited. Crimson provides two methods to do this, both of which rely on the same underlying
mechanism.

8.2.16.1 Using Copy From
The Copy From command can be used to copy the selected properties of a given primitive to one or more
primitives. To use the command, select the required targets, and then rightclick to access the associated context
menu. Select one of the Copy From commands, and the cursor will change to allow you to select the primitive from
which the copy operation should be performed. Depending on the command that was selected, one or more
properties from the source will then be applied to the target primitives.

8.2.16.2 Using Paste Special
The Paste Special command can be used to achieve the same result, but via a different method that also allows
properties to be copied between databases and between multiple instances of Crimson. First, select the source
primitive and use the Copy command to put it on the Clipboard. Then, select the required target primitives, right-
click the selection, and select the Paste Special command. The following dialog box will appear:

The selected properties from the source primitive will be applied to the target primitives.

8.2.16.3 Property Selections
Both methods detailed above allow you to define which properties are to be copied:
• All Formatting copies everything except any text, data item or action.
• Text Formatting copies the font, alignment and margins of text or data items.
• Fills and Edges copies the fill and edge attributes from the Figure tab.
• Action copies any action assigned to the primitive.

8-93 Crimson® 3.1 User Manual


REVISED 2019-1-15 CREATING DISPLAY PAGES
DRAWING NO. LP1044-F WORKING WITH PRIMITIVES

In addition, the Selective option can be used to select the properties to copy:

The list contains a hierarchical presentation of the properties defined by the source primitive, organizing them per
the layout used when editing the primitive, and showing the value assigned to each. Each property or group of
properties can be selected or deselected using the associated checkboxes. The checked properties will be applied,
thereby providing you with low-level control of what gets copied from one primitive to another.

8.2.17 Jumping to Other Items
If a primitive references tags, display pages or other items, a Jump submenu will appear on its context menu.
Select this menu to view a list of referenced items. Select one of those items to jump directly to that section of the
database. The example below shows a primitive that references two tags:

After you have made whatever changes you want to the tag, you can use the Back button on the toolbar or the
ALT+LEFT key combination to return to the display page that you were just editing. Note how the selection is preserved
during navigation, making it easy to view or edit a referenced object and to then resume the display creation
process.

Crimson® 3.1 User Manual 8-94


CREATING DISPLAY PAGES REVISED 2019-1-15
PRIMITIVE PROPERTIES DRAWING NO. LP1044-F

8.3 Primitive Properties
The properties of a primitive can be edited by double-clicking on the primitive, or by using the Properties command
on the primitive’s context menu. You may also select the primitive and press the ALT+ENTER key combination. The
property dialog for a primitive will contain various tabs, with some tabs only appearing when additional items—such
as text, data or an action—have been added to the primitive. The properties dialog shows a live preview of the
current primitive, allowing you to see the effect of changes before you commit them.

8.3.1 Showing or Hiding Primitives
All primitives have a Show tab in their property dialog:

The Visible property can be set to an integer expression to show or hide the associated primitive at runtime. A
value of zero will hide the primitive, while any non-zero value will allow it to be shown. All primitives are visible by
default.

8.3.2 Defining Primitive Colors
Colors within primitives are edited using a field similar to that shown below:

You will notice that the color property is presented by means of an arrowed button, a dropdown list and a Pick
button. The arrowed button is used to show the list that contains the various color animation modes. It can be
activated in the usual way by clicking with the mouse or by pressing the spacebar with the button selected. While
the button is selected, you may also press the initial letter of one of the options contained in the list, avoiding the
need to show the list at all. For example, pressing 2 will select 2-State mode.

8-95 Crimson® 3.1 User Manual


REVISED 2019-1-15 CREATING DISPLAY PAGES
DRAWING NO. LP1044-F PRIMITIVE PROPERTIES

The following color animation modes are available:


• In Fixed mode, the color does not change, and is selected from the drop-down list, or by invoking the
color selection dialog by pressing the Pick button.
• In Tag Text mode, the color is animated to match the foreground color defined by a particular tag. The
specific tag can be selected by pressing the Pick button.
• In Tag Back mode, the color is animated to match the background color defined by a particular tag.
The specific tag can be selected by pressing the Pick button.
• In Flashing mode, the color is animated to alternate between two colors at a specific rate, with another
color being displayed when flashing is disabled.
• In 2-State mode, the color is animated to switch between two colors depending on the value of a tag or
other data item.
• In 4-State mode, the color is animated to switch between four colors depending on the value of two
tags or other data items.
• In Blended mode, the color is animated to transition smoothly from one color to another based upon
the value of a tag or other data item relative to specified minimum and maximum values.
• In Expression mode, a numeric expression can be entered that will be used to determine the color to
be displayed. See below for more details.
• In Complex mode, a local program returning an integer value can be written to define the color to be
displayed. See below for more details.
The drop-down menu contains the following colors:
• The sixteen standard VGA colors.
• Thirty-two shades of gray between black and white.
• Any other colors used in the database, up to a limit of twenty-four.
The More option at the bottom of the list can be used to invoke the color selection dialog:

This dialog offers several ways of defining a color. You can pick from the palette, pick from the “rainbow” window, or
enter the explicit HSL or RGB parameters. If the color selected has not previously been used in the database and
is not one of the standard colors or grays, it will be added to the custom colors shown in the drop-down menu.

Crimson® 3.1 User Manual 8-96


CREATING DISPLAY PAGES REVISED 2019-1-15
PRIMITIVE PROPERTIES DRAWING NO. LP1044-F

8.3.3 Defining Flashing Colors
Flashing colors are defined via the following dialog box:

• The Rate property defines the rate at which the flashing should occur. A value of 1 produces a flashing
rate of 1Hz, with each color being displayed for 500ms. It is not recommended to use rates in excess
of 4Hz, as the target device’s display update rate may produce unpleasant “beating” effects.
• The Enable property defines an optional expression that can be used to enable or disable flashing.
The Steady Color will be displayed when flashing is disabled.
• The Color properties allow you to define the colors to be used.

8.3.4 Defining 2‐State Colors
2-State colors are defined via the following dialog box:

• The Value property is used to select the color to be displayed.


• The Color properties allow you to define the colors to be used.

8-97 Crimson® 3.1 User Manual


REVISED 2019-1-15 CREATING DISPLAY PAGES
DRAWING NO. LP1044-F PRIMITIVE PROPERTIES

8.3.5 Defining 4‐State Colors
4-State colors are defined via the following dialog box:

• The Value properties are used to select the color to be displayed.


• The Color properties allow you to define the colors to be used.

8.3.6 Defining Blended Colors
Blended colors are defined via the following dialog box:

• The Value, Minimum and Maximum properties are used to define the color to be displayed. In the
example shown, the color will blue when the tag is at or below its minimum value, red when it is at or
above its maximum value, and will transition smoothly from blue to red as the tag changes between its
limits.
• The Color properties allow you to define the colors to be used.

8.3.7 Defining Tank Fills
Many geometric primitives support a so-called “tank fill” option whereby the figure is filled to a given level based
upon the contents of a tag. This feature can be used to implement simple bar graphs or to fill more complex
shapes.

Crimson® 3.1 User Manual 8-98


CREATING DISPLAY PAGES REVISED 2019-1-15
PRIMITIVE PROPERTIES DRAWING NO. LP1044-F

The example below shows a six-pointed star with a bottom-up tank fill set to 60%:

Tank fills are defined using a primitive’s Fill Behavior properties:

• The Fill Mode property defines whether a tank fill should be drawn, and from which direction the fill
should occur. Fills can occur from any edge of the primitive, allowing complex animations to be cre-
ated. Block mode results in the figure being filled with a single pattern, disabling tank fills.
• The Value property selects the value used to calculate the level of the fill. If a tag is entered, the Mini-
mum and Maximum limits will automatically be set to the data entry limits of that tag using the tag prop-
erty expression syntax. The Value property may be an integer or a floating-point value. The fill level
calculations are always performed in floating point.
• The Minimum and Maximum values define the limits to be used when scaling the Value property to cal-
culate the fill level.

8.3.8 Defining Fill Formats
A primitive’s Fill Format properties define how the inside of the primitive will be filled:

• The Pattern property selects between various fill patterns. The default option is Solid Color, but a vari-
ety of dithered, hatched patterns may also be selected. In addition, a texture may be selected to create
a realistic looking representation of a real-world object. The picture below shows some of the available
textures:

8-99 Crimson® 3.1 User Manual


REVISED 2019-1-15 CREATING DISPLAY PAGES
DRAWING NO. LP1044-F PRIMITIVE PROPERTIES

• Several graduated fills are also available:

Pattern Description
Graduated Fill 1 Color 1 at the top and bottom of the primitive,
changing vertically to Color 2 at the center.
Graduated Fill 2 Color 1 at the top of the primitive,
changing vertically to Color 2 at the bottom.
Graduated Fill 3 Color 1 at the left and right of the primitive,
changing horizontally to Color 2 at the middle.
Graduated Fill 4 Color 1 at the left of the primitive,
changing horizontally to Color 2 at the right.
Shiny and Chrome A metallic effect using the two specified colors,
allowing you to ride eternal.
Horz Cylinder An effect that models a horizontally oriented
cylinder of Color 1 with a highlight of Color 2.
Vert Cylinder An effect that models a vertically oriented
cylinder of Color 1 with a highlight of Color 2.

• The Color 1 property defines the first color to be used for the fill.
• The Color 2 property defines an optional second color to be used for the fill.
• The Color 3 property defines the background color for a tank fill. It is not required if a block fill is being
used. The property may not be present if the current primitive does not support tank fills.

8.3.9 Legacy Fill Formats
For the older primitives supported by Crimson 3.0, a simpler Fill Format is supported:

The properties are exactly as for the richer fill format above, except that the Pattern setting is limited to fewer
options. Specifically, neither textures nor the metallic and cylindrical graduated fills are supported, and there are
slightly fewer hatch patterns available.

8.3.10 Defining Edge Formats
A primitive’s Edge Format properties define how the edge of the primitive will be drawn:

Crimson® 3.1 User Manual 8-100


CREATING DISPLAY PAGES REVISED 2019-1-15
PRIMITIVE PROPERTIES DRAWING NO. LP1044-F

• The Width property defines how wide the edge will be, with a value of zero disabling the edge com-
pletely. While legacy primitives have a limited number of edge sizes available, newer primitives sup-
port arbitrary widths up to 80 pixels.
• The Pattern property defines how the edge will be filled. While legacy primitives required the edge to
be of a solid color, newer primitives allow edges to be drawn using graduated fills, patterns or textures.
The settings are analogous to those defined above for a primitive’s Fill Format.
• The Color 1 property defines the first color to be used for the edge.
• The Color 2 property defines an optional second color to be used for the edge.
• The Edge Mode property defines where the edge is placed relative to the boundary of the filled portion
of the figure. Edges may be placed inside or outside a figure, or may be drawn such they are centered
on the figure’s boundary. This setting has a subtle impact on how tank fills are processed, and on the
position of the edge relative to the primitive’s bounding box. It is only available for edge widths of three
pixels or greater. Thinner edges are automatically positioned.
• The Join Mode property defines how the edge will be drawn on the outside of each corner of a figure.
Bevel mode will flatten off the corners, while miter mode will extend each edge to create a point—
although miters that extend too far will be clipped to avoid unattractive results. Rounded mode will
round-off the corners with a radius equal to the edge width. The illustration below shows a triangle with
a 10-pixel edge drawn in each of the three modes.

8.3.11 Defining Edge Trim
A primitive’s Edge Trim properties allow an option line to be drawn on each side of the edge:

• The Trim Width property specifies the width of the trim. The default value of zero disables the trim. Trim
is often used when a richly-styled edge is applied, such as one that uses a texture. A trim line on the
outside of the edge better delineates the edge, allowing it to stand out against the background.

8-101 Crimson® 3.1 User Manual


REVISED 2019-1-15 CREATING DISPLAY PAGES
DRAWING NO. LP1044-F RECOLORING SYMBOLS

• The Trim Edges property specifies which side of the edge the trim should be applied to. It may either
be applied to the inner or outer edge, or to both.
• The Trim Color property specifies the color of the trim.

8.3.12 Legacy Edge Formats
For legacy primitives, a simpler Edge Format is supported:

• The Width property specifies the thickness of the edge. The edge may be displayed by selecting a
value of None. For legacy primitives, Crimson supports only odd edge sizes, up to nine pixels in width.
• The Color property defines the color of the edge.
• The Corners property is only present for rectangles, and defines whether rounded or square corners
should be used when drawing the edge. All other primitives use rounded corners by default.

8.4 Recoloring Symbols
When a symbol is added to a page by dragging it from the Symbols section of the Resource Pane, a special
primitive is created to hold the resulting image. This Simple image primitive supports all the image adjustment
features described in the next chapter. It also supports image recoloring, allowing the existing colors within the
symbol to be replaced with a solid color or a graduated fill. Recoloring is configured via the Shade Format
properties on the Shading tab of the Simple Image primitive.

• The Shading, Color 1, Color 2 and Color 3 properties are as described above.
• The Include property defines how Crimson should apply the new color. If Alpha Channel is selected,
the new color is applied to any pixels that are not fully transparent, removing any internal detail within
the symbol. This is most often used with symbols from the Basic Shapes category. The other settings
select one or more of the red, green and blue channels that encode the colors of each pixel that makes
up the symbol. The saturation of the selected channels will be used to define the saturation of the new
color for each pixel, allowing the internal detail of the symbol to be retained while still changing its
color. Since this behavior is easier to see than it is to explain, you should experiment with this setting to
obtain the most pleasing result!
A tank fill option is also supported and is configured as described above. This is particularly useful when combined
with symbols from the Tank Cutaways category to create an attractive indication of the level in a tank.

Crimson® 3.1 User Manual 8-102


CREATING DISPLAY PAGES REVISED 2019-1-15
USING GROUPS DRAWING NO. LP1044-F

8.5 Using Groups
A group is a collection of primitives that is treated as a single object.

8.5.1 Making and Breaking Groups
If you have several primitives that you wish to treat in this way, you may select them as described above and then
use the Group command on the Organize menu. You can perform the same operation by pressing the CTRL+G key
combination. Once a group has been created, it can be moved, sized and copied just like a single object. A group
can be broken into its component primitives by selecting it and using the Ungroup command, or the CTRL+U key
combination. Note that groups can comprise both primitives and other groups, and that groups can be nested up to
any reasonable limit.

8.5.2 Editing Within Groups
Once a group has been created, you might want to edit its contents without first breaking it apart. This is particularly
useful when you have created nested groups, as the regrouping process would then be very difficult. To edit within
a group, first select that group, and then click on a member of the group. (Avoid clicking on the central handle of the
group object, as that is used to move or select the group as a whole.) Once the group member has been selected,
Crimson will switch into group editing mode, as shown below:

Note the green rectangle displayed around the group that is being edited. Editing within a group works just like
editing within a page, except that items cannot be moved beyond the group boundaries. They can be copied,
pasted, sized, and deleted. In fact, any of the usual operations can be performed. You can even drag new items
from the Resource Pane and drop them into a group. To exit group mode, click outside the group or press the ESC
key.

8-103 Crimson® 3.1 User Manual


REVISED 2019-1-15 CREATING DISPLAY PAGES
DRAWING NO. LP1044-F ADDING MOVEMENT TO PRIMITIVES

8.5.3 Nested Group Editing
Crimson also allows editing within groups that are themselves within groups:

To activate this feature, begin editing within the outer group, select the inner group and then click on a member of
that inner group. Note in the example above how a series of fading rectangles are used to show the group
hierarchy. Note also how items outside the current groups are shown in faded colors to make highlight where the
group ends. When using the ESC key to exit nested group editing, each press of the key will move up one level.

8.5.4 Expanding Groups
As mentioned above, movement of primitives during group editing is limited such that you cannot move a primitive
outside the group to which it belongs. In situations where you want to make adjustments to primitives at the edge of
a group, you may select the Expand and Edit command from the group’s context menu. This will move the group
boundaries out from the primitives, allowing such adjustments to be made. When group editing mode is canceled,
the group boundary will be moved inwards to tightly surround its contents.

8.6 Adding Movement to Primitives
Any primitive can be animated such that it moves dynamically within a bounding rectangle that you define.
Primitives can be moved horizontally, vertically or in both dimensions, or they can be moved according to polar
coordinates such that they orbit a point at a variable distance. In each case, each dimension is defined by a control
value and a pair of limits.
To apply movement, select the required primitive or primitives, and choose one of the Add Movement commands
from the Behavior menu. A red rectangle will appear around the primitives, representing the movement group in
which the animation will take place. The group can be resized to change the extent of animation, but unlike a
regular group, resizing a movement group does not change the size of the primitives themselves. The group
contents can be edited just as with standard groups, using the techniques detailed above. When polar movement is
being edited, an ellipse will show the path that the primitives will follow when the radius is set to 100%. Note that
this will always be smaller than the group itself, as it represents the position of the center of the items that are being
animated, and space must be left to ensure that they do not extend beyond the group boundary.

Crimson® 3.1 User Manual 8-104


CREATING DISPLAY PAGES REVISED 2019-1-15
ADDING TEXT TO PRIMITIVES DRAWING NO. LP1044-F

To define how the movement is controlled, open the properties of the movement group:

The example above shows the configuration of 2D movement. Polar movement is configured in a similar way. For
each dimension of movement, the Position value defines where the contents of the group will be placed relative to
its outline. The Minimum and Maximum values represent the limits of the control values. For 2D movement, the
minimum settings result in the group contents being displayed in the top left corner.

8.7 Adding Text to Primitives
Most primitives within Crimson can support the addition of text. To add text to a primitive, simply select the
primitive, press F2 and begin typing. Alternatively, you can right-click the primitive and select the Add Text command
from the resulting menu. The example below shows text being entered into a rounded rectangle:

Note first how the bounding rectangle for the primitive is shown in yellow, and how all the other primitives on the
page are faded out. Note also how the text editor automatically splits the text across lines. Try resizing a primitive
containing text, and you will see how Crimson automatically adjusts the text to fit into the new shape.

8-105 Crimson® 3.1 User Manual


REVISED 2019-1-15 CREATING DISPLAY PAGES
DRAWING NO. LP1044-F ADDING TEXT TO PRIMITIVES

During text editing, the toolbar changes to provide commands to modify the text alignment, and to grow or shrink
the spacing between lines. The more advanced text properties can be editing by either selecting Text Properties
from a primitive’s context menu, or by pressing ALT+ENTER while in text editing mode:

8.7.1 Text Properties
• The Text property contains the text to be displayed. Vertical bar characters are used to encode hard
line breaks. Since this field is a translatable string, multilingual versions can be edited. This also
implies that the property can be set to an expression, allowing its contents to change dynamically.
Crimson supports full dynamic re-flow, allowing complex and attractive presentation options.
• The Text Font property allows the required font to be selected. Crimson’s new default font is Hei, a Uni-
code font that provides support for simplified Chinese and most other languages. The Pick button can
be used to invoke the font selection dialog, allowing any font that is installed on your system to be ren-
dered in a form that can be used by the target device. Note that it is your responsibility to ensure that
you are licensed for this kind of font usage.
• The Horizontal property defines the horizontal alignment of the text.
• The Vertical property defines the vertical alignment of the text.
• The Line Spacing property defines additional line spacing in pixels.
• The Text Color property selects the color of the text.
• The Drop Shadow property is used enable an optional shadow to the right and to the bottom of the text
itself. This effect is useful when trying to make text stand out from its background, especially if the
background is an image that contains a combination of many colors.

Crimson® 3.1 User Manual 8-106


CREATING DISPLAY PAGES REVISED 2019-1-15
ADDING TEXT TO PRIMITIVES DRAWING NO. LP1044-F

8.7.2 More Properties

• The Text Margin properties are used to control the margin around the text relative to the text-bounding
box provided by the primitive. This can be useful if you want to reposition the text within the primitive,
or in achieving better visual centering when working with fonts that have lots of space above or below
their characters, either for diacritical marks or descenders.
• The Direction property defines the direction in which the text will be moved when the associated primi-
tive is pressed. It is only enabled when an action is assigned to the primitive, or when the primitive is
something like a button that has an inherent action associated with it. This option is useful when creat-
ing custom buttons that should provide feedback when touched.
• The Step property indicates how far the text should move when the primitive is pressed. One to three
pixels can be chosen, according to the effect desired.

8-107 Crimson® 3.1 User Manual


REVISED 2019-1-15 CREATING DISPLAY PAGES
DRAWING NO. LP1044-F ADDING DATA TO PRIMITIVES

8.8 Adding Data to Primitives
Primitives which support the addition of text also support the display of live data, and can optionally be configured
for data entry. To add data to a primitive, right-click the primitive and select the Add Data command from the
resulting menu. Alternatively, select the primitive and press the CTRL+F2 key combination. The primitive’s properties
dialog will be displayed, with a number of additional tabs being available to define the data item and its behavior.

8.8.1 Data Properties

• The Value property defines the data value to be displayed.


• The Contents property defines whether the field should display the data value, the data value and its
associated label, or just the label alone.
• The Layout property defines how the selected data should be formatted. A setting of Single Line
places everything on a single line, overflowing the available space if the text is too large. A setting of
Multiple Lines breaks the text into several lines if this is necessary to accommodate in the primitive. In
this mode, the label is always placed on a separate line from the associated data.
• The Operation property defines whether the field should just display the value or also provide data
entry functionality. Data entry is obviously only available if the selected data value is writable.
• The Get from Tag properties define whether certain properties of the data field are defined locally or
are linked to the properties of the tag being displayed. The options are only available when a tag is
specified in Value.
• The Text Font property allows the required font to be selected. Crimson’s new default font is Hei. This
is a Unicode font that provides support for simplified Chinese and most other languages. The Pick but-
ton can be used to invoke the font selection dialog, allowing any font that is installed on your system to
be rendered in a form that can be used by the target device. Note that it is your responsibility to ensure
that you are licensed for this kind of font usage.
• The Horizontal property defines the horizontal alignment of the text.
• The Vertical property defines the vertical alignment of the text.
• The Line Spacing property defines how many extra pixels should be inserted between lines when
working in the Multiple Lines layout mode.

Crimson® 3.1 User Manual 8-108


CREATING DISPLAY PAGES REVISED 2019-1-15
ADDING DATA TO PRIMITIVES DRAWING NO. LP1044-F

8.8.2 More Properties

• The Text Margin properties are used to control the margin around the text relative to the text-bounding
box provided by the primitive. This can be useful if you want to reposition the text within the primitive,
or in achieving better visual centering when working with fonts that have lots of space above or below
their characters, either for diacritical marks or descenders.
• The Direction property defines the direction in which the text will be moved when the associated primi-
tive is pressed. It is only enabled when an action is assigned to the primitive, or when the primitive is
something like a button that has an inherent action associated with it. This option is useful when creat-
ing custom buttons that should provide feedback when touched.
• The Step property indicates how far the text should move when the primitive is pressed. One to three
pixels can be chosen, according to the effect desired.

8.8.3 Entry Properties
These properties are only available when data entry is enabled:

8-109 Crimson® 3.1 User Manual


REVISED 2019-1-15 CREATING DISPLAY PAGES
DRAWING NO. LP1044-F ADDING DATA TO PRIMITIVES

• The Enable property is used to provide an expression to enable or disable data entry. Disabled data
entry fields will act just like display-only fields.
• The Validate property is used to define an expression that will be used to validate any entered values.
The expression should evaluate to non-zero to allow entry, or zero to block it. For example, entering
Data%25==0 will only allow multiples of 25 to be entered, as these are the only values for which reduc-
ing to modulus 25 will result in a zero value. During the execution of this expression, the special sys-
tem variable Data will hold the newly-entered value.
• The Remote property enables or disables the ability to control data input remotely via the web server.
• The On Selected property specifies an action to be executed when the user presses on the data entry
field, just before data entry begins.
• The On Deselected property specifies an action to be executed when data entry ends, either as a
result of a value being written, a page change or the user pressing a button to cancel the entry pro-
cess.
• The On Entry Complete property specifies an action to be executed when data entry is successfully
completed.
• The On Entry Error property specifies an action to be executed when the user enters an invalid value.
• The Title property field can be used to enter a title that will appear the top of the entry keypad when
activated.
• The Status Bar property field can be used to enter a comment or information that will appear the bot-
tom of the entry keypad when activated.

8.8.4 Format Properties

• The Label property defines the label to be applied to this field. It may not be available if the label is not
to be displayed, or if the field is configured to get its label from the controlling tag.

Crimson® 3.1 User Manual 8-110


CREATING DISPLAY PAGES REVISED 2019-1-15
ADDING DATA TO PRIMITIVES DRAWING NO. LP1044-F

• The Format Type field specifies the format type to be used when displaying and optionally editing the
data value. Again, the selection may not be available if the format is being obtained from the controlling
tag.
• Other properties are specific to the data format that has been selected. Refer to the chapter on Using
Formats for details of each format’s properties.

8.8.5 Color Properties

• The Color Type field specifies the coloring to be used when displaying the data value. The selection
may not be available if the coloring is being obtained from the controlling tag.
• The Text Color property is used to override the color of the text if the General coloring is being used.
• The Drop Shadow property is used to enable an optional shadow to the right and to the bottom of the
text itself. This effect is useful when trying to make text stand out from its background, especially if the
background is an image that contains many colors. It is only available with the General coloring.
• Other properties are specific to the coloring that has been selected. Refer to the chapter on Using Col-
orings for details of each coloring’s properties.

8-111 Crimson® 3.1 User Manual


REVISED 2019-1-15 CREATING DISPLAY PAGES
DRAWING NO. LP1044-F ADDING ACTIONS TO PRIMITIVES

8.9 Adding Actions to Primitives
Primitives that do not perform their own implicit action support the addition of customized actions to be performed
when the operator presses or releases the touch-screen. An action can be added by selecting the Add Action
command from the primitive’s context menu, or by selecting the primitive and pressing the CTRL+I key combination.
An Action tab will be added to the primitive’s properties dialog:

8.9.1 Protecting Actions
An action’s Protection property can be used to prevent an action from being invoked accidentally. This facility
operates in addition to any protection provided by the Security System and is invoked before the associated
actions are begun. The following protection modes are available:
• Confirmed mode displays a popup to confirm the action, and then performs the action immediately if
the user indicates that the action should proceed.
• Locked mode displays a popup stating that the action is locked. If the user indicates that the action
should proceed, it becomes unlocked, and they must activate the action again for it to actually take
place. Selecting another action will lock the previous action, as will waiting beyond the global timeout.
• Hard Locked mode operates as for Locked mode, except that the action will relock once it has been
performed and must be unlocked each time.

8.9.2 Enabling Actions
If you want to make a particular action dependent on some condition being true, enter an expression for that
condition in the Enable field. This expression may reference a flag tag directly, or may use any of the comparison or
logical operators defined in the Writing Expressions section. If you need more complex logic such that one of
several actions is performed based on more complex decision-making, configure the key for User Defined mode,
and use it to invoke a program that implements the required logic. You can also use the Remote property to block
access to this action from the web server.

Crimson® 3.1 User Manual 8-112


CREATING DISPLAY PAGES REVISED 2019-1-15
ADDING ACTIONS TO PRIMITIVES DRAWING NO. LP1044-F

8.9.3 The Goto Page Action
This action is used to instruct the target device to show a new page:

• The Target Page property is used to indicate which page should be displayed. In addition to the pages
contained in the database, you have the option of selecting either Previous Page or Next Page to nav-
igate within the page history list. The New button may be used to create a new page without leaving
the dialog.
• The Show As property is used to indicate how the page should be displayed. A selection of Normal
Page will cause the page to be selected in the usual manner, while the Simple Popup option will cause
the primitives on the new page to be displayed in a rectangular popup on top of the current page,
replacing any existing popups. A setting of Nested Popup will also display the page as popup, but will
display the new page on top of any existing popup. Popup Menu is a legacy setting for devices with
soft-keys down the left-hand side of the display. Crimson 3.1does not support any such devices at the
time of writing. A popup can be closed by executing the HidePopup() function or by selecting the Hide
Popup or Hide All Popups for an action’s Operation property.

8.9.4 The User Defined Action
This action is used to perform one or more user-defined actions:

• The On Pressed property defines the action to be performed when the primitive is pressed. This action
may invoke any of the functions in the Function Reference or the data modification operators
described in the Writing Actions chapter. It may also run a program to perform a more complex action.

8-113 Crimson® 3.1 User Manual


REVISED 2019-1-15 CREATING DISPLAY PAGES
DRAWING NO. LP1044-F ADDING ACTIONS TO PRIMITIVES

• The On Auto-Repeat property defines the action to be performed when the primitive is pressed and
then held down. The action occurs both on the initial depression and on subsequent auto-repeats, so
there is no need to define both this property and On Pressed. This action may invoke any of the func-
tions from the Function Reference or the data modification operators described in the Writing Actions
section, or it may run a program.
• The On Released property defines the action to be performed when the primitive is released. This
action may invoke any of the functions from the Function Reference or the data modification operators
described in the Writing Actions section, or it may run a program.
In the example above, a user-defined action is used to implement a momentary pushbutton.

8.9.5 The Push Button Action
This action is used to emulate a pushbutton:

• The Button Type property selects the desired behavior:


Button Type Primitive Behavior
Toggle Change the data state when the primitive is pressed.
NO Momentary Set the data to 1 when the primitive is pressed.
Set the data to 0 when the primitive is released.
NC Momentary Set the data to 0 when the primitive is pressed.
Set the data to 1 when the primitive is released.
Turn On Set the data to 1 when the primitive is pressed.
Turn Off Set the data to 0 when the primitive is pressed.

• The Button Data property defines the data to be changed by the key.
• The Hold Time property is used for momentary buttons to ensure that the data associated with the
pressed state is written for at least a specified amount of time, even if the button is pushed and imme-
diately released. It can be used to ensure that the remote device sees the button activation in circum-
stances where Crimson’s transactional writes are insufficient or have been disabled. It is generally bad
practice to rely on this property as it must be tuned to allow for the comms delays present in the sys-
tem.
In the example above, touching the primitive will toggle the value of the Output tag.

Crimson® 3.1 User Manual 8-114


CREATING DISPLAY PAGES REVISED 2019-1-15
ADDING ACTIONS TO PRIMITIVES DRAWING NO. LP1044-F

8.9.6 The Change Value Action
This action is used to write a numeric value to a data item:

• The Write To property defines the data item to be changed.


• The Data property defines the data to be written.
In the example above, touching the primitive will set the Data tag to 250. Note that this action supports either
floating point or integer values. The Data property must be of a type appropriate for the data item defined by the
Write To property.

8.9.7 The Ramp Value Action
This action is used to increase or decrease a data item. The options are shown below:

• The Write To property defines the data item to be changed.


• The Data property defines the step by which to raise or lower the item.
• The Limit property defines the minimum or maximum data value.
• The Ramp Mode property defines whether to raise or lower the item.
In the example above, pressing and holding down the primitive will repeatedly increase the Data tag by 5 until it
reaches 500. Note that this action supports either floating point or integer values. The Data and Limit properties
must be of a type appropriate for the data item defined by Write To property.

8-115 Crimson® 3.1 User Manual


REVISED 2019-1-15 CREATING DISPLAY PAGES
DRAWING NO. LP1044-F ADDING ACTIONS TO PRIMITIVES

8.9.8 The Play Tune Action
This action plays a selected tune using the target device’s internal sounder.

• Tune Name selects the tune to be played.


Customized tunes may be played using the PlayRTTTL() function.

8.9.9 The Log On User Action
This action activates the log-on screen on the target device. It has no options.

8.9.10 The Log Off User Action
This action logs off the current user of the target device. It has no options.

8.9.11 The Hide Popup Action
This action hides a page that has been displayed as a popup, allowing the underlying page or, in the case of a
nested popup, the previously displayed popup, to be seen once more. If no popup is displayed, the action has no
effect.

8.9.12 The Hide All Popups Action
This action hides any pages that have been displayed as popups or nested popups, allowing the underlying page
to be seen once more. If only a single popup is present, it is equivalent to the Hide Popup action. If no popup is
displayed, the action has no effect.

Crimson® 3.1 User Manual 8-116


CREATING DISPLAY PAGES REVISED 2019-1-15
ADDING ACTIONS TO ICONS DRAWING NO. LP1044-F

8.10 Adding Actions to Icons
Certain devices support added actions to the LED icons present above or below the device’s display. Zoom out
until you can see the icons, and then double-click to bring up its properties:

You will notice that this dialog contains two tabs, both of which define an action. The first tab defines the action that
will be performed by this icon when the current page is displayed, while the second tab defines an action to be
performed on every page. These are known as the local and global actions, respectively. Once you have defined
an action, you can right-click on the icon and use the resulting menu to select either Make Global or Make Local to
change the action type. These options will not be available if both actions have already been defined.
Refer to the section later in this chapter for information on controlling the associated LEDs.

8.11 Editing Page Properties
Right-clicking in the Editing Pane away from any primitives activates the context menu and allows selection of the
Properties commands to edit a display page’s properties:

8.11.1 General Properties

8-117 Crimson® 3.1 User Manual


REVISED 2019-1-15 CREATING DISPLAY PAGES
DRAWING NO. LP1044-F EDITING PAGE PROPERTIES

• The Label and Description properties define general purpose translatable strings that can be accessed
elsewhere using Crimson’s property extraction syntax. See the chapter on Writing Expressions for
more details.
• The Master Slide property allows the selection of another page that will be used as a background for
the current page. This allows common user interface elements such as clocks, alarm status indicators
and so on to be drawn on a single page and then included on several other pages.
• The Fill Color property defines the background color of the page, assuming that a master slide has not
been used. You should avoid animating the background color, as changes will require the hardware to
redraw of all items on the page, with a potential impact on performance.
• The Update Rate property defines the page’s update rate. The overdrive setting should not be used in
normal circumstances. The default setting is currently equivalent to the standard setting.
• The Timeout properties define timeout behavior. If a period of time equal to Period passes without user
activity, the On Timeout action will be executed. Refer to the Writing Actions chapter for details of the
possible actions.
• The Clear GotoPrevious Buffer property indicates that the history buffer maintained by GotoPrevi-
ous() and GotoNext() should be cleared when this page is selected. You would typically set this
property on the main menu page of your database, removing the ability to go back beyond that point.

8.11.2 More Properties

• The Links property group specifies the pages to be selected by various standard actions on a display
page. The Parent Page property defines a page to be selected if the timeout occurs and no action is
defined. The Next Page property defines a page to be selected if input navigation is enabled and the
focus is moved beyond the last field on the page. The Previous Page property defines a page to be
selected if the focus is similarly moved beyond the first field.
• The Auto Initiate property is used to indicate whether the data entry keypad should automatically be
displayed as soon as an alphanumeric character is received from an external source, such as a
keyboard or USB scanner, provided enabled entry fields exist. If this mode is disabled an active data
entry field must be touched to display the keypad.
• The Entry Order property is used to select how the next and previous buttons on the keypad should
navigate between fields. Fields may be selected in rows and then in columns, or in columns and then
in rows.

Crimson® 3.1 User Manual 8-118


CREATING DISPLAY PAGES REVISED 2019-1-15
EDITING PAGE PROPERTIES DRAWING NO. LP1044-F

• The Position property allows the globally defined position of popup windows to be overridden for this
page. If local settings are enabled, the Horizontal and Vertical properties are used to specify the posi-
tion.
• The Master Slide property is used to indicate whether the master slide should be kept active while a
popup is displayed. The default setting of enabled allows buttons on the master slide to function, even
though buttons on the actual page will be disabled while a popup is present. This can be useful if you
want global navigation options on the master slide to always be available.

8.11.3 Action Properties

• The On Select property defines an action to be run when the page is displayed.
• The On Remove property defines an action to be run when the page is deselected.
• The On Tick property defines an action to be run once per second.
• The On Update property defines an action to be run on each display update.

8.11.4 Security Properties
Refer to the Using Security chapter for details on security descriptors.

8-119 Crimson® 3.1 User Manual


REVISED 2019-1-15 CREATING DISPLAY PAGES
DRAWING NO. LP1044-F USER INTERFACE SETTINGS

8.12 User Interface Settings
Selecting the root item in the Navigation List will access the user interface settings.

8.12.1 Global Properties
The Global tab contains various general settings that apply across the database:

8.12.1.1 Global Actions
• The On Power Up property defines an action to be run when the system starts.
• The On Startup property defines an action to be run slightly later1.
• The On Tick property defines an action to be run once per second.
• The On Update property defines an action to be run on each display update.

8.12.1.2 Global Timeouts
• The Keypad Timeout property defines the period of time without user action after which any data entry
operations will be canceled and the associated popup keypad removed from the display.
• The Backlight Timeout property defines the period of time without user action after which the display
backlight will be turned off to conserve power and display life. The default value of zero disables this
feature.
• The Relock Timeout property defines the period of time after which any actions protected via the
Locked or Hard Locked methods will relock automatically, such that the user will once again have to
unlock them before they can be used.

1. The difference between these two properties is subtle and not of concern to most users.

Crimson® 3.1 User Manual 8-120


CREATING DISPLAY PAGES REVISED 2019-1-15
USER INTERFACE SETTINGS DRAWING NO. LP1044-F

8.12.1.3 Popup Position
• The Horizontal and Vertical properties define the default position for popup display pages and popup
keypads. They can be overridden at the page level if desired by using the page’s own properties to
specify new values.

8.12.1.4 Diagnostics
• The Show GMCs property is used to enable or disable the display of certain diagnostic information
after a runtime system fault. The information is useful in correcting software problems, but may be dis-
tracting to users.

8.12.1.5 Languages
• The Configure Translation button is used to configure the languages to be used within the system.
Refer to the chapter on Localization for more information.

8.12.2 Entry Properties
The Entry tab contains global settings that apply to data entry:

8-121 Crimson® 3.1 User Manual


REVISED 2019-1-15 CREATING DISPLAY PAGES
DRAWING NO. LP1044-F USER INTERFACE SETTINGS

8.12.2.1 Keypad Options
• The Keypad Size property is used to select the size of the data entry keypad. The various settings pro-
gressively increase the size of the keypad, with a setting of Maximum causing the keypad to take up
most of the screen for use in situations where, for example, operators are wearing unwieldy gloves.
• The Keypad Layout property is used to select between the default keyboard layout and specialist lay-
outs for different languages. This release of Crimson supports specialized keyboards for French and
Hebrew.
• The Input Navigation property is used to show or hide the NEXT and PREVIOUS keys in the various popup
keypads. These keys can be used to move between entry fields without first deactivating the keypad.
• The Auto Initiate property is used to indicate whether the data entry keypad should automatically be
displayed as soon as the page is selected, provided enabled entry fields exist. If this mode is disabled,
an active data entry field must be touched to display the keypad.
• The Entry Order property is used to select how the next and previous buttons on the keypad should
navigate between fields. Fields may be selected in rows and then in columns, or in columns and then
in rows.
• The Numeric Keypad option is used to control the appearance of the keypad used for numeric entry,
and specifically whether ramping is enabled in addition to or instead of traditional entry.

8.12.2.2 Data Entry Mode
• The Multi Data Entry property is used to control the data entry mode used for multi-state format
objects. Two-stage editing results in the ENTER key having to be pressed to commit any changes, while
single-stage editing results in the new data being written to the associated data item as soon as RAISE or
LOWER is used to make a change. Single-stage entry is faster, but may result in the writing of intermedi-
ate values when changing a multi-state setting.
• The Flag Data Entry property is used to control the data entry mode used for two-state format objects.
It operates in the same way as the property above.

8.12.2.3 Miscellaneous
• The Activate Beeper property is used to turn the target device’s beeper on or off, as desired. The
beeper provides feedback as to keyboard and touchscreen activation, but can become annoying
during the development process.

Crimson® 3.1 User Manual 8-122


CREATING DISPLAY PAGES REVISED 2019-1-15
USER INTERFACE SETTINGS DRAWING NO. LP1044-F

8.12.3 Images Properties
The Images tab is used to manage images within the database:

8.12.3.1 Images
• The Symbol Library property indicates whether Crimson should use new-style smoothed symbols or
whether it should prefer the rougher old-style symbols used by Crimson 2.0 and Crimson 3.0. For data-
bases imported from Crimson 3.0, old-style symbols will be preferred until this setting is changed. This
ensures that visual consistency is retained until you can review the impact of switching to the new sym-
bols. For new databases created under Crimson 3.1, the smoother, higher-resolution symbols will be
used by default.
• The Include Data property indicates whether external images dragged into a display page should be
stored as pointers to the source location, or whether the actual image data should be included in the
database file. Including image data will typically make the database very large, and may make it
impossible to use the Support Upload feature without filling the memory of the target device.
• The Stored Paths property defines how image links are stored. Absolute mode stores the full path,
including the drive letter. The two relative modes store and interpret image paths relative to either the
database or the Crimson image directory, allowing database and image files to be moved between
machines without too much worry about absolute path locations.
• The Image Directory property defines the image path referenced above.
• The CF Directory property is used to specify where Crimson can find copies of the images that will be
stored on a target device’s memory card. The memory card image primitive uses this path when pre-
viewing images.

8.12.3.2 Maintenance
• The Manage Image Database button is used to invoke the Image Manager in order to view and manip-
ulate the images used in the database. See the section below for more information on this facility.

8-123 Crimson® 3.1 User Manual


REVISED 2019-1-15 CREATING DISPLAY PAGES
DRAWING NO. LP1044-F USER INTERFACE SETTINGS

8.12.4 Fonts Properties
The Fonts tab is used to manage fonts within the database:

8.12.4.1 Maintenance
• The Manage Font Database button is used to invoke the Font Manager in order to view and manipu-
late the fonts used in the database. See the section below for more information on this facility.

Crimson® 3.1 User Manual 8-124


CREATING DISPLAY PAGES REVISED 2019-1-15
USER INTERFACE SETTINGS DRAWING NO. LP1044-F

8.12.5 Icons Properties
The Icons tab is used to set properties of the icon LEDs on those HMIs that provide them:

• The Alarm LED property is used to set whether the left-hand or alarm LED will be controlled by the
system or whether it will be free for user control. The default behavior is that flashing red indicates the
presence of an active and unaccepted alarm, and solid red indicates the presence of accepted alarms.
• The Orb LED property is used to set whether the central or orb LED will be controlled by the system or
whether it will be free for user control. The default behavior is that the LED will show flashing blue to
indicate boot code loading into a unit, and will flicker during memory card access.
• The Home LED property is used to set whether the right-hand or home LED will be controlled by the
system controlled by the system or whether it will be free for user control. The default behavior is that
solid green indicates power on.
Refer to the “Adding Actions to Icons” section earlier in this chapter for information on adding actions to the LEDs
on those devices which support touch-sensitive annunciators.

8-125 Crimson® 3.1 User Manual


REVISED 2019-1-15 CREATING DISPLAY PAGES
DRAWING NO. LP1044-F MANAGING IMAGES

8.13 Managing Images
The Image Manager is invoked from the Images tab of the user interface settings. It contains a list of the images
referenced in the database, together with their properties. It allows you to view the images, and to perform certain
changes to how the images are stored and used.
The sample below shows the Images Manager from a complex database:

 
The main list view shows the properties of the various images:
• The Source column indicates whether the image is being obtained from a file via either a fixed or a rel-
ative path, from the Symbol Library, or from internal data stored when an image was pasted or dragged
from another source.
• The Name column shows the filename for images stored in files, and the relevant symbol information
for images sourced from the Symbol Library.
• The Type column shows the file type of the image data.
• The Used column indicates whether the image is used in the database.
• The Valid column indicates whether valid image data is available. This column may be set to No if an
image was being sourced from a disk file that is no longer available, and if the database is not config-
ured to hold its own image data via the Include Data property described above.
• The Disk column indicates whether the image exists on disk. Images that were pasted or dragged
directly into the editor may never have existed on disk, and images sourced from files but also stored
within the database itself may now be missing if the file is no longer available.
The toolbar at the top of the window allows various commands to be performed:

Crimson® 3.1 User Manual 8-126


CREATING DISPLAY PAGES REVISED 2019-1-15
MANAGING FONTS DRAWING NO. LP1044-F

• The Export command saves an image that is available but not stored on disk to a file. If a filename has
already been defined for the selected image, that name will be used. In other cases, you will be
prompted to select a filename.
• The Replace command allows you to replace a given image with another. All references to the image
in the database will be updated to reflect the change.
• The Export All command saves all images that are available but not stored on disk and that have file-
names defined. It can be used to ensure that all images are stored in external files prior to turning off
Include Data.
• The Purge Unused command is used to remove all images that are not used in the database, thereby
saving disk space when saving the database to disk. Use of this command may also reduce memory
usage in the target device.

8.14 Managing Fonts
The Font Manager is invoked from the Fonts tab of the user interface settings. It contains a list of all the fonts
referenced in the database, together with their properties. It allows you to view the fonts, and to perform certain
changes to how the fonts are stored and used.
The sample below shows the Font Manager from a complex database:

The main list view shows the properties of the various fonts:
• The Face property shows the name of the font.
• The Size property shows the height in pixels of the font.
• The Weight property indicates whether the font is bold or not.
• The Type property indicates whether the font is a system or custom font.
• The Used property indicates whether the font is used in the database.
• The Options property lists the options selected for the font.
The toolbar at the top of the window allows various commands to be performed:

8-127 Crimson® 3.1 User Manual


REVISED 2019-1-15 CREATING DISPLAY PAGES
DRAWING NO. LP1044-F MANAGING FONTS

• The Edit button allows the properties of custom fonts to be edited.


• The Delete button allows an unused font to be deleted. Once a font is deleted, it will no longer be pre-
sented in the drop-down used for font selection, but may be recreated by using the associated Pick
button.
• The Replace button allows a font to be replaced with another. All references to the font in the database
will be updated to reflect the change.
• The Show System button controls whether system fonts are shown in the list.
• The Purge Unused button removes all unused fonts from the database, thereby reducing the amount
of memory used in the target device. As with a deleted font, purged fonts will no longer be presented in
the drop-down list used for font selection, but may be recreated by using the associated Pick button.
Editing the properties of a custom font produces the following dialog box:

The various options allow specific sets of characters to be included in the font image that is created and
downloaded to the target device. Restricting the characters to the ones that are needed for your application will
save memory, especially with larger fonts. Note that the Numeric Output option can be used alone to restrict the
font to digits, decimal points and those other characters used to render conventional, scientific or hexadecimal
numbers.

Crimson® 3.1 User Manual 8-128


CREATING DISPLAY PAGES REVISED 2019-1-15
ADVANCED TOPICS DRAWING NO. LP1044-F

8.15 Advanced Topics
This section describes advanced techniques that are typically not required by most users.

8.15.1 Defining Color Expressions
As mentioned above, color properties can be defined via integer expressions or via local programs returning
integer values. These mechanisms are used in those circumstances where the standard color animation methods
are not sufficient.
Crimson works with 15-bit color constants, with the lowest five bits representing the red, the next five bits
representing the green and the upper five bits representing the blue. (Note that this is true even with device’s that
support richer sets of colors. Those additional colors are used for graduated fills, symbols and pictures, but cannot
be selected for color settings and constants.) You can manipulate color values just as you would any other integer
value.

8.15.1.1 Building Colors
The ColGetRGB(r,g,b) function can be used to create a color value from its red, green and blue components.
Although Crimson uses 15-bit color values containing three 5bit values, the arguments passed to this function are
internally scaled down by a factor of 8 and should thus be in the range 0 to 255. ColGetRGB(128, 0, 64) will
therefore return a purple-like color with a red value of 16, no green component and a blue value of 8.

8.15.1.2 Splitting Colors
The ColGetRed(rgb), ColGetGreen(rgb) and ColGetBlue(rgb) functions can be used to access the individual
color components of a color value. In keeping with the convention used by ColGetRGB(), the values returned by
these functions are scaled to be between 0 and 255.

8.15.1.3 Choosing Colors
The ColPick2() function can be used to select between two colors based on the value of an expression. For
example, the expression ColPick2(Flag1, Col1, Col2) will return Col1 if Flag1 is non-zero, or Col2 if Flag1 is
zero. The first and second color arguments can be replaced by calls to the ColGetRGB() function if required.

8.15.1.4 Blending Colors
The ColBlend() function can be used to produce a color that is a user-defined blend of two other colors. For
example, the expression ColBlend(Data, 0, 100, Col1, Col2) will return Col1 if Data is 0 and Col2 if Data is
100. Intermediate values will be appropriate mixtures of the two colors, allowing a smooth transition from one color
to another. Once again, the color arguments can be replaced by calls to the ColGetRGB() function.

8.15.1.5 Responding to Touch
The IsPressed system variable is equal to true if the current primitive has been touched and is otherwise false. It
can be used with the color selection functions to animate a primitive per its touch status. Note that primitives will
not be enabled for touch unless they have an action defined or they support an inherent action.

8-129 Crimson® 3.1 User Manual


PRIMITIVE TYPES REVISED 2019-1-15
CORE PRIMITIVES DRAWING NO. LP1044-F

Chapter 9 Primitive Types

This chapter describes each of the primitives provided by Crimson.

9.1 Core Primitives
9.1.1 Geometric Primitives

             
The geometric primitives represent simple shapes. They include rectangles, full and partial ellipses, rectangles with
rounded or trimmed corners, polygons, stars, arrows, parallelograms and trapeziums. All these primitives support
tank fills, and can therefore be used to implement effects such as bar graphs. They also support the addition of text
or data, and can therefore be used to create text or data displays, or to provide data entry. Finally, they support the
addition of actions, and can therefore be used to implement interactive display elements.

9.1.1.1 Basic Properties
All geometric primitives have properties that control their basic appearance in terms of fills, edges and edge trim.
These properties can be used to create a broad range of effects, and you should experiment with the various
settings to get a feel for what can be achieved. Refer to the previous chapter for these standard settings. While the
geometric primitives are very simple, their support for tank fills, data, text and actions means that a large portion of
most databases can in fact be created by using just the rectangle or the rounded rectangle.

9.1.1.2 Other Properties
Certain geometric primitives offer additional configuration options:
• Rectangles with rounded or trimmed corners have a Skip Corners property that allows the corner effect
to be omitted for specific corners. This replaces the various semi-trimmed figures in Crimson 3.0 while
providing greater flexibility.
• Polygons have a Rotation property that allows the orientation of the polygon to be adjusted within the
bounding rectangle. Note that the polygon is always scaled to fill the rectangle and the rotation applied
accordingly.
• Stars likewise have a Rotation property, but also have an Inner Radius property that allows the point-
edness of the star to be adjusted. The behavior is difficult to explain but easy to see in practice!
• Arrows, triangles, parallelograms and trapeziums have Direction and Reflection properties that allow
the figures to be rotated and reflected via either these properties or the Transform menu in the graph-
ics editor.
• Partial ellipse primitives likewise have the transformation properties, but also have a Show Edges
property which defines whether the edge will be drawn around just the arc, or around the arc and the
straight edges.

Crimson® 3.1 User Manual 9-130


REVISED 2019-1-15 PRIMITIVE TYPES
DRAWING NO. LP1044-F CORE PRIMITIVES

9.1.2 The Line Primitive

The line primitive is used to place a line on the page. The Crimson 3.1 line primitive supports a rich variety of
settings, including textured and graduated fills, line edging and edge trim, and selectable end styles to allow the
creation of arrows and other figures.

9.1.2.1 Line Properties

• The Width property specifies the width of the line from 1 to 80 pixels.
• The Pattern property specifies the pattern to be used to fill the line. The available options are identical
to those offered for fills and edges, so refer to the previous chapter for information on the various set-
tings.
• The Color 1 and Color 2 properties select the colors for the selected pattern.
• The End 1 Style and End 2 Style properties define the effects to be applied to each end of the line. A
flat endcap ends exactly at the end of the line, while a square endcap extends beyond the end of the
line by an amount equal to the width of the line. The rounded and pointed endcaps should be self-
explanatory, as should the various arrowheads and other shapes that are available.

9.1.2.2 Edge Properties
Refer to the previous chapter for information on edges and edge trim.

9.1.3 Text and Data Primitives

  
The text box and data box primitives are rectangles with predefined data and text items, and with no fill or edge
colors defined. They exist to make it easier to add data and text elements, and to provide comfort to those users
who are not used to being able to construct an entire database from simple geometric primitives! They can also be
used to add a second data or text element to a primitive or when constructing a group. Refer to the previous
chapter for details of the standard settings.
 

9-131 Crimson® 3.1 User Manual


PRIMITIVE TYPES REVISED 2019-1-15
CORE PRIMITIVES DRAWING NO. LP1044-F

9.1.4 The Image Primitive

The image primitive is used to display an image, possibly chosen from several images based upon a numeric
value. The primitive supports the display of bitmaps, JPEGs, metafiles, bitmaps and many other image types. It can
operate with a transparent or filled background, and can optionally define an edge to go around the image. It also
supports the addition of data, text or actions, thereby allowing more complex elements to be constructed.
The Image tab for an animated image primitive is shown below:

• The Image Count property defines the number of image slots that are defined for this primitive. One of
the images will be chosen for display at any given time, based upon the value of the Image Select
property.
• The Image Select property selects the desired image. It is taken as a zerobased value and is reduced
modulo the Image Count. In other words, if four images are defined, values of 0, 4, 8 etc. will display
the first image, values of 1, 5, 9 etc. will display the second image and so on.
• The Use Color property is used to either reduce an image to black-and-white or to preserve its color.
An expression that evaluates to a non-zero value or an empty expression will result in a color image. A
zero value will reduce the image to grayscale using standard r-g-b brightness weightings. This option
is useful when showing the disabled state of an image on a button.
• The Show Image property is used to show or hide the image. If the primitive has no edge or fill defined,
it is functionally equivalent to the Show Item property, but will otherwise still display the edge or back-
ground as per the configuration.
• The Show Item property is used to show or hide the entire primitive.

Crimson® 3.1 User Manual 9-132


REVISED 2019-1-15 PRIMITIVE TYPES
DRAWING NO. LP1044-F CORE PRIMITIVES

9.1.4.1 Defining Images
The Images section of the dialog box defines the images for each slot. The Pick button next to each image will
display a dialog box reminding you that you can simply drag an image onto the field. This image can be dragged
from the Symbol Library category in the Resource Pane, from a folder in Windows Explorer or from any other drag-
and-drop capable application. The Browse button can be used to open a file containing a suitable image format
and to load that file into this image slot. As mentioned above, JPEGs, metafiles, bitmaps and many other graphical
file formats are supported.

9.1.4.2 Adjusting Images
The Adjust button next to the image can be used to modify the image:

The various sliders can be used to pan, zoom and spin the image, while the checkboxes can be used to mirror it
horizontally or vertically. The Show Center checkbox shows or hides the blue lines that mark the center of the
image, while the Reset button can be used to restore the image to its original state. The manipulation options are
sometimes used to modify an image to create various states for use in animation.

9.1.5 The Bevel Primitive
The bevel primitive displays a rectangle with a raised or sunken border. The face color may be changed, as may
the colors used for the highlighted and shadowed portions. You may also change the color and width of the lines
within the primitive, or remove them entirely. Finally, a layout handle may be used to adjust the width of the beveled
portions.

9-133 Crimson® 3.1 User Manual


PRIMITIVE TYPES REVISED 2019-1-15
CORE PRIMITIVES DRAWING NO. LP1044-F

9.1.5.1 Figure Properties

• The Pattern, Color 1 and Color 2 properties define the color of the face of the primitive in the usual
way. Refer to the previous chapter for more details.
• The Style properties controls whether the bevel will be raised or sunken. This effect is achieved simply
by switching the highlight and shadow colors.
• The Highlight and Shadow properties define the two colors to be used to create the 3D effect applies to
the outside of the primitive.

9.1.5.2 Line Properties

• The line properties are conventional, except to note that setting the Width to zero will remove all divid-
ing lines. Refer to the previous chapter for details.

9.1.6 The Button Primitives

  
The button primitives implement beveled or graduated buttons. Text is preconfigured to allow the button to be
labeled, but can be removed to allow the addition of live data. An action tab is also provided by default, but will be
disabled if data entry is configured, as button with data entry fields use the button press to activate editing.

Crimson® 3.1 User Manual 9-134


REVISED 2019-1-15 PRIMITIVE TYPES
DRAWING NO. LP1044-F CORE PRIMITIVES

The primitive-specific property tab for a beveled button is shown below:

Refer to the previous chapter for details of the standard settings.


The primitive-specific property tab for a graduated button is shown below:

Refer to the previous chapter for details of the standard settings.

9-135 Crimson® 3.1 User Manual


PRIMITIVE TYPES REVISED 2019-1-15
GAUGE PRIMITIVES DRAWING NO. LP1044-F

9.2 Gauge Primitives 
Crimson 3.1 supports a wide range of linear and radial gauges that can be used to display process variables in an
intuitive and easy-to-read format. All the gauges have similar behavior and similar configuration properties.
Gauges do not themselves display data in textual form, but text and data boxes can be added to augment the
display.

9.2.1 Gauge Concepts
The following sections describe various concepts that apply to all gauges.

9.2.1.1 Types
Radial gauges display a value by means of a rotating pointer or a radially-swept band:

Linear gauges display a value by means of a moving line or a colored bar:

9.2.1.2 Bugs
Bugs are triangular markers shown on the outside of the gauge’s scale. They are used to indicate set-points or
other important values. Each gauge can support up to two bugs, with the color and position being dynamically
adjustable via tags. The picture below shows a single green bug on a radial and linear gauge:

Crimson® 3.1 User Manual 9-136


REVISED 2019-1-15 PRIMITIVE TYPES
DRAWING NO. LP1044-F GAUGE PRIMITIVES

9.2.1.3 Bands
Bands are radial or linear regions drawn outside the gauge’s scale. Bands indicate important operating ranges. For
example, a green band might indicate the target range for a process variable, while a red band might indicate an
area where operation should be avoided. Each gauge can support up to two bands, with the color and position
being dynamically adjustable via tags. The picture below shows a green band on a radial and linear gauge:

9.2.1.4 Styles
Gauges can be created in various styles, with each style applying pre-defined colors to the gauge’s elements. A
custom style can be used to manually specify each color, allowing a broad range of visual themes to be created.
The picture below shows a radial gauge in each of the five pre-defined styles:

9.2.1.5 Naked Gauges
A naked gauge is a gauge that displays only the pointer, scale, bugs and bands. It does not display the bezel or
even the background against which the pointer moves. Naked gauges are created by selecting the Naked style on
the Style page. They can be used to create gauges with custom bezels or to combine several gauges within a
single figure. The picture below shows three naked linear gauges on top of a rounded rectangle:

9-137 Crimson® 3.1 User Manual


PRIMITIVE TYPES REVISED 2019-1-15
GAUGE PRIMITIVES DRAWING NO. LP1044-F

9.2.2 Gauge Properties
All gauges have similar properties.

9.2.2.1 Format Properties

• The Value property specifies the value that is to be displayed by the gauge, while the Minimum and
Maximum properties specify the range that the gauge’s scale is to cover. The range is used both to
scale the Value property, and to determine the position of any bugs and bands.
• The Major Color and Minor Color properties specify the colors to be used for the major and minor divi-
sions of the scale. These properties can be animated, allowing the scale to show important changes in
process state.
• The Major Divisions and Minor Divisions properties control how the scale is to be divided. Note that the
divisions are applied without reference to the minimum and maximum values. Setting Minor Divisions
to one will result in only major division being shown. Crimson’s sub-pixel graphics engine ensures that
even large numbers of divisions can be shown clearly.
• The Display Mode property selects between pointer and swept operation. See the examples at the
start of this section for an illustration of each mode for both linear and radial gauges.
• The Display Color property controls the color of the pointer or the band. Note again that this property
can be animated, drawing attention to important changes in process state.
• The Pointer Style property defines the how the outer end of a radial pointer or both ends of a linear
pointer will be drawn. The property is not used when operating in swept mode.

Crimson® 3.1 User Manual 9-138


REVISED 2019-1-15 PRIMITIVE TYPES
DRAWING NO. LP1044-F GAUGE PRIMITIVES

9.2.2.2 Layout Properties for Radial Gauges

• The Scaling properties allow the radial size of each element of the gauges to be adjusted to achieve a
different visual result, or to make room for additional text or data boxes. The impact of each value is
best experienced by making changes and viewing the results in the primitive’s properties dialog box.

9.2.2.3 Layout Properties for Linear Gauges

• The Margin properties allow the margin around the active area of the gauge to be adjusted to make
room for additional text or data boxes. For example, increasing the bottom margin will allow a label to
be placed below the scale.

9-139 Crimson® 3.1 User Manual


PRIMITIVE TYPES REVISED 2019-1-15
GAUGE PRIMITIVES DRAWING NO. LP1044-F

9.2.2.4 Style Properties

• The Rotation and Reflection properties allow the gauge to be transformed to achieve different orienta-
tions and directions of pointer movement. The properties may also be accessed via the Transform
menu or via the icons that will appear in the primitive’s Quick Bar.
• The Gauge Style property selects from one of the predefined styles, or allows custom colors to be
selected. The property also allows naked mode to be selected, as described previously in this section.
• The Custom properties allow the colors assigned to various elements of the gauge’s bezel to be modi-
fied. Many weird and wonderful results can be achieved by adjusting the various settings.

9.2.2.5 Band Properties

• The Band Enabled property enables or disables the associated band.


• The Band Color property selects the required color for the band. Note that this color can be animated,
drawing attention to changes in process state.
• The Band Start and Band End properties select the region to be spanned by the band. The values are
relative to the Minimum and Maximum properties defined on the gauge’s Format page.

Crimson® 3.1 User Manual 9-140


REVISED 2019-1-15 PRIMITIVE TYPES
DRAWING NO. LP1044-F GAUGE PRIMITIVES

9.2.2.6 Bug Properties

• The Bug Enabled property enables or disables the associated bug.


• The Bug Color property selects the required color for the bug. Note that this color can be animated,
drawing attention to changes in process state.
• The Bug Position property defines the location of the bug. The value is relative to the Minimum and
Maximum properties defined on the gauge’s Format page.

9-141 Crimson® 3.1 User Manual


PRIMITIVE TYPES REVISED 2019-1-15
BAR AND LINE GRAPHS DRAWING NO. LP1044-F

9.3 Bar and Line Graphs

     
Bar graphs display one or more values from an array as a series of horizontal bars. Scatter graphics allow up to
four associated sets of x and y values to be plotted, with optional data markers and a connecting line. They also
provide the ability to add a regression line that shows the best-fit linear relationship associated with each data set.

9.3.1 The Bar Graph Primitives
Bar graphs are available in both horizontal and vertical forms.

9.3.1.1 Option Properties

• The Value property defines an array element as the source of the data to be displayed. The element
will be used for the first bar. A total of Count elements will be displayed, with subsequent array ele-
ments being used for each.
• The Minimum and Maximum properties define the lower and upper limits of the display range. Bars
beyond these ranges will be clipped.
• The Fill Format property group defines the color to be used for the bars.

9.3.1.2 Figure Properties
The figure properties control the background of the graph and are conventional.

Crimson® 3.1 User Manual 9-142


REVISED 2019-1-15 PRIMITIVE TYPES
DRAWING NO. LP1044-F BAR AND LINE GRAPHS

9.3.2 Scatter Graph Properties
9.3.2.1 Line Properties

• The X Values and Y Values properties define array elements as the source of the first data point to be
plotted. A total of Count elements will be displayed, with subsequent array elements being used for
each. If Count is set to zero, the data set will not be displayed.
• The Graph Style property defines whether data markers will be drawn, and whether lines will be used
to connect the data point.
• The Marker Color and Line Color properties define the colors to be used to plot the respective ele-
ments.
• The Regression Line property defines whether Crimson should calculate the linear relationship that
best fits the set of points, and draws a line to show this relationship. The Line Color property allows the
line color to be selected.

9.3.2.2 Option Properties

9-143 Crimson® 3.1 User Manual


PRIMITIVE TYPES REVISED 2019-1-15
BAR AND LINE GRAPHS DRAWING NO. LP1044-F

• The Style property controls which set or sets of grid lines will be enabled.
• The Y Axis Grid Lines property group controls how the horizontal grid lines will be drawn and laid out.
The system uses an automatic algorithm to determine the best way to place the lines based upon the
minimum and maximum values of Line 1. The Layout Font and Limit Values properties correspond to
those of the legacy scale primitive, such that matching those settings will allow a scale placed next to
the scatter graph to align with the associated grid lines.
• The X Axis Grid Lines property group controls how the vertical grid lines will be drawn and laid out. The
system uses an automatic algorithm to determine the best way to place the lines based on the number
of points shown for Line 1 and the minimum spacing specified by the Layout Width property.

9.3.2.3 Figure Properties
The figure properties control the background of the graph and are conventional.

Crimson® 3.1 User Manual 9-144


REVISED 2019-1-15 PRIMITIVE TYPES
DRAWING NO. LP1044-F ACTION BUTTONS

9.4 Action Buttons

     
Actions buttons use preselected images from the Symbol Library to create a button that will perform a given action
when it is pushed. Many versions are provided beyond those shown above. Clicking on a given button in the
Resource Pane will show the different color variants that are available. For example, the square button is available
in red, green or black:

When using an action button, you will primarily use the Action tab of the properties dialog to define an action as per
the description in the previous chapter. The Button tab can also be used to adjust the button images, or to define
your own versions:

9-145 Crimson® 3.1 User Manual


PRIMITIVE TYPES REVISED 2019-1-15
ILLUMINATED BUTTONS DRAWING NO. LP1044-F

9.5 Illuminated Buttons

     
Illuminated buttons use preselected images from the Symbol Library to create a button that will control a tag, and
light up based either upon the state of that tag or the state of another expression. Many versions are provided
beyond those shown above. Clicking on a given button in the Resource Pane will show the different color variants
that are available. For example, the candy button shown below is available in red, green, yellow, blue or grey:

The primitive-specific property tab for these primitives is shown below:

Crimson® 3.1 User Manual 9-146


REVISED 2019-1-15 PRIMITIVE TYPES
DRAWING NO. LP1044-F ILLUMINATED BUTTONS

• The Operation property selects the required behavior:


Operation Button Behavior
Toggle Change the data state when the primitive is pressed.
Latching If the data is 0, set it to 1 when the button is pressed.
If the data is 1, set it to 0 when the button is released.
NO Momentary Set the data to 1 when the primitive is pressed.
Set the data to 0 when the primitive is released.
NC Momentary Set the data to 0 when the primitive is pressed.
Set the data to 1 when the primitive is released.
Turn On Set the data to 1 when the primitive is pressed.
Turn Off Set the data to 0 when the primitive is pressed.

• Note that Latching is slightly different from Toggle in respect of the point at which a non-zero control
value is set back to zero. Toggle makes all changes when the button is pressed, while Latching turns a
value off when it is released. This produces a result more in keeping with the behavior of a real-world
pushbutton.
• The Control property defines the value to be written when the button is pressed or released. This value
must be writable, and will be set to one or zero depending on the exact operation defined for the but-
ton.
• The Status property is used to control the illumination of the button. If it is left blank, it will default to the
Control value. A different value can be used if more complex logic is required.
• The Hold Time property is used for momentary pushbuttons to ensure that the data associated with the
pressed state is written for at least a specified amount of time, even if the button is pushed and imme-
diately released. It can be used to ensure that the remote device sees the button activation in circum-
stances where Crimson’s transactional writes are insufficient or have been disabled. It is generally bad
practice to rely on this property as it must be tuned to allow for the comms delays present in the sys-
tem.
Refer to the previous chapter for details of the Protection, Enable and Remote properties.
Refer to earlier in this chapter for details of how to change or adjust the button images.

9-147 Crimson® 3.1 User Manual


PRIMITIVE TYPES REVISED 2019-1-15
INDICATORS DRAWING NO. LP1044-F

9.6 Indicators

     
Indicators use preselected images from the Symbol Library to show the on/off status of a data value. Many
versions are provided beyond those shown above. Clicking on a given button in the Resource Pane will show the
different color variants that are available. For example, the pilot indicator shown above is available in red, green,
yellow, blue or white:

Indicators have a very simple set of properties:

The Status property controls the images to be drawn. All other properties are standard.

Crimson® 3.1 User Manual 9-148


REVISED 2019-1-15 PRIMITIVE TYPES
DRAWING NO. LP1044-F 2-STATE TOGGLES

9.7 2‐State Toggles

     
2-State Toggles use preselected images from the Symbol Library to implement toggle switches with up and down
positions. Many versions are provided beyond those shown above. Clicking on a given toggle in the Resource
Pane will show the different color variants that are available. For example, the paddle switch is available in red,
green or black:

9.7.1 Switch Properties

• The Actions property controls the behavior of the switch. The three automatic modes model conven-
tional or biased toggle switches, while User-Defined mode allows you to specify more complex actions
that will occur when either half of the toggle switch is pressed or released.
• The Value property is used in the automatic modes and will be written to the data values associated
with States A and B as the switch is changed. By default, State A is represented by a zero and State B
by a one, but these values can be changed using the advanced settings for this primitive.
• The Divisions property defines whether the switch is thrown vertically or horizontally, and therefore
how Crimson should divide the primitive when interpreting touches by the user.
• The Hold Time property is used for biased switches to ensure that the data associated with the
pressed state is written for at least a specified amount of time, even if the switch is thrown and immedi-
ately released. It can be used to ensure that the remote device sees the switch activation in circum-

9-149 Crimson® 3.1 User Manual


PRIMITIVE TYPES REVISED 2019-1-15
2-STATE TOGGLES DRAWING NO. LP1044-F

stances where Crimson’s transactional writes are insufficient or have been disabled. It is generally bad
practice to rely on this property as it must be tuned to allow for the comms delays present in the sys-
tem.
Refer to the previous chapter for details of the Protection, Enable and Remote properties.
Refer to earlier in this chapter for details of how change or adjust the switch images.

9.7.2 Advanced Properties

• The Value A and Value B properties define the data values used in the automatic modes to represent
the states of the switch. The value read from the Value property will be compared to these two values
to decide which state to display, and changing the switch will similarly write the appropriate value.
• The Default property selects the state to be displayed if the data read from the Value property does not
match either Value A or Value B.
• The On Pressed and On Released properties define custom behaviors to be carried out when the A
and B portions of the switch are pressed or released by the user. For a vertical switch, A is the bottom
half and B is the top half. For a horizontal switch, A is the left half and B is the right half.

Crimson® 3.1 User Manual 9-150


REVISED 2019-1-15 PRIMITIVE TYPES
DRAWING NO. LP1044-F 3-STATE TOGGLES

9.8 3‐State Toggles

  
3-State Toggles use preselected images from the Symbol Library to implement toggle switches with up, center and
down positions. Other versions are provided beyond those shown above. Clicking on a given toggle in the
Resource Pane will show the different color variants that are available. For example, the paddle switch is available
in three colors:

9.8.1 Switch Properties

• The Actions property controls the behavior of the switch. The four automatic modes model conven-
tional or biased toggle switches, while User-Defined mode allows you to specify more complex actions
that will occur when either half of the toggle switch is pressed or released. Note that the switch can
only be moved one position at a time, so moving from State A to State C will necessarily mean moving
through State B, as would occur with a physical toggle switch.
• The Value property is used in the automatic modes and will be written to the data values associated
with States A, B or C as the switch is changed. By default, State A is represented by a zero, State B by
a one and State C by a two, but these values can be changed using the advanced settings for this
primitive.
• The Divisions property is used to define whether the switch is thrown vertically or horizontally, and
therefore how Crimson should divide the primitive when interpreting touches by the user.

9-151 Crimson® 3.1 User Manual


PRIMITIVE TYPES REVISED 2019-1-15
2-STATE SELECTORS DRAWING NO. LP1044-F

• The Hold Time property is used for biased switches to ensure that the data associated with the
pressed state is written for at least a specified amount of time, even if the switch is thrown and immedi-
ately released. It can be used to ensure that the remote device sees the switch activation in circum-
stances where Crimson’s transactional writes are insufficient or have been disabled. It is generally bad
practice to rely on this property as it must be tuned to allow for the comms delays present in the sys-
tem.
Refer to the previous chapter for details of the Protection, Enable, Remote properties.
Refer to earlier in this chapter for details on how to change or adjust the switch images.

9.8.2 Advanced Properties

• The Value A, Value B and Value C properties define the data values used in the automatic modes to
represent the three states of the switch. The value read from the Value property will be compared to
these values to decide which state to display, and changing the switch will write the appropriate value.
• The Default property selects the state to be displayed if the data read from the Value property does not
match Value A, Value B or Value C.
• The On Pressed and On Released properties define custom behaviors to be carried out when the A
and C portions of the switch are pressed or released by the user. For a vertical switch, A is the bottom
half and C is the top half. For a horizontal switch, A is the left half and C is the right half.

9.9 2‐State Selectors

     
2-State Selectors use preselected images from the Symbol Library to implement rotary selector switches with two
states. Their behavior is identical to Two-State Toggles, and they are implemented using the same primitive.

Crimson® 3.1 User Manual 9-152


REVISED 2019-1-15 PRIMITIVE TYPES
DRAWING NO. LP1044-F 3-STATE SELECTORS

9.10 3‐State Selectors

     
3-State Selectors use preselected images from the Symbol Library to implement rotary selector switches with three
states. Their behavior is identical to Three-State Toggles, and they are implemented using the same primitive.

9.11 System Primitives
9.11.1 Viewer Format
Most system primitives display or manipulate data created or accessed by Crimson. Each viewer consists of a
viewing area with a number of buttons beneath. The appearance of the list-based viewers is controlled via the
Format tab of the properties dialog:

Colors and fonts are specified in the conventional way. The Buttons section allows some of buttons at the bottom of
the viewer to be disabled, and allows their labels to be edited or translated for international applications.
Remember that translatable strings can be set to expressions, implying that the label on a button can be
customized at runtime.

9.11.2 The Alarm Viewer
The Alarm Viewer is used to display and optionally accept alarms within the system.

9-153 Crimson® 3.1 User Manual


PRIMITIVE TYPES REVISED 2019-1-15
SYSTEM PRIMITIVES DRAWING NO. LP1044-F

9.11.2.1 Option Properties

• The Show Alarm Time property is used to indicate whether each alarm should be prefixed with the
time and date at which it occurred. The exact time format to be used is specified on the Time tab.
• The Show End Markers property is used to indicate whether markers should be included in the list to
flag the first and last items, thereby making it easier for the user to know when they are at either end of
the list.
• The Show Numbers property is used to indicate whether the alarm numbers should be included, and if
so, how many digits should be displayed.
• The Sort Alarms By property is used to indicate how the alarms should be ordered in the viewer.
Alarms can be shown oldest first or newest first. Note that the system’s ability to detect the time at
which an alarm becomes active is a function of the communication scan time and the alarm task scan
time.
• The Auto Scroll Timeout is used to define the period after which the cursor will return to the top of the
list, allowing the list to once more scroll automatically to show new alarms. Set the property to zero to
disable the timeout.
• The Colors property group specifies the text colors to be used when showing alarms in different states.
The Active state can either be represented by a single color or by various colors that represent the
alarm priorities. The Use Priority Colors property selects between the two modes. The “No Active
Alarms” message supports a dedicated background color, while the other states always use the back-
ground of the primitive itself.
• The When Inactive property defines the string that is displayed by the primitive when no alarms are
active. This option is typically used to provide localized text when creating multi-lingual applications.

Crimson® 3.1 User Manual 9-154


REVISED 2019-1-15 PRIMITIVE TYPES
DRAWING NO. LP1044-F SYSTEM PRIMITIVES

9.11.2.2 Actions Properties
If the Help button at the bottom of the viewer is enabled via the Format tab, the On Help property on the Actions tab
can be used to define an action to be executed when the button is pressed. While the action is being executed, the
following system variables contain information about the currently selected alarm:
Variable Contents
Data A packed representation of the tag number and alarm number, with the tag
number in the low word and the alarm number in the high word. This variable
exists solely for compatibility with earlier software released.
t The index of the tag associated with the alarm. The tag number for a tag is dis-
played at the top right-hand side of the Editing Pane when a tag is selected,
right next to the Up and Down buttons used to move between tags.
i The array element associated with the alarm if the alarm is sourced from a tag
array, or zero otherwise. As you will recall, arrays can have alarms that are
applied to the first 256 elements of the array, numbered from 0 to 255.
a The alarm number of the alarm, this being 1 for Alarm 1 and 2 for Alarm 2.

9.11.2.3 Time Properties
The Time tab defines the format to be used when indicating the time and date at which an alarm occurred. Refer to
the chapter on Using Formats for detailed information.

9.11.2.4 Color Properties
The Priority Colors tab defines the colors to be applied to each alarm priority. This feature will only be enabled if the
Use Priority Colors property has be selected on the Options tab.

9.11.3 The Alarm Ticker
The Alarm Ticker is used to display a scrolling summary of the active alarms in the system. It is typically placed
along the bottom edge of the display page, perhaps on a master slide so that it will always be visible.

9.11.3.1 Options Properties

• The Show Alarm Count property controls whether the number of active alarms should be displayed as
part of the ticker.
 

9-155 Crimson® 3.1 User Manual


PRIMITIVE TYPES REVISED 2019-1-15
SYSTEM PRIMITIVES DRAWING NO. LP1044-F

• The Show Alarm Time property controls whether the activation time of each alarm should be displayed
as the ticker scrolls through the alarms.
• The Colors property group specifies the text colors to be used when showing alarms in different states.
The Active state can either be represented by a single color or by various colors that represent the
alarm priorities. The Use Priority Colors property selects between the two modes.
• The Show No Active Alarms Text property is used to configure whether the primitive will display a mes-
sage when there are no active alarms present in the system, or whether an empty bar will be displayed
instead.
• The No Active Alarms Text property is used to configure the text to be displayed when no active alarms
are present in the database. It can be translated to ensure that appropriate versions are available in
each language.
• The Enable Blinking and Blink Accepted Alarms properties control whether active alarms will blink
when they are displayed, and whether this blinking will also be extended to active alarms that have
been accepted. The Blink Rate property controls how quickly this blinking will occur.
• The Alarm Transition property controls how long Crimson will display each alarm before moving on to
the next alarm in the active list. The default value of two seconds is reasonable for most applications.
Note that it is common to add an action to the alarm ticker to allow the user to switch to a page that shows the full
alarm viewer. Alternatively, a popup page may be used to achieve the same result. Refer to the previous chapter
for information on adding actions.

9.11.4 The Event Viewer
The Event Viewer is used to view and optionally clear the events logged by the system in response to alarms or
events generated by data tags.

9.11.4.1 Options Properties

• The Show Event Time property is used to indicate whether each event should be prefixed with the time
and date at which it occurred. The exact time format to be used is specified on the Time tab.
• The Show End Markers property is used to indicate whether markers should be included in the list to
flag the first and last items, thereby making it easier for the user to know when they are at either end of
the list.

Crimson® 3.1 User Manual 9-156


REVISED 2019-1-15 PRIMITIVE TYPES
DRAWING NO. LP1044-F SYSTEM PRIMITIVES

• The Show Numbers property is used to indicate whether the event numbers should be included, and if
so, how many digits should be displayed.
• The Show Event Type property is used to indicate whether each entry should be marked to indicate
whether it is an alarm occurrence, acceptance or clearance, or whether it represents a simple event. If
alarms are in use, failing to enable this setting can produce rather confusing displays.
• The Auto Scroll Timeout is used to define the period after which the cursor will return to the top of the
list, allowing the list to once more scroll automatically to show new events. Set the property to zero to
disable the timeout.
• The When Empty property defines the string that is displayed by the primitive when no events are
present in the log. This option is typically used to provide localized text when creating multi-lingual
applications.

9.11.4.2 Enables Properties
If the Clear button at the bottom of the viewer is enabled via the Format tab, the Enable Clear property is used to
enable or disable the clearing of the event log.

9.11.4.3 Time Properties
The Time tab specifies the format to be used when indicating the time and date at which an event occurred. Refer
to the chapter on Using Formats for more details.

9.11.5 File Viewer
The File Viewer is used to allow the user to view text files on the memory card.

9.11.5.1 Options Properties

• The Root Directory property specifies the directory to be displayed.


• The Line Numbers property is used to show or hide line numbers on the file.
• The Sort Order property is used to indicate how files should be accessed.

9-157 Crimson® 3.1 User Manual


PRIMITIVE TYPES REVISED 2019-1-15
SYSTEM PRIMITIVES DRAWING NO. LP1044-F

• The File Types property group is used indicate the types of file that should be made available for view-
ing. Note that only text files can be displayed.
• The Messages property group defines and perhaps translates various messages used by the file
viewer.

9.11.6 User Manager
The User Manager is used to allow the changing of passwords at runtime:

Its core properties are contained on a single tab, and all are conventional.

9.11.7 Trend Viewer
The trend viewer allows the display of information from the Data Logger.

9.11.7.1 Options Properties

Crimson® 3.1 User Manual 9-158


REVISED 2019-1-15 PRIMITIVE TYPES
DRAWING NO. LP1044-F SYSTEM PRIMITIVES

• The Data Log property selects the data log to be displayed.


• The Data Display property is used to select the display mode. Trend Lines will display the log contents
as lines plotted against time while Trend Lines with Fill will also fill the area below the lines. The fills
are drawn before the trend lines, such that the lines will be visible on top of the filled areas.
• The View Width property is used to indicate the initial amount of data to be shown across the window.
The user can subsequently zoom in and out using the buttons at the bottom of the viewer.
• The Pen Weight property is used to define the thickness of the lines to be drawn by the viewer. The
weights are nominally in quarter pixel increments, with a weight of four representing a single pixel.
Fraction widths are implemented using standard anti-aliasing techniques.
• The Pen Mask property is used to provide a 32-bit integer value to selectively enable or disable the
trend line for specific channels. Bit 0 corresponds to the first channel of the data log, bit 1 to the second
and so on. A bit value of one shows the channel while a value of zero hides it. A blank entry provides
the default behavior, with all channels being displayed.
• The Fill Mask property is used to provide a 32-bit integer value to selectively enable or disable the
below-the-line fill for specific channels. Bit 0 corresponds to the first channel of the data log, bit 1 to the
second and so on. A bit value of one shows the channel while a value of zero hides it. A blank entry
provides the default behavior, with all channels being displayed.
• The Show Values property enables or disables the display of the data values associated with each
channel of the data log, either during live mode or when scrolling back and forth using the cursor.
• The Show Cursor property is used to enable or disable the display of a cursor on the viewer. The cur-
sor can be activated by the user to allow a specific point in time to be precisely determined, and option-
ally to allow the associated historical data values to be displayed.
• The Time Axis property defines whether gridlines should be displayed for the time axis. The pitch of
the gridlines is automatically determined by Crimson based on the amount of time covered by the
viewer.
• The Data Axis property is used to control the display of gridlines for the data axis. Gridlines may be
defined manually by specifying either just major divisions or both major and minor divisions, or may be
defined automatically by specifying minimum and maximum values for the data axis and letting
Crimson calculate the best gridline pattern.
• The Major Divisions and Minor Divisions properties define the number of divisions to be drawn when
using manually-defined gridlines.
• The Minimum and Maximum properties are used to indicate the range of data to be displayed when
using automatic gridlines. Crimson will use these values to determine the best gridline pattern to
adopt. Data values will also be scaled to these values, as opposed to being scaled to their own data
limits.
• The Limit Values property specifies how the top and bottom values of the scale are determined. If a
setting of Precise is specified, the Minimum and Maximum values will be used exactly, even if this pro-
duces limits that do not exactly correspond to the automatically selected tick spacing. This can pro-
duce irregular gridline spacing. A setting of Rounded allows the scale primitive to adjust the limits to
achieve regularly spaced tick marks.

9.11.7.2 Format Properties
These properties are used to specify colors and fonts. Their operation is conventional.

9.11.7.3 Buttons Properties
These properties are used to edit and optionally translate the various button labels.

9-159 Crimson® 3.1 User Manual


PRIMITIVE TYPES REVISED 2019-1-15
SYSTEM PRIMITIVES DRAWING NO. LP1044-F

9.11.7.4 Time Properties
The Time tab is used to format the time used when providing time and date information relating to the data log.
Refer to the chapter on Using Formats for detailed information.

9.11.7.5 Pen Properties

These properties are used to specify sixteen colors that will be used for drawing the trend lines. The colors are
used cyclically, such that the seventeenth channel will return to the color of the first. Note that drawing so many
channels can produce a confusing display.

9.11.7.6 Fill Properties

Crimson® 3.1 User Manual 9-160


REVISED 2019-1-15 PRIMITIVE TYPES
DRAWING NO. LP1044-F SYSTEM PRIMITIVES

These properties are used to specify sixteen colors that will be used for filling below the trend lines. The colors are
used cyclically, such that the seventeenth channel will return to the color of the first. Note that drawing so many
channels can produce a confusing display.

9.11.8 Touch Calibration
The Touch Calibration primitive is used to calibrate the touch-screen:

Its primitive-specific properties define the actions to be taken when calibration has either succeeded or failed.
These properties are typically configured to return to a menu screen or to otherwise move away from the
calibration page.

9.11.9 Touch Tester
The Touch Tester primitive allows the user to check the touch-screen performance and calibration. Each touch
produces a dot on the screen, with a trail being displayed of the last so-many touches. It has no configurable
properties beyond visibility control.

9.11.10 PDF Viewer
The PDF Viewer primitive is used to display a PDF file stored on the unit’s memory card.

9.11.10.1 Option Properties

9-161 Crimson® 3.1 User Manual


PRIMITIVE TYPES REVISED 2019-1-15
SYSTEM PRIMITIVES DRAWING NO. LP1044-F

• The File Name property is used to specify which PDF file to display. The PDF file must be stored on
the unit’s memory card in a directory named pdf.
• The Cannot Load property defines the text that is displayed when the named file cannot be loaded,
either because it is not present or because it contains errors.
• The Working property defines the text that is displayed when a file is being loaded and processed for
display.

9.11.11 Camera
The camera primitive is used to allow video from a remote camera to be displayed page.

9.11.11.1 Option Properties

• The Comms Device sets the source of the video to be displayed in the given primitive. A device must
already be mapped to a communications port before this selection can be made.
• Scale is used to change the image size coming from the source. Scaling is drive dependent and might
not be supported by all camera types.

9.11.11.2 Figure Properties
The Figure properties are used to control the primitive appearance and are conventional.

Crimson® 3.1 User Manual 9-162


REVISED 2019-1-15 PRIMITIVE TYPES
DRAWING NO. LP1044-F LEGACY PRIMITIVES

9.12 Legacy Primitives
These primitives are provided for compatibility with Crimson 2.0 and Crimson 3.0. Most of the primitives are
analogous to the newer primitives described above, except that they do not use Crimson 3.1’s enhanced graphics
engine to create a smoother appearance, and they do not support richer fill and edge properties. Except for the
vertical scale primitive, they will not be described in detail here. Where the behavior of the primitive is not intuitive
or conventional, you are referred to earlier software manuals.

9.12.1 Scale Primitive

The scale primitive is used to draw a vertical scale. The limits of the scale can be defined as constants, or can be
varied per the value of specific expressions. The scale can be labeled or unlabeled, with any labels being based
upon a specified format object which may optionally be obtained from a tag. The scale is designed to operate in the
same way as the scatter graph referred to earlier in this chapter, and can therefore be used to label such a graph.

9.12.1.1 Data Properties

• The Value property defines an optional tag that will be used to obtain limits and format information for
the scale. The value itself is not actually used by the primitive, but the tag is used as a source for other
pieces of information.
• The Get From Tag properties are used to indicate whether a tag selected in the Value property should
be used as a source for the data in question.
• The Show Labels property is used to show or hide the numeric scale labels.
• The Show Units property is used to show or hide the units defined by a numeric data format. The units
may be appended to each scale label, or may be drawn vertically by the edge of the scale.
• The Limit Values property specifies how the top and bottom values of the scale are determined. If a
setting of Precise is specified, the limit values will be used exactly, even if this produces limits that do
not exactly correspond to the automatically selected tick spacing. This can produce irregular scale
labels but will ensure that a tank fill placed next to the scale and bound to the same tag will be drawn

9-163 Crimson® 3.1 User Manual


PRIMITIVE TYPES REVISED 2019-1-15
LEGACY PRIMITIVES DRAWING NO. LP1044-F

exactly as required. A setting of Rounded allows the scale primitive to automatically adjust the limits to
achieve more regular tick marks.
• The Limit Positions property specifies how the limits of the scale relate to the unit labels. A setting of
Aligned keeps the tick marks and the labels aligned precisely, at the cost of moving the outer tick
marks inwards from the edge of the primitive. Choosing a setting of Shifted moves the outer two labels
relative to the tick marks, but allows the minimum and maximum ticks to line up with the edge of the
primitive, making it easier to align with, say, a tank fill.

9.12.1.2 Figure Properties

The properties on this page define the colors and fonts used for the scale. Refer to the previous chapter for details
of the standard properties. The Label Shift property can be used to move the labels up or down relative to the tick
marks, producing more attractive results when working with fonts with spacing above or below the character
glyphs.

9.12.1.3 Limit Properties

The properties on this page are used to set the minimum and maximum values to be shown by the scale.
Expressions may be specified, in which case Crimson will dynamically update the scale at runtime, choosing tick
marks and label positions appropriate to the new values. These settings are not available if a tag has been chosen
as the source of the limit values.
 

Crimson® 3.1 User Manual 9-164


REVISED 2019-1-15 PRIMITIVE TYPES
DRAWING NO. LP1044-F LEGACY PRIMITIVES

9.12.1.4 Format Properties

The Format Type field specifies the format type to be used when drawing the labels. Only general or numeric
formats are supported. The selection may not be available if the format is being obtained from a tag. Refer to the
section on Using Formats for details of the various other properties that are displayed when a numeric data format
is selected.

9-165 Crimson® 3.1 User Manual


REVISED 2019-1-15 LOCALIZATION
DRAWING NO. LP1044-F SELECTING LANGUAGES

Chapter 10 Localization

Crimson supports several features that allow you to adapt your database for deployment in multilingual
environments. This chapter describes how these features are used, and how you can easily create databases that
can be used across the world.

10.1 Selecting Languages
The first stage in creating a multilingual database is to configure the languages to be used within your project.
Pressing the Configure Translation button on the Global page of the user interface properties displays the following
dialog box:

The top section defines global settings for the translation process:
• The Method property specifies how translation is to be performed, and is described in more detail in
the following section.
• The Service property selects from several supported translation services that Crimson will access to
perform auto-translation.
• The Apply Languages Globally property instructs Crimson to apply the currently selected language to
all operations that use translatable text. As an illustration, consider a multi-state tag with translated
state names that is subject to data logging. If this property is checked, the tag’s state will be recorded
in the log using the currently selected language. If the property is unchecked, the default system lan-
guage will be used no matter which UI language is selected.
• The Localize Separators property instructs Crimson to replace the comma in comma separated vari-
ables (CSV) files with a localized version. This is typically a semicolon for languages that use the
comma as a decimal separator.

Crimson® 3.1 User Manual 10-166


LOCALIZATION REVISED 2019-1-15
CONFIGURING AUTO-TRANSLATION DRAWING NO. LP1044-F

The bottom section of the dialog box defines various properties for each language:
• The Language property is used to select the required language. A language may exist in several varia-
tions according to the different countries in which it is spoken. The Generic setting may be used for
languages that are not directly supported within Crimson.
• The Code property is used to display or enter the two-character code for the language that has been
selected. This property will be passed to the web translation services during automatic translation, and
will be used to define the header row in a lexicon file. You must enter the code manually for Generic
languages of which Crimson has no prior knowledge.
• The Numeric Format property is used to define whether Crimson will format numbers using US format
or using a format specific to the current language selection. Numeric formatting options include the use
of commas versus decimal points, and the placement of digit grouping characters.
• The Diacritical Marks property is used to override a language’s default setting for the treatment of
accents on upper case characters. For example, French as used in France (as opposed to Canada)
applies accents to upper case characters, which can make these characters harder to render in some
fonts. Selecting Lower Case Only for this setting will override this default behavior.
• The Switch Keyboard property is used to select the circumstances in which the Crimson configuration
software will switch the keyboard layout to that used by the language. The switching can occur when
using the translation dialog box, whenever text is being edited in this language, or not at all. Keyboard
switching in the translation dialog is enabled by default for languages such as Simplified Chinese,
thereby ensuring that the appropriate Input Method Editor is invoked.

10.2 Configuring Auto‐Translation
Crimson contains powerful auto-translation features to help you adapt your database for international deployment.
The translation process uses two components, namely a system lexicon and a web-based translation service.
The system lexicon is a Unicode text file that contains many standard words and phrases that are used in industrial
automation and process control, together with translations in each of a number of common languages. This lexicon
can be consulted during the translation process, allowing some text to be translated very quickly and with a high
degree of accuracy.
The web-based portion uses one of two services. Google WebAPIs typically provides faster translations, as it is not
subject to bandwidth restrictions. In contrast, Microsoft Translator provides slightly more accurate translations, but
is not as quick as there is a limit on the number of submissions that can be made per minute. You can select either
service from the Configure Translation dialog pictured above.
Auto-translation can be configured to use either or both of these methods. If you have an Internet connection, it is
generally better to use first the lexicon and then the web-based service. The lexicon can be used alone in some
circumstances to avoid the questionable translations that the web-based services can sometimes provide.
Note that text boxes will not accept more than 1,000 characters. If an English string is close to this limit, its
translations may be too long and will not be accepted by Crimson. Long translations should be reviewed after auto-
translation to assure they completed correctly.

10-167 Crimson® 3.1 User Manual


REVISED 2019-1-15 LOCALIZATION
DRAWING NO. LP1044-F TRANSLATING YOUR DATABASE

10.3 Translating Your Database
Database translation can be accomplished in a number of ways, as described in the remainder of this section.

10.3.1 Entering Translations
Manual translation is performed by pressing the Translate button next to each translatable string in the database. A
dialog will be displayed, allowing translated text to be entered, or allowing auto-translation to be invoked for this
string alone:

This kind of per-string auto-translation allows you to review the translations for accuracy.

10.3.2 Global Auto‐Translation
The Utilities submenu on the File menu contains a command to apply auto-translation to every string in the
database. This command may take some time to execute, especially if a bandwidth limited translation service is
used. Some care should be taken when using global auto-translation, as strings that are not in the system lexicon
may be subject to erroneous translation if they contain technical terms or industry-specific jargon.

10.3.3 Exporting and Importing
The Utilities submenu also contains commands to export and import text files containing all the translatable text in
the database. These files can be edited using an application such as Microsoft Excel, allowing translations to be
entered manually. This facility is particularly useful when working with a third-party translation service. The file
format includes several columns that indicate the source of each string, allowing distinct occurrences of a given
string to be translated into different text according to context.

Crimson® 3.1 User Manual 10-168


LOCALIZATION REVISED 2019-1-15
PREVIEWING TRANSLATIONS DRAWING NO. LP1044-F

10.3.4 Applying a Lexicon
In addition to the system lexicon described above, you may create your own lexicons, either from scratch or by
using Export Lexicon command in the Utilities submenu. Lexicon files are Unicode text files that start with a header
row containing tab-separated language codes, as used in the Code properties defined in the Configure Translation
dialog box. After the header row, each row contains a word or phrase in each of the defined languages.
A sample lexicon file is shown below:

en fr de
one un eins
two deux zwei
three trois drie

Note that text should be entered in lower case unless a specific term is only ever used in upper case, such as might
be the case with a German noun. The use of lower case allows Crimson to form its own upper case and title case
variants.

10.4 Previewing Translations
Translations can be previewed within the graphics editor by selecting the appropriate language from the drop-down
menu that is accessed via the flag icon in the toolbar. Any direct editing of text will also apply to the currently
selected language, with the other languages being left unchanged. Editing within dialog boxes continues to be
restricted to the default language, with the other languages accessed via the Translate button.

10.5 Switching Languages
The language used by the target device is controlled via calls to the SetLanguage() function, with the argument of
the function being a number between 0 and 19 to select the required option. For example, a call to
SetLanguage(1) in the example above will select French, while a custom action of SetLanguage(2) will select
German. The GetLanguage() function can be used to determine the current language.

10-169 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING WIDGETS
DRAWING NO. LP1044-F CREATING A WIDGET

Chapter 11 Using Widgets

Crimson® 3.1 supports a powerful new feature, namely the ability to turn ordinary groups of primitives into powerful
entities called widgets. In addition to its component primitives, a widget contains user-definable data items that can
be edited at the group level but referenced by the widget’s components. This chapter explains how to use widgets.

11.1 Creating a Widget
The easiest way to understand widgets is to create one. Let’s start by creating an empty database and adding four
numeric tags. Leave the tag properties at their default settings, resulting in four internal integer values named Tag1
through Tag4.

Switch to the Display Pages section and add two data box primitives to the page:

Leave their properties at their default values for now, and select both items. Right-click on the selection, and select
the wonderfully-named Widgetize command from the context menu. The items will be bound into a group, but the
following dialog box will also appear:

Crimson® 3.1 User Manual 11-170


USING WIDGETS REVISED 2019-1-15
CREATING A WIDGET DRAWING NO. LP1044-F

Once the widget has been created, this dialog box will be used to edit the widget’s data items, but for now we have
nothing defined. Click on the Edit button in the Definitions section to allow us to define some data items:

Clicking on the Edit button next to Count field will let us create two properties:

Complete the data fields as shown above, paying attention to get the data type right, and to modify the Flags fields
to indicate that each data item should be a tag. (The flags field can be edited using the Edit button next to the
property.) Press OK to close the dialog box, and note how the widget itself now displays data items in its own
properties dialog:

Ignore these for now, and press OK to close this dialog, too.

11-171 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING WIDGETS
DRAWING NO. LP1044-F CREATING A WIDGET

The widget should still be selected in the graphic editor, so click on one of the data boxes contained in the widget to
enter group editing mode. Remember, the green rectangle marks the group that we’re editing, and the red
rectangle shows the selected item in that group:

Double-click on the data box to bring up its properties:

Enter Data1 in the Value field, and note the results.


Crimson accepts this as a tag name, even though we don’t actually have a tag called Data1 in our database. This
value is actually equal to one of the data items defined within the widget, and will represent whatever tag we assign
when we go back and edit the widget data. (The value of 25 shown in the preview window is the default value used
for widget data items that are not mapped to anything.) Since Data1 is marked a tag, we can access its properties,
use it as a source of formatting, or do anything else that we would do with a tag.
Repeat this step for the second data box, this time setting its Value property to Data2.

Crimson® 3.1 User Manual 11-172


USING WIDGETS REVISED 2019-1-15
CREATING A WIDGET DRAWING NO. LP1044-F

Press ESC until you have the widget alone selected. If you go too far and clear the selection, just click on the widget
itself, ensuring that it has a red rectangle round it:

Now bring up the widget properties, and this time enter values for the data items:

Enter the values shown above, setting the data items to Tag1 and Tag2 respectively. Note how the preview now
shows values of zero, as the data boxes within the widget are now getting their data from Tag1 and Tag2
respectively. To make things a bit more interesting, right-click on the widget and access the Jump menu:

Select Tag1 to jump to that tag, and enter a value of 1234 in the Simulate As property. Use the ALT+LEFT key
combination or the Back button on the toolbar, and note how the widget is continuing to track the tag data:

Next, grab the right handle and make the widget a little wider:

11-173 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING WIDGETS
DRAWING NO. LP1044-F CREATING A WIDGET

Left-click on the upper of the two data boxes to enter group editing mode, and then right-click on the same box to
access its context menu:

Select the Data submenu, and choose the Label and Data command to configure this data box to display the tag’s
label as well as its value. Note the new appearance of the widget:

As you can see, the data box is displaying the label from Tag1, indicating that the value of Data1 that we entered
into the data box’s Value property is entirely equivalent to the tag to which the data item was subsequently
configured. We refer to the process of setting a widget item to a tag as binding that data item to that tag. Binding
can be performed in more complex ways, as we shall see later.

11.1.1 Summary
Let us now recap what we did:
• We placed primitives on the display and grouped them into a special kind of group called a widget. The
widget appeared to behave like a normal group in terms of editing and so on, but had additional prop-
erties.
• We edited the data definitions for the widget, creating two data items. Each was given a name, a
description, a data type and a number of flags.
• We used group editing to edit the contents of the widget, setting their properties to the widget’s own
data items, and referring to them by the data item names.
• We modified the widget’s data items, binding them to tags, thereby providing real tags and their asso-
ciated information to the contents of our widget.

11.1.2 Why This Matters
So why are widgets important? We could easily have created the data boxes and bound them directly to the tags,
so why bother with these extra steps? The answers become obvious when you try to create more complex widgets:
• Widgets allow data items be used in several places, with multiple elements in the widget being depen-
dent on the same tag without your having to select the tag name in multiple places.

Crimson® 3.1 User Manual 11-174


USING WIDGETS REVISED 2019-1-15
WIDGET DATA DEFINITIONS DRAWING NO. LP1044-F

• Widgets can encapsulate complex design and functionality, and allow you to replicate and reuse this
across or within databases. In effect, they allow complex primitives to be created by the user.
• Widgets can be saved to disk and be added to the Resource Pane, or distributed via email, thereby
allowing easier cooperation between Crimson users or between users and Tech Support.

11.1.3 Down to Details
The next section revisits most of the topics above, but in more detail.
They also explore some of the magic that can be used to make widgets even more powerful.

11.2 Widget Data Definitions
The features that give widgets their power is their data items. The data definition of a widget is edited by opening
the widget’s properties and by clicking on the Edit button in the Definitions section of the Data page:

• The Extent property defines how many data items are required for this widget. This value can be
changed at any time, but making it smaller will result in data items and their values being lost. Up to
eighty data items may be defined.
• The Name property of each data item is used to refer to that item from primitives contained within the
widget. It must therefore meet all the requirements of a tag name. It must contain no spaces or punctu-
ation, and it must start with a letter.
• The Description property for each data item is used to provide a more friendly version of the name, this
time for display in the data item editing dialog. No restrictions are placed on the contents of this field.
• The Data Type property for each item defines the required data type. The way in which the data item is
displayed in the widget’s property dialog will depend on the setting that is selected. The real, integer
and string data types correspond to expression values, while the color, page and action data types
allow more complex items to be created. Page and action items can be treated as display page names
and programs from within the widget’s primitives.

11-175 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING WIDGETS
DRAWING NO. LP1044-F FILING WIDGETS

• The Flags property for each data item is used to modify items that have data types of real, integer or
string. It supports the following settings:

Setting Description
Tag The value entered for the data item must be a tag.
The primitives within the widget can treat the data
item as a tag, and access its properties, data format
and so on.
Writable The value entered for the data item must writable.
The primitives within the widget are similarly allowed
to write to the data item.
Array The value entered for the data item must be the
name of an array. The primitives within the widget will
see the data item as an array, and must use the
index operator to access individual values.
Element The value entered for the data item must be an array
element. The primitives within the widget will see the
data item as an element, and will be able to pass it to
functions that require arguments of this type.
No Bind Crimson will not apply folder binding to this property,
allowing it to be used to store predefined values with-
out errors being generated on binding. See later sec-
tions for details of folder binding.

• The Binding property group is used to control an advanced feature known as folder binding. It is dis-
cussed in detail below.
• The Details property group is used to control an advanced feature known as details page creation. It is
discussed in detail below.

11.3 Filing Widgets
Each widget has a Filing tab in its property dialog:

The Description and Category properties are used to control how a widget will be displayed on the Resource Pane
after it is saved. All widgets of the same category will be grouped together in the same subcategory on the
Primitives category, and the widget description will be displayed when the user hovers over an item.

Crimson® 3.1 User Manual 11-176


USING WIDGETS REVISED 2019-1-15
FOLDER BINDING DRAWING NO. LP1044-F

To save a widget, simply select it, and choose Save Widget from the Edit menu or press the CTRL+Q key combination.
A standard Save dialog will open, allowing you to save the widget as a wid file in the Crimson widget directory:

The Resource Pane will update automatically whenever a widget file is added to this directory. This will occur
whether the change is made via Crimson or by simply dropping a wid file in the directory via Windows Explorer.
Note that widget files are stand-alone, and can be transferred between Crimson installations on different machines.
This provides a powerful mechanism for sharing user interface elements, or for exchanging items with other
engineers when multiple individuals are working on a project.

11.4 Folder Binding
Crimson’s ability to organize tags in folders allows a kind of object-oriented design whereby tags that represent the
properties of an object can be grouped together in a folder that represents the object itself. Consider the example
below:

Here, a folder has been created to represent a PID loop, and tags have been created to refer to the loop’s process
value and setpoint. The tags are referred to in code as Loop.PV and Loop.SP, using the standard Crimson rules
for using nested items.

11-177 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING WIDGETS
DRAWING NO. LP1044-F FOLDER BINDING

Folder binding allows you to create a widget that mirrors that object and property structure that you have created in
your tags. Consider the following data definition:

Here we have created data items whose names match the names of the tags that make up a PID loop. We have
provided human-readable names for them, and we have flagged both data items as being tags. We have also
defined the setpoint to be writable. Note at this time that a new property called Bind To has appeared for each data
item—we shall return to this during a discussion of advanced folder binding.
In the binding section, we have enabled folder binding. This indicates that we want Crimson to support the
automatic binding of all the data items to tags from a single source folder. After we save these changes and select
the widget’s context menu, we will notice a new command called Bind Widget that allows the binding operation to
be performed.
Selecting the command or pressing CTRL+B displays the following dialog box:

If we drag the Loop folder from the Resource Pane and drop it on the target, the widget’s data items will be
automatically bound to the corresponding tags in the folder.
Opening the widget’s properties shows the results:

Crimson® 3.1 User Manual 11-178


USING WIDGETS REVISED 2019-1-15
ADVANCED BINDING DRAWING NO. LP1044-F

In other words, each data item has been bound to the tag within the selected folder that has a name equal to its
own data item name. Think for a second about how powerful this is: You can define multiple properties and bind
them in a single operation, reducing design time and allowing better reuse of previously designed items.

11.5 Advanced Binding
Folder binding supports a number of advanced options.

11.5.1 Class Matching
The first and simplest is the Required Folder Class setting in the widget’s properties. This can be used to restrict
the folders that will be accepted during binding, therefore avoiding mismatches between what amount to different
object types. The specified class on the widget must match the class on the folder that is being bound, or an error
will result.

11.5.2 Binding Prefixes
The Binding Prefix property can be used when nesting widgets to allow the child widgets to be bound to sub-folders
of the folder to which the parent widget is bound. For example, suppose you create a dual-loop widget that is to be
bound to a folder that contains two PID folders named Loop1 and Loop2. By setting each of the child widget’s
binding prefix to one of the loop names, you can ensure that they are bound to different child folders of the folder
that is dragged on to the parent widget. For example, if the first child widget has a binding prefix of Loop1 and its
parent is bound to a folder called Dual, the child widget’s properties will be bound to expressions of
Dual.Loop1.PV and Dual.Loop1.SP.

11.5.3 Using Bind To
The Bind To property of a data item can be used to modify the expression to which that data item is bound. The
simplest option is to enter a name distinct from the name of the data item, in which case that name will be used for
selecting the tag to which to bind.

11.5.3.1 Using Periods
You may also enter a name that contains periods. These select tags in child folders of the source folder. For
example, entering Remote.SP will result in the data item in question being bound to an expression of
Loop.Remote.SP upon binding to the Loop folder.

11.5.3.2 Using Carets
To ascend the folder tree, you may prefix the name with caret characters, each of which moves up one level. A data
item with a Bind To setting of ^Name in a widget that is bound to a Dual.Loop will itself be bound to the expression
of Dual.Name.

11-179 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING WIDGETS
DRAWING NO. LP1044-F DETAILS WIDGETS

11.5.3.3 Special Name
You may also use one of a number of special Bind To names:

Name Result
::Path The full path of the tag to which this widget was
bound, including any parent folders.
::Name The name of the tag to which this widget was bound,
excluding any parent folders.
::TopPath The full path of the tag to which the root widget was
bound in a nested binding operation. Equivalent to
::Path for non-nested binding.
::TopName The name of the tag to which the root widget was
bound in a nested binding operation. Equivalent to
::Name for non-nested binding.

Note that each of these special names evaluates to a string constant equal to the required name and not to the
actual tag itself. They are typically used to provide information to the user regarding the folder to which a widget or
its root widget have been bound.

11.6 Details Widgets
Suppose you have created a PID widget, but want to display more detailed status information when the user
presses a button in that widget. The easy answer is to create a more and perhaps larger complex widget that you
would then bind to the same loop. You would place this widget on another page, and then select that page from the
original overview widget, perhaps using a data item to tell the widget which page to use.
Well, Details Widget creation performs all these steps automatically!

11.6.1 Enabling Details Creation
This feature is controlled via the Details Creation property of the widget’s data definition:

The Details Widget property is used to provide a comma-separated list of the one or more details widgets that you
would like to place on their own pages. Each widget is specified by giving the filename to which it was saved. In the
example above, we have one details widget to be extracted from a file called PIDDetails.wid in the Crimson
widgets directory.

Crimson® 3.1 User Manual 11-180


USING WIDGETS REVISED 2019-1-15
DETAILS WIDGETS DRAWING NO. LP1044-F

11.6.2 Defining Data Items
We must also provide data items in the overview widget so that we can access the names of the pages that are
created for the details widgets. These properties must be named Details1, Details2 and so on, with one data
item for each element in the Details Widgets list. Each data item must be the Page data type. In the example below,
we have created a single such property to hold the page name of our single details page:

11.6.3 Results of Binding
When we bind the overview widget to our PID loop, a new page is created to hold the details widget. The name of
the new page is based on the name of our page containing the overview widget, but with a “Zoom” suffix and a
number chosen to make the name unique.
This page is placed in the Navigation List below the current page:

The details created on this page are bound to our loop:

11-181 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING WIDGETS
DRAWING NO. LP1044-F DETAILS WIDGETS

And the properties of our overview widget are modified as follows:

We can easily define a button within our overview widget, and have this button invoke an action of
ShowPopup(Details1) thereby displaying the associated details widget. The details widget itself can close the
popup by calling HidePopup().

11.6.4 Multiple Details Pages
If multiple details pages are created, you will recall that data items called Details1, Detail2 and so on in the
overview widget will hold the names of those pages. These data items can also be defined on the details widgets,
and will also be set to the names of the pages that have been created. This is useful if you want to allow the first
details page to navigate to the second and so on, thereby linking the pages together. Details widgets can also
define a special data item called DetailsP which will be set equal to the page that holds the overview widget. This
can be used to return to the overview—something that cannot be achieved via a simple GotoPrevious() when
multiple details pages are provided.

Crimson® 3.1 User Manual 11-182


REVISED 2019-1-15 USING THE DATA LOGGER
DRAWING NO. LP1044-F CREATING DATA LOGS

Chapter 12 Using the Data Logger

Now that you have configured the core of your application, you may decide to make use of Crimson® 3.1’s data
logger to record certain tag values to a memory card. Data recorded in this way is stored in industry-standard
comma separated variable or CSV files, and can easily be imported into applications such as Excel using a variety
of methods. To configure data logging, select the Data Logger category in the Navigation Pane.

12.1 Creating Data Logs
Data logs are created in the Navigation List in the usual way.
Each log has the following properties:

12.1.1 Setup Properties
• The Path Name property allows you to modify the directory in which the log will be saved. By default,
the log is saved in a directory named after the log’s own name. If you rename a log but wish to retain
the associated data, use this property to override the default directory.
• The Update Type property allows the user to choose between Continuous Sample and Triggered
Snapshot data collection.
• The Update Rate property is used to indicate how often Crimson will take a sample of the data items to
be logged. Although a decimal place can be entered, sampling is only accurate to 200ms. The fastest
sample rate is one second, but note that using such a high rate will produce very large amounts of
data. All of the tags in the log will be sampled at the same rate.
• The Each File Holds property is used in conjunction with the Update Rate property to determine how
often a new data file will be created. When in Continuous Sample mode, this is the number of samples
that will be included in each log file. Typically, this value is set such that each log file contains a sensi-
ble amount of data. For example, the log shown above is configured to use a new log file each day.
When in Triggered Snapshot mode, each file will only contain as many samples as were logged as a
result of the given trigger within the time frame between new log files. Each new log file is given a dif-
ferent name.

Crimson® 3.1 User Manual 12-183


USING THE DATA LOGGER REVISED 2019-1-15
CREATING DATA LOGS DRAWING NO. LP1044-F

• The Retain At Most property is used to indicate how many log files will be kept on the memory card
before the oldest file is deleted. This property should be set to allow whatever is consuming the logged
information to extract the data from the Crimson device before the information is deleted. The log
shown above is configured to retain a week’s worth of data.
• The Allow Comments property is used to enable or disable the addition of comments to the data log via
the LogComment() function. Refer to the Reference Manual for details of how this function can be
used.
• The Merge Events property is active when the Allow Comments property is set to Yes. The Merge
Events property allows event associated with the logger tags and those in the Monitor List to be
merged into the data log. Such events will still be logged in the events file.
• The Apply Signatures property is used to control the addition of cryptographic signatures to the log.
See below for more information on these signatures and how they can be used to ensure the log integ-
rity is maintained.
• The Include in Batch property is used to include or exclude this log from the batch logging system. See
below for information on how batch logging operates.
• The Log Enable property is used to allow or inhibit logging. If the entered expression is true, logging
will be enabled. If the expression is false, logging will be disabled. If no expression is entered, logging
will be enabled by default.
• The Log Trigger property is active when the Update Type property is set to Triggered Snapshot. The
Log Trigger property is used to set the event that initiates taking a snapshot of current data points.

12.1.2 Contents Properties
• The Contents property is used to indicate which tags should be included in the data log. Tags can be
dragged into the list from the Resource Pane, and moved up and down within the list using standard
drag-and-drop techniques.

12.1.3 Monitor Properties
• The Monitor property is active when both the Allow Comments and Merge Events properties are set to
Yes. The Monitor property is used to select additional tags the associated events of which will be
merged into the data log.

12-184 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING THE DATA LOGGER
DRAWING NO. LP1044-F BATCH LOGGING

12.2 Batch Logging
When you first access the Data Logger, you will notice a global setting to enable or disable batch logging. For
normal data logging operation, the Data Logger will save the log files under the folder name specified for each log.
Batch logging, on the other hand, also saves all logs that are so configured to a directory named after the current
production batch. This allows all the logs related to a particular batch to be accessed and manipulated as a group.
To illustrate this, consider the following directory structure:

This example is taken from a target device that has batch logging enabled and has two data logs configured. The
first data log is set to be included in the batch, while the second one is not. Note that the log files are stored by
default in the directories named LOGS/LOG1 and LOGS/LOG2. Note also, however, that the first log is also being
placed in subdirectories under the BATCH directory. Each subdirectory contains the data sampled between the time
when that batch was started and the time when the batch was ended.

12.2.1 Controlling a Batch
Batch logging is controlled via a number of functions. NewBatch(name) will create a folder called name, ending the
current batch and starting a new one. Files recorded after this command will be saved under the new folder. The
EndBatch() function will stop the current batch, while GetBatch() will return the name of the batch that is currently
active. For more information, please refer to the Reference Manual.

12.3 Digital Signatures
Crimson supports the addition of cryptographic signatures to data, event and security logs, thereby allowing you to
check a log file’s integrity. The signatures will show if the log has been tampered with, or if data has been removed
from the middle of the file. They will also allow you to be sure that a given log file came from the given device.
Enabling signatures adds an extra field to the CSV file to allow the storage of the required data. If you examine
such a file, you will see that every few lines of the file have a large amount of data stored in this additional field.
This data is the digital signature—a value mathematically derived from the data in the proceeding lines in a manner
that makes it impossible to figure out how to keep the signature valid if a change is made to the data.
Signatures can be verified using the SigCheck command-line utility provided with the Crimson software. The utility
will either confirm that the file is valid, or indicate the line at which the validation error occurs. If you want to be
100% sure of a file’s integrity, you should also validate the digital signature applied to the SigCheck utility to ensure
that it is approved Red Lion software and not a modified version that will produce invalid results.
To provide further comfort as to the integrity of the signature process, a Technical Note describing the algorithm in
detail can be obtained from Technical Support. You may also obtain the source code for SigCheck so that you can
independently verify that it correctly validates the signatures applied to the log files.

Crimson® 3.1 User Manual 12-185


USING THE DATA LOGGER REVISED 2019-1-15
LOG FILE STORAGE DRAWING NO. LP1044-F

12.4 Log File Storage
As described above, data logs store their data in a series of files on the target device’s memory card. The files are
placed in the subdirectory specified in the log’s properties, with this directory being stored under a root directory
entry called LOGS.
Log files are named after the time and date at which the log is scheduled to begin. If each file contains an hour or
more of information, the files will be named YYMMDDhh.CSV, where YY represents the year of the file, MM represents
the month, DD represents the date, and hh represents the hour. If each file contains less than one hour of
information, the files will instead be named MMDDhhmm.CSV, with the initial six characters as described above, and
the trailing mm representing the minute at which the log began. These rules ensure that each log file has a unique
name, dependent on the time at which it was created.
The length of each file depends on the Update Rate and Each File Holds properties. For example, with an update
rate of 5 seconds and a number of samples of 360, each file will hold (5 x 360) / 60 = 30 minutes of data, therefore
use the MMDDhhmm.CSV filename format. A new file will be created every 30 minutes, either on the hour or at half-
past the hour.

12.5 The Logging Process
Crimson’s data logger operates using two separate processes. The first samples each data point at the rate
specified by the properties of each log and places the data in a buffer within the RAM of the target device. The
second process executes every two minutes and writes the data from memory to the memory card.
This structure has several advantages:
• Writes to the memory card are guaranteed to begin only on a two-minute boundary—that is, at exactly
2, 4 or 6 minutes past the hour, and so on. This means that if your target device supports hot-swap-
ping, you can wait for the next burst of writes to start, and, when the memory card activity LED ceases
to flicker, you are guaranteed to have at least until the start of the next two minute interval before fur-
ther writes will be attempted. This implies that you can remove the memory card without fear of data
corruption. As long as you insert a new card before four minutes have elapsed, no data will be lost.
• Writes to the card occur at much higher levels of performance, as the system avoids the need to con-
tinually update the card’s file system data structures for every single sample. For logs configured to
sample at very high data rates, the bandwidth of a typical memory card would not allow data to be writ-
ten reliably in the absence of such a buffering process.
Note that because data is not committed to a memory card for up to two minutes, up to this amount of log data may
be lost when the terminal is powered-down. Further, if the target device is powered down while a write is in
progress, the memory card may be corrupted. To ensure that such corruption is not permanent, Crimson uses a
journaling system that caches writes to additional non-volatile memory within the terminal. If the device detects that
a write was interrupted during power-down, the write will be repeated when power is reapplied, thereby reversing
any corruption and repairing the card.
If you want to remove a memory card from a panel performing data logging, you must observe the procedure
described above with respect to the activity LED, and only remove power when the activity has ceased. If you are
not sure if the terminal was powered-down correctly, reapply power, allow the write sequence to complete, and
power down according to the correct procedure. The card can then be removed safely.
Since the gyrations required to remove a memory card are somewhat complex, Crimson provides a variety of other
mechanisms for accessing log files, thereby eliminating the need for such removals. These methods are described
below.

12-186 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING THE DATA LOGGER
DRAWING NO. LP1044-F ACCESSING LOG FILES

12.6 Accessing Log Files
There are five methods of accessing log files:
• You can mount the memory card as a drive on a PC via the process described at the start of this man-
ual. This will allow the logs to be copied via Windows Explorer. This method has some drawbacks in
terms of the amount of load that Windows can put on the memory card when it is first mounted.
• You can use the Web Server that is described in the next chapter. With the web server enabled, log
files can be accessed over a TCP/IP connection, using either a web browser such as Microsoft Internet
Explorer, or by using the automated process implemented by the WebSync utility provided with
Crimson.
• You can use the FTP Server to allow remote clients to connect to the Crimson device and download
the logs. Refer to the Using Services chapter for details.
• You can use the Sync Manager to push the files to an FTP server on a periodic basis. Again, refer to
the Using Services chapter for more details.
• You can enable automatic copying of the log files to a USB memory device by configuring the Memory
Stick option in the Communication category. Refer to the Using Communications chapter of this man-
ual for more details.

Crimson® 3.1 User Manual 12-187


REVISED 2019-1-15 USING THE WEB SERVER
DRAWING NO. LP1044-F SWITCHING VERSIONS

Chapter 13 Using the Web Server

Crimson’s web server can be used to expose various data via TCP/IP connections, using either modems or the
target device’s Ethernet ports. This allows remote access to diagnostic information or to the values recorded by the
Data Logger. The web server is configured by selecting the Web Server category in the Navigation Pane.

13.1 Switching Versions
Note that if you are testing the Crimson 3.1 web server on a device and then switch that device back to Crimson
3.0, you may have to press F5 (or CTRL+F5 or SHIFT+F5, depending on your web browser) to clear your browser’s page
cache and reload the Crimson 3.0 version of the current page. Many pages have different URLs and so are
immune to this issue, but the home page and the remote view page may confuse your browser when switching
versions.

13.2 Web Server Properties
The web server’s properties are accessed from the root entry of the Navigation List.

13.2.1 Control Properties

 
• The Enable Web Server property is used to enable or disable the web server. If the server is enabled,
the panel will wait for incoming requests and then fulfill the requests as required. If the server is dis-
abled, connections to this port will be refused. Remember that for the server to operate, an Ethernet or
modem interface must have been configured via the Communications category.
• The Transport Protocol property is used to select between TCP/IP and HTTP, or TLS and HTTPS. The
latter is more secure, encrypting the data transferred between the server and its clients, and providing
a mechanism for the server’s identity to be validated. TLS-HTTPS demands more effort during config-
uration, however, with a valid server certificate being required to prevent web browsers from complain-
ing about an insecure connection.

Crimson® 3.1 User Manual 13-188


USING THE WEB SERVER REVISED 2019-1-15
WEB SERVER PROPERTIES DRAWING NO. LP1044-F

• The Connect Via Port property specifies the TCP port number on which the web server will listen. Port
80 is the standard port used by the HTTP protocol and port 443 is the standard port for HTTPS. These
settings will most likely suit your application unless some form of port mapping device is in use.
• The HTTP Redirect property is available in HTTPS mode and instructs the web server to redirect any
HTTP requests made to port 80 to the corresponding page on port 443. This allows the web server’s IP
address or host name to be typed straight into a browser without using the https:// prefix, while still
ensuring that the secure version of the website is accessed. Note that while the port used for HTTPS
can be modified via the above setting, HTTP redirect always uses port 80.
• The Server Certificate property group is available in HTTPS mode and indicates how the server should
obtain the certificate used to identify the site. You may provide a certificate in the form of a PFX file and
an associated password, or you may select a certificate from the Windows private certificate store. If
you do not specify a certificate, Crimson’s default server certificate will be used. See the section below
for more information on working with certificates.
• The Identification property group allows you to provide text strings to be used to identify the server.
These can be used to differentiate between several terminals on a network, thereby ensuring that the
correct device is being accessed. The Main Title is shown in the web browser title bar. The Main
Header is shown above the web server’s main menu. The Home Label is shown in the top left-hand
corner of the menu bar included on each webpage.
• The Custom Home Page property is used to override the default home page displayed by the web
server. If this property is enabled, the server will look for a file named default.htm in the WEB
directory of the memory card. A sample home page is included in the WebServer/Samples direc-
tory of the Crimson 3.1 installation. The sample is identical to the default page, except that it
includes tag data and a message that the page has been customized.
• The Custom Logon Page property is used to override the page used by the web server to capture
logon credentials in Form authentication mode. If this property is enabled, the server will look for
a file named logon.htm in the WEB directory of the memory card. A sample logon page is included
in the WebServer/Samples directory of the Crimson 3.1 installation. The sample is identical to the
default page, except for a note that it has been modified.
• The Custom Style Sheet property is used to include a custom CSS file in the standard pages pro-
vided by the web server. All such pages include a stylesheet named /custom/css/custom.css in
their header section. If this property is enabled, references to this file will be mapped to a file
named custom.css in the WEB directory of the memory card. If the property is disabled, any such
references will return an empty file. A custom CSS file can be used to override the appearance of
the standard web server, modifying colors, fonts etc. A sample stylesheet is included in the Web-
Server/Samples directory of the Crimson 3.1 installation. The sample modifies the pages’ back-
ground color.
• The Custom JavaScript property is used to include a custom script in the standard pages pro-
vided by the web server. All such pages include a script named /custom/js/custom.js in their
header section. If this property is enabled, references to this file will be mapped to a file named
custom.js in the WEB directory of the memory card. If the property is disabled, any such refer-
ences will return an empty file. Once a webpage has been loaded, the browser will attempt to run
a JavaScript function called doCustom, allowing your custom script to modify the document model
or to implement any other customizations. A sample script is included in the WebServer/Samples
directory of the Crimson 3.1 installation. The sample uses JQuery and certain predefined anchors
within the webpage structure to add additional menu items. For more details on these anchors,
see the next chapter.

13-189 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING THE WEB SERVER
DRAWING NO. LP1044-F WEB SERVER PROPERTIES

13.2.2 Feature Properties

• The Remote Viewing property is used to enable or disable a facility by which a web browser can be
used to view the current contents of the target device’s display. This facility is very useful when
remotely diagnosing problems that an operator may be having with the operator panel or the machine
it controls.
• The Remote Control property is used to enable or disable a feature whereby the remote viewing facility
is extended to allow a web browser to be used to simulate the pressing of keys or display primitives,
thereby allowing remote control of the panel or the machine it controls. While this feature is extremely
useful, care must be taken to use the various security parameters to prevent tampering.
• The Display Mode property is used to control how the remote view will be rendered in the web browser.
Regular mode will display the view as part of a normal page, complete with a menu bar to allow navi-
gation to other pages. Full Window mode scales the remote view to the entire browser window, adjust-
ing the scale factor if the window is resized. This mode is useful on mobile devices or whenever the
display is too large to view in a regular window. The Bare Display modes show only the device’s dis-
play without any bezel or keys. These modes are optimized for use on the web browsers incorporated
into large-screen TVs.
• The Display Scale property is used to control how the display image is scaled within the web browser.
Most devices scale the display at 1:1, but devices with lower-resolution displays may use 2:1 by
default. This setting can be used to override this behavior and force the scale to 1:1 at all times.
• The Display Depth property is used to control how many colors are used to render the display image.
The default setting of 16 bits supports about 32,000 different colors and results in a good compromise
between performance and fidelity. A setting of 24 bits will produce a completely accurate copy of what
is shown on the device’s display at the cost of using at least 50% more data. (Opportunities for com-
pression are also reduced by using more bits, so the increase is more than would be expected by sim-
ply comparing the bit count.) A setting of 8 bits will use the same palette-based technique employed by
Crimson 3.0, reducing the data usage by at least 50% at the cost of much lower fidelity. This setting is
only recommended for low-bandwidth or metered applications.
• The Data Log Access property is used to enable or disable web access to the files created by the Data
Logger. This facility must be enabled if the web server is to be used by a remote client program to
automatically synchronize data logs.
• The Show Batches property is used to enable or disable the display of batches within the data log sec-
tion. If it is enabled, the user will be able to review the current and previous batch logs in addition to the
current real-time logs.

Crimson® 3.1 User Manual 13-190


USING THE WEB SERVER REVISED 2019-1-15
WEB SERVER PROPERTIES DRAWING NO. LP1044-F

• The Custom Site property is used to enable or disable a facility whereby files stored in the WEB direc-
tory of the memory card can be exposed via the web server. This facility is described further below,
and in even greater detail in the next chapter. Note that the custom home page and logon page can be
implemented without enabling this function.
• The Include in Menu option is used to control whether the custom site is explicitly included in the web
server’s default menu and in the menu bar present on each bar. You may not need to enable this fea-
ture if you have modified the home page or changed the menu structure using JQuery.
• The Root Redirect feature is used to instruct the server to redirect any unresolved references to the
server’s root directory to the WEB directory on the memory card. It is not recommended for new applica-
tions as Red Lion reserves the right to create other root directory entries that may override your selec-
tions.
• The Maximum Wait property is used to specify how long Crimson 3.1 should wait for external commu-
nications data before serving a webpage. This applies only to custom webpages which include tag
data using the embedded text values described in the next chapter. If these data items are not on the
communications scan, Crimson must read them before sending the page. This setting limits the wait
period to ensure that offline data does not adversely impact server performance.
• The various Access Control properties allow a security descriptor to be used to restrict access to each
feature to certain users. The properties are only available if security is enabled and the Crimson 3.1
user database is used for authentication.

13.2.3 Security Properties

• The Authentication property defines how Crimson 3.1 will authenticate users who connect to the web
server. Selecting None will disable all authentication, allowing anonymous access to the server’s
resources. Selecting Form will use an HTML form to allow entry of the user name and password, with
a custom logon page being used if the server is so configured. This method is recommended for
HTTPS connections as it is more attractive, more customizable, and it supports the ability to log off in a
consistent and secure manner. It should not be used over HTTP as it sends the password in plain text.
Selecting HTTP will use HTTP’s own authentication method, which typically results in a popup appear-
ing in the client’s web browser. If this method is selected, the HTTP Method property must be set to
select the precise method that will be used. The Basic method is not recommended with HTTP as
again it sends the password in plain text. HTTP authentication also requires the Realm to be specified.
This is displayed in the browser popup to confirm the site identity.

13-191 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING THE WEB SERVER
DRAWING NO. LP1044-F WEB SERVER PROPERTIES

• The Credentials property group is used to specify how Crimson 3.1 should obtain user name and pass-
word information. The Source setting should typically be left as Security Manager, allowing multiple
users with differing permissions to be created via the Security category of the database. For legacy
databases, it is sometimes necessary to specify a single user by setting the Source to Web Server and
entering the information manually. This facility is also useful during testing when a user needs to be
created quickly. Note that only a setting of Security Manager will allow security to be defined at the
facility and page level.
• The IP Restrictions group is used to restrict web server access to hosts whose IP address matches the
mask and data indicated. All access may be restricted, or the filter may be used to restrict just remote
control and data editing.

13.2.4 Advanced Properties

• The Enable Advanced Settings property enables or disables the other settings on this page. You will
typically not have to adjust any of these settings, except for perhaps using the Port Override when
importing a Crimson 3.0 database that uses an expression as a port number.
• The other settings are documented via balloon help. Do not adjust them unless you are an advanced
user and understand their impact, or have been instructed to do so by Red Lion’s technical support
team. The default settings will be suitable for virtually all applications.

Crimson® 3.1 User Manual 13-192


USING THE WEB SERVER REVISED 2019-1-15
ADDING WEBPAGES DRAWING NO. LP1044-F

13.3 Adding Webpages
In addition to the facilities described above, the web server supports the display of generic webpages, each of
which contains a predefined list of tag values. These pages are created in the Navigation Pane in the usual way.
Each webpage has the following properties:

• The Title property is used to identify the webpage in the menu presented to the user via their web
browser. Although the title is translatable, Crimson 3.1 uses only the US version of the text.
• The Refresh property is used to indicate whether the webpage will be updated with new data as it
arrives. While previous versions refreshed the entire page, Crimson 3.1 uses AJAX to update only the
data values. There is therefore no flicker and no need to specify the update rate.
• The Use Colors property is used to indicate if colors defined by a tag’s coloring should be used when
rendering this page. If enabled, the color shown in the web browser will change depending on the tag
status. Refer to the Using Data Tags chapter for more details.
• The Allow Editing property is used to enable the editing of data tags via this page. If it is enabled, each
data value will have an Edit button displayed, allowing the user to change that value. If the tag has
security settings defined, the user logged on to the web server must have sufficient rights to modify the
tag. The use of authentication is recommended when using this feature.
• The Prefetch Data property is used to indicate whether the tags for this page should always be placed
on the communications scan to minimize any delay when serving the page. If prefetching is disabled,
Crimson 3.1 will read the tags before the page is delivered to the browser, waiting for up until the
period specified by the Maximum Wait property.
• The Hide Page property is used to hide a page from the standard menus presented by the webserver.
It is used to create webpages that can be invoked via the AJAX mechanisms described in the next
chapter to provide your own custom website with real-time tag data. The Access Control and Allow
Editing properties are used to decide whether read or write access will be provided based on the
identity of the currently logged on user.
• The Access Control property allows a security descriptor to be used to restrict access to this page to
certain users. The property is only available if security is enabled and the Crimson 3.1 user database is
used for authentication.
• The Contents property is used to indicate which tags should be included on the page. Tags can be
dragged into the list from the Resource Pane, and moved up and down within the list using standard
drag-and-drop techniques.

13-193 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING THE WEB SERVER
DRAWING NO. LP1044-F WORKING WITH CERTIFICATES

13.4 Working with Certificates
If you know all about certificates, skip to Section 13.4.2.1 to learn the various ways to get a certificate; or to Section
13.4.2.4 to learn how to get up and running quickly.

13.4.1 Introduction
Web servers that use HTTPS are required to provide a certificate that verifies that the server is indeed owned by
the company referenced by its URL. For example, if you access Google via HTTPS, their server will provide your
browser with the following certificate:

The relevant pieces of information to note here are that the certificate is intended to ensure the identity of a remote
computer and that it applies to sites that have *.google.com as their domain address. Your web browser will
compare this name to the address you entered in the address bar and if they match, it will allow you to proceed to
the site.
To ensure the validity of a certificate, it must be signed by another certificate. This certificate must in turn be signed
by another certificate, all the way back to some set of certificates that are trusted by your browser as being issued
by reliable organizations who only hand out certificates to people who have a right to use the associated names.
For example, the Google certificate referred to above has the following certification path:

The certificate upon which your browser is depending is vouched for by the Google Internet Authority, which is
presumably some part of the Google organization that issues certificates to other parts of the company. But your
browser does not really know anything about this Internet Authority and whether it can be trusted it to issue
certificates only to valid Google domains. Instead, it relies on the fact that this certificate has in turn been signed by
GeoTrust, a company in the business of issuing trusted certificates and that is well known for having in place the
procedures necessary to stop anyone other than Google from getting access to a certificate with a name that refers
to a google.com domain. Your browser has GeoTrust’s certificate as one of its so-called trusted roots. This chain of
trust is used to validate that you are indeed talking to Google and not to a hacker trying to steal your identify.

Crimson® 3.1 User Manual 13-194


USING THE WEB SERVER REVISED 2019-1-15
WORKING WITH CERTIFICATES DRAWING NO. LP1044-F

13.4.2 Using Certificates
All of this means that if you are going to use HTTPS, you need to provide a certificate that matches the name that
will be used to access the server, and that this certificate must be traceable back to one of the trusted roots used by
the relevant web browsers. There are several ways of accomplishing this goal. If you are testing and just want a
quick answer, skip straight to Section 13.4.2.4 and you will be able to get up and running much more quickly.
Otherwise, the sections below explore your various options in detail.

13.4.2.1 Obtain a Commercial Certificate
The most correct way of dealing with this issue is to ensure that your target device is accessed via a DNS name
that is part of a domain that your company owns. For example, you may decide to create a DNS entry called
hmi01.hmis.mycom.com that refers to a specific HMI. If your company can prove that it is the owner of the
mycom.com domain, you will be able to get one of several trusted certificate providers to issue a certificate that
either validates this specific name, or perhaps validates any names ending in the hmis.mycom.com suffix. Since
these certificates will be traceable to one of the trusted roots that are installed on just about every device in the
world, the server will be able to be validated by any client. The downside is that you will need to get your IT
department (and, worse, perhaps your legal department) involved and you must pay a fee upon issue and upon
renewal. Commercial certificate providers include GeoTrust, Thawte, GoDaddy and Comodo.

13.4.2.2 Use a Local Certification Authority
If you do not want to bother with a public certificate, it is possible that you will be able to use your company’s own
certification authority or CA. Many companies have an internal CA which issues certificates for servers,
workstations and users within the organization. The certificates are not always traceable back to one of the trusted
root certificates that you would find installed on a regular computer, in which case every PC in the organization will
have been configured to trust the CA’s root certificate. If the web server is only to be accessed via devices that
belong to your company and trust its CA, this method will work well. As before, you must refer to your device via a
DNS name that your organization controls, and you must work with your IT department to get the certificate issued.
No fees will be required.

13.4.2.3 Use a Self‐Signed Certificate
If you do not have access to a public or a private certification authority, you can use what is called a self-signed
certificate. This is a certificate that has no chain of trust and basically attests to its own validity. For a self-signed
certificate to work, the certificate itself must be installed as a trusted root on each device that will access the web
server. Sometimes this means installing it in the operating system’s Trusted Roots store. Other times, it means
adding it to the browser’s own list. This is somewhat painful if you have multiple devices accessing the server, or if
you do not know ahead of time which devices will require access. Self-signed certificates can be generated using
command line tools for Linux or for Windows PowerShell. There are also several websites that will generate a self-
signed certificate for you. Whichever method you use, ensure that the name matches the DNS entry that will be
used to refer to the server, and ensure that the certificate is in PFX format. Crimson 3.1 does not currently accept
certificates in split certificate and key PEM format.

13.4.2.4 Use the Default Certificate
You will have realized by now that all of this is a significant amount of work, especially if you just want to test a web
server for evaluation purposes. Luckily, Crimson 3.1 provides a simpler solution in the form of a default certificate.
If your unit has a local name configured via the Zero Config option on the Network page of the Communications
category, the Crimson 3.1 device will generate a certificate for that name upon startup. If you have not entered a
name, the default name will be used instead. You will recall that this is red-xx-yy-zz.local, where the letter pairs
are replaced with the last half of the unit’s MAC address. This automatic certificate will be signed by the Crimson
Local Root, and so per the chain of trust described above, you must trust this root certificate in order to trust the

13-195 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING THE WEB SERVER
DRAWING NO. LP1044-F WORKING WITH CERTIFICATES

certificates that it is used to sign. You can install the Crimson Local Root certificate by clicking on the link
immediately below the Zero Config settings, displaying the following:

If you want to verify you are installing the correct certificate, the thumbprint should be:
A919C8D1 EF3F11FA E1F21ABE B9A60623 FFCC122D
Once the Crimson Local Root is installed, you may refer to your unit via its local name and you will get no certificate
errors. For example, a unit named test may be accessed from anywhere on the same subnet by typing https://
test.local into your web browser address bar. The https:// prefix can be omitted for some browsers if HTTP
Redirect is turned on.
The default certificate is not recommended for production deployments.

13.4.2.5 Beyond the Subnet
If you wish to access a device using the default certificate from beyond its subnet, you can still use the local name
but you must put an entry in the HOSTS file on the client machine. For testing, you may be happy to open a
command prompt and ping the local name to discover the DHCP-allocated IP address, or you may wish to switch
to Manual port configuration and use a fixed IP instead. Note that local name resolution still works with manual
addresses.
Let us assume your device is called test.local and has an IP address of 192.168.1.250.

Open a Windows command prompt with administrative privileges1 and change the directory to:
C:\Windows\System32\drivers\etc

From that directory, run NOTEPAD HOSTS and add a line to the end of the file:
192.168.1.250 test.local

Save the file and references to test.local will be resolved to the required IP address.

13.4.2.6 Don’t Bother
You may simply decide not to provide a certificate or not to bother establishing a trust relationship between your
clients’ browsers and the web server. This will result in the browser displaying an error each time the site is visited.
Indeed, many modern browsers will block access to the site entirely unless the user goes through various
gyrations. It also has the effect of numbing your users to the idea of ignoring security warnings, an attitude that may

1. If you don’t have admin privileges, see the comments above about working with your IT department and contact your System Administrator.

Crimson® 3.1 User Manual 13-196


USING THE WEB SERVER REVISED 2019-1-15
USING A CUSTOM WEBSITE DRAWING NO. LP1044-F

bite them when they stumble across a genuinely insecure site. This approach is therefore most definitely not
recommended.

13.5 Using a Custom Website
While the standard webpages provide quick-and-easy access to the data within the terminal, you may find that your
inability to edit their precise formatting leaves your artistic capabilities somewhat frustrated. Before resorting to a
completely custom site, consider whether the custom stylesheet and JavaScript options detailed above will meet
your needs, particularly if you just want to adjust formats and colors.
If you need more than simple format changes, the Crimson 3.1 custom site facility will allow you to create a
completely customized website using your favorite HTML editor. The HTML can include special commands to
include the various fragments that make up the standard website, or to include live data from Crimson 3.1 tags.
Once the files have been created, they can be stored on your device’s memory card in the WEB subdirectory, at
which point they will be available for access via the web server in the under the /custom path.
The next chapter provides more in-depth information on this process.

13-197 Crimson® 3.1 User Manual


REVISED 2019-1-15 CREATING CUSTOM WEBSITES
DRAWING NO. LP1044-F NAMING

Chapter 14 Creating Custom Websites

This chapter contains information on creating a custom website that is to be hosted by a Crimson® 3.1 device. It
assumes knowledge of HTML and JavaScript. To create a website that is well integrated with the standard Crimson
website, a working knowledge of Bootstrap and JQuery would also be an advantage.

14.1 Naming
While previous versions of Crimson restricted filenames to the 8.3 format, a memory card formatted in FAT32 will
allow Crimson 3.1 devices to use longer names and extensions. Since the filing system is still case insensitive, you
must not rely on case difference to differentiate between pages. Beyond this limitation, you may use a directory
structure nested to any level, provided it is all stored under the WEB subdirectory. Crimson’s web server is aware of
virtually every popular file extension and will reply with the appropriate MIME type when the file is requested.
Custom MIME types are not currently supported.

14.2 Resources
Crimson’s standard webpages make use of Bootstrap and JQuery to implement much of their functionality. Each
webpage thus includes the following stylesheets and script files:

<link href="/assets/css/bootstrap.min.css" rel="stylesheet">

<link href="/assets/css/bootstrap-theme.min.css" rel="stylesheet">

<link href="/assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet">

<link href="/assets/css/theme.css" rel="stylesheet">

<link href="/custom/css/custom.css" rel="stylesheet">

<!--[if lt IE 9]>

<script type="text/javascript" src="/assets/js/html5shiv.min.js"></script>

<script type="text/javascript" src="/assets/js/respond.min.js"></script>

<![endif]-->

<script type="text/javascript" src="/assets/js/jquery.min.js"></script>

<script type="text/javascript" src="/assets/js/bootstrap.min.js"></script>

<script type="text/javascript" src="/assets/js/ie10-viewport-bug-workaround.js"></script>

<script type="text/javascript" src="/assets/js/session.js"></script>

<script type="text/javascript" src="/custom/js/custom.js"></script>

You may include as many or as few of these resources as are needed to implement your site, using the URLs
shown above. We recommend that you use Crimson’s own versions of the Bootstrap and JQuery libraries and
avoid adding them to your site manually. The current versions of Bootstrap and JQuery are 3.3.7 and 1.12.4,
respectively. If Crimson subsequently switches to newer versions that introduce compatibility issues, a property will
be added to allow you to select which versions you wish to use for your custom website.
The session.js script performs a special function. It rewrites any URLs referenced by <a> elements to include the
session identifier passed to the page as part of its own URL, thereby allowing Crimson and your browser to
distinguish between sessions when caching pages. This is important as different users will have different user
 

Crimson® 3.1 User Manual 14-198


CREATING CUSTOM WEBSITES REVISED 2019-1-15
SERVER COMMANDS DRAWING NO. LP1044-F

interface options determined by their security settings and caching may not respond correctly to these changes
unless the session value is included in the URL. If you are relying on this functionality, you should make sure you
include session.js and include the following after your closing </body> tag:

<script type="text/javascript">$(document).ready(doSession);</script>

The doSession function is also responsible for calling doCustom from a custom JavaScript file and for invoking the
standard functions used for remote access and data animation.

14.3 Server Commands
Crimson’s webserver does not support CGI, ASP, ASPX or other server-side scripting functionality. However,
server-side commands are provided to indicate that a page should not be cached and to include embedded tag or
system data within a page.

14.3.1 Server Include
A server-side include can be performed by inserting the following HTML:

<%Include filename%>

The filename portion should be replaced by the URL-style path of the required file. Note that the URL-style path
for custom website files starts with /custom, and not the \WEB prefix used for the directory in which they are stored.
Two standard files are provided and are often included on custom pages. The /stdhead.htm file contains all the
HTML code that is required to load the standard libraries and stylesheets described above. It can be added to each
page in the <head> section to avoid duplication of this content. The /stdnavbar.htm file contains the HTML
necessary to implement the menu bar provided by the standard website. If you want your custom pages to use this
navigation method, include this at the start of the <body> section of each page.

14.3.2 Cache Control
The following directive can be used to disable caching for a page:

<%NoCache%>

Caching typically needs to be disabled when dynamic data is included on a page.

14.3.3 Embedded Data
Data can be embedded within a page by using the following syntax:

<%=class.name%>

14-199 Crimson® 3.1 User Manual


REVISED 2019-1-15 CREATING CUSTOM WEBSITES
DRAWING NO. LP1044-F SERVER COMMANDS

14.3.3.1 Tag Data
For a class value of Tags, the following values of name are supported:

Name Result
TagName The formatted value of the specified tag. For example, Tags.Tag1 will insert
the value of value of Tag1. The name may be followed by an array index in
square brackets to access a specific element, such that for example
Tags.Tag2[10]
will display the eleventh (think about it!) element of Tag2.

In addition to the <%=Tags.Name%> syntax, you may insert a tag value by using the legacy sequence of [[n]],
replacing n with the index number or name of the tag in question. A tag’s index number is displayed in the top right-
hand side of the Editing Pane when a tag is selected within the Data Tag category. It more-or-less corresponds to
the order in which the tags were created. Index numbers provide marginally faster access to tag data than names,
but the newer syntax is nonetheless preferred.

14.3.3.2 Global Data
For a class value of Global, the following values of name are supported:

Name Result
Home The Home Label property of the web server.
Title The Main Title property of the web server.
Header The Main Header property of the web server.
MainNavBar The code used to implement the main navigation bar at the top of each page.
This value is invoked when stdnavbar.htm is included. Placeholder spans
with ids of c3navbar-head, c3navbar-home and c3navbar-tail are
included to allow JQuery manipulation of the navigation structure. See the
sample.js file referenced in the previous chapter for an illustration.
MainMenu The code used to implement the main menu shown on the default home
page. You may use this within a custom home page to avoid replication.
Placeholder rows with ids of c3-menu-head and c3-menu-tail are
provided to allow JQuery manipulation of the menu structure. See the
sample.js file referenced in the previous chapter for an illustration.

14.3.3.3 Data Index Data
For a class value of DataIndex, the following values of name are supported:

Name Result
Dropdown The code used to implement the drop-down list of the standard webpages
created via the Crimson configuration tool, modified to include only those
pages that are accessible to the user current.
List The code used to implement the menu-style list of the standard webpages
created via the Crimson configuration tool, modified to include only those
pages that are accessible to the user current.

14.3.3.4 Data View Data
For a class value of DataView, the following values of name are supported:

Name Result

Crimson® 3.1 User Manual 14-200


CREATING CUSTOM WEBSITES REVISED 2019-1-15
AJAX UPDATES DRAWING NO. LP1044-F

Header The code used to create the header shown at the top of a specific standard
webpage. The page number must be included in the URL as the page
parameter.
TagHead The code used to create the header of the table shown on a specific standard
webpage. The page number must be included in the URL as the page
parameter.
TagList The code used to create the contents of the table shown on a specific
standard webpage. The page number must be included in the URL as the
page parameter.

14.4 AJAX Updates
14.4.1 Reading Tags
The standard webpages that contain tag data are updated by means of a GET request to the /ajax/dataview-
read.htm resource. The URL must include the required page number as the page parameter, with the value being
encoded in decimal. Page numbers start at zero and essentially follow the order in which the standard pages were
created. They are not exposed via Crimson’s user interface but can easily be deduced from the links used by the
standard website to reference these pages. You may use this URL to obtain the same data for your own purposes,
perhaps to animate a custom page that likewise contains tags. The request will return a text file containing a line for
each tag. Each line will contain the tag’s formatted value, followed optionally by the tag’s foreground and
background colors if these are enabled for the page in question. If you create a standard webpage just for this
purpose, you will typically set its Hide Page property to prevent it appearing in the standard menus.

14.4.2 Writing Tags
The standard webpages that contain tag data perform tag writes via a GET request to the /ajax/dataview-
write.htm resource. As above, this URL must include the required page number as the page parameter, but this
time it must also specify the required tag as the tag parameter. The tag number is a zero-based index into the list
of tags configured for that page via its Contents property. The tag will be set to the value specified in the data
parameter, which must also be included in the URL. A successful write will produce a return code of 200 with a
message in the reply body confirming the change. A write that produces no change will have the same return code
but will have an empty body. A return code of 403 indicates that the write failed because of a security problem or
invalid data. The operation will also fail if the page in question has not been configured to allow writes. Once again,
if you create a standard webpage just for this purpose, you will typically set its Hide Page property to prevent it from
appearing in the standard menus.

14.5 Site Deployment
To deploy your custom website, copy it into the \WEB directory on the memory card to be installed in the target
device. To copy the files, either mount the card as a drive as described in the early chapters of this manual, use a
suitable card writer connected to your PC, or transfer them via the FTP Server. Enable the custom site in the web
server’s properties, and if you have included the custom site in the menu, the site will appear in both the menu bar
and the main menu list. When the site is selected, a file called default.htm within the \WEB directory will be
displayed. Navigation beyond that point is according to the page’s links.

14-201 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING THE SECURITY SYSTEM
DRAWING NO. LP1044-F SECURITY BASICS

Chapter 15 Using the Security System

Crimson® 3.1 contains powerful features that allow you to define which operators have access to which display
pages and other facilities, and limit those operators able to make changes to specific data. The software also
contains a logging facility that can be used to record changes to data values to indicate when each change
occurred and by whom it was performed.

15.1 Security Basics
The following sections detail some of the basic concepts used by the security system.

15.1.1 Object‐Based Security
Crimson’s security system is object-based. This means that security characteristics are applied to a display page
or to a tag, and not to the user interface element that accesses the page or makes a change to the tag. The
alternative subject-based approach typically means that you have to be careful to apply security settings to every
single user interface element that might change restricted data. Crimson’s approach avoids this duplication and
ensures that once you have decided to protect a tag, it will remain protected throughout your database.

15.1.2 Named Users
Crimson supports the ability to create any number of users, each of whom will have a username, a real name and
a password. The username is a case-insensitive string with no embedded spaces that is used to identify the user
when logging on, while the real name is typically a longer string that is used within log files to record the human-
readable identity of the user making a change. Note that you are free to use these fields in other ways if it suits your
application: You may, for example, create users that represent groups of individuals or perhaps roles, such as
Operators, Supervisors and Managers.

Crimson® 3.1 User Manual 15-202


USING THE SECURITY SYSTEM REVISED 2019-1-15
SECURITY BASICS DRAWING NO. LP1044-F

15.1.3 User Rights
Each user is granted zero or more access rights. A user with no rights can access those objects that merely require
the identity of the user to be recorded, whereas users with more rights can access those objects that demand those
rights to be present. Rights are divided into System Rights and User Rights, with the former controlling access to
facilities within the Crimson software, and the latter being available for general use. For example, User Right 1
might be used within your database to control access to production targets. Only users whom you want to be able
to vary such things would then be assigned this right.

15.1.4 Access Control
Objects that are subject to security have an associated Access Control property.
Editing the property displays the following:

These settings allow you to specify whether the item can be accessed by anyone, by any operator whose identity is
known, or by users with specific user rights. You may also specify whether a tag can be changed by a program that
is running as a result of something other than user action. This facility allows you to guarantee that no background
changes occur to sensitive data, even if a programming error attempts to make such a change.

15.1.5 Write Logging
Tags also have a Write Logging property.
Editing the property displays the following:

The selection indicates whether changes made to a tag by users or by programs should be logged. This facility
allows you to create an audit trail of changes to your system, thereby simplifying faultfinding and providing quality-
control information as to process configuration. Note that care should be taken when logging changes made by
programs, as certain database may log unmanageable amounts of data in such circumstances.

15-203 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING THE SECURITY SYSTEM
DRAWING NO. LP1044-F SECURITY BASICS

15.1.6 Default Access
To speed the configuration process, Crimson also provides the ability to specify default access and write logging
parameters for mapped tags, internal tags and display pages. The differentiation between mapped and unmapped
tags is important in systems where all changes to external data must be recorded, but where data internal to
Crimson can be manipulated without the need for such an audit trail.

15.1.7 On‐Demand Logon
Crimson’s security system supports both conventional and on-demand logon. A conventional logon can occur
when a user interface element such as a pushbutton is used to activate the Log On User action or to call the
UserLogOn() function. On-demand logon occurs if the operator attempts an action without sufficient access rights,
and if a failed logon attempt has not occurred within the same action. For example, a user may press a button that
runs a program to reset a number of values. As soon as the program attempts to change a value that requires
security access, the system will prompt for logon credentials. This method limits operator interaction and produces
a more responsive system.

15.1.8 Maintenance Access
The system also provides a facility called Maintenance Mode to allow the user inactivity timeout to be overridden
during system commissioning. This mode is activated if a display page is marked as being accessible with the
Maintenance Access right and if the current user has gained access to the page because of that right. Use of this
mode avoids the need to logon repeatedly when testing the system.

15.1.9 Check Before Operate
The Check Before Operate feature allows you to force the user to confirm every change to a sensitive data item.
The feature is enabled by selecting the appropriate setting on a data tag’s security descriptor. When a change is
made to a tag that has this feature enabled, a popup will appear displaying the old and new values and demanding
confirmation before the change is permitted. This feature operates whether or not a user is currently logged on,
and is in addition to any user rights required for the change to occur. It is also independent of the action Protection
operations defined when creating the user interface.

Crimson® 3.1 User Manual 15-204


USING THE SECURITY SYSTEM REVISED 2019-1-15
SECURITY SETTINGS DRAWING NO. LP1044-F

15.2 Security Settings
The security system settings are accessed via the root item in the Security category:

The available properties are as follows:


• The Inactivity Timeout property is used to indicate how much time must pass without user input before
the current user is automatically logged off. Too high a value for this setting will produce an insecure
system, while too low a value will produce a system that is awkward for operators.
• The Clear Logon Name property is used to indicate whether or not the username should be cleared
before asking the operator to logon. If this setting is disabled, the previous username will be displayed,
and only the password will need to be reentered. Enabling this feature produces higher security, and
may be required to comply with security standards in certain industries.
• The Default Access properties are used to indicate the access to be provided to various objects should
no specific access be defined for that item. The settings are as described in the Access Control section
above.
• The Default Logging properties are used to indicate whether changes to mapped and unmapped tags
should be logged should no specific logging criteria be defined for a tag. It is not possible to log pro-
grammatic access by default, as such logging should be carefully considered to avoid excessive log
activity.
• The Logging Control properties define whether and how the security logs should be created. Refer to
the Using the Data Logger chapter for information on how the data is written and how files are named.

15-205 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING THE SECURITY SYSTEM
DRAWING NO. LP1044-F CREATING USERS

15.3 Creating Users
Users are created and otherwise manipulated via the usual methods in the Navigation List:

Each user has the following properties:


• The Real Name property is used to record the user’s identity in security logs, and is also shown in the
Security Manager primitive that is used to change passwords at runtime. If maximum security is
required, the user name should not be easily derived from the real name.
• The Password property specifies an initial password for this user. The password is case-sensitive and
comprises alphanumeric characters. Note that if the Override Existing box is checked, any changes
made to this password from the target device will be overridden when this database is downloaded.
• The System Rights properties are used to grant a user the ability to perform certain system actions.
The properties relating to password changes are self-explanatory, while the user of Maintenance Mode
is described above.
• The Custom Rights properties are used to grant a user certain rights which may then be used within
the database to allow access to groups of tags or display pages. The exact usage of these rights is up
to the system designer.

15.4 Specifying Tag Security
Each tag has a tab called Security which defines the access control and write logging settings for that tag. If you do
not define specific settings, the system will use the appropriate default settings, depending on whether it is mapped
to external data.

Crimson® 3.1 User Manual 15-206


USING THE SECURITY SYSTEM REVISED 2019-1-15
SPECIFYING PAGE SECURITY DRAWING NO. LP1044-F

15.5 Specifying Page Security
The access control settings for display pages are defined via their Properties dialog:

Once again, if no setting is defined, default settings will be used.

15.6 Security Related Functions
Please refer to the Reference Manual for details on the UserLogOn(), UserLogOff() and TestAccess() functions.
This last function is useful when changing many values from within a program, as it allows you to force an access
check early in the code to avoid making changes only to have later operations fail due to insufficient user rights.

15-207 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING SQL QUERIES
DRAWING NO. LP1044-F CONFIGURING THE SERVER

Chapter 16 Using SQL Queries

The SQL Queries category is used to create SQL queries that can be used to extract data from a Microsoft SQL
Server database and store it within tags. These tags can then be used elsewhere in the Crimson 3.1 database to
control production, update recipe settings or perhaps display productivity information related to the factory in which
the device is installed.

16.1 Configuring the Server
The first step in accessing SQL data is to configure the Microsoft SQL Server from which the data is to be obtained.
This is done by selecting the root entry in the Navigation List that is displayed within the SQL Queries category, as
follows:

• The Enable SQL Queries property is used to enable the SQL Queries function.
• The Server property is used to specify the address of the Microsoft SQL Server to which the device will
connect. It may be specified as an IP address, a fixed DNS name, a DNS name determined by a string
tag, or a numeric expression.
• The TCP Port property is used to specify the TCP/IP port to which the device will connect. This port
must agree with the port configured for TCP/IP access on the server. Contact your database adminis-
trator for more information.
• The Logon Username and Logon Password are the credentials that are submitted to the server when
the connection is established. The password is always case sensitive. The case sensitivity of the user-
name depends on the server. The user must have the rights necessary to read table data.
• The Database Name property is used to specify the name of the database on the server from which
the SQL Queries will extract data. Again, contact your database administrator to ensure that the cor-
rect name is specified.

Crimson® 3.1 User Manual 16-208


USING SQL QUERIES REVISED 2019-1-15
CREATING QUERIES DRAWING NO. LP1044-F

16.2 Creating Queries
SQL Queries are created in the Navigation Pane in the usual way. Each query has the following properties:

• The Query Mode property is used to control how the query will be executed. If the property is set to
Periodic, the query will be executed at the rate specified by the Refresh Rate property. If the property is
set to On Demand, the query can be executed by calling the RunQuery() function and passing as a
parameter the name of the query, or by calling the RunAllQueries() function. If the property is set to
Disabled, the query will not be executed.
• The Table Name property is used to specify the name of the table against which the query will be run.
It should correspond to a suitable table within the SQL database specified when the server was config-
ured.
• The Schema Name property is used to override the default schema name of dbo when schemas have
been used to manage table visibility. It should correspond to the schema via which the specified user
will access the specified table.
• The Number of Rows property is used to specify how many rows will be requested from the database
when the queries are executed. It will be passed to the database as a TOP element in the SELECT
query. The filters and sort order specified below will determine exactly which rows are returned.
• The Sort Results property is used to define the ORDER BY clause of the query, and thus to sort order
of the resulting row. This impacts both the order in which the data is stored in the mapped tags and the
effect of the TOP clause controlled by the Number of Rows property. If Sort Results is enabled, the
Sort by Column property is used to specify the column to be used as the sort key.

16-209 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING SQL QUERIES
DRAWING NO. LP1044-F CREATING QUERIES

16.2.1 Filtering the Results
You may filter the rows return by each query by selecting the Edit Filters option:

A filter condition may be added by selecting the required column in the first field of the Create Filter section, and
then selecting the required operator and data value. Once this has been done, press the Add button to append the
condition to the list. Note that filter data values are constants and cannot be set to Crimson 3.1 tags or other
expressions. Conditions may be removed by selecting them in the Applied Filters list and pressing Delete Filter.

16.2.2 Checking the SQL Code
Once a query has been defined, the View Generated SQL option may be used to review the SQL that will be sent
to the server. The example below shows a query that reads up to eight rows of two columns, applying filters and
sorting by one of the columns:

Crimson® 3.1 User Manual 16-210


USING SQL QUERIES REVISED 2019-1-15
CREATING COLUMNS DRAWING NO. LP1044-F

16.3 Creating Columns
When a query is created, Crimson 3.1 creates a single column in the Navigation Pane to represent the returned
data. Additional columns will typically be needed, and these can be created by selecting the required query and
choosing the Column option under the New button at the top-left of the Navigation List. Each column has the
following properties:

• The SQL Column Name property is used to specify the name of the column as it is shown in the SQL
table on which the query is to be performed. It should correspond to the name specified when the table
was created.
• The SQL Type property is used to select the data type of the column. The type should correspond to
the type specified when the table was created. It is used to control the mapping of SQL tags to Crim-
son 3.1 tags.

16-211 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING SQL QUERIES
DRAWING NO. LP1044-F MAPPING TAGS

16.4 Mapping Tags
For each column contained within the query, the Navigation List will show several row entries, the quantity being
driven by the number of rows selected in the query properties. You may drag and drop tags from the Resource
Pane to establish a mapping between the query results and the tags that will be used to store the resulting data.
You will typically use an array to represent each column, with each row being mapped to a specific array element.
The following example shows each row of each column being mapped to an element in a Crimson array, allowing
the result data to be easily accessed by the rest of the Crimson 3.1 database:

Crimson® 3.1 User Manual 16-212


REVISED 2019-1-15 USING IEC-61131
DRAWING NO. LP1044-F WHY USE CONTROL?

Chapter 17 Using IEC‐61131

The Control category of the database is used to create and manage programs written in one of the four IEC-61131
languages supported by Crimson® 3.1. (Sequential Function Charts are not currently supported.) These programs
can be executed periodically to perform control-based activities related to the I/O connected to the device as plug-
in expansion modules or via communications links. Programs may use their own local variables, while global
variables can be used to store shared information. A wide variety of system functions are provided, allowing rich
control solutions to be created within your Crimson device.

17.1 Why Use Control?
Note that much of what can be accomplished with the IEC-61131 engine could in theory be achieved via Crimson’s
Programs category. The Control category, however, offers several significant advantages. First, the programming
languages that the Control category supports are much more suited to machine and process control, while the C-
like language used in the Programs category is more suited to data processing and managing the user interface.
Second, programs within the Control category are executed on a periodic, semi-deterministic basis, while
programs within the Programs category are more likely to be run in response to data changes or user actions.
Finally, the Control category’s function block library is more suited to control applications, while Crimson’s own
programs are designed to interact with library functions that relate to communication and to the user interface.

17.2 Learning IEC‐61131
This chapter is not designed to teach how to program in IEC-61131. That is far too rich a topic for a manual like this
and you are referred to many of the excellent online resources that are available. Red Lion’s Technical Support
team will be happy to help with Crimson-specific questions and they will of course do their best to assist you more
broadly, but they will not be able to make you into an IEC-61131 programmer over the phone. Please check Red
Lion’s website for information on recommended IEC-61131 training resources.

17.3 Working with Programs
Programs are the basic units of execution within Crimson’s IEC-61131 engine.

17.3.1 Types of Program
Three types of program are supported:
• Main Programs are called by the IEC-61131 engine either on every scan or once every so many sec-
onds. Your database should contain at least one Main Program, and may contain many more. The
execution order of Main Programs is managed from the Project object in the Navigation List via the
process described below.
• Sub-Programs are called by other programs. They will not be executed unless a Main Programs calls
them either directly or via another sub-program. They can be used to divide your control solution into
more manageable sections, or to conditionally execute portions of the solution based on specific con-
ditions.

Crimson® 3.1 User Manual 17-213


USING IEC-61131 REVISED 2019-1-15
WORKING WITH PROGRAMS DRAWING NO. LP1044-F

• User-Defined Function Blocks are like sub-programs, but they have specifically defined inputs and out-
put variables so that they can be placed within another program to implement a specific function. For
example, a user-defined function block may be placed within a Function Block Diagram program, with
its inputs and outputs wired to other blocks or to I/O points.

17.3.2 Creating Programs
Programs are created in the usual way from the Navigation Pane under the Programs sections of the Control
category. Menu options exist under the New button to create programs of all three types described above. When a
program is created, you will be prompted for the program name and for the IEC-61131 language to be used:

The supported languages are:


• Structured Text, a high-level text-based language resembling the PASCAL programming language.
Structured Text supports function calls to access other programs and the function library, plus several
control constructs that can be used to create loops and to add decision-making capabilities.
• Function Block Diagram, a graphical language that allows function blocks to be wired together to rep-
resent the flow of data between them. Each function block will have one or more inputs and one or
more outputs. These can be connected to other blocks or to I/O points that represent to IEC-61131
variables.
• Ladder Diagram, the graphical language traditionally used to program PLCs, representing power flow
from one rail to another through a series of simulated relay coils and contacts that map to IEC-61131
variables.
• Instruction List, a low-level text-based language resembling a form of assembly code. It lacks the high-
level constructs of Structured Text, using jump and call instructions to implement flow control. Instruc-
tion List is not recommended for new applications and has been deprecated in the later IEC-61131
standards.

17.3.3 Editing Programs
When a program is selected, a suitable editor will be shown in the Editing Pane. The exact form of the editor will
depend upon the language in which the program was created. The following sections describe each editor in turn.

17-214 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING IEC-61131
DRAWING NO. LP1044-F WORKING WITH PROGRAMS

17.3.3.1 The Structured Text Editor
The picture below shows the editor used for programs written in Structure Text:

Instructions are entered and edited just as one would into any Windows text editor, except that variables, operators
and function calls may be dragged from the Resource Pane and dropped in the text. As with other editors, pressing
CTRL+T will validate the code and place any errors in the Global Error List, where they can be accessed via the F8 and
F4 key sequences.

17.3.3.2 The Function Block Diagram Editor
The picture below shows the editor used for programs written in Function Block Diagram:

Variables and both standard and user-defined function blocks can be accessed via the Resource Pane and placed
within the program. Function blocks may optionally include variables bound to their inputs and outputs if the
appropriate option is selected from the Options menu in the toolbar. Once elements have been added, placing your

Crimson® 3.1 User Manual 17-215


USING IEC-61131 REVISED 2019-1-15
WORKING WITH PROGRAMS DRAWING NO. LP1044-F

mouse cursor on one of the input or output connection points will allow you to drag a wire to another block to create
a connection and thereby indicate the flow of data. The picture below shows this process being used to link a
variable to the input of a comparison operator:

Commands exist on the Function Block Diagram editor toolbar to control the zoom level at which the diagram is
shown, to turn on or off the grid, and to add a variety of standard items to the program. As with other editors,
pressing CTRL+T will validate the code and place any errors in the Global Error List, where they can be accessed via
the F8 and F4 key sequences.

17.3.3.3 The Ladder Diagram Editor
The picture below shows the editor used for programs written in Ladder Diagram:

17-216 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING IEC-61131
DRAWING NO. LP1044-F WORKING WITH PROGRAMS

As with programs written in Function Block Diagram, Variables and both standard and user-defined function blocks
can be accessed via the Resource Pane and placed within the program. In addition, a variety of standard ladder
diagram elements can be accessed directly from the toolbar, allowing contacts and coils to be added more easily.
Commands exist on the Function Block Diagram editor toolbar to control the zoom level at which the diagram is
shown, to turn on or off the grid, and to add a variety of standard items to the program. As with other editors,
pressing CTRL+T will validate the code and place any errors in the Global Error List, where they can be accessed via
the F8 and F4 key sequences.

17.3.3.4 The Instruction List Editor
The picture below shows the editor used for programs written in Instruction List:

Instructions are entered and edited just as one would into any Windows text editor. Note that the low-level nature of
Instruction List does not allow access to Resource Pane items beyond variables. As with other editors, pressing
CTRL+T will validate the code and place any errors in the Global Error List, where they can be accessed via the F8 and
F4 key sequences.

17.3.4 Converting Programs
Programs may be converted from one language to another by right-clicking on a program in the Navigation List and
selecting the one of the Convert options from the context menu. Note that the conversion process cannot be
undone and clears the global undo list. Note also that not all language constructions can be converted. If the
conversion fails, an appropriate error message will be displayed explaining why.

Crimson® 3.1 User Manual 17-217


USING IEC-61131 REVISED 2019-1-15
USING VARIABLES DRAWING NO. LP1044-F

17.3.5 Program Properties
The Properties tab in the Editing Pane can be used to access a program’s properties:

• The Execution property is used to control when the program is executed. For programs that are not
Main Programs, it will always be set to Called by Another Program and the remaining properties will be
hidden. For Main Programs, a setting of Called on Each Cycle will result in the program being called
each time the IEC-61131 engine completes a scan. A setting of Called Periodically will result in the
program being called at a rate defined by the other properties. A setting of Do Not Execute can be
used to disable a program during testing.
• The Period and Phase properties are used to control the rate at which a Main Program set for periodic
execution will be run. The Period property defines how many scans will elapse between one invocation
of the program and the next, such that this value multiplied by the scan time will define the rate at
which the program will run. The Phase property can be used to shift the scans on which programs of a
given period will execute. It should be set to a value between 0 and the value specified by the Period.
A program will execute when the remainder of the scan number divided by the period is equal to the
phase. For example, if Program 1 and Program 2 both have their period set to 5 and their phase set to
0, they will both execute on scans 0, 5, 10 and so on. If the phase of Program 2 is changed to 1, it will
now execute on scans 1, 6, 11 and so on. The phase can thereby be used to balance the execution
load on a system with many periodic programs by distributing them between individual scans.

17.4 Using Variables
The IEC-61131 engine works upon variables. These variables may be internal to the Control category or may be
mapped to the other Crimson data items such as tags, expressions, or references to communications or I/O data
points.

17.4.1 Creating Variables
Variables can be created in the Navigation List under the Local Variables folder of a program or under the Project
Variables folder of the project. Local Variables are only visible to the program to which they belong while Project
Variables are visible to all programs and can be used to store information that is shared within the project. When a
variable is created, you will be prompted for its name and its IEC61131 data type:

17-218 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING IEC-61131
DRAWING NO. LP1044-F USING VARIABLES

17.4.2 Variable Properties
Each variable has the following properties:

• The Data Source property is used to specify whether the variable is internal to the IEC-61131 engine or
whether it should be mapped to an expression, a Crimson tag or to some other data item. Its operation
is just as described in the earlier chapter on tags. If a variable is mapped to a Crimson tag, the IEC-
61131 data type must be suitable for direct conversion to the tag’s data type.
• The Data Type property is used to specify or modify the IEC-61131 data type of the variable. If the type
is changed after the variable has been referenced in a program, you may be required to rebuild your
control project and to correct any resulting errors. Refer to later in this chapter for more information.
• The String Length property is used only for variables of type STRING and is used to indicate how many
characters the string will be able to store.
• The Extent property is used to indicate whether this variable is a single data item or a one-dimensional
array. If a setting of Array is selected, a further property will appear allowing the length of the array to
be specified.
• The Flags property is used to restrict access to a variable by marking it as read only. This can be used
to prevent Crimson tags from being changed or to otherwise protect data that has been configured via
Initial Values.
• The Initial Value property is used to specify to what value or values this variable should load upon a
cold start where retentive data is not used, or upon the first execution of this database by a given target
device. For complex data types, a Pick button will be presented to allow the data to be edited.

Crimson® 3.1 User Manual 17-219


USING IEC-61131 REVISED 2019-1-15
USING VARIABLES DRAWING NO. LP1044-F

17.4.3 Parameters
Parameters are somewhat like local variables but while all programs can have local variables, parameters exist
only for User-Defined Function Blocks. They are shown in a separate folder within the Navigation List and have
slightly different properties. For example, each parameter may be specified as an Input, an Output or both. And
parameters cannot be mapped to Crimson data items. Rather, upon execution of the function block, the input
parameters will be loaded with the data bound to the block via the program that is invoking it. After execution, the
values placed in the output parameters will be passed on to whichever elements in the calling program consume
that data.
Consider a User-Defined Function Block configured as follows:

It contains a very simple piece of code which simply adds its two inputs:

And it is invoked from another program in the following manner:

Before the User-Defined Function Block is executed, its In1 parameter will be set to the contents of Variable2 and
its In2 parameter will be set to a constant value of 1. The function block will then run and it will place Variable2+1
into its Out parameter. The calling program will then take this output and store it in Variable3, completing the
operation.

17-220 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING IEC-61131
DRAWING NO. LP1044-F PROJECT PROPERTIES

17.5 Project Properties
Selecting the Project element in the Navigation List allows access to properties that relate to the execution of the
entire project. These properties are shown below:

• The Program Execution property is used to globally enable or disable IEC-61131 execution. It is by
default set to disabled to avoid the display of certain prompts that are required when downloading to
devices that contain a running instance of the IEC-61131 engine. Be sure to set this property to Exe-
cute Periodically or your programs will not execute.
• The Start Mode property is used to define the state of retained variables upon power-up. If Cold Start is
selected, the initial values will be used and the retentive values will be discarded. If Warm Start is
selected, the retentive values will be used if they are available, with the initial values used as a fall-
back.
• The Cycle Time property is used to define how often the IEC-61131 engine should execute all the pro-
grams set as Called on Each Cycle. It also provides the timebase for the periodic execution mecha-
nism described above.
• The Execution Order property is used to control the order in which Main Programs will be executed by
the IEC-61131 engine. The programs shown in the list can be moved up and down using the buttons
on the attached toolbar.

17.6 Project Rebuilding
Certain changes may require that you rebuild your IEC-61131 programs to accommodate, for example, a change in
the type of a global variable. The CTRL+B sequence can be used to accomplish this, as can the hammer icon in the
toolbar or the Rebuild option in the Control menu. Crimson will also prompt you before downloading your database
if the database contains programs or other control elements that need to be rebuilt.

Crimson® 3.1 User Manual 17-221


USING IEC-61131 REVISED 2019-1-15
IEC-61131 DEBUGGING DRAWING NO. LP1044-F

17.7 IEC‐61131 Debugging
The IEC-61131 system supports two debugging modes where the execution state of a program and the associate
data items can be viewed from within the associated editors.
• Offline Emulation mode runs the control program on your Windows-based configuration PC, emulating
the behavior that can be expected when the database is downloaded to the target device.
• Online Debugging mode downloads the database to the target device and then allows you to debug
the control programs within the Crimson configuration tool as they execute on that device.
The debugging modes are activated via the Play button control on the toolbar. This button displays a menu
allowing the appropriate mode to be selected, at which point the current editor will switch into debug mode:

The editor is framed with a double rectangle as a reminder that debug mode has been activated, with the rectangle
being drawn in blue for offline mode and red for online mode. The editor contents can no longer be changed, but
the current values of data items are shown in the appropriate locations, as shown in the close-up below:

17-222 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING IEC-61131
DRAWING NO. LP1044-F IEC-61131 DEBUGGING

As the program executes, the values of Variable2 shown in the program will be updated in real time. If you wish to
edit the value of a variable, double-click on the variable to display the editing window:

A new value can be entered into the box and the Force button pressed, or the various checkboxes can be used to
update the individual bits of the variable. Always take care when editing values associated with control systems
connected to operating machinery!
Other buttons on the toolbar can be used to control the debugging process:

The Play button or the Stop button can be used to halt emulation or to disconnect from an online debugging
session. The Pause button can be used to stop the execution of the program, allowing the Step button to be used
to single-step through the execution. The Pause button will be highlighted and the Step button made available
when this mode is selected. Pressing Pause again will resume normal execution. Single stepping is very useful in
the text-based programming languages, as it allows program flow to be verified. Note that disconnecting an online
debugging session while the system is paused will leave the system in that state. A warning message to this effect
will be displayed.

Crimson® 3.1 User Manual 17-223


REVISED 2019-1-15 USING CONNECTORS
DRAWING NO. LP1044-F CONFIGURING CONNECTORS

Chapter 18 Using Connectors

Crimson® 3.1 connectors allow tag data and device status information to be pushed to the cloud or to an on-
premises SCADA system. Support is provided for JSON-based MQTT to Amazon Web Services™ (AWS),
Microsoft Azure and the Google Cloud Platform™ service, and for Sparkplug-based MQTT to packages such as
Inductive Automation’s® Ignition® SCADA system. A generic JSON-based MQTT driver is also provided to allow
connectivity to a wide variety of other systems, including B-Scada’s Status Enterprise system and Kepware’s®
MQTT driver.

18.1 Configuring Connectors
Crimson® 3.1 connectors are configured via the Communications section in the Navigation pane.

18.1.1 Common Settings
The connectors have very similar properties, split over the following tabs:
• The Service tab is used to configure the connector-specific information.
• The Network tab is used to configure the underlying connection options.
• The Device Data tab specifies the device status data to be pushed to the server.
• The Tag Data tabs specifies the tag data that will be pushed to the server.

Crimson® 3.1 User Manual 18-224


REVISED 2019-1-15 USING CONNECTORS
DRAWING NO. LP1044-F CONFIGURING CONNECTORS

18.1.1.1 Network Options
The Network tab is used to configure the underlying connection options that are used by the connector. The default
settings will be appropriate for the connector in question but may need adjustment if for example you are
connecting to a non-standard port.
The Network options are shown below.

• The Transport Protocol property is used to select between TCP or TLS. The TCP setting uses the
unencrypted TCP/IP protocol, while the TLS setting uses the encrypted and secure TLS or SSL protocol.
• The Server Certificate property is used to define the level of validation that will be applied to the certificate
supplied by the server. Ignore will not perform any checks; Check CA will ensure that the certificate can be
traced back to a trusted certificate; Check CA and Name will do this and in addition ensure that the
certificate applies to the correct server name; and Check Everything will do this and then check the
expiration date of certificate. You should ideally use Check Everything, but each level requires a little extra
care. For the chain of trust to be validated, an appropriate root certificate must be available, wither via the
connector properties or via the TLS-SSL tab in the Network settings; for the name to be validated, a
hostname and not an IP address must be used; and for the expiration to be validated, the device’s clock
must be set correctly, ideally via network time synchronization as described in the Using Services chapter.
• The Connect via Port property is used to define the TCP/IP port to which the connector will connect. For
most TCP MQTT connections, the value will be 1883, while for most TLS MQTT connections, the value will
be 8883.
• The Publication QoS property is used to configure how the connector will confirm that data submitted to the
server was successfully received. The default value of Level 1 guarantees what is known as an At Least
Once operation. This means that each publication message will receive an acknowledgement from the
server and will be retransmitted if that acknowledge is not received. A setting of Level 0 performs only a
Fire and Forget transmission, allowing the TCP/IP layer to ensure delivery. This is less reliable but is
considerably quicker when replaying large amounts of historical data over connections with long round-trip
times.

Crimson® 3.1 User Manual 18-225


REVISED 2019-1-15 USING CONNECTORS
DRAWING NO. LP1044-F CONFIGURING CONNECTORS

• The Connection Timeout option is used to define how long the connector will wait when opening a new
connection to the server. If no connection is established during this period, the connection will be
abandoned and then retried. The setting need not be changed unless instructed by Technical Support.
• The Transmit Timeout option is used to define how long the connector will wait when sending a request to
the server. If the request cannot be sent during this period, the connection will be closed and re-opened.
The setting need not be changed unless instructed by Technical Support.
• The Receive Timeout option is used to define how long the connector will wait when receiving a reply from
the server. If the reply is not received during this period, the connection will be closed and re-opened. The
setting need not be changed unless instructed by Technical Support.
• The Keep Alive Time is used to define how often an MQTT keep-alive packet should be sent to the server.
These packets are used to ensure that the connection is kept open and that the server is still responding to
requests.
• The Back Off Time is used to define how long the connector should initially wait before trying to re-
establish communications after a failed connection to all defined hosts. The delay will start at this value
and then double after each cycle until it reaches the time specified by the Back Off Limit property. Smaller
values will allow connections to be re-established more quickly, but at the cost of increased bandwidth
usage when there are no hosts are available.

18.1.1.2 Device Data Options
The Device Data tab is used to control how and when device status information is pushed to the server. The
connectors do not currently pass anything useful in the device data block, but future releases will provide
information on the device hardware, its revision information, and its software load. GPS position or cellular signal
data may optionally be included if available.
The Device Data options are shown below.

• The Transfer Mode property is used to control how the device data will be transferred. A setting of Disabled
will prevent the data being transferred; a setting of Periodic will send the data on a periodic basis; and a
setting of Triggered will send it on the rising edge of a triggering expression. Device data is transferred to
the server whether it has changed or not.
• The Update Rate property is used to control how often the device data is pushed to the server when
Periodic mode is selected. Device data will typically not be pushed too often, as it is not expected to
change to any great extent.

Crimson® 3.1 User Manual 18-226


REVISED 2019-1-15 USING CONNECTORS
DRAWING NO. LP1044-F CONFIGURING CONNECTORS

• The Request property has two uses. In Periodic mode, it acts as a level-sensitive enable for the transfer, in
that the transfer will only occur if the expression is true or undefined. In Triggered mode, it acts as an edge-
sensitive trigger for the transfer, initiating the operation on a rising edge.
• The Acknowledge property is used in Triggered mode to provide feedback as to the status of the transfer.
It should be set to a modifiable expression that will be set to true once the transfer has completed, and
false once the Request property has returned to a false state.
• The Include Location property is used to indicate whether position information from a GPS receiver should
be included in the device data block. At the time of writing, this property merely enables a placeholder in
the JSON structure. No actual data is transferred.The Include Cell Data property is used to indicate
whether signal strength and cell information from a cellular modem should be included in the device data
block. At the time of writing, this property merely enables a placeholder in the JSON structure. No actual
data is transferred.

18.1.1.3 Tag Data Options
The Tag Data tabs are used to control which tags are pushed to the server, and how and when the transfer occurs.
By default, four blocks of tag data are supported, but additional blocks may be created using the Tag Set Count
property on the Service page. The multiple tag sets allow data to be pushed at different frequencies and allow
writes from the server to the Crimson device to be limited to a restricted set of tags.
The Tag Data options are shown below.

• The Transfer Mode property is used to control how the tag data will be transferred. A setting of Disabled
will prevent the data being transferred; a setting of Periodic will send the data on a periodic basis; and a
setting of Triggered will send it on the rising edge of a triggering expression. Unless sent as a result of the
Force Update property, tag data is only sent upon initial connection or when it has changed by more than a
particular tag’s deadband property. The special setting of Write Only prevents updates being published
from the specified tags but allows them to still accept writes. This can be useful if you want to avoid writes
being immediately reflected to the server.
• The data Buffering property is used to enable or disable data buffering for this tag set. Refer to the section
on Data Buffering later in this chapter for more information. Note that data buffering must also be enabled
on the Services tab for this property to have any effect.
• The Update Rate property is used to control how often the tag data is pushed to the server when Periodic
mode is selected. Different tag data sets will often have different settings, allowing more important data to
be transferred more often.

Crimson® 3.1 User Manual 18-227


REVISED 2019-1-15 USING CONNECTORS
DRAWING NO. LP1044-F CONFIGURING CONNECTORS

• The Force Update property is used to ensure that the value of each tag is pushed to the server at least this
often. If the setting is left at zero, tag data is only sent as described above under Transfer Mode.
• The Request property has two uses. In Periodic mode, it acts as a level-sensitive enable for the transfer, in
that the transfer will only occur if the expression is true or undefined. In Triggered mode, it acts as an edge-
sensitive trigger for the transfer, initiating the operation on a rising edge.
• The Acknowledge property is used in Triggered mode to provide feedback as to the status of the transfer.
It should be set to a modifiable expression that will be set to true once the transfer has completed, and
false once the Request property has returned to a false state.
• The Tag Writes property is used to indicate whether the connector should accept writes from the server to
the tags in this set. The exact method by which the server sends a write will vary between connectors and
is detailed below.
• The Tag Naming property is used to define how Crimson will generate the label for each tag in the JSON
that it will create. By default, the tag’s name as entered in the Navigation Pane will be used, but you may
also select the tag’s description, label or alias. When a localizable source is selected, the default
translation will be used, no matter which language is selected for display in the user interface.
• The Label Set property is used to indicate whether or not the tag data from this set should be placed in a
distinct object within the JSON data structure. See the section below on data layout for more information.
• The Tag Structure property is used to indicate how tags within Crimson folders should be represented in
the JSON data structure. If Simple Tag List is selected, each tag will exist as a root level property of the
tags object, with its name being equal to the dotted form of its Crimson name. If Folders with Short Names
is selected, a JSON object will be created for each Crimson folder and the relevant tags will be placed in
that object. Each tag’s name will be equal to the last portion of its Crimson name. If Folders with Full
Names is selected, the behavior will be similar, but the tag’s name will be its full dotted form. See the
section below on data layout for more information. Note that this property is not supported for connectors
that do not use JSON for data representation.
• The Array Layout property is used to indicate how array elements should be represented in the JSON data
structure. If Create Elements in List is selected, each array element will appear as a distinct tag, named
after the tag and the element index. If Create Elements in Folder is selected, each array element will
appear as a property within a JSON object named after the tag. See the section below on data layout for
more information. Note that this property is not supported for connectors that do not use JSON for data
representation.
• The Send Properties property is used to indicate whether Crimson should provide the various properties
associated with the tag. If this feature is enabled, a JSON object will be created for the tag, and a subset of
the tag properties accessible via the dot operator will be included in that object. A property named Value
will also be created to hold the current tag data. Note that the connector treats the detailed tag properties
as read-only and neither checks for changes nor sends such changes to the server. For the Sparkplug
connector, this property is always enabled and is thus not displayed.

Crimson® 3.1 User Manual 18-228


REVISED 2019-1-15 USING CONNECTORS
DRAWING NO. LP1044-F CONFIGURING CONNECTORS

18.1.2 Triggered Mode
When operating in Triggered mode, the data transfer for device data or tags is controlled by a Request and
Acknowledge property. The behavior is described in the text above, but the diagram below may make this clearer.

As can be seen, the transfer is triggered by the database setting the Request to true. Once the transfer has
completed, the connector sets the Acknowledge to true and waits for the database to set the Request to false.
Once this has occurred, the connector sets the Acknowledge to false and the cycle is ready to repeat.

18.1.3 Connector Diagnostics
Each connector allows you to specify a numeric tag into which a value will be written that reflects the state of the
connector. This provides a simple form of diagnostics, allowing you to ensure that you are successfully connecting
to the cloud. The values that will be placed into the tag are as follows.

Value Connector State


0 Starting up or recovering from a dropped connection.
1 Connecting to the server after identifying its IP address from the hostname.
2 Connected to the server but waiting for the Primary Application.
3 Connected to the server and ready to pass data.
4 Connected to the server and data updates have been published.

As can be seen, the transfer is triggered by the database setting the Request to true. Once the transfer has
completed, the connector sets the Acknowledge to true and waits for the database to set the Request to false.
Once this has occurred, the connector sets the Acknowledge to false and the cycle is ready to repeat.

Crimson® 3.1 User Manual 18-229


REVISED 2019-1-15 USING CONNECTORS
DRAWING NO. LP1044-F DATA BUFFERING

18.2 Data Buffering
Crimson’s MQTT connectors can be configured to buffer data within the device when a connection to the server is
not available. If this option is not configured, no samples are taken when the service is offline, with the latest values
being pushed to the server as soon as a connection is restored. Data buffering is controlled via the eponymous
property on the connector’s Service tab and can be set to indicate whether data should be buffered just to memory
or whether the device’s memory card should be used to provide further storage that will survive a power-cycle. In
memory-based mode, the connector will buffer up to 14,400 values, this being 4 hours of data at one sample per
second. In disk-based mode, the connector will attempt to buffer for as long as it can until it runs out of disk space.
If data buffering is enabled, messages submitted to the server have additional properties named adhoc and
historic. The adhoc property is set to true to indicate data that was collected outside the usual sampling schedule,
while the historic property is set to true to indicate data that is being replayed from the data buffer.
In normal operation, both the adhoc and historic properties are false, but consider a situation where a device is
configured to store data every minute, and then loses and regains connectivity to its server after a break of two
hours. Immediately after the connection is restored, the connector will replay all 120 or so historical records that it
stored, marking each as historic so that the backend knows, for example, not to update mimics or other status
displays with stale data. Once the historical data has been replayed, the connector will immediately send a single
reading containing live data. Readings would normally occur only exactly on the minute, but this reading will be
sent immediately and marked as adhoc. If you are storing data to a database and only want data collected at the
interval defined by the sampling period, the adhoc flag allows you to ignore values that are sampled off-schedule.
You should still pass these values to any mimics or status displays, however, as you will want to ensure that fresh
data is available as soon as possible.
For JSON-based connectors, the adhoc and historic properties are encoded in the JSON alongside the timestamp. For
Sparkplug, the adhoc property is not supported, while the historic property is encoded using the protocol’s
MetricIsHistorical flag.

Crimson® 3.1 User Manual 18-230


REVISED 2019-1-15 USING CONNECTORS
DRAWING NO. LP1044-F JSON DATA LAYOUT

18.3 JSON Data Layout
Connectors that use JSON for data transfer create a JSON fragment that contains the device and tag data. The
fragment will typically be embedded as an object within a larger JSON structure defined by the requirements of the
connector protocol. The descriptions below assume that the Tag Naming property is set to Name. If another
naming source is used, the JSON will be modified to reflect that setting. Grouping by folders will then only occur if
the naming source provides values that contain embedded periods.
A typical JSON fragment is shown below.

Note that depending on how you view them, the objects and properties may be in a different order. The
underlying structure will nonetheless be the same. As you can see, the fragment contains two objects, the
first being device and the second being tags, plus a value that indicates that the connection is valid and a
timestamp for the reported data.

18.3.1 Connector Options
By default, Crimson encodes true-or-false values as strings rather than using JSON’s specific Boolean format, but
this can be overridden using the Data Encoding property of the connector’s Service tab. Changing this property
from Standard to Use Booleans will remove the quotation marks from the true-or-false values, while changing it to
Numeric Only will encode true as 1 and false as 0. This last option is only available on the Generic MQTT
Connector and is typically used for platforms such a Ubidots which do not understand anything beyond numeric
data values.

18.3.2 Connection Status
As noted above, the JSON submitted by the connector contains a property called connected that is always set
to true in normal messages. MQTT supports a mechanism called a Last Will and Testament (LWT) that allows
a device to register a message to be posted to a specified topic by the broker if the connection is dropped.
The JSON-based connectors typically register an LWT message containing just the connected property and a
value of false. This ensures that the device twin or shadow will contain a connected value that accurately
represents the device’s connection status, and that telemetry-based applications will receive a message that
similarly allows them to detect a broken connection.

Crimson® 3.1 User Manual 18-231


REVISED 2019-1-15 USING CONNECTORS
DRAWING NO. LP1044-F JSON DATA LAYOUT

18.3.3 Device Data
The device object contains a property called status which is always set to okay, and objects called cellular and
location. These two objects in turn contain a property called valid which is currently set to false as they are not
functional at this time.

18.3.4 Tag Data
In this example, the tags object contains four tags with no folder structure. This represents a simple database
which has these four tags configured in the top level of the tag list. For more complex structure, various options
exist to control how the tags are displayed.
Consider a database with the following tag structure.

Here we have four tags within a folder, and a further two tags at the top level. The second of these two tags is an
array. In our connector configuration, we map all of these tags into the first tag data set as shown below, including
four elements from the array.

With default settings, this will produce the JSON tags object shown below.

 
Here the four tags from the folder are encoded with their dotted names, the simple tag from the top level is encoded
using its simple name, and the four array elements are encoded using names that represent the tag and the
element index.

Crimson® 3.1 User Manual 18-232


REVISED 2019-1-15 USING CONNECTORS
DRAWING NO. LP1044-F JSON DATA LAYOUT

Note that certain cloud services do not support dots or square brackets in tag names. In these circumstances, the
dots and the opening square bracket will be replaced with dashes, while the closing bracket will be removed. This
resulting JSON fragment will look like this.

 
As noted above, the Tag Structure property can be used to control how tags within folders are represented in the
JSON. The example above shows the default setting of Simple Tag List. If the Folders with Short Names option is
selected, the JSON will be as follows.

 
As you can see, the tags from within the folder are now within a JSON object named after that folder, with the
properties within the object being the last portions of the tag’s names. In contrast, if the Folders with Full Names
option is selected, the JSON will be as follows.

 
Here the object structure is the same, but the properties within the folder object are now named after the full dotted
name of the relevant tag. This is less efficient than the short names form but has been requested by certain
customers for their applications.

Crimson® 3.1 User Manual 18-233


REVISED 2019-1-15 USING CONNECTORS
DRAWING NO. LP1044-F JSON DATA LAYOUT

As further noted above, the Array Layout property can also be used to change how array elements are presented
in the JSON. The examples so far have all been created with the property set to Create Elements in List. If we
return the Tag Structure property to Folders with Short Names and set the Array Layout property to Create
Elements in Folder, the resulting JSON will be modified as follows.

 
Here a JSON object has been created for the array and properties have been created within this object to
represent each element. This may provide a more natural representation of arrays within your application.
In all of the examples above, the Send Properties setting has been turned off. If this is enabled, a raw richer
structure is created under each tag or array element. The JSON fragment below shows how a tag might be
represented in such circumstances. The properties are as described in the Tag Properties section of the Writing
Expressions chapter. Note how the tag has changed from a JSON value into an object, with actual data stored in
the Value property.

Crimson® 3.1 User Manual 18-234


REVISED 2019-1-15 USING CONNECTORS
DRAWING NO. LP1044-F JSON DATA LAYOUT

One final option exists that may modify the tags object within the JSON structure, namely the ability to label tag
data sets. By default, all tags data is placed directly under the tags object, even if that data is sourced from multiple
tag data sets. Setting the Label Set property to Yes will create an intermediate object named after that set under
tags object, modifying the JSON to look similar to this.

 
Here the set1 object indicates that all these tags came from the Tag Data 1 tab.

18.3.5 Site Naming
Some connectors allow a Site Name property to be defined on their Service tab. If defined, this value will be
included as a property called cid under each tag set and under the device object. The value will be included in all
updates, whether or not it has changed, and is designed to allow the back-end to more easily associated each
message with the device from which it originated. A sample JSON structure containing the cid property is shown
below.

Here the Site Name value of site-name is included at the device and tag set level.

Crimson® 3.1 User Manual 18-235


REVISED 2019-1-15 USING CONNECTORS
DRAWING NO. LP1044-F THE GENERIC MQTT CONNECTOR

18.4 The Generic MQTT Connector
The Generic MQTT Connector is designed to publish data in JSON format to an arbitrary MQTT topic and to listen
for writes by subscribing to another arbitrary topic. It is not optimized for operation with any particular cloud
provider but does contain certain facilities to assist with integration with B-Scada’s Status Enterprise product.

18.4.1 Connector Settings
The settings for the connector are shown below.

• The Enable Agent property is used to enable or disable this connector.


• The Tag Set Count property is used to change the number of tag sets supported by the connector. Up to
thirty tag sets may be created. Changes to this value cannot be undone and will clear the undo buffer.
• The Update Mode property is used to specify which data values should be sent in each update
message. Send Changes will send only those values that have changed by more than their deadband
since data was last sent. Send All If Any will send all the data values from a tag set if any values in
that set changed by more than the deadband. Send All Data will send all the data on each update
event, whether or not anything has changed.
• The Reconnection property is used to specify how the connector should behave when a connection is
dropped and re-established. Send All Data will reset the history values used to detect changes, and
thereby resend all the data. Per Update Mode will treat the reconnection update as a normal update and
therefore use the same behavior as defined by the Update Mode property.
• The Data Buffering property is used to enable or disable data buffering. Refer to the specific section earlier
in this chapter for more information. Note that data buffering must also be enabled at the tag set level if it is
to occur.

Crimson® 3.1 User Manual 18-236


REVISED 2019-1-15 USING CONNECTORS
DRAWING NO. LP1044-F THE GENERIC MQTT CONNECTOR

• The Host Name 1 and Host Name 2 properties are used to specify the names of the MQTT servers to
which the connector will publish data and from which it will receive subscription updates. They may be
provided as an IP address or an actual hostname, but connections using TLS will typically require a name
if the server certificate is to be validated. The connector will start by trying to connect to Host Name 1 and
will then move to Host Name 2 if a connection cannot be successfully established. If neither host is
responsive, the connector will wait for the back-off time and then begin the cycle again.
• The Client ID property is used to specify the client identifier that will be included in the MQTT frames. The
exact interpretation of this value will vary according to the server to which you are connecting. The value is
also used to construct the default topic names if these are not specified.
• The Publication Topic is used to specify the MQTT topic to which the connector will publish a JSON
fragment containing the device and tag data. If you do not specify a value, $crimson/generic/device-
id/pub will be used, with the device-id portion being replaced by the Client ID property. The dollar sign
will be omitted if the Drop Dollar Sign property is set to Yes.
• The Subscription Topic is used to specify the MQTT topic to which the connector will subscribe in order to
receive JSON fragments containing tag writes. If you do not specify a value, $crimson/generic/device-
id/sub will be used, with the device-id portion being replaced by the Client ID property. The dollar sign
will be omitted if the Drop Dollar Sign property is set to Yes.
• The Use Dollar Sign property is used to instruct the connector to add an initial dollar sign from the default
publication and subscription topics. Certain brokers such as ActiveMQ do not like the initial dollar sign.
• The Force Into Root property is used to flatten the entire JSON structure such that all values are included
in the root object. This is designed for use with servers such as Ubidots which perform only very basic
JSON parsing.
• The Data Encoding property controls how Boolean values are represented in the JSON sent to the server.
The behavior is described earlier in this chapter. The Generic Connector supports an additional setting of
Numeric Only which forces all data items into numeric form. Again, this is designed for use with servers
such as Ubidots which perform only very basic JSON parsing.
• The User Name and Password properties are used to provide the authentication information to be included
when the MQTT connection is established.
• The Site Name property is used to provide a string that will be included in every update published to the
server, making it easier for the back-end application to identify the source of the update.
• The Status property is used to specify the numeric tag into which connector state information will be
written. See the table earlier in this chapter for more details.

18.4.2 Connector Operation
The connector will publish JSON fragments containing device and tag data to the Publication Topic specified in the
configuration. The fragments will be formatted as described above, with the tags and device objects being at the
top level of the fragment. The connector will also accept writes to Crimson tags when so configured. It does this by
subscribing to the Subscription Topic specified in the configuration, expecting to see JSON fragments formatted in
the same manner as the fragments that it publishes. For example, a simple fragment of {"tags":{"Tag1":100}} will
write value 100 to Tag1, assuming of course that Tag1 is included in a tag data set that is configured to allow
writes.

Crimson® 3.1 User Manual 18-237


REVISED 2019-1-15 USING CONNECTORS
DRAWING NO. LP1044-F THE AMAZON MQTT CONNECTOR

18.5 The Amazon MQTT Connector
The Amazon MQTT Connector is a specialized connector designed to publish tag and device data to the reported
section of the shadow object created for a thing within the AWS IoT environment. It also subscribes to changes to
the desired section, allowing writes to be submitted to tags that are configured to accept changes. The connector
implements TLS security using the certificates made available when an AWS IoT thing is created.

18.5.1 Connector Settings
The settings for the connector are shown below.

• The Enable Agent property is used to enable or disable this connector.


• The Tag Set Count property is used to change the number of tag sets supported by the connector. Up to
thirty tag sets may be created. Changes to this value cannot be undone and will clear the undo buffer.
• The Update Mode property is used to specify which data values should be sent in each update
message. Send Changes will send only those values that have changed by more than their deadband
since data was last sent. Send All If Any will send all the data values from a tag set if any values in
that set changed by more than the deadband. Send All Data will send all the data on each update
event, whether or not anything has changed.
• The Reconnection property is used to specify how the connector should behave when a connection is
dropped and re-established. Send All Data will reset the history values used to detect changes, and
thereby resend all the data. Per Update Mode will treat the reconnection update as a normal update and
therefore use the same behavior as defined by the Update Mode property.
• The Data Buffering property is used to enable or disable data buffering. Refer to the specific section earlier
in this chapter for more information. Note that data buffering must also be enabled at the tag set level if it is
to occur.

Crimson® 3.1 User Manual 18-238


REVISED 2019-1-15 USING CONNECTORS
DRAWING NO. LP1044-F THE AMAZON MQTT CONNECTOR

• The Host Name 1 and Host Name 2 properties are used to specify the names of the MQTT servers to
which the connector will publish data and from which it will receive subscription updates. Host Name 1
should match the name provided in the AWS IoT console on the Interact page of the thing’s information,
while Host Name 2 will only be used in topologies involving redundancy. The connector will start by trying
to connect to Host Name 1 and will then move to Host Name 2 if a connection cannot be successfully
established. If neither host is responsive, the connector will wait for the back-off time and then begin the
cycle again.
• The Client ID property is used to specify the name of the thing.
• The Data Encoding property controls how Boolean values are represented in the JSON sent to the server.
The behavior is described earlier in this chapter.
• The Certificate File, Private Key File and Server CA File properties are used to specify the three files that
were downloaded from the AWS IoT console when the thing was created. The public key file is not
required.
• The Site Name property is used to provide a string that will be included in every update published to the
server, making it easier for the back-end application to identify the source of the update.
• The Status property is used to specify the numeric tag into which connector state information will be
written. See the table earlier in this chapter for more details.

18.5.2 Connector Operation
The connector will publish JSON fragments containing device and tag data to the reported section within the
shadow of the specified thing. If a corresponding tag value is created within the desired section of the shadow, the
connector will update the tag if that tag is included in a data set with writes enabled. It will then remove the desired
value from the shadow.

Crimson® 3.1 User Manual 18-239


REVISED 2019-1-15 USING CONNECTORS
DRAWING NO. LP1044-F THE AZURE MQTT CONNECTOR

18.6 The Azure MQTT Connector
The Azure MQTT Connector is a specialized connector than can either publish tag and device data to the reported
section of the twin object created for a device within the Azure IoT environment, or to the device’s Events topic.
When operating in twin mode, the connector reads the desired section of the twin upon initial connection and then
monitors it for changes, allowing writes to be submitted to tags that are configured to accept changes. In telemetry
mode, the data will instead by published to the device’s events endpoint. No matter which mode is selected, the
connector subscribes to the device’s devicebound endpoint, once again processing writes to tags that are
configured to accept them. Either endpoint name can be changed if required by the application. The connector
implements authentication using the device key associated with the Azure IoT device.

18.6.1 Connector Settings
The settings for the connector are shown below.

• The Enable Agent property is used to enable or disable this connector.


• The Tag Set Count property is used to change the number of tag sets supported by the connector. Up to
thirty tag sets may be created. Changes to this value cannot be undone and will clear the undo buffer.
• The Message Type property is used to specify the type of messages that the connector should send.
Device Twin mode will send the reported status to the Azure twin and look for changes to the desired
status. The Telemetry mode will send and receive telemetry messages and do not need twin support from
Azure.
• The Update Mode property is used to specify which data values should be sent in each update
message. Send Changes will send only those values that have changed by more than their deadband
since data was last sent. Send All If Any will send all the data values from a tag set if any values in
that set changed by more than the deadband. Send All Data will send all the data on each update
event, whether or not anything has changed.
• The Reconnection property is used to specify how the connector should behave when a connection is
dropped and re-established. Send All Data will reset the history values used to detect changes, and

Crimson® 3.1 User Manual 18-240


REVISED 2019-1-15 USING CONNECTORS
DRAWING NO. LP1044-F THE AZURE MQTT CONNECTOR

thereby resend all the data. Per Update Mode will treat the reconnection update as a normal update and
therefore use the same behavior as defined by the Update Mode property.
• The Data Buffering property is used to enable or disable data buffering. Refer to the specific section earlier
in this chapter for more information. Note that data buffering must also be enabled at the tag set level if it is
to occur.
• The Host Name 1 and Host Name 2 properties are used to specify the names of the MQTT servers to
which the connector will publish data and from which it will receive subscription updates. Host Name 1
should match the hostname of the IoT hub created within Azure, while Host Name 2 will only be used in
topologies involving redundancy. The connector will start by trying to connect to Host Name 1 and will then
move to Host Name 2 if a connection cannot be successfully established. If neither host is responsive, the
connector will wait for the back-off time and then begin the cycle again.
• The Host Name property is used to specify the name of the MQTT server to which the connector will
publish data and from which it will receive subscription updates. It should match the hostname of the IoT
hub created within Azure.
• The Client ID property is used to specify the name of the IoT device.
• The Device-to-Cloud property is used to specify the name of the endpoint to which data will be submitted in
the Telemetry mode. The full MQTT topic name will be device/device-id/messages followed by the
specified endpoint name, with device-id being replaced with the Client ID property specified above. If no
value is entered, the default endpoint name of events will be used.
• The Cloud-to-Device property is used to specify the name of the endpoint to which the connector will
subscribe so that it can listen for writes. In Twin mode, the device twin will also be monitored for changes.
The full MQTT topic name will be device/device-id/messages followed by the specified endpoint name,
with device-id being replaced with the Client ID property specified above. If no value is entered, the default
endpoint name of devicebound will be used.
• The Data Encoding property controls how Boolean values are represented in the JSON sent to the server.
The behavior is described earlier in this chapter.
• The Device Key property is used to authenticate with Azure and should be set to the Primary Key
displayed on the Device Details page of the associated device within the Azure management console. The
connector will create an appropriate access token using this key each time it connects.
• The Site Name property is used to provide a string that will be included in every update published to the
server, making it easier for the back-end application to identify the source of the update.
• The Status property is used to specify the numeric tag into which connector state information will be
written. See the table earlier in this chapter for more details.

18.6.2 Connector Operation
In twin mode, the connector will publish JSON fragments containing device and tag data to the reported section
within the twin of the specified thing. If a corresponding tag value is created within the desired section of the twin,
the connector will update the tag the connector will update the tag if that tag is included in a data set with writes
enabled. The connector does not remove the desired value, as the Azure framework does not allow the desired
section to be altered by the device. This can make bidirectional data transfer complicated as a pending cloud write
can unexpectedly override a local change,
In Telemetry mode, the connector will publish JSON fragments containing device and tag data to the device’s
events endpoint. The fragment will in addition to the usual data contain a timestamp and the Azure device name
of the source device. The connector will subscribe to the device’s devicebound endpoint and check any
messages for a tags section that contains information that correspond to tags with writes enabled. A write to a tag
may produce an event message reflecting the change. If this is not the desired behavior, place your writable tags in
a tag set that is configured for Write Only operation.
 

Crimson® 3.1 User Manual 18-241


REVISED 2019-1-15 USING CONNECTORS
DRAWING NO. LP1044-F THE GOOGLE MQTT CONNECTOR

18.7 The Google MQTT Connector
The Google MQTT Connector is a specialized connector designed to publish tag and device data to the Google
Cloud Platform (GCP). Updates are published to the events topic and writes to tags that are configured to be
writable are accepted from the config topic. The connector implements security using locally-generated RS256 key
pairs.

18.7.1 Connector Settings
The settings for the connector are shown below.

• The Enable Agent property is used to enable or disable this connector.


• The Tag Set Count property is used to change the number of tag sets supported by the connector. Up to
thirty tag sets may be created. Changes to this value cannot be undone and will clear the undo buffer.
• The Update Mode property is used to specify which data values should be sent in each update
message. Send Changes will send only those values that have changed by more than their deadband
since data was last sent. Send All If Any will send all the data values from a tag set if any values in
that set changed by more than the deadband. Send All Data will send all the data on each update
event, whether or not anything has changed.
• The Reconnection property is used to specify how the connector should behave when a connection is
dropped and re-established. Send All Data will reset the history values used to detect changes, and
thereby resend all the data. Per Update Mode will treat the reconnection update as a normal update and
therefore use the same behavior as defined by the Update Mode property.
• The Data Buffering property is used to enable or disable data buffering. Refer to the specific section earlier
in this chapter for more information. Note that data buffering must also be enabled at the tag set level if it is
to occur.

Crimson® 3.1 User Manual 18-242


REVISED 2019-1-15 USING CONNECTORS
DRAWING NO. LP1044-F THE GOOGLE MQTT CONNECTOR

• The Host Name 1 and Host Name 2 properties are used to specify the names of the MQTT servers to
which the connector will publish data and from which it will receive subscription updates. Host Name 1
should match the hostname of the IoT hub created within Azure, while Host Name 2 will only be used in
topologies involving redundancy. The connector will start by trying to connect to Host Name 1 and will then
move to Host Name 2 if a connection cannot be successfully established. If neither host is responsive, the
connector will wait for the back-off time and then begin the cycle again.
• The Project Name property is used to specify the name of the GCP project. The Region Name property is
used to specify the region in which the device registry was created. The Registry Name property is used to
specify the name of that registry. The Device Name property is used to specify the name of the device in
the registry.
• The Data Encoding property controls how Boolean values are represented in the JSON sent to the server.
The behavior is described earlier in this chapter.
• The Authentication section contains operations for managing the cryptographic key pair used to identify a
device to the GCP. When the connector is first enabled, a public and private key is created. The public key
can be exported to a file or placed on the clipboard. It must be provided to GCP with a type of RS256 when
the corresponding device is created. If you are connecting to a device that has an existing key pair, you
may import the private key and override Crimson’s own values. An option is also provided to generate a
new key pair. The new public key must be provided to GCP if the connector is to pass data successfully.
• The Site Name property is used to provide a string that will be included in every update published to the
server, making it easier for the back-end application to identify the source of the update.
• The Status property is used to specify the numeric tag into which connector state information will be
written. See the table earlier in this chapter for more details.

18.7.2 Connector Operation
The connector will publish JSON fragments containing device and tag data to the events topic and listen for
incoming messages on the config topic. Any tag data in the incoming messages will be routed to appropriate
tags, assuming they are configured to accept writes..

Crimson® 3.1 User Manual 18-243


REVISED 2019-1-15 USING CONNECTORS
DRAWING NO. LP1044-F THE SPARKPLUG MQTT CONNECTOR

18.8 The Sparkplug MQTT Connector
The Sparkplug MQTT Connector is a specialized connector designed to publish tag and device data to the Ignition
SCADA system from Inductive Automation. In contrast to the textual JSON representation used by most other
connectors, Sparkplug uses a binary representation that is slightly more efficient. This also means that most of the
tag data options relating to JSON formatting are not available for this connector.

18.8.1 Connector Settings
The settings for the connector are shown below.

• The Enable Agent property is used to enable or disable this connector.


• The Tag Set Count property is used to change the number of tag sets supported by the connector. Up to
thirty tag sets may be created. Changes to this value cannot be undone and will clear the undo buffer.
• The Update Mode property is used to specify which data values should be sent in each update
message. Send Changes will send only those values that have changed by more than their deadband
since data was last sent. Send All If Any will send all the data values from a tag set if any values in
that set changed by more than the deadband. Send All Data will send all the data on each update
event, whether or not anything has changed.
• The Data Buffering property is used to enable or disable data buffering. Refer to the specific section earlier
in this chapter for more information. Note that data buffering must also be enabled at the tag set level if it is
to occur.
• The Host Name 1 and Host Name 2 properties are used to specify the names of the MQTT servers to
which the connector will publish data and from which it will receive subscription updates. They may be
provided as an IP address or an actual hostname, but connections using TLS will typically require a name
if the server certificate is to be validated. The connector will start by trying to connect to Host Name 1 and
will then move to Host Name 2 if a connection cannot be successfully established or if the Primary App ID
property is defined and the server reports that the primary application is offline. If neither host is
responsive, the connector will wait for the back-off time and then begin the cycle again.

Crimson® 3.1 User Manual 18-244


REVISED 2019-1-15 USING CONNECTORS
DRAWING NO. LP1044-F THE SPARKPLUG MQTT CONNECTOR

• The Group ID and Node ID properties are used to specify how this device should presents its data within
the Ignition tag browser. The strings are arbitrary, but should together form a unique value that identifies
this Crimson device.
• The Primary App ID property is used to define the identifier of the primary application that must be
connected to the server before the connector will start passing data. If the primary application is reported
as offline or if no report of an online status is received within 75% of the keep-alive time, the connector will
switch to an alternative server if one is available. Leaving this field blank will disable this functionality. If you
enter a value for this field, it must match the Primary Host ID field in the configuration of the Ignition MQTT
Engine, or the equivalent field of whatever primary application you may be using. If the fields do not match,
the connector will not pass data to the server.
• The User Name and Password properties are used to authenticate the connector to the MQTT server. The
default values used by Ignition are admin and changeme, and these are similarly the defaults for this
connector.
• The Server CA File property is reserved for future use.
• The Status property is used to specify a numeric tag into which state information will be written. See the
table earlier in this chapter for more details.

18.8.2 Connector Operation
The connector will publish device and tag data to Ignition and will respond to tag writes if so configured. Tags within
folders are placed in the corresponding folders within the Ignition tag browser, and array elements are placed
within folders that correspond to the underlying tag. If the Primary App ID is defined, the connector will ensure that
the corresponding application is connected to the server and is reported as online before data is transmitted. If the
application is not connected, the server will attempt to contact an alternative host if one is defined. If the application
cannot be found on either host, the connector will wait for the back-off time and begin the process again until the
primary application is detected.

Crimson® 3.1 User Manual 18-245


REVISED 2019-1-15 USING SERVICES
DRAWING NO. LP1044-F USING THE OPC UA SERVER

Chapter 19 Using Services

In addition to the core functions described earlier in this document, the Communications category also allows
various services to be configured. These services appear in the Navigation Pane under the Services icon, and
each is described below.

19.1 Using the OPC UA Server
Crimson® 3.1 contains an OPC UA server that allows the tags defined by your database to be exposed using the
OPC UA protocol. The server supports both live data, and the buffering of historic data to allow data to be
recovered after a lost connection. The server supports anonymous connections via the TCP protocol on a user-
defined port, and uses the None security profile. The server supports subscriptions and publication and so can
provide updates to clients without data values having to be read continuously. Note that it is important when
configuring the OPC UA server to provide some mechanism of time synchronization, as the protocol depends upon
accurate timestamps. Please refer to the Time Management section later in this chapter for information on how to
configure this functionality.

19.1.1 Configuring the Service
The OPC UA Server is configured via the associated icon in the Navigation Pane:

Crimson® 3.1 User Manual 19-246


USING SERVICES REVISED 2019-1-15
USING THE OPC UA SERVER DRAWING NO. LP1044-F

19.1.1.1 Service Properties
The following properties can be configured via the Service tab:

• The Enable Server setting enables or disables the OPC UA server.


• The Server Name property is used to define the server name that will be returned to the OPC UA client
during the connection process. The name should typically be distinct for every OPC UA device con-
nected to a given network. If you leave the name blank, the server will use the endpoint host name.
• The Endpoint Host property is used to define the host portion of the endpoint name that will be
returned to the OPC UA client. It typically corresponds to the DNS name used to identify the unit. The
full endpoint name will be this name prefixed with opc.tcp:// and followed by a colon and the TCP
port number. If you leave the name blank, the server will use the device’s name as defined on the
Zero Config tab. This will itself default to the red-xx-yy-zz.local form discussed elsewhere in this
manual.
• The Listen on Port property is used to define the TCP port on which the server will listen. The default
value is 4840 and corresponds to the default value used by most OPC UA clients.
• The Model Layout property is used to select between the default data model layout and a simplified
layout where the tags are placed directly in the server’s Objects folder. The simplified layout produces
shorter data item path names, but at the expense of removing a mechanism that is specifically
designed to provide backward compatibility as software updates are deployed. It is recommended that
you use the default model unless you have strong reasons otherwise.
• The Tag Structure property is used to define how the server will present data tags within in the OPC
UA model. A setting of Simple Tag List will list all of the selected tags under a single folder, using dot-
ted names to represent any folder structure created in Crimson. A setting of Folders with Short Names
will duplicate the folder structure created in Crimson, naming the tag nodes with the short names of the
tags. A setting of Folders with Full Names will similarly duplicate the folder structure, but will name
each tag node with its full dotted name.
• The Array Layout property is used to define how Crimson will present array elements in the data
model. A setting of Create Elements in List will create an element named Tag[x] for each array
element and will place these elements directly in the folder that contains the tag. A setting of Create
Elements in Folder will create a folder called Tag in the same location, and will create elements with
numerical names within that folder.
• The Show Properties property is used to indicate whether or not the server should expose the various
tag properties described in the Writing Expression chapter in order to allow access to additional
information. If you enable StateText, any tags that use multi-state format objects will also have a
property that define the number of states that they represent, and a further property that presents an
array of strings that can be used to convert the tag’s numeric value to strings.
• The Record History property is used to indicate whether historic data should be recorded to the
memory card and made available via the OPC UA protocol. Data will be recorded at the rate specified
by the Sample Rate property, using up to the proportion of the memory card specified by Disk Usage
Limit. See the Historic Data section below on historic data for more information.
• The Allow Writes property is used to enable or disable writes to tags.

19.1.1.2 Data Properties
The Data tab is used to define the tags to be exposed by the server. Tags within folders are listed by their full dotted
names. Crimson may or may not convert this flat list back into a folder hierarchy depending on the setting of the
Tag Structure property.

19-247 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING SERVICES
DRAWING NO. LP1044-F USING TIME MANAGEMENT

19.1.2 Data Presentation
In its default configuration, the OPC UA server exposes the configured tag in two ways:
• The Arrays folder contains three arrays, each containing as many elements as there are tags exposed
by the device. The Integer array contains the integer representation of numeric tags, and zeros
where string tags are located; the Double array contains the floating-point representation of numeric
tags, and zeros where string tags are located; and the String array contains the string representation
of each tag, converted using the appropriate format object.
• The Tags folder contains an entry for each exposed tag, optionally organized using folders that align
with the database’s tag structure and with each tag optionally containing additional properties related
to that tag.
Both folders are located in the V1 folder under the Objects folder in the server’s OPC UA data model. The V1
folder provides a versioning mechanism such that existing deployments will not be broken by subsequent releases.
If Red Lion changes the data model in a manner that is incompatible with existing versions, the old model will be
retained under the V1 folder and the new model will be included under a folder called V2. Any future changes made
under V1 are therefore guaranteed to be compatible with existing deployments.
The default model can be overridden with the Model Layout property, as described above.

19.1.3 Historic Data
The OPC UA Server can be configured to store historic data so that readings can be recovered upon the
restoration of a lost connection to the server. While data can be extracted from arbitrary points in the history buffer,
performance will be limited. The feature is not intended to support the random browsing of data. Rather, it is
expected that a client such as the OSIsoft PI Historian will read any missing data items using this functionality and
then return to accepting published data. Further, it should be noted that the historic data feature used considerable
memory card bandwidth, especially when operating at high sample rate with large numbers of tags. While it has
been tested with 500 tags and a one-second sample rate, it is not recommended that these numbers be
exceeded, or that other memory card heavy operations such as MQTT store-and-forward be used the same time.
Please review Red Lion’s website for technical notes on integrating with various historians via this feature.

19.2 Using Time Management
Crimson contains facilities to allow you to synchronize the time and date within the target device with a variety of
sources. The Time Manager can also maintain information about the device’s time-zone, and whether daylight
saving time is currently enabled. In fact, having accurate time-zone information available is vital to proper
synchronization, as the various synchronization methods are all designed to work with Universal Coordinated
Time, also known as UTC or Greenwich Mean Time. An accurate UTC time may also be required if you are using
TLS or SSL to connect to a remote device, as the server certificate validation process may optionally check the
expiration date of the certificate. Crimson can act both as a client and a server, either requesting the time from or
providing the time to other Crimson devices. Note that the server implementation does not currently support third-
party clients.

Crimson® 3.1 User Manual 19-248


USING SERVICES REVISED 2019-1-15
USING TIME MANAGEMENT DRAWING NO. LP1044-F

19.2.1 Configuring the Service
The Time Manager is configured via the associated icon in the Navigation Pane:

 
The Enable Time Manager property is used to control access to the other facilities. If it is not checked, Crimson will
operate in the local time zone only and will have no knowledge of timezones or other time management
information.

19.2.1.1 Time Server
Appropriately configuring the Enable SNTP property of the Time Server section will instruct Crimson to act as an
SNTP server. This will allow other Crimson devices to synchronize their own clocks to the clock of this unit. Note
that Crimson’s implementation of SNTP is not fully RFC-compliant, and is not supported as a source of
synchronization for third-party clients.

19.2.1.2 Time Client
Selecting Yes in the Enable SNTP property of the Time Client section will cause Crimson to synchronize its clock
with another Crimson-based device or with another SNTP-based time source accessible via the local network or
via the Internet. The time client has the following additional properties:

• The Linked DST property is used to instruct the SNTP client to attempt to read the current Daylight
Savings Time setting from the SNTP server. As this facility is not a part of the standard SNTP protocol,
it will only operate if another Crimson device is specified as the server. The facility is useful in that it
allows the Daylight Savings Time adjustment to be made via a single device on the factory network,
with the other devices then following the central setting.
• The SNTP Mode and SNTP Server properties are used to configure the IP address of the Simple Net-
work Time Service server. If Configured via DHCP is selected, at least one Ethernet port must be con-
figured to use DHCP and the server must be configured to designate a server via option 42. The
default server setting for Manual Configuration is a publicly-accessible server maintained by the
National Institute of Standards and Technology (NIST) in the United States. This will only be suitable if
the device has Internet access.
• The Enable GPS property is used to instruct the time client to use a GPS unit connected via NMEA-
0183 as an alternative method of obtaining the current time. The unit may be connected to any serial
port using the appropriate driver.

19-249 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING SERVICES
DRAWING NO. LP1044-F USING TIME MANAGEMENT

• The Frequency property specifies how often Crimson should attempt to synchronize its time by the
methods enabled above. Crimson will always attempt to sync twenty seconds after power-up, and will
then sync as specified by this property. If a given attempt to sync fails, the unit will retry every 30 sec-
onds until it is successful in finding a suitable time source.

19.2.1.3 Time Stamps
Crimson can record a variety of log files on the target device’s memory card and each log entry has a time stamp.
By default, the time stamp comes from the local real time clock and is in the local time zone. The behavior can be
changed via the following properties:

• The Time Source property is used to indicate from where the time stamps should be obtained. The
default setting obtains the time from the unit’s own real time clock, while the alternative allows the use
of an expression to define the current time. This expression is typically a reference to a data item in a
connected device, allowing that device’s clock to be used for data logging. The expression must be
entered in the Expression property.
• The Sync Clock property is used to indicate whether the local real time clock should be synced to the
alternative time source specified above. If this option is enabled, the local clock will be synchronized
on startup and periodically thereafter. The local clock will be used as a time stamp source if the alter-
native source is not available due to comms problems.
• The Time Zone property is used to indicate the time zone to be used for time stamps. It is only applica-
ble when the local real time clock is configured as the source for time stamps. Selecting Local will use
the local time zone; selecting UTC will use Universal Coordinated Time instead. This latter setting pro-
duces log files which are more easily portable across time-zones, and which do not suffer from discon-
tinuities when switching in and out of Daylight Savings Time.

Crimson® 3.1 User Manual 19-250


USING SERVICES REVISED 2019-1-15
USING TIME MANAGEMENT DRAWING NO. LP1044-F

19.2.2 Choosing an SNTP Server
When configuring the SNTP client, you have several options when selecting a server.
If you have a Windows- or Unix-based time server as part of your network infrastructure, you should ultimately
synchronize to this source to ensure enterprise-wide synchronization. If you have several Crimson devices on the
same network, though, you will find it better to nominate one of these as the master device for the purpose of
setting Daylight Savings Time, and then have that device alone synchronize to the enterprise time source. You can
then configure the other devices to synchronize to the master device, and enable the Linked DST facility to
propagate the Daylight Savings Time setting around your factory.
If you have no enterprise time source available, you may choose to nominate a single Crimson device as the point
where an operator will set the time, and then have other devices synchronize to that source. Alternatively, if your
installation provides TCP/IP access to the Internet via either Ethernet or a modem connection, you may configure
the SNTP client to synchronize to a public time server. An example of this would be 192.6.15.28, which is the
current IP address of a public time server provided by NIST.
A list of other servers can be found at:

http://support.microsoft.com/kb/262680
If you have DNS enabled on your device, you should ideally use a DNS name to refer to the SNTP server. For the
NIST servers referenced above, a name of time.nist.gov will randomly choose one of the active servers in the
server pool. This mechanism provides better load balancing and redundancy, while also being immune to IP
address changes.

19.2.3 Time‐Zone Configuration
As mentioned above, a Crimson device must have knowledge of the current time-zone if it is to use advanced time
management. This information can be provided in two ways. The easiest method is to use the Send Time
command on the Link menu of the Crimson configuration software. In addition to setting the clock, this command
also sends the PC’s current time zone and the status of Daylight Savings Time. Crimson will store this data in
nonvolatile memory, and use it from that point forward. Obviously, you should be sure that the PC contains valid
time and date information before sending it to the unit!
The alternative method is to use the system variables TimeZone and UseDST. The former holds the number of hours
by which the local time zone differs from UTC, and may be either negative or positive. For example, a setting of -5
corresponds to Eastern Standard Time in the United States. The latter contains either 0 or 1, depending on whether
Daylight Savings Time is active. Editing either of these variables via the user interface will result in the unit’s clock
changing to take account of the new settings. For example, enabling Daylight Savings Time will move the clock
forward one hour, while disabling it will move it back. A typical database will only need to expose UseDST for editing
by the user, and even this may not be necessary if the Linked DST facility described above is in use.

19-251 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING SERVICES
DRAWING NO. LP1044-F USING THE FTP SERVER

19.3 Using the FTP Server
Crimson’s FTP server provides a method to exchange files between a Crimson device and a remote computer
running an FTP client application. The Crimson device will act as a server, waiting for client applications to connect
and download or upload files.

19.3.1 Configuring the Service
The FTP Server is configured via the associated icon in the Navigation Pane:

The following properties can be configured:


• The Anonymous Access property defines the rights, if any, granted to a user accessing the server
using anonymous FTP. A setting of Disabled will prevent anonymous access. A setting of Read-Only
will allow the user to download files from the memory card, but will prevent uploads. A setting of Read-
Write will allow both uploads and downloads.
• Enable the Record Log File to keep a log of all FTP interactions in the root directory of the memory
card. This file can be useful when debugging FTP operations, but it will tend to degrade performance
slightly.

19.3.2 FTP Security
As the FTP Server can provide full access to the memory card, it is high recommended that you use the Security
Manager to define specific username and password combinations and to grant those users the appropriate access
rights. In general, you should avoid granting anonymous access, and you should especially avoid allowing
anonymous writes.

Crimson® 3.1 User Manual 19-252


USING SERVICES REVISED 2019-1-15
USING THE OPCWORX PROXY DRAWING NO. LP1044-F

19.4 Using the OPCWorx Proxy
The OPCWorx Proxy is a service that gives Red Lion’s OPCWorx software access to the device’s tag database. It
does not implement any OPC-style communications itself, but rather provides a mechanism for OPCWorx to
provide a PC-based OPC server that can expose tags from one or more Crimson devices. In addition, the OPC
proxy can accept connection from the Red Lion OPC Driver. This driver allows one device to access the tags in
another device without the need to set up Modbus or some other register-based protocol.

19.4.1 Configuring the Service
The OPCWorx Proxy service is configured via the associated icon in the Navigation Pane:

• The Enable OPC Proxy setting enables or disables the service.


• The TCP Port option specifies on which port the service should listen. OPCWorx and the Red Lion
OPC Driver by default expect to connect to port 790 and the default value should be suitable for most
applications.
• The Session Limit property controls how many simultaneous sessions will be supported. It should be
equal to at least one more than the maximum number of devices (either PCs running OPCWorx or
other Crimson devices running the OPC Driver) that will be connecting to this device.
• The IP Restrictions property group allows access to the server to be limited to certain IP addresses,
either for all access or for writes to tags. It can be used to ensure that only authorized devices are
allowed access to the tag database.

19-253 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING SERVICES
DRAWING NO. LP1044-F USING FILE SYNCHRONIZATION

19.5 Using File Synchronization
The Synchronization Manager can be used to exchange files between a Crimson device and an FTP server. This
facility can be used to synchronize log files with a server computer, either automatically or on-demand, thereby
providing an alternative to accessing the log file via the web server and allowing for unattended transfer of files
from several devices to a central collection point. Note that although it is called the Synchronization Manager for
historical reasons, the service is a general-purpose FTP client that can also be used to perform other FTP
operations. See the FtpGetFile() and FtpPutFile() functions in the Reference Manual for information on how
to manually initiate file transfers.

19.5.1 Configuring the Service
The Synchronization Manager is configured via the associated icon in the Navigation Pane:

19.5.1.1 FTP Client
The following properties relate to the FTP client:

• The Enable Sync Manager property is used to enable the FTP client. The client may be enabled with-
out enabling synchronization, allowing it to be used for manual file transfer via the FTP functions men-
tioned above.
• The Enable Log File Sync property is used to enable automatic log synchronization. See the next sec-
tion for details of the other settings related to this feature and how they control file location and the syn-
chronization timing.
• The Server IP address property is used to indicate the IP address of the server. As with many address
fields in Crimson, this may be set to a fixed IP address, a string that represents a hostname, or a tag
that contains such a name. It may also be set to a 32-bit integer than contains the packed version of
the address.
• The Port Number property is used to indicate the TCP port to which the FTP client service will attempt
to connect. The default value is suitable for most applications, as most servers will listen on port 21.
• The Logon Username and Logon Password are the credentials that are submitted to the server when
the connection is established. Both are typically case sensitive, although that depends on the server
implementation. For anonymous login, leave the Username at its default value, and either leave the
password blank, or enter your email address as a courtesy to the provider.

Crimson® 3.1 User Manual 19-254


USING SERVICES REVISED 2019-1-15
USING FILE SYNCHRONIZATION DRAWING NO. LP1044-F

• The Data Connection provides a choice between standard and PASV mode. You can enable the PASV
mode to force the FTP client to initiate all data connections rather than waiting for incoming connec-
tions from the server. This mode is sometimes required when working behind non-FTP aware firewalls
or when operating via certain forms of network address translation. It is also preferred when working
over cellular modem connections.
• The Keep Alive time is the period for which the FTP connection should be kept alive in case further
transfers are required. A value of zero will close the connection as soon as the current transfer has
been completed. Non-zero values make for more efficient operation when transferring multiple files.
• The Record Log File property can be used to keep a log of all FTP interactions in the root directory of
the memory card. This file can be useful when debugging FTP operations, but it will tend to degrade
performance slightly.

19.5.1.2 Log Synchronization
The following properties relate specifically to log file synchronization:

• The Base Directory property defines the directory on the server where the log files will be placed. This
directory is relative to the FTP server’s folder space, not to the underlying directory structure of the
server’s own filing system. You will typically specify a different base directory for each Crimson device
that is synchronizing to a given server.
• The Sync Period property specifies how often the FTP client will connect to the server and transfer its
files. It is measured in hours and is always based from midnight. For example, selecting a value of
three will result in transfers at midnight, 3:00 am, 6:00 am and so on.
• The Sync Delay property defines an offset in minutes from the standard time at which file transfers will
occur. This property can be used to allow multiple terminals to talk to one server without all the file
transfers occurring at once and thereby overloading the target’s capabilities.

19-255 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING SERVICES
DRAWING NO. LP1044-F USING ELECTRONIC MAIL

19.6 Using Electronic Mail
Crimson can be configured to send email messages when alarm conditions are present or when notifications need
to be provided of other events within the system. These messages may be sent via SMS to cellular devices, or via
SMTP email to any device which accepts mail using standard internet protocols.
The mail transports and the email address book are configured via the Mail Manager:

The properties on the Mail tab are used to enable or disable the mail manager, and to provide a name for the
device on which Crimson is running. This name will be used within email messages to identify the originator of the
message. Applications will typically use the name of the machine to which the device is attached or the name of the
site that it is monitoring.

19.6.1 Adding Contacts
The Contacts button can be used to access Crimson’s address book:

Each entry allows a Display Name and an Address to be entered, together with an optional expression that will
enable or disable email to that contact. The address should be in a format suitable for the required transport. For
example, SMTP names should be in the usual name@domain format, while SMS names should be entered as
international-format telephone numbers without the leading plus sign. Multiple email addresses can be entered by
separating them by semicolons, allowing simple mailing lists to be created.
 

Crimson® 3.1 User Manual 19-256


USING SERVICES REVISED 2019-1-15
USING ELECTRONIC MAIL DRAWING NO. LP1044-F

19.6.2 Configuring SMTP
The SMTP tab is used to configure the Simple Mail Transport Protocol. This is the standard protocol used to send
email over the Internet or over other TCP/IP networks. SMTP addresses follow the familiar name@domain standard.
The configuration options for the SMTP transport are shown below:

• The Transport Mode property is used to enable or disable the transport. Note that the mail manager
must be enabled via the Mail tab before the SMTP transport can be enabled. Note also that at least
one transport must be enabled if the mail manager is to be able to deliver messages.
• The Server Selection property defines how the transport will locate an SMTP server. If Manual Selec-
tion is used, the Server IP Address property should be used to manually designate a server. If Config-
ured via DHCP is selected, at least one Ethernet port must be configured to use DHCP and the
network’s DHCP server must be configured to designate an SMTP server via DHCP option 69.
• The Server IP Address property is used to designate an SMTP server when manual server selection is
enabled. The server must be configured to accept mail from the panel and to relay messages if
required by the application.
• The Server Port Number property defines the TCP port number that will be used for SMTP sessions.
The default value is 25. This value will be suitable for most applications, and will only need to be
adjusted if the SMTP server has been reconfigured to use another port.
• The Domain Name property specifies the domain name that will be passed to the SMTP server in the
HELO or EHLO command. The vast majority of SMTP servers ignore this string. In the unlikely event
that your SMTP server attempts to do a DNS lookup to confirm the identity of its client, you may need
to enter something appropriate to your DNS configuration.
• The Reverse Path property specifies the email address that will be supplied as the originator of the
messages sent by the target device. The property comprises a display name, and an email address.
Since Crimson is not capable of receiving messages, the email address will often be set to something
that will return an “undeliverable” message if a reply is sent.
• The Initial Timeout property specifies how many seconds the mail client will wait for the SMTP server
to send its welcome banner. Some Microsoft servers attempt to negotiate Microsoft-specific authenti-
cation with mail clients, thereby delaying the point at which the banner appears. You may want to
extend this time period to 2 minutes or more when working with such servers.
• The Record Log File property can be enabled to keep a log of all SMTP interactions in the root direc-
tory of the memory card. This file can be useful when debugging SMTP operations, but enabling it all
the time will tend to degrade performance slightly. A log file can only be created when a connection
with the mail server has been established.

19-257 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING SERVICES
DRAWING NO. LP1044-F USING ELECTRONIC MAIL

• The Method property indicates the type of authentication to be attempted by the client. A selection of
Digest will insist upon an authentication technique that sends the password in an encrypted form and
will skip authentication if the server does not support such a method. A selection of Basic will attempt
to use the more secure technique, but will fall back to trivially encoded transmission if necessary. A
selection of None will not attempt to authenticate. Your server may or not require authentication. Con-
tact you network administrator or mail provider for more details of the setting that should be used for
your server.
• The Username and Password properties provide the optional credentials for the authentication pro-
cess described above.
• The Use Secure Connection option is used to enable SSL for encrypted email transmission. Many
public servers now insist on SSL and so this option should be enabled when using such services. The
TLS-SSL option starts the connection in secure mode, while the STARTTLS option starts the connec-
tion as usual but manually switches to secure operation once it is established. Contact your network
administrator or mail provider for more details of the setting that should be used for your server.

19.6.3 Configuring SMS
The SMS tab is used to configure the Short Message Service transport that is supported when using a GPRS
modem in association with the target device. Email addresses for the SMS transport are in the form of
international-format telephone numbers without the plus sign. For example, an address of 17175551111 would
send a message to the cell phone or other GSM device that had a number of (717) 555-1111 within the United
States.
The configuration options for the SMS transport are shown below:

• The Transport Mode property is used to enable or disable the transport.


• The Message Relay property is used to enable or disable Crimson’s SMS relay feature. If this feature
is enabled, a user who receives an SMS message that has been sent to several recipients can reply to
that message and have the Crimson device runtime relay the message to the other recipients. This
provides a simple conferencing facility between message recipients.
• The On Message property is used to define an action to be executed each time a message is received.
A local system variable called Data is defined within the action, allowing access to the message itself.
The source number of SMS is prefixed to the message, with a colon separating it from the message
body.

Crimson® 3.1 User Manual 19-258


USING SERVICES REVISED 2019-1-15
USING SQL SYNC DRAWING NO. LP1044-F

19.7 Using SQL Sync
SQL Sync can be used to set up a connection to a Microsoft SQL Server database to periodically synchronize all
log files to a remote database. This service allows direct integration with enterprise-level systems without the need
to push CSV files via FTP and then have a server script harvest those files.

19.7.1 Configuring the Service
SQL Sync is configured via the associated icon in the Navigation Pane:

 
• The Server property is used to specify the IP address of the SQL Server.
• The TCP Port property is used to specify the TCP/IP port to which the SQL Sync will connect. This port
must agree with the port configured for TCP/IP access on the server. Contact your database adminis-
trator for more information.
• The Logon Username and Logon Password are the credentials that are submitted to the server when
the connection is established. The password is always case sensitive. The case sensitivity of the user-
name depends on the server. The user must have the rights necessary to create tables and write data.
• The Database Name property is used to specify the name of the database on the server to which SQL
Sync will synchronize.
• The Table Name Prefix property is used to specify a namespace for all tables created by SQL Sync.
This prefix will be prepended to the name of the log using an underscore to create the table name. This
property can be used to avoid naming collisions when other devices are synchronizing to the same
server.
• The Primary Key Type setting is used to control how SQL Sync distinguishes between rows of data. By
default, the timestamp of the event or data log entry will be used as each table’s primary key. But for
event logs and data logs that update more than once a second, the resulting key will not be unique.
For these cases, select Auto-Increment to specify that an automatically incrementing number should
be used as the table’s primary key. This may also be required if non-UTC logging is used and if Day-
light Savings Time adjustments are made, as this can result in two entries with the same time and date
combination.
• The Select Log Directories option displays a dialog box to allow synchronization for each data log to be
turned on or off. This allows only certain logs to be pushed to the server, avoiding the transfer of infor-
mation that is needed only on the local device.

19-259 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING SERVICES
DRAWING NO. LP1044-F USING SQL SYNC

• The Include Security Logs and Include Alarm and Events properties control whether the respective
event logs will be pushed to the server. Enable the properties if this information is required centrally.
• The Sync Period property specifies how often SQL Sync will connect to the server and transfer its
data. It is measured in hours and is always based from midnight. For example, selecting a value of
three will result in transfers at midnight, 3:00 am, 6:00 am and so on.
• The Sync Delay property defines an offset in minutes from the standard time at which data transfers
will occur. This property can be used to allow multiple terminals to talk to one server without all the
transfers occurring at once and thereby overloading the target’s capabilities.
• The Record Log File property is a flag to determine whether SQL Sync activity should be logged to the
compact flash. Information logged includes commands sent to the SQL server and messages about
any errors that occur. This feature can be useful for debugging failed synchronization attempts.

Crimson® 3.1 User Manual 19-260


REVISED 2019-1-15 SHARING PORTS
DRAWING NO. LP1044-F ENABLING TCP/IP

Chapter 20 Sharing Ports

Crimson® 3.1 provides a port sharing facility that allows either physical or virtual serial connections to be made to
any serially-connected device. For example, you may be using an operator panel with a programmable controller,
but since the PLC has only a single serial port, you may find yourself swapping cables when modifying the ladder
program. By sharing the communications port to connect to the PLC, you can send data directly to the controller,
either from another serial port or by means of a connection made over a TCP/IP link.

20.1 Enabling TCP/IP
The first configuration step when using port sharing is to enable the Ethernet port as described elsewhere in this
manual. While you may not choose to use the virtual serial port facility, even the local sharing of ports is based
upon the TCP/IP protocol, which will not be available unless at least one network interface is enabled.

20.2 Sharing the Required Port
The next step is to share the required port, which is done by selecting Yes in the Share Port property and then
entering a suitable TCP/IP port number to indicate exactly how the virtual port should be addressed:

 
If you leave the port setting at zero, a number of 4000 plus the logical index of the port will be used. You may use
any number that is not already used by another TCP/IP protocol. If you are stuck for ideas, we recommend
numbers between 4000 and 4099.

Crimson® 3.1 User Manual 20-261


SHARING PORTS REVISED 2019-1-15
CONNECTING VIA ANOTHER PORT DRAWING NO. LP1044-F

20.3 Connecting via Another Port
If you want to use another port on the target device to route data to the shared port, you must select the Generic
Program Thru driver for that port, and configure this driver with the TCP/IP port number of the port that you have
shared. In the example below, we are routing data from the programming port to a PLC that is connected via the
RS485 comms port:

 
Note that in most cases, the Baud rate and other port settings do not have to be the same as those for the port that
we are sharing, as Crimson will perform the conversion. The one exception to this is where one device transmits
large bursts of data without any replies from the other. In this case, the device carrying out the larger transmissions
must not be using a higher Baud rate than the device receiving them, or Crimson may not have enough memory to
buffer the data while waiting for it to be retransmitted.
In the example above, to make use of the shared port you would connect a spare serial port on your PC to the
programming port of the target device, and configure the PLC programming software to talk to this COM port. As
soon as the PC begins to send to the PLC, all communications between Crimson and the PLC will be suspended,
and the target device’s two ports will be connected in software, such that the PC will appear to be talking directly to
the PLC. If no data is transferred for more than a minute, communications between Crimson and the PLC will be
resumed.

20.4 Connecting via Ethernet
Rather than using an additional serial port on your PC and on the Crimson-based device, it is possible to use a
third-party utility to create what are known as virtual serial ports on your PC. These appear to applications to be
physical COM ports, but they in fact send and receive data to a remote device over TCP/IP. By installing one of
these utilities and configuring it to address the Crimson-based device, you can have serial access to any devices
connected to that device without any additional cabling. Indeed, there is no need to have any physical serial ports
available on the PC at all—something that is very valuable when working with modern laptops, where a COM port
is often an expensive option.
Several third-party virtual serial port utilities are available. On the freeware side, a company known as HW Group
(http://www.hw-group.com) provides a utility called HW Virtual Serial Port. There are also a number of other
freeware port drivers available, most of which seem to be derived from the same source base. On the commercial
side, a company called Tactical Software (http://www.tacticalsoftware.com) offers Serial/IP for about $100 a port.

20-262 Crimson® 3.1 User Manual


REVISED 2019-1-15 SHARING PORTS
DRAWING NO. LP1044-F PURE VIRTUAL PORTS

While the various freeware drivers no doubt have many contented users, we have found that these drivers have
occasional stability problems on certain PCs. Tactical Software’s Serial/IP is the only package that we are able to
support, and the following information assumes that you are using this package.
To create a virtual serial port, open Serial/IP’s configuration screen, and select the name of the COM port you wish
to define. This will typically be the first free COM port after those allocated to the physical ports and modems
installed in your PC. Next, enter the IP address of the Crimson-based device, and enter the TCP/IP port number
that you allocated when sharing the port. The example below is configured as required by the previous samples in
this document. Finally, ensure Raw TCP Connection is selected, and close the Serial/IP dialog.

You will now be able to configure any Windows-based software to use the newlycreated COM port for download.
When the software opens the connection, Crimson will suspend communications on the shared port, and data will
be exchanged between the PC software and the remote PLC—just as if they were connected directly! When the
port is closed, or if no data is transferred for a minute, communications will be resumed.
Assuming you have purchased the appropriate number of licenses for Serial/IP, you will be able to create as many
virtual ports as you need. This means that you can be connected to multiple devices from the same PC,
downloading to each via its respective programming package—all without plugging or unplugging a single cable.
This feature is extremely valuable when you have many devices in a complex system.

20.5 Pure Virtual Ports
In some circumstances, you may want to use a spare serial port on a Crimson-based device to provide access to a
remote device that is not otherwise referenced in your database, effectively using the spare port as a remote serial
server. To do this, configure the port in the usual way, selecting the Virtual Serial Port driver for that port. Then,
share the port as described above, exposing it via TCP/IP. The Virtual Serial Port driver performs no comms activity
of its own, but still allows the device to be shared for remote access.

Crimson® 3.1 User Manual 20-263


SHARING PORTS REVISED 2019-1-15
LIMITATIONS DRAWING NO. LP1044-F

20.6 Limitations
Note that some PLC programming packages may not work with virtually or physically shared ports. Issues to watch
out for are tight timeouts that do not allow Crimson time to relay the data to the PLC; a reliance on sending break
signals or on the manipulation of hardware handshaking lines; or DOS-style port access such that the package
cannot see the virtual serial port. Luckily, these issues are rare, and most packages will happily communicate as if
they were directly connected to the PLC in question.

20-264 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING MODEMS
DRAWING NO. LP1044-F ADDING A DIAL-IN CONNECTION

Chapter 21 Using Modems

This chapter explains how to configure Crimson® 3.1 to work either with modems, or with direct serial connections
to computers running the Windows operating system. Crimson’s modem support is entirely based upon running
TCP/IP over the Point-To-Point Protocol, otherwise known as PPP. While protocols such a Modbus allow a single
conversation to occur between any two devices, PPP is more akin to an Ethernet connection in that it allows an
unlimited number of logical connections to exist on a single physical link. A single PPP connection can allow
simultaneous access to the panel’s TCP/IP download facility, its web server, its shared serial ports, and to any
TCP/IP protocols that have been defined.

21.1 Adding a Dial‐In Connection
To add a dial-in connection to your database, select the Communications category and navigate to the serial port
via which the connection will be made. Click on the Pick button of Driver property, and select the PPP and Modem
Server driver from the System section:

The Editing Pane will now show the modem configuration:

Crimson® 3.1 User Manual 21-265


USING MODEMS REVISED 2019-1-15
ADDING A DIAL-IN CONNECTION DRAWING NO. LP1044-F

The modem has the following configuration options:


• The Connect Using property is used to select the physical device to be used to make the connection.
The devices supported via serial ports are direct serial connections to computers running the Microsoft
Windows operating system, generic landline modems which implement the Hayes command set, and
GSM modems implementing industry-standard GSM commands. When used for dialing, GSM devices
must be configured in Circuit Switched Data mode.
• The Manufacturer property is used to select from the manufacturers or models for which specific
configurations have been developed and stored within Crimson. Leaving this setting at Generic will
allow you to customize the settings related to initialization strings and the like. Please consult
Technical Support for the settings required for any particular modem.
• The Activity Timeout property is used to define how long a period must pass without the Crimson
device sending a packet over the PPP link in order for the connection to be terminated. For dial-in
connections, it is assumed that the connecting device is friendly, so no effort will be made to filter out
optional packets that might result in the link staying active for long periods. Note that even if you want
a permanent connection, you must enter a timeout to allow the detection of dead links. This implies
that so-called permanent connections may still drop on occasions, but will in any case be immediately
reestablished.
• The Init String property is used to enable or disable certain commands during the initialization
sequence. It is automatically configured if a specific setting is entered in the Manufacturer property.
• The Additional Init string is used with non-direct links, and provides a series of AT commands to be
used to initialize the modem. The initial AT prefix is not required. Several commands may be combined
by simply placing one after the other. The exact string that will be required for your modem is
dependent upon its internal software, so if you contact Technical Support for assistance, be sure to
have exact make and model information available.
• The SMS Support property is used to enable Short Message Service messaging when using a GSM
modem. For SMS messaging to operate properly, you will also have to enable the SMS Transport in
the Mail Manager as described elsewhere in this manual.
• The Log File property is used to enable the logging to the memory card of data exchange with the
modem. This file can be used for debugging purpose during initial modem setup or when attempting to
find the appropriate configuration options. Be sure to disable this feature once the correct modem
configuration sequence has been established or performance will be greatly degraded.
• The Logon Username and Logon Password properties are used to define the credentials that the
remote client must provide to be allowed to connect to this device. The username is not case sensitive,
while the password is. Crimson’s PPP implementation will ask its peer to use CHAP authentication to
avoid transmitting or receiving plaintext password, but will fall back to using PAP if the remote client
does not support CHAP.
• The Local Address property is used to define the IP address to be allocated to the local end of the
connection. This will thus be the IP address of the Crimson device for this link. Please note that this
must not be the same as the IP address of the device’s Ethernet port, as every physical interface using
IP must have a distinct address. The default value will work in most situations, unless your network
design demands that you use a different setting.
• The Remote Address property is used to define the IP address to be allocated to the remote end of the
connection. It is used together with the Remote Mask property to determine what packets will be
routed to this connection. For most applications, a mask of 255.255.255.255 will be used, thereby
instructing Crimson to send via this interface only those packets directly bound for the remote client. A
mask of 0.0.0.0, by contrast, will allow all packets that do not specifically match another interface to be
forwarded to the remote client, presumably for further forwarding to the intended host. Intermediate
masks may be used to control exactly which packets are sent.

21-266 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING MODEMS
DRAWING NO. LP1044-F ADDING A DIAL-OUT CONNECTION

21.2 Adding a Dial‐Out Connection
Dial-out connections are added exactly as described above, except that the PPP and Modem Client driver should
be selected for the required communications port. The configuration options for this modem are shown below:

• The Connect Using property is as for dial-in connections, with the addition of support for GPRS and
HSPA+ connections via a GSM modem. These connections differ from CSD connections in that they
achieve much higher speeds and are typically charged based on how much data is transferred rather
than how long the connection is maintained. GPRS and HSPA+ connections may therefore be config-
ured for permanent connection unless there is a need to provide downtime to allow SMS messages to
be transferred.
• The No Firewall property is used to turn off the firewall protection that is otherwise provided for dial-out
connections. This protection prevents incoming connections from being made to this interface, and
prevents the device from sending certain diagnostic packets that might either provide a hacker with
information about the system, or might be used by an attacker to keep a connection active in the
absence of any actual data transfer. If you are connecting directly to the Internet by means of this con-
nection, you should not normally turn off the firewall. The firewall should be disabled only for connec-
tions to corporate networks or to other controlled environments.
• The Connection Type property is used to indicate whether you want this connection to be permanently
maintained, or whether you want it to be established automatically when an attempt is made to transfer
data to hosts that are reachable via this interface. If you select an ondemand connection, you must
specify the timeout after which the link will be terminated if no packets have been transmitted by the
Crimson device.
• The Number or APN property is used to configure the telephone number which a conventional modem
will dial, or the APN required to access the service associated with the SIM installed in a GSM modem.
Your GSM service provider will typically provide this information.
• The Logon Username and Logon Password properties are used to define the credentials that will be
passed to the remote server when attempting to initialize this connection. The username is not case
sensitive, while the password is. Crimson’s PPP implementation will ask its peer to use CHAP

Crimson® 3.1 User Manual 21-267


USING MODEMS REVISED 2019-1-15
ADDING AN SMS CONNECTION DRAWING NO. LP1044-F

authentication to avoid transmitting or receiving plaintext password, but will fall back to using PAP if the
remote server does not support CHAP.
• The Route Type property is used to define the data that will be transferred via this interface. For onde-
mand connections, this effectively defines when the connection will be activated. If Default Gateway is
selected, any packets that do not match the address and network mask of the Ethernet connection will
be sent to this interface. Note that in this mode, the Ethernet port must have a gateway setting of
0.0.0.0, or it will take all the packets and leave none to activate the modem! If Specific Network is
selected, you must provide the address and netmask that define the network to which packets will be
routed.
• The DNS Configuration options are used to configure the DNS servers that can be reached via this
interface. Manual mode allows the servers to be specified individually, while Automatic mode will use
the servers negotiated during the PPP connection process. The default Manual mode servers for new
databases are Google’s public DNS servers at 8.8.8.8 and 8.8.4.4.
• The Dynamic DNS options are used to control whether this interface’s public IP address should be reg-
istered using a third party Dynamic DNS service. The Provider property selects the Dynamic DNS pro-
vider to use. Current releases support only DynDNS using one of two domain suffixes. The Username
and Password properties specify the credentials associated with your DynDNS account, while the Host
Prefix specifies the name that will be prefixed to the dnsalias.com or dyndns.org domain when regis-
tering this device.
• The remaining properties are exactly as for dial-in connections.

21.3 Adding an SMS Connection
SMS connections are used when text messaging functionality is required, but where neither dial-in nor dial-out
PPP connections will be established. They are configured as described above, except that the SMS via GSM
Modem device is selected for the required port. The properties for this driver are a subset of those provided for dial-
in connections. SMS support is always enabled with this driver, but note once again that for SMS messaging to
operate, you will have to enable the SMS Transport within the Mail Manager.

21.3.1 SMS Message Processing
When SMS messaging is enabled, Crimson will instruct the GSM modem to check for new incoming or outgoing
messages every five seconds. Incoming messages are forwarded to the mail manager, which will optionally
forward them to other users according to its configuration. Note that it is not possible to check for messages while
the modem is connected to a CSD or GSM session, so you may want to avoid using permanent connections when
you are working with SMS. Note also that if more than one GSM modem is configured, all will be able to receive
messages, but only the last modem will be used for sending.

21-268 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING MODEMS
DRAWING NO. LP1044-F MODEM EXPANSION CARDS

21.4 Modem Expansion Cards
The information above describes the process of connecting a modem via one of the device’s serial ports. Modems
expansion modules and expansion cards are also available for many devices. These are configured by adding the
expansion option as described in the Using Communications chapter and then selecting the appropriate driver for
the port that then appears in the Navigation Pane.
This example shows a Graphite expansion module being used to provide SMS connectivity:

Crimson® 3.1 User Manual 21-269


USING MODEMS REVISED 2019-1-15
CHECKING THE MODEM STATUS DRAWING NO. LP1044-F

21.5 Checking the Modem Status
In order to help debug modem connections, Crimson provides the GetInterfaceStatus() function. This function
takes a single argument, which is the numeric index of the required interface. Interface zero is the internal loopback
interface. Next come any Ethernet interfaces that are enabled, followed by the PPP interfaces. In a system using a
single Ethernet port, for example, the first PPP interface will have an index of 1.
The function returns a string, which can be interpreted according to the following table:

Status Meaning
CLOSED The interface has not yet been initialized. This state will only
occur for a short time during system start-up.
INIT The modem is being initialized. If the connection remains in
this state, there are probably errors in the init strings being
sent to the modem.
IDLE The link is idle. GSM modems will return a number at the end
of the string to indicate signal strength. The next table
explains how to interpret these values.
SMS The modem is sending SMS messages, or polling the
modem to see if new SMS messages are available. If SMS
messaging is enabled for a modem, you will see this state
appear for a short period every five seconds.
CONNECTING The modem is establishing a connection. This state typically
appears only for client connections, and indicates that a call
is being placed.
LISTENING The modem is waiting for a call. This state appears only for
server connections. Note that GSM modems will also return
an IDLE state while waiting for a call in order to show signal
strength.
ANSWER The modem is answering a call and trying to negotiate the
Baud rate for the connection. This state appears only for
server connections. If the connection is established, the
modem will enter the CONNECTED state.
CONNECTED The modem has established a connection. This state will
persist for only a short time, as the LCP negotiation process
will begin after a small delay.
NEG LCP The connection is negotiating LCP options. This process
decides on a set of link protocol settings that are acceptable
to both the client and the server.
AUTH The connection is performing the authentication process to
ensure that the appropriate user credentials are used.
NEG IPCP The connection is negotiating IPCP options. This process
decides on a set of network protocol settings that are accept-
able to both the client and the server.
UP The connection is active and IP data can be exchanged.
HANGING UP The modem is disconnecting. This state will exist for only a
short time before the modem returns to IDLE.

21-270 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING MODEMS
DRAWING NO. LP1044-F USING MULTIPLE INTERFACES

The signal strength values returned by GSM modems have the following meaning:

Value Signal Strength


0 –113dBm or less.
1 –111dBm.
2-30 –109dBm to –52dBm in 2dBm steps.
31 –51dBm or greater.
99 Signal strength cannot be determined.

Cell phones typically interpret these values as follows when displaying signal strength:

Value Strength Number of Bars


5 or less. –103dBm or less. One
6 thru 9. –101dBm thru –95dBm Two
10 thru 14. –93dBm thru –85dBm Three
15 or greater. –83dBm or greater. Four

21.6 Using Multiple Interfaces
Crimson supports up to two independent modem connections. When combined with the one or two Ethernet ports
provided by the target device, this gives a total of up to four distinct IP interfaces, all of which will operate according
to the configuration parameters defined for each connection. This section describes how these multiple interfaces
will interact, and how Crimson will decide where to send each packet of data.

21.6.1 Interface Selection
Each interface has an IP address and a network mask, which are used to decide whether to forward packets to that
interface. For example, if an Ethernet interface is configured with an IP address of 192.168.1.0 and a network mask
of 255.255.255.0, any packets for IP addresses starting with 192.168.1 will be sent to this interface. Likewise, if an
on-demand modem connection has a remote IP address of 192.168.2.2 and a network mask of 255.255.255.255,
sending a packet to address 192.168.2.2 will result in the connection being established.
Note that this mechanism will only send a packet to a single interface. This implies that interfaces should have
distinct network addresses, as defined by their IP address and netmask. If you breach this requirement, packets
will not get routed to the second interface with that network address, and communications on that port will fail. For
example, you must not configure one Ethernet port as 192.168.100.1 and the other as 192.168.100.2, as packets
for the 192.168.100.0 network will only be sent to the first port.

Crimson® 3.1 User Manual 21-271


USING MODEMS REVISED 2019-1-15
USING MULTIPLE INTERFACES DRAWING NO. LP1044-F

21.6.2 Default Route
In addition, one single interface may also define a default route, which will be used to handle packets that do not
specifically match any other interface. The method used to configure the route varies according to the interface
type, as shown in the table below:

Interface To Define Default Route


Ethernet Enter a non-zero value for the Gateway property.
Dial-In Enter 0.0.0.0 for the Remote Mask.
Dial-Out Select Default Gateway for the Route Type property

Again, only a single interface may define a default route. For example, an operator panel may be connected to a
number of Ethernet devices using an IP address of 192.168.1.0 and a network mask of 255.255.255.0, with no
gateway defined. An on demand modem connection may be configured to access an Internet Service Provider to
send emails when alarms occur. Its Route Type is set to Default Gateway, making it the destination for any packets
for IP addresses that do not match the network defined for the Ethernet port. The SMTP server is configured as
24.104.0.39, resulting in a dial-out connection when an attempt is made to send a message.

21-272 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING THE USB HOST
DRAWING NO. LP1044-F MEMORY STICK SUPPORT

Chapter 22 Using the USB Host

If your target device has one or more USB host ports, the corresponding icon in the Communications category can
be used to configure the devices that it will support. Current builds of Crimson® 3.1 support USB memory devices,
keyboard and mice. The keyboard driver supports the many USB bar-code readers that provide keyboard
emulation, and the mouse driver will also support some types of touchscreen or touchpad.

22.1 Memory Stick Support
USB memory devices are configured via the Memory Stick icon:

22.1.1 General Properties

• The Enabled property is used to globally disable or enable memory stick support.
• The Updates property is used to configure the automatic transfer of an update file to the root directory
of the target device’s memory card. If the setting is enabled, the file specified will be copied when the
memory device is first inserted into the USB port. When the target device restarts, the file will be used
to update the device’s firmware and configuration database.
• The Database property defines the name of the database image to be copied to the image.ci3 file on
the memory card. This setting allows several files to be placed on a single stick, with each Crimson
device copying the file that is appropriate to the device into which the stick is inserted.
• The Location property specifies the location on the memory stick where the database image file speci-
fied above can be located.
• The Restart property is used to indicate whether an automatic restart should be performed once the
file has been copied. Enabling this property allows the information from the database image to be
immediately loaded by Crimson.

Crimson® 3.1 User Manual 22-273


USING THE USB HOST REVISED 2019-1-15
KEYBOARD SUPPORT DRAWING NO. LP1044-F

22.1.2 Transfer Properties

• The Transfer property for each synchronization group defines the function that should be performed.
Information may either be copied or moved, and the operation may either be applied to the files in the
specified folder, or to those files and the folder’s sub-folders and their contents on a recursive basis.
• The Direction property specifies the direction of the transfer.
• The Update property is used to indicate whether files that appear to be already present on the target
device should be copied in any case or whether only new and modified files should be transferred.
Crimson uses the file’s time-stamp and size to decide whether the file should be processed.
• The Source and Destination properties are used to indicate the folders on the source and target
devices where the files should be located.

22.2 Keyboard Support
A USB keyboard may be connected to the target device to provide a further method of data entry. Crimson
primitives will accept the characters from the keyboard as if they had been entered via the popup keypad. The
keyboard is configured via the Keyboard section of the USB Host Ports, with the only option being to choose the
keyboard layout so that Crimson can convert the scan-codes into the corresponding characters. Only US and UK
layouts are currently supported. Note that USB barcode readers that implement the keyboard HID class are also
supported. This allows barcodes to be entered directly into Crimson string tags by means of a simple data entry
primitive.

22.3 Mouse Support
A USB mouse or similar pointing device may be connected to the target device to provide a further method of input.
Crimson primitives will accept clicks from the mouse as if they had come from the device’s touchscreen. This
mouse is configured via the Mouse section of the USB Host Ports, with the only options being a scale factor that
can be used to make the mouse less sensitive, and a period after which the mouse pointer will be hidden.

22-274 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING PROGRAMS
DRAWING NO. LP1044-F THE PROGRAM LIST

Chapter 23 Using Programs

The previous chapters of this manual refer to using actions to perform operations in response to key or touch-
screen presses, or to changes in data tags. If you need to perform an action that is too complex to fit on a single
line, or that demands more complex decision-making logic, you can use the Programming category to create and
manipulate programs.

23.1 The Program List
The program list in the Navigation Pane is a conventional Navigation List that can be used to create, delete,
rename and otherwise organize programs. Note that programs can be grouped into folders, and that each
program’s icon can display three states: green, indicating a program that has been translated and validated; yellow,
indicating a program that has been edited but not yet translated; or red, indicating a program that contains one or
more errors.

23.2 Finding Program Usage
You can find all the items that refer to a given program by right-clicking that item in the Navigation Pane and
selecting the Find Usage command. The resulting items will be placed on the Global Search Results List, and can
be accessed by means of the F4 and SHIFT+F4 key combinations. The list itself can be shown or hidden by pressing F8.

Crimson® 3.1 User Manual 23-275


USING PROGRAMS REVISED 2019-1-15
EDITING PROGRAMS DRAWING NO. LP1044-F

23.3 Editing Programs
To edit a program, simply edit the program text using the Source tab shown in the Editing Pane. You will notice that
the program’s icon turns yellow as soon as you start typing, indicating that you have made changes that have yet to
be translated. You will also notice that Crimson® 3.1’s program editor performs syntax coloring, auto-indentation
and a variety of other features appropriate for a code editor. Editor options can be configured by right-clicking on
the Editing Pane and selecting the appropriate command from the resulting menu.
When you have finished writing your program, press the CTRL+T key combination or select the Translate button on
the toolbar. The program will then be checked for errors. If an error is found, a dialog box will be displayed and the
program’s icon will turn red. The cursor will also be moved to the position of the error. If no errors exist, a chime
sound will be omitted and the program’s icon will turn green, indicating that the program has been translated into a
form suitable for execution within the target device.

23.4 Getting Help
While working within the editing pane, a shortcut is available to provide help on system functions. Place your cursor
within or at the end of the function name, and press the F1 key to display information on the function’s operation,
arguments and return type. You may also press F1 after typing a function’s name to gain access to the same
information.

23.5 The Resource Pane
The Resource Pane displayed by the program editor contains a variety of items that can be dragged into your
code. The Data Tags and Programs categories are self-explanatory and provide quick access to the respective
items in your database by allowing the name of the item to be inserted into the editor. The System category
provides access to Crimson’s extensive library of system variables and functions:

As you can see, variables and functions are grouped into categories. When a function is selected, its return type
and argument types are shown on the status bar. Dropping a function into your code enters the appropriate text,
and put the cursor in the parentheses following the function name, thereby allowing you to enter the required
arguments.

23-276 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING PROGRAMS
DRAWING NO. LP1044-F PROGRAM DATA TYPES

23.6 Program Data Types
The field above the program editor can be used to edit the program’s data types:

• The Data Type property is used to indicate whether this program should simply perform a series of
actions, or whether it will perform a calculation and return the value of that calculation to the caller. Pro-
grams that return values cannot by definition be run in the background.
• The Parameters property section defines up to six parameters that the program will accept. Each
parameter has a name and a data type. In this example, the program accepts two parameters, the first
named Value1 and the second named Value2, and both being 32-bit signed integers.
Returning values and passing parameters are discussed in more detail below.

23.7 Program Properties
The second tab of the editor defines the program’s execution environment:

• The Execution Task property is used to indicate how Crimson should execute the program. If the prop-
erty is set to Same as Caller, the program will be run by the task that called it and Crimson will wait for
the program to complete execution before continuing with whatever that task was doing. For example,
selecting this setting and running a program in response to a key being pressed will result in a pause in
display updates until the program completes. (Since most programs take very little time to execute,
this may not even be noticeable.) If this property is set to one of the background settings, Crimson will
use one of three tasks allocated for background execution, and the calling task will immediately be
able to continue perform its own work. Each task can run only one background program at once, so
subsequent requests are queued for later execution. Note also that programs that return values cannot
be run in the background, as their return value would then not be available for the caller to use! Pro-
grams set to Same as Caller that are called from programs running in the background will themselves
run in the background, interrupting the previously executing program. Programs set to background
execution that are called from programs already executing in the background will be queued if they are
directed to the same task or to a task that is already busy, or executed immediately if directed to an
unused task.

Crimson® 3.1 User Manual 23-277


USING PROGRAMS REVISED 2019-1-15
PROGRAM PROPERTIES DRAWING NO. LP1044-F

• The External Data and Timeout properties are used to control how the program interacts with
Crimson’s communication infrastructure with respect to external data items to which the program
refers. You will recall that Crimson only reads data items when they are used. This property is used to
control the exact interpretation of this rule with respect to programs:

Mode Behavior
Read When External data used by the program will be added to
Referenced the comms scan whenever the program is
referenced. If the program is referenced by a display
page, the data will be read when that page is
displayed; if the program is referenced by a global
action or a trigger, the data will be read at all times.
This is the default mode, and is acceptable for all
programs, except those that use very large amounts
of external data.
Read Always External data used by the program will be read at all
times, whether or not the program is referenced. This
means that the program will always be ready to run,
and that the operator will not see the “NOT READY”
message that might otherwise occur when the
program is first referenced. The downside of this
mode is that comms performance may be reduced if
large amounts of data are referenced by the program.
Read When Executed External data used within the program will be read
only when the program is invoked. The program will
wait for the period defined in the timeout property for
such data to be available. If the data cannot be
read—perhaps because a device is offline—the
program will not execute. This mode is typically used
with globally-referenced programs that consume
large amounts of data that would otherwise slow
down the communications scan.
Read But Run Anyway External data will be treated as described for Read
Always mode, but the program will execute whether
or not the data has been read successfully. The
operator will therefore never see the “NOT READY”
message, but if a device is offline, there is no
guarantee that the program’s data items contain valid
data.

23-278 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING PROGRAMS
DRAWING NO. LP1044-F ADDING COMMENTS

23.8 Adding Comments
You can add comments to your programs in two ways. First, you can use the // sequence to introduce a comment
which will continue for the rest of the current line. Secondly, you can use the /* sequence to introduce a single or
multiline comment. This comment will continue until the */ sequence appears. The sample below shows both
commenting styles:

// This is a single-line comment



/* This is line 1 of the comment
This is line 2 of the comment
This is line 3 of the comment */

A single-line comment may also be placed at the end of a line that contains code.

23.9 Returning Values
As mentioned above, programs can return values. Such programs can be invoked by other programs or by
expressions anywhere in the database. For example, if you want to perform a particularly complex decode on a
number of conditions relating to a motor and return a value to indicate the current state, you could create a
program that returns an integer like this:

if( MotorRunning )
return 1;
else {
if( MotorTooHot )
return 2;
if( MotorTooCold )
return 3;
return 0;
}

You could then configure a tag to invoke this program, and use a multi-state format to provide names for the
various states. The invocation would be performed by setting the tag’s Value property to Program(), where
Program is the name of the program in question. The parentheses are used to indicate a function call and cannot
be omitted.

Crimson® 3.1 User Manual 23-279


USING PROGRAMS REVISED 2019-1-15
PASSING ARGUMENTS DRAWING NO. LP1044-F

23.9.1 Avoiding Pitfalls
Note that you have to exercise a degree of caution when using programs to return values. In particular, you should
avoid looping for long periods of time, or performing actions that make no sense in the context in which the function
will be invoked. For example, if the code fragment above called the GotoPage function to change the page, the
display would change every time the program was invoked. Imagine what would happen if you, say, tried to log
data from the associated tag, and you’ll realize that this would not be a good thing! Therefore, keep programs that
return values simple, and always consider the context in which they will be run. If in doubt, avoid doing anything
other than simple math and if statements.

23.10 Passing Arguments
As mentioned above, programs can accept arguments. Suppose you want to write a program called FindMean to
take the average of two integer values. The program would be configured to accept two integer arguments, a and
b. The program would also be configured to return an integer. The code within the program would then be defined
as:

return (a+b)/2;

Once this program has been created and translated, you will be able to enter an expression such as
FindMean(Tag1, Tag2) to invoke it with the appropriate arguments. In this case, the expression would be equal to
the average of Tag1 and Tag2.

23.11 Programming Tips
The sections below provide an overview of the programming constructions supported by Crimson. The basic
syntax used is that of the C programming language. Note that the aim is not to try to teach you to become a
programmer, or to master the subtleties of the C language. Such topics are beyond the scope of this manual.
Rather, the aim is to provide a quick overview of the facilities available, so that the interested user might
experiment further.

23.11.1 Multiple Actions
The simplest type of program comprises a list of actions, with each action taking up a single line, and being
followed by a semicolon. All of the various actions defined in the Writing Actions section are available for use.
Simple programs like this are typically used where combining the actions in a single action definition would
otherwise prove unreadable.

23-280 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING PROGRAMS
DRAWING NO. LP1044-F PROGRAMMING TIPS

The sample shown below sets several variables, and then changes the display page:

Motor1 = 0;
Motor2 = 1;
Motor3 = 0;

GotoPage(Page1);

The actions will be executed in order, and the program will then return to the caller.

23.11.2 If Statements
This type of statement is used within a program to make a decision. The construct consists of an if statement with
a condition in parentheses, followed by an action (or actions) to be executed if the condition is true. If more than
one action is specified, each should be placed on a separate line, and curly-brackets should be used to group the
statements together. An optional else clause can be used to provide for code to be run if the condition is false.
The example below shows an if statement with a single action:

if( TankFull )
StartPump = 1;

The example below shows an if statement with two actions:

if( TankEmpty ) {
StartPump = 0;
OpenValue = 1;
}

The example below shows an if statement with an else clause:

if( MotorHot )
StartFan = 1;
else
StartFan = 0;

Note that it is very important to remember to place the curly-brackets around groups of actions to be executed in
the if or else portion of the statement. If you omit the brackets, Crimson will most likely misunderstand exactly
which actions you want to be dependent upon the if condition. Although line breaks are recommended between
actions, they are not used to figure out what is and is not included within the conditional statement.

Crimson® 3.1 User Manual 23-281


USING PROGRAMS REVISED 2019-1-15
PROGRAMMING TIPS DRAWING NO. LP1044-F

23.11.3 Switch Statements
A switch statement is used to compare an integer value against a number of possible constants, and to perform
an action based upon which value is matched. The exact syntax supports a number of options beyond those
shown in the example below, but for the vast majority of applications, this simple form will be acceptable.
This example below will start a motor selected by the value in the MotorIndex tag:

switch( MotorIndex ) {

case 1:
MotorA = 1;
break; 
case 2:
case 3:
MotorB = 1;
break; 
case 4:
MotorC = 1;
break;
default:
MotorD = 1;
break;
}

A value of 1 will start motor A, a value of 2 or 3 will start motor B, and a value of 4 will start motor C. Any value
which is not explicitly listed will start motor D. Things to note about the syntax are the use of curlybrackets around
the case statements, the use of break to end each conditional block, the use of two sequential case statements to
match more than one value, and the use of the optional default statement to indicate an action to perform if none
of the specified values is matched by the value in the controlling expression. (If this syntax looks too intimidating, a
series of if statements can be used instead to produce the same results, but with marginally lower performance,
and somewhat less readability.)

23.11.4 Local Variables
Some programs use variables to store intermediate results, or to control one of the various loop constructs
described below. Rather than defining a tag to hold these values, you can declare what are known as local
variables using the syntax shown below:

int a;// Declare local integer ‘a’


float b;// Declare local real ‘b’
cstring c;// Declare local string ‘c’

Local variables may optionally be initialized when they are declared by following the variable name with = and the
value to be assigned. Variables that are not initialized in this manner are set to zero, or to an empty string, as
appropriate.

23-282 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING PROGRAMS
DRAWING NO. LP1044-F PROGRAMMING TIPS

Note that local variables are truly local in both scope and lifetime. This means that they cannot be referenced
outside the program, and they do not retain their values between function invocations. If a function is called
recursively, each invocation has its own variables.

23.11.5 Loop Constructs
The three different loop constructs can be used to perform a given section of code while a certain condition is true.
The while loop tests its condition before the code is executed, while the do loop tests the condition afterwards. The
for loop is a quicker way of defining a while loop, allowing you to combine three common elements into one
statement.
You should note that some care is required when using loops within your programs, as you may make a
programming error which results in a loop that never terminates. Depending on the situation in which the program
is invoked, this may seriously disrupt the terminal’s user interface activity, or its communications. Loops which
iterate too many times may also cause performance issues for the subsystem that invokes them.

23.11.5.1 The While Loop
This type of loop repeats the action that follows it while the condition in the while statement remains true. If the
condition is never true, the action will never be executed, and the loop will perform no operation beyond evaluating
the controlling condition. If you want more than one action to be included in the loop, be sure to surround the
multiple statements in curly-brackets, as with the if statement. The example below initializes a pair of local
variables, and then uses the first to loop through the contents of an array, totaling the first ten elements, and
returning the total value to the caller:

int i=0, t=0;



while( i < 10 ) {
t = t + Data[i];
i = i + 1;
}

return t;

The example below shows the same program, but rewritten in a compressed form. Since the loop statement now
controls only a single action, the curly-brackets have been omitted:

int i=0, t=0;



while( i < 10 )
t += Data[i++];

return t;

23.11.5.2 The For Loop
You will notice that the while loop shown above has four elements:

Crimson® 3.1 User Manual 23-283


USING PROGRAMS REVISED 2019-1-15
PROGRAMMING TIPS DRAWING NO. LP1044-F

1. The initialization of the loop control variable.

2. The evaluation of a test to see if the loop should continue.

3. The execution of the action to be performed by the loop.

4. The making of a change to the control variable.

The for loop allows elements 1, 2 and 4 to be combined within a single statement, such that the action following
the statement need only implement element 3. This syntax results in something similar to the FOR-NEXT loop
found in BASIC and other such languages.
Using this statement, the example given above can be rewritten as:

int i, t;

for( i=t=0; i<10; i++ )
t += Data[i];

return t;

You will notice that the for statement contains three distinct elements, each separated by semicolons. The first
element is the initialization step, which is performed once when the loop first begins; the next is the condition,
which is tested at the start of each loop iteration to see if the loop should continue; the final element is the induction
step, which is used to make a change to the control variable to move the loop on to its next iteration. Again, if you
want more than one action to be included in the loop, include them in curly-brackets!

23.11.5.3 The Do Loop
This type of loop is similar to the while loop, except that the condition is tested at the end of the loop. This means
that the loop will always execute at least once.

The example below shows the example from above, rewritten to use a do loop:

int i=0, t=0;



do {
t += Data[i];
} while( ++i < 10 );

return t;

23.11.5.4 Loop Control
Two additional statements can be used within loops. The break statement can be used to terminate the loop early,
while the continue statement can be used to skip the balance of the loop body and begin another iteration without
executing any further code. To make any sense, these statements must be used with if statements to make their
execution conditional.

23-284 Crimson® 3.1 User Manual


REVISED 2019-1-15 USING PROGRAMS
DRAWING NO. LP1044-F PROGRAMMING TIPS

The example below shows a loop that terminates early if another program returns true:

for( i=0; i<10; i++ ) {


if( LoopAbort() )
break;
LoopBody();
}

Crimson® 3.1 User Manual 23-285


REVISED 2019-1-15 WRITING EXPRESSIONS
DRAWING NO. LP1044-F DATA VALUES

Chapter 24 Writing Expressions

You will recall from the earlier sections of this manual that many fields within Crimson® 3.1 are configured as what
are called expression properties. You will further recall that these fields are edited by means of a user interface
element similar to that shown below:

In many situations, you will be configuring these properties to be equal to the value of a tag, or to the contents of a
register in a remote communications device. In these cases, you will either be dragging items from the Resource
Pane, or you will be clicking the appropriate option on the drop-down menu, and then selecting the item from the
resulting dialog box.
There will be situations, though, when you want to make a property dependent on a more complex combination of
data items, perhaps using some math to combine or compare their values. Such eventualities are handled via what
are known as expressions, which can be entered in the property’s edit box whenever General mode is selected via
the drop-down.

24.1 Data Values
All expressions contain at least one data value. The simplest expressions are references to single constants, single
tags, or single PLC registers. If you enter either of the last two options, Crimson will simplify the editing process by
automatically changing the property mode as appropriate. For example, if you enter a tag name in General mode,
Crimson will switch to Tag mode, and show the tag name in the selection field.

24.1.1 Constants
Constants represent—not surprisingly—constant numbers or strings.

24.1.1.1 Integer Constants
Integer constants represent a single 32-bit signed number. They may be entered in decimal, binary, octal or
hexadecimal as required. The examples below show the same number entered in the four different number bases:

Base Example
Decimal 123
Binary 0b1111011
Octal 0173
Hexadecimal 0x7B

The ‘U’ and ‘L’ suffixes supported by earlier versions of software are not used.

Crimson® 3.1 User Manual 24-286


WRITING EXPRESSIONS REVISED 2019-1-15
DATA VALUES DRAWING NO. LP1044-F

24.1.1.2 Character Constants
Character constants represent a single Unicode character, encoded in the lower 16 bits of a 32-bit signed number.
A character constant comprises a single character enclosed in single quotation marks, such that 'A' can be used
to represent a value of 65. Certain otherwise unprintable or unrepresentable characters can be encoded using
what are called escape sequences, each of which is introduced with a single backslash:

Sequence Value ASCII


\a Hex 0x07, Decimal 7 BEL
\t Hex 0x09, Decimal 9 TAB
\n Hex 0x0A, Decimal 10 LF
\f Hex 0x0C, Decimal 12 FF
\r Hex 0x0D, Decimal 13 CR
\e Hex 0x1B, Decimal 27 ESC
\xnn The hex value represented by nn. -
\unnnn The hex value represented by nnnn. -
\nnn The octal value represented by nnn. -
\\ A single backslash character. -
\' A single quotation mark character. -
\" A double quotation mark character. -

24.1.1.3 Logical Constants
Logical constants represent a 1 or 0 value that is used to indicate the truth or otherwise of a yes-or-no expression.
An example of something that can be assigned to be equal to a logical constant is a tag that represents a digital
output in a PLC. Logical constants can either be entered simply as 1 or 0, or by use of the keywords true or false.

24.1.1.4 Floating‐Point Constants
Floating-point constants represent a 32-bit single-precision floating point value. They are represented as you might
expect—by the integer portion, followed by a single decimal point, followed by the fractional portion. Scientific
notation is also supported by specifying a value for the mantissa and following this with an ‘E’ and an exponent.

24.1.1.5 String Constants
String constants represent sequences of characters. They comprise the characters to be represented, enclosed in
double quotation marks. For example, the string "ABCD" represents a four-character string, comprising the values
65, 66, 67 and 68. (Actually, five 16-bit words are used to store the string, with a null value being appended as a
terminator.) The various escape sequences discussed above may also be used within strings.

24.1.2 Tag Values
The value of a tag is represented in an expression by the tag name. Tags that are organized into folders are
represented by the pathname of the tag with each pair of elements being separated by a period. Therefore, a tag
named PV in a folder named Loop would be referenced as Loop.PV. Note that uppercase and lowercase
characters are considered equivalent when finding the required tag. Once an expression has been entered, any
changes to the name of the tag will modify all of the expressions that make reference to it.

24-287 Crimson® 3.1 User Manual


REVISED 2019-1-15 WRITING EXPRESSIONS
DRAWING NO. LP1044-F DATA VALUES

24.1.3 Tag Properties
Data tags have certain properties than can be accessed by following a tag name with a period and then with the
name of the required property. The following properties are defined:

Property Description Data Type


Name The tag’s name. String.
AsText The tag’s value formatted as text. String.
Label The tag’s Label property. String.
Desc The tag’s Description property. String.
Prefix The prefix defined by the tag’s format. String.
Units The units defined by the tag’s format. String.
SP The tag’s setpoint property. Same as Tag.
Min The tag’s lower data entry limit. Same as Tag.
Max The tag’s upper data entry limit. Same as Tag.
Fore The tag’s current foreground color. Integer.
Back The tag’s current background color. Integer.

24.1.4 Page Properties
Display pages also have certain properties that can be accessed in the same way:

Property Description Data Type


Name The page’s name. String.
Label The page’s Label property. String.
Desc The page’s Description property. String.

24.1.5 Comms References
References to registers in master communications devices can be entered into an expression by means of a
syntax comprising an opening square bracket, the register name, and a closing square bracket. An optional device
name may be prefixed to the register name and separated by a period. The device name is not needed when
referring to the only device in a database.
Examples of this syntax are shown below:

Example Meaning
[D100] Register D100 in first device.
[AB.N7:0] Register N7:0 in device AB.
[FX.D100] Register D100 in device FX.

Crimson® 3.1 User Manual 24-288


WRITING EXPRESSIONS REVISED 2019-1-15
SIMPLE MATH DRAWING NO. LP1044-F

24.2 Simple Math
As mentioned above, expressions often contain more than one data value, with their values being combined
mathematically. The simplest of these expressions may add a pair of values, while a more complex expression
might obtain the average of three values. These operations are performed using the familiar syntax you will have
seen in applications such as Excel. The examples below show the basic operations that can be performed:

Operator Priority Example


Addition Group 4 Tag1 + Tag2
Subtraction Group 4 Tag1 - Tag2
Multiplication Group 3 Tag1 * Tag2
Division Group 3 Tag1 / Tag2
Remainder Group 3 Tag1 % Tag2
Although the examples show spaces surrounding the operators, these are not required.

24.3 Operator Priority
You will have noticed the Priority column in the above table. As you no doubt recall from your algebra classes,
when several operators are used together, they are evaluated in a defined order. For example, multiplication is
always evaluated before addition. Crimson implements this ordering by means of what are known as operator
priorities, with each operator being placed in a group, and with operators being applied from the lowest numbered
group to the highest. Except where noted otherwise in the text, operators within a group are evaluated left-to-right.
The default order of evaluation can be overridden by using parentheses.

24.4 Type Conversion
Normally, Crimson will automatically decide when to switch from evaluating an expression in integer math to
evaluating it using floating point. For example, if you divide an integer value by a floating point value, the integer
will be converted to floating point before the division is carried out. However, there will be some situations where
you want to force a conversion to take place.
For example, suppose you are adding together three integers that represent the levels in three tanks, and then
dividing the total by the tank count to obtain the average level. If you use an expression such as
(Tank1+Tank2+Tank3)/3 then your result may not be as accurate as you demand, as the division will take place
using integer math, and the average will not contain any decimal places. To force Crimson to evaluate the result
using floating-point math, the simplest technique is to change the 3 to 3.0, thereby forcing Crimson to convert the
sum to floating point before the division is performed. A slightly more complex technique is to use syntax such as
float(Tank1+Tank2+Tank3)/3. This invokes what is known as a type cast on the term in parentheses, manually
converting it to floating point.
Type casts may also be used to convert a floating-point value to an integer value, perhaps deliberately giving up
some precision from an intermediate value before storing it in a PLC register. For example, the expression
int(cos(Theta)*100) will calculate the cosine of an angle, multiply this value by 100 using floating-point math,
before converting it to an integer, dropping any digits after the decimal place.

24-289 Crimson® 3.1 User Manual


REVISED 2019-1-15 WRITING EXPRESSIONS
DRAWING NO. LP1044-F COMPARING VALUES

24.5 Comparing Values
You will quite often find that you wish to compare the value of one data item with another, and make a decision
based on the result. For example, you may wish to define a flag formula to show when a tank exceeds a particular
value, or you may wish to use an if statement in a program to execute some code when a motor reaches its
desired speed. The following comparison operators are provided:
Operator Priority Example
Equal To Group 7 Data == 100
Not Equal To Group 7 Data != 100
Greater Than Group 6 Data > 100
Greater Than or Equal Group 6 Data >= 100
To
Less Than Group 6 Data < 100
Less Than or Equal To Group 6 Data <= 100

Each operator produces a value of 0 or 1, depending on the condition it tests. The operators can be used on
integers, floating point values or strings. If strings are being compared, the comparison is case-insensitive such
that “abc” is considered equal to “ABC”.

24.6 Testing Bits
Crimson allows you to test the value of a bit within a data value by using the bit selection operator, which is
represented by a single period. The left-hand side of the operator should be the value in which the bit is to be
tested, and the right-hand side should be an expression indicating the bit number to test. This right-hand value
should be between 0 and 31. The result of the operator is equal to 0 or 1 depending on the value of the bit in
question.
Operator Priority Example
Bit Selection Group 1 Input.2

The example shown tests bit 2 (i.e. the bit with a value of 4) within the indicated tag.
If you want to test for a bit being equal to zero, you can use the logical NOT operator:
Operator Priority Example
Logical NOT Group 2 !Input.2

This example is equal to 1 if bit 2 of the indicated tag is equal to 0, and vice versa.

Crimson® 3.1 User Manual 24-290


WRITING EXPRESSIONS REVISED 2019-1-15
MULTIPLE CONDITIONS DRAWING NO. LP1044-F

24.7 Multiple Conditions
If you want to define an expression that is true if a number of conditions are all true, you can use the logical AND
operator. Similarly, if you want to define an expression that is true if any of a number of conditions are true, you can
use the logical OR operator. The examples below show each operator in use:
Operator Priority Example
Logical AND Group 11 A>10 && B>10
Logical OR Group 12 A>10 || B>10

The logical AND operator produces a value of 1 if and only if the expressions on the left-hand and right-hand sides
are true, while the logical OR operator produces a value of 1 if either expression is true. Note that—unlike the
bitwise operators referred to elsewhere in this section—the logical operators stop evaluating once they know what
the answer will be. This means that in the above example for logical AND, the right-hand side of the operator will
only be evaluated if A is greater than 10, as, if this were not true, the result of the AND operator must already be
zero. While this property makes little difference in the examples given above, if the left-hand or right-hand
expressions call a program or make a change to a data value, this behavior must be taken into account.

24.8 Choosing Values
You may find situations where you want to select between two values—be they integers, floating point values or
strings—depending on the value of some condition. For example, you may wish to set a motor’s speed equal to
500 rpm or 2000 rpm based on a flag tag. This operation can be performed using the ?: operator, which is unique
in that it takes three arguments, as shown in the example below:
Operator Priority Example
Selection Group 13 Fast ? 2000 : 500

This example will evaluate to 2000 if Fast is true, and 500 otherwise. The operator can be thought to be equivalent
to the IF function found in applications such as Microsoft Excel.

24.9 Manipulating Bits
Crimson also provides operators to perform operations that do not treat integers as numeric values, but instead as
sequences of bits. These operators are known as bitwise operators.

24-291 Crimson® 3.1 User Manual


REVISED 2019-1-15 WRITING EXPRESSIONS
DRAWING NO. LP1044-F INDEXING ARRAYS

24.9.1 And, Or and XOR
These three bitwise operators each produce a result in which each bit is defined to be equal to the corresponding
bits in the values on the operator’s left-hand and right-hand sides, combined using a specific truth-table:
Operator Priority Example
Bitwise AND Group 8 Data & Mask
Bitwise OR Group 9 Data | Mask
Bitwise XOR Group 10 Data ^ Mask

The table below shows the associated truth tables:


A B A&B A|B A^B
0 0 0 0 0
0 1 0 1 1
1 0 0 1 1
1 1 1 1 0

24.9.2 Shift Operators
Crimson also provides operators to shift an integer a number of bits to the left or right:
Operator Priority Example
Shift Left Group 5 Data << 2
Shift Right Group 5 Data >> 2

Each example shifts Data two bits in the specified direction.

24.9.3 Bitwise NOT
Finally, Crimson provides a bitwise NOT operator to invert the sense of the bits in a value:
Operator Priority Example
Bitwise NOT Group 2 ~Mask

This example produces a value where every bit is equal to the opposite of its value in Mask.

24.10 Indexing Arrays
Elements within an array tag can be selected by following the array name with square brackets that contain an
indexing expression. This expression must range from 0 to one less than the number of elements in the array. If
you create a 10-element array, for example, the first element will be Name[0] and the last will be Name[9].

24.11 Indexing Strings
Square brackets can also be used to select characters within a string. For example, if you have a tag called Text
that contains the string “ABCD”, then the expression Text[0] will return a value of 65, this being equal to the
Unicode value of the first character. Index values beyond the end of the string will always return zero.

Crimson® 3.1 User Manual 24-292


WRITING EXPRESSIONS REVISED 2019-1-15
ADDING STRINGS DRAWING NO. LP1044-F

24.12 Adding Strings
As well as adding numbers, the addition operator can be used to concatenate strings. So, the expression
"AB"+"CD" evaluates to “ABCD”. You may also use the addition operator to add an integer to a string, in which
case a single character equal to the Unicode representation of the integer is appended to the data in the string.

24.13 Calling Programs
Programs that return values may be invoked within expressions by following the program name with a pair of
parentheses. For example, Program1()*10 will invoke the associated program, and multiply the return value by
10. Obviously, the return type for Program1 must be set to integer or floating point for this to make sense.

24.14 Using Functions
Crimson provides a number of predefined functions that can be used to access system information, or to perform
common math operations. These functions are defined in detail in the Function Reference. They are invoked using
a syntax similar to that for programs, with any arguments to the function being enclosed within the parentheses.
For example, cos(0) will invoke the cosine function with an argument of 0, returning a value of +1.0.

24.15  Priority Summary
The table below shows the priority of all the operators defined in this section:
Group Operators
Group 1 .
Group 2 !~
Group 3 */%
Group 4 +-
Group 5 << >>
Group 6 < > <= >=
Group 7 == !=
Group 8 &
Group 9 |
Group 10 ^
Group 11 &&
Group 12 ||
Group 13 ?:

Operators in the lower-numbered groups are applied first.

24-293 Crimson® 3.1 User Manual


REVISED 2019-1-15 WRITING ACTIONS
DRAWING NO. LP1044-F CHANGING PAGE

Chapter 25 Writing Actions

While expressions define values, actions define what you want to happen when an event occurs. Most of the
actions in a database will relate to interactions with primitives or with the keyboard. Since Crimson® 3.1 provides a
simple method of defining commonly used actions for these items, you will often be able to avoid writing actions by
hand. Actions are needed, though, if you want to use triggers, write programs, or use primitives in User Defined
mode.

25.1 Changing Page
To create an action that changes the page shown on the panel’s display, use the syntax GotoPage(Name), where
Name is the name of the display page in question. The current page will be removed, and the new page will be
displayed in its place.

25.2 Changing Numeric Values
Crimson provides several ways of changing data values.

25.2.1 Simple Assignment
To create an action that assigns a new value to a tag or to a register in a communications device, use the syntax
Data=Value, where Data is the data item to be changed, and Value is the value to be assigned. Note that Value
need not just be a constant value, but can be any valid expression of the correct type. Refer to the previous section
for details of how to write expressions. For example, code such as [N7:0]=Tank1+Tank2 can be used to add two
tank levels and store the total quantity directly in a PLC register. Note that all assignment operators fall into Group
14. In other words, they will be evaluated after all other operators in an action. They are also unique in that they
group right-to-left. This means that a code fragment such as Tag1=Tag2=Tag3=0 can be used to clear all three tags
at once.

25.2.2 Compound Assignment
To create an action that sets a data value equal to its current value combined with another value by means of any
of the operators defined in the previous section, use the syntax Dataop=Value, where Data is the tag to be
changed, Value is the value to be used by the operator, and op is any of the available operators. For example, the
code Tag+=10 will increase Tag by a value of 10, while Tag*=10 will multiply the current value by 10.

25.2.3 Increment and Decrement
To create an action that increases a data value by one, use the syntax Data++. To create an action that decreases
a tag by one, use the syntax Data--. Note that the ++ or -- operators may be placed before or after the data value
in question. In the former case, the value of the expression represented by ++Data is equal to the value of Data
after it has been incremented. In the latter case, the expression is equal to the value before it has changed.

Crimson® 3.1 User Manual 25-294


WRITING ACTIONS REVISED 2019-1-15
CHANGING BIT VALUES DRAWING NO. LP1044-F

25.3 Changing Bit Values
To change a bit within a tag, use the syntax Data.Bit=1 or Data.Bit=0 to set or clear the bit as required, where
Data is the tag in question and Bit is the zero-based bit number. Note again that the value on the right-hand side
of the = operator can be an expression if desired, such that an example such as Data.1=(Level>10) can be used
to set or clear a bit depending on whether or not a tank level exceeds a preset value.

25.4 Running Programs
Programs may be invoked within actions by following the program name with a pair of parentheses. For example,
Program1() will invoke the associated program. The program will execute in the foreground or background as
defined by the program’s properties.

25.5 Using Functions
Crimson provides a number of predefined functions that can be used to perform various operations. These
functions are defined in detail in the Function Reference. They are invoked using a syntax similar to that for
programs, with any arguments to the function being enclosed within the parentheses. For example,
SetLanguage(1) will set the terminal language to 1.

25-295 Crimson® 3.1 User Manual


REVISED 2019-1-15 GRAPHITE I/O MODULES
DRAWING NO. LP1044-F SELECTING MODULES

Chapter 26 Graphite I/O Modules

This chapter provides information on how to configure the I/O modules supported by the Graphite range of HMIs
and the associated controllers. While communications modules are configured via the Communications tab, I/O
and control modules have their own dedicated I/O Modules category at the bottom of the categories list.

26.1 Selecting Modules
As mentioned above, modules are selected via the I/O Modules category:

To add a module, select the required slot and press the New button to display a dialog box:

Select the appropriate module and press OK to close the dialog. After the module has been created, you may
provide a descriptive name by right-clicking on the module that was added and then selecting Rename or by simply
pressing the F2 key. Additional modules can be added by repeating the process. Modules can be moved between
slots by drag-and-drop.

Crimson® 3.1 User Manual 26-296


GRAPHITE I/O MODULES REVISED 2019-1-15
THE GMPID PID MODULES DRAWING NO. LP1044-F

26.2 The GMPID PID Modules
The GMPID modules’ parameters are broken into groups, each with their own page. The GMPID2 module has
several extra tabs for configuration of the second loop. Use the tabs at the top of the window to view the various
pages.

26.2.1 General Properties

26.2.1.1 Operation
• The Control Type property allows you to choose from Heat Only, Cool Only or Heat and Cool
depending on the type of process to be controlled. For processes other than thermal applications,
select Heat for reverse acting applications and Cool for direct acting applications.
• The Input Type property is used to select an RTD, Thermocouple or process input type. When either
RTD or Thermocouple mode is selected, the TC / RTD property is used to select the sensor standard
being used.
• The Input Filter is a time constant used to stabilize fluctuating input signals.
• The Slope and Offset properties can be used to adjust or rescale the PV value to compensate for an
error in the attached sensor. They can also allow correction of the PV value in applications in which the
sensor isn’t measuring the process directly, thereby inducing a fixed or variable offset. The section
below provides a worked example on how to configure these properties.

26.2.1.2 Units
• Temperature Units selects between the Kelvin, Fahrenheit or Celsius scales.
• The Process Units property allows you to enter the engineering units for the process, while the
Decimal Places property is used to allow Crimson® 3.1 to display the engineering units in the proper
resolution. These are only used to identify the appropriate fields throughout the software. The
parameters are saved as part of the Crimson file, but are not used within the module.

26-297 Crimson® 3.1 User Manual


REVISED 2019-1-15 GRAPHITE I/O MODULES
DRAWING NO. LP1044-F THE GMPID PID MODULES

• The Process at 0% and Process at 100% properties are used to scale DC input signals. Enter the
desired PV reading for the minimum and maximum input signal levels. For example, if the application
accepts an input from a flow sensor with a 4 to 20 mA output that represents 5 to 105 gallons per
minute, select Process 420mA for the Input Type, enter 5 for the Process at 0% setting and enter 105
for the Process at 100% setting.
• The Square Root property allows the unit to be used in applications in which the measured signal is
the square of the PV. This is useful in applications such as the measurement of flow with a differential
pressure transducer.

26.2.1.3 Initialization
The initialization parameters provide initial values for settings usually controlled by a PC or PLC. In typical
applications, these settings will only be used until communications is established for the first time, at which point
the remote device will take over control.
• The Include in Download property is used to determine whether the initialization values will be
downloaded to the module. Selecting No allows the modification and download of databases at will,
without accidental overwriting of the established process parameters such as the set-point, PID
values, etc.
• The PID Parameters property dictates which PID parameters the module will load and subsequently
use to control the process. The module controls the process using the Active PID values and Active
Power Filter. (See ActConstP, ActConstI, ActConstD and ActFilter variables in the Available Data
chart at the end of this section.) The active set is loaded with either the User PID Settings or the Auto-
Tune Results values, depending on the state of the ReqUserPID bit. If the bit is true, the Active set is
loaded with the user’s variables. If the bit is false, the values that were established by auto-tune are
loaded. Adjusting the PID Parameters property writes the ReqUserPID bit appropriately upon
initialization.
• The Control Mode property dictates whether the module will be in auto or manual mode upon
initialization. In auto mode, the controller calculates the required output to reach and maintain setpoint,
and acts accordingly. In manual mode, the output can be controlled directly by writing to the power
variable.
• The Initial Setpoint property is used as the setpoint value upon initialization.
• Manual Power is the level the PID module will assume in manual mode. Values beyond +100% and -
100% can be entered to ensure that the gains and offsets defined in the Power Transfer section do not
limit the outputs.

26.2.1.4 SmartOnOff
SmartOnOff is designed for situations where on-off control would normally be used but where the advantages of
PID are also desired. When either heat or cool is placed into this mode, the control output will either be driven on or
off, with no intermediate values or time proportioning. However, rather than using the process value to decide when
to turn the output on, SmartOnOff looks at the output of the PID calculation and activates the output when it
exceeds half the defined gain for that channel. For example, with default settings, SmartOnOff for heating would
turn the heat output on once the PID algorithm called for 50% power or more, with the hysteresis value being used
to ensure that small changes in the PID calculation do not produce relay chatter. The Hysteresis property can be
used to eliminate output chatter by separating the on and off points when performing SmartOnOff control. The
Hysteresis value is centered around the setpoint, such that the transition points of the output are offset above and
below the setpoint by half that value.

Crimson® 3.1 User Manual 26-298


GRAPHITE I/O MODULES REVISED 2019-1-15
THE GMPID PID MODULES DRAWING NO. LP1044-F

26.2.2 Slope and Offset Example
Suppose the reading from a thermocouple is 3°F lower than the actual temperature when the process is at 200°F,
but is only 1°F lower than the actual temperature when the process is at 300°F. We need to define custom Slope
and Offset value to correct these errors so that the module receives and processes the correct value.
The slope can be calculated using the following:

In our example, this corresponds to:

Once we have the slope, we can calculate the offset using the following:

In our example, this corresponds to:

A Slope value of 0.980 and an Offset value of 6.940 thus corrects the sensor error.
The above is independent of temperature scale, and works just the same in °C or °K.

26.2.3 Control Properties

26.2.3.1 Setpoint
• The Ramp Timebase property selects seconds, minutes, or hours as the unit of time for ramping of the
process.
• The Ramp Rate property is used to reduce sudden shock to a process during setpoint changes and
system startup, a setpoint ramp rate can be used to increase or decrease the Actual Setpoint at a

26-299 Crimson® 3.1 User Manual


REVISED 2019-1-15 GRAPHITE I/O MODULES
DRAWING NO. LP1044-F THE GMPID PID MODULES

controlled rate. The value is entered in units/time. A value of 0 disables setpoint ramping. If the
Setpoint Ramp Rate is a non-zero value, and the Requested Setpoint is changed or the module is
powered up, the controller sets the Actual Setpoint to the current process measurement, and uses that
value as its setpoint. It then adjusts the Actual Setpoint per the setpoint Ramp Rate. When the Actual
Setpoint reaches the Requested Setpoint, the controller resumes use of the Requested Setpoint value.
(In a properly designed and functioning system, the process will have followed the Actual Setpoint
value to the Requested Setpoint value.)
• The On / Off Hysteresis property is used to eliminate output chatter by separating the on and off points
of the output(s) when performing on/off control. The hysteresis value is centered around the setpoint,
such that the transition points of the output will be offset above and below the setpoint by half of that
value. This value affects outputs programmed for Heat or Cool. During auto-tune, the controller cycles
the process through 4 on-and-off cycles, so it is important to set the hysteresis to an appropriate value
before starting the tuning process.
• The On-Off Deadband property provides a means of offsetting the on-points of heat and cool outputs
programmed for on/off operation. This results in a deadband if the value is positive, and overlap if the
value is negative. When determining the actual transition points of the outputs, the On / Off Hysteresis
value must also be taken into consideration.

26.2.3.2 Auto‐Tune Settings
• The Tune Response property is used to ensure that auto-tune yields the optimal P, I, and D values for
your specific application. A setting of Very Aggressive results in a PID parameter set that will reach
setpoint as fast as possible with no concern for overshoot, while a setting of Very Conservative
sacrifices speed to reach the setpoint in order to prevent overshoot. If the Tune Response property is
changed, auto-tune needs to be reinitiated for the changes to affect the PID settings. See the Auto-
Tuning Section for more information.

26.2.3.3 User PID Settings
• The Proportional Band property, entered as a percentage of the full input range, is the amount of input
change required to vary the output by its full scale. For temperature inputs, the input range is fixed per
the entered thermocouple or RTD type. For process inputs, the input range is the difference between
the Process at 0% and Process at 100% values. The Proportional Band is adjustable from 0% to
1000% and should be set to a value that provides the best response to a process disturbance while
minimizing overshoot. A Proportional Band of 0% forces the controller into on-off control. The optimal
value for this parameter may be established by invoking auto-tune.
• The Integral Time is the time in seconds that it takes the integral action to equal the proportional action
for a constant process error. If the error continues to exist, integral action is repeated each Integral
Time. The higher the value, the slower the response. The optimal value may be established by
invoking auto-tune. The Integral Time is adjustable from 0 to 6000 seconds.
• The Derivative Time is the seconds per repeat that the controller looks ahead at the ramping error to
see what the proportional contribution will be and it matches that value every Derivative Time. If the
ramping error continues to exist, the derivative contribution is repeated every derivative time.
Increasing the value helps to stabilize the response, but too high of a value coupled with noisy signal
processes, may cause the output to fluctuate too greatly. Setting the time to zero disables derivative
action. The optimal Derivative Time may be established by invoking auto-tune. The value is adjustable
from 0 to 600 seconds.
• The Power Filter is a time constant in seconds that dampens the calculated output power. Increasing
the value increases the dampening effect. Generally, a Power Filter in the range of one-twentieth to
one-fiftieth of the controller’s integral time or the process time constant will be effective. Values longer
than these may cause controller instability due to the added lag effect.

Crimson® 3.1 User Manual 26-300


GRAPHITE I/O MODULES REVISED 2019-1-15
THE GMPID PID MODULES DRAWING NO. LP1044-F

26.2.4 Power Properties

26.2.4.1 Power Transfer
• The Output Offset value effectively shifts the zero point of the module’s output power calculation. This
feature is commonly used to remove steadystate error in proportional-only applications.
• The Output Deadband property defines the area in which both the heating and cooling outputs are
inactive, known as deadband, or the area in which they will both be active, known as overlap. A
positive value results in a deadband, while a negative value results in an overlap.
• The Output Heat Gain defines the gain of the heating output relative to the gain established by the
Proportional Band. A value of 100% causes the heat gain to mimic the gain determined by the
proportional band. A value less than 100% can be used in applications in which the heater is
oversized, while a value greater than 100% can be used when the heater is undersized. For most
applications, the default value of 100% is adequate, and adjustments should only be made if the
process requires it.
• The Output Cool Gain defines the gain of the cooling output relative to the gain established by the
Proportional Band. A value of 100% causes the cool gain to mimic the gain determined by the
proportional band. A value less than 100% can be used in applications in which the cooling device is
oversized, while a value greater than 100% can be used when the cooling device is undersized. For
most applications, the default value of 100% is adequate, and adjustments should only be made if the
process requires it.
• The Heat Low Limit and Heat High Limit properties may be used to limit controller power due to
process disturbances or setpoint changes. Enter the safe output power limits for the process. You may
enter values beyond +100% and –100% to overcome the effect where the various gains and offsets
would otherwise limit the outputs to less than their maximums.
• The Cool Low Limit and Cool High Limit properties may be used to limit controller power due to
process disturbances or setpoint changes. Enter the safe output power limits for the process. You may
enter values beyond +100% and –100% to overcome the effect where the various gains and offsets
would otherwise limit the outputs to less than their maximums.

26-301 Crimson® 3.1 User Manual


REVISED 2019-1-15 GRAPHITE I/O MODULES
DRAWING NO. LP1044-F THE GMPID PID MODULES

26.2.4.2 Transfer Graph
• The previous power transfer graph illustrates the relationship between the commanded power and the
values sent to the heat and cool outputs. The blue line represents the cooling, while the red line
represents the heating. The graph is updated in real time as adjustments are made to the other
properties.

26.2.5 Alarm Properties

The four process alarms may be used to monitor process status. They may optionally be used to actuate the
module’s physical outputs, or the status of the alarm bit may be monitored via the system itself, or via external
devices.

Crimson® 3.1 User Manual 26-302


GRAPHITE I/O MODULES REVISED 2019-1-15
THE GMPID PID MODULES DRAWING NO. LP1044-F

• The Mode property determines what behavior the alarm will assume. The table below describes the
various selections.
Mode Description
Absolute Low The alarm activates when the Process Value falls
below the Alarm Value. The alarm deactivates when
the Process Value goes above the Alarm Value +
Hysteresis.
Absolute High The alarm activates when the Process Value
exceeds the Alarm Value. The alarm deactivates
when the Process Value falls below the Alarm Value
– Hysteresis.
Deviation Low If the Process Value falls below the Setpoint Value by
the amount of the Alarm Value, the alarm activates.
In this mode, the alarm point tracks the Setpoint
Value.
Deviation High If the Process Value exceeds the Setpoint Value by
the amount of the Alarm Value, the alarm activates.
In this mode, the alarm point tracks the Setpoint
Value.
In Band If the difference between the Setpoint Value and the
Process Value is not greater than the Alarm Value,
the alarm activates.
Out of Band If the Process Value exceeds, or falls below, the Set-
point Value by an amount equal to the Alarm Value,
the alarm activates. In this mode, the alarm point
tracks the Setpoint Value.

• The Value property is the point at which the alarm will turn on. The alarm values are entered as
process units or degrees.
• The Hysteresis value separates the on and off points of the alarm. For example, a high acting alarm
programmed to turn on at 500 with a Hysteresis of 10 will turn on at 500 but off again when the PV falls
below 490. To remember this more easily, note that the hysteresis always acts to keep the alarm
active.
• The Latching property dictates how the alarm behaves once activated. See the Alarm Behavior Chart
below for more information.The Standby property provides a means of preventing so called nuisance
alarms during power up. See the Alarm Behavior Chart below for more information.

26-303 Crimson® 3.1 User Manual


REVISED 2019-1-15 GRAPHITE I/O MODULES
DRAWING NO. LP1044-F THE GMPID PID MODULES

26.2.5.1 Alarm Behavior Chart
Latching Standby Alarm Behavior
Off Off Alarm automatically turns on and off as the process value entered
and leaves the alarm state. The AlarmAccept bit disables alarm,
regardless of the state of the process. If the alarm condition exists
and the AlarmAccept bit is written to 0, the alarm activates.
On Off Once activated, the alarm stays active until accepted. If the alarm
condition no longer exists, writing the AlarmAccept bit to 1
resets the alarm condition. While the AlarmAccept bit is 1, the
alarm automatically turns on and off as the process value enters
and leaves the alarm state.
Off On The alarm automatically turns on and off as the process value
enters and leaves the alarm state. The alarm is automatically dis-
abled when a setpoint change occurs or when the module is first
powered up. This prevents nuisance alarms from occurring. The
alarm remains disabled until the process enters a non-alarm state.
The next time the process value enters an alarm condition, the
alarm will activate accordingly. The AlarmAccept bit disables the
alarm, regardless of the state of the process. If the alarm condition
exists and the AlarmAccept bit is written to 0, the alarm acti-
vates.
On On Once activated, the alarm stays active until accepted. The alarm is
automatically disabled when a setpoint change occurs, or when
the module is first powered up. This prevents nuisance alarms
from occurring. The alarm remains disabled until the process
enters a non-alarm state. The next time the process value enters
an alarm condition, the alarm will activate accordingly. Setting the
AlarmAccept bit to 1 turns off an active alarm. If the alarm condi-
tion still exists when the bit is set to 0, the alarm remains off and is
placed into standby mode. This implies that the alarm will remain
off until the alarm condition is removed and then reapplies. If the
AlarmAccept bit remains at 1, the alarm is disabled and will not
function.

26.2.5.2 Heater Current
The Heater Current alarm is useful for monitoring the condition of external control circuitry via the Heater Current
Monitor input. Depending on output conditions, it can detect relays that have failed in the open or close state, as
well as failing heater elements.
• The Channel property is used to select which one of the four discrete outputs will used to control the
monitoring process. This output should be the one that is used to control the heater whose current is
being measured.
• The Limit Low property represents the maximum allowable current to be measured while the heater is
turned off. A value from 0 to 100mA may be entered. If the heater current monitor input measures a
current value greater than the Limit Low value while the output is off, the alarm becomes active.
• The Limit High property represents the minimum acceptable current to be measured while the heater
output is turned on. A value from 0 to 100mA may be entered. If the heater current monitor input
measures a current value less than the Limit High value while the output is on, the alarm becomes
active.
• The Latching property determines whether an activated alarm will stay active until accepted. To accept
a latched alarm, its AlarmAccept bit must be written to a 1. If latching is not selected, the alarm will

Crimson® 3.1 User Manual 26-304


GRAPHITE I/O MODULES REVISED 2019-1-15
THE GMPID PID MODULES DRAWING NO. LP1044-F

automatically deactivate when the alarm condition no longer exists, and the AlarmAccept bit may be used
as a means of disabling the alarm.

26.2.5.3 Input Fault
The Input Fault section is used to define the response of the GMPID module’s control outputs in the event of an
input failure. The Input Fault alarm is considered a process alarm for items that may be mapped to Any Process
Alarm.
• The Set Output To property is the output value that the controller will assume in the event of an input
sensor failure. Values beyond +100% and –100% may be entered to overcome limitations caused by
power transfer values.
• The Latching property, if enabled, will cause the input fault bit to stay active until accepted, regardless
of the state of the input. To reset the fault, the InputAccept bit must be written to a 1. If latching is not
selected, the fault will automatically deactivate when the input failure is corrected.

26.2.6 Output Properties

26.2.6.1 Digital Outputs
• The Output properties are used to assign the module’s physical outputs to various internal properties
or values. The GMPID2’s list is expanded to include the channel number for each possible selection.
• The Cycle Time value is used to define the cycle time of an output when used in time-proportioned
mode. This mode is enabled when an analog value is assigned to a digital output, and converts a
percentage value to on-and-off times for the output. For example, if the controller’s algorithm calls for
65% power and the cycle time is set to 10 seconds, the output will be on for 6.5 seconds and off for 3.5
seconds. A Cycle Time less than or equal to one-tenth of the process time constant is recommended.

26-305 Crimson® 3.1 User Manual


REVISED 2019-1-15 GRAPHITE I/O MODULES
DRAWING NO. LP1044-F THE GMPID PID MODULES

26.2.6.2 Linear Output (GMPID1 Only)
• The Output Type property is used to select between 0-10 V, 0-20 mA, or 4-20 mA outputs.
• The Mapping property is used to assign the module’s analog output to one of various internal
properties. The most common configuration is to set the property to Heat Power to control a heat-only
process via the analog output.
• The Drive Min At and Drive Max At values can be used to scale the analog output, using the same
units as those of the mapped value.
• The Output Filter is a time constant entered in seconds that dampens the response of the analog
output. Increasing the value increases the dampening.
• The Output Deadband value can be used to prevent the analog output from changing when only small
adjustments are required. This is useful in preventing mechanical wear when driving a proportional
valve. The analog output will not adjust unless the change called for exceeds half of the deadband
value. For example, with a deadband of 10% and an output value of 50%, the output will not change
until a value of 45% or 55% is requested.
• The Output Update time can be used to decrease the update frequency of the analog output. When
the Output Update timer expires, the analog output checks to see if the required change is greater than
the Output Deadband value. If the required change is greater, the output will reflect the new value. If
not, the output does not change and the timer starts again. This property can be combined with the
deadband to prevent hunting with mechanical actuators.

26.2.7 Auto‐Tuning
Auto-tune may be used to establish the optimal P, I, D and Power Filter values. By cycling the process through four
on-and-off cycles, the module learns information about the process and can thereby determine the most
appropriate control loop parameters.

The setpoint used during auto-tune is 75% above the difference between the current PV and the setpoint. This
allows the oscillations to occur close to setpoint while avoiding excessive overshoot. Since the module performs
on/off control during auto-tune, it is important to set a suitable On / Off Hysteresis value prior to invoking auto-tune.
Customization of the PID set that auto-tune will yield is possible by adjusting the Tune Response value to Very
Aggressive, Aggressive, Default, Conservative, or Very Conservative. These settings correspond to the value of 0
thru 4 in the Tune Response register.

Crimson® 3.1 User Manual 26-306


GRAPHITE I/O MODULES REVISED 2019-1-15
THE GMPID PID MODULES DRAWING NO. LP1044-F

26.2.7.1 Invoking Auto‐Tune
The auto-tune sequence uses request-acknowledgement handshaking. To invoke auto-tune, set the ReqTune bit to
a 1. The module signifies that auto-tune is running by setting the AckTune bit high. When auto-tune is complete, the
TuneDone bit goes high, at which point the external logic should turn off the auto-tune request bit. When the module
observes this change, it will set the AckTune bit back to 0. If for some reason auto-tune fails to complete, the
TuneDone and TuneFail bits both go high. This situation may occur if, for example, an input fault occurs, and will
require that auto-tune be reinitialized.
An auto-tune request cycle therefore looks as follows:

1. PLC sets ReqTune high.

2. Module starts auto-tuning, sets AckTune high.

3. Auto-tune is complete. AckTune goes low; TuneDone goes high.

4. PLC sees TuneDone high, sets ReqTune low.

5. Module sees ReqTune go low, and sets the TuneDone low.

26.2.8 Available Data
The tables below show the GMPID1 data values that are available to the Graphite host. The GMPID2 module
typically has the same data replicated for Loop 1 and Loop 2. Decimal places are used to denote resolution only
and are not read or written. For example, while Power is shown as varying from 0% to 100.00%, it should be written
from 0 to 10000.

26-307 Crimson® 3.1 User Manual


REVISED 2019-1-15 GRAPHITE I/O MODULES
DRAWING NO. LP1044-F THE GMPID PID MODULES

26.2.8.1 Loop Status

Data Description Range Access


PV Process Value or input value of the module. Per Sensor R
Output Calculated output power of the PID loop. +/- 200.00% R
HeatPower Output applied to channels assigned for Heat. 0 – 100.00% R
CoolPower Output applied to channels assigned for Cool- 0 – 100.00% R
ing.
ActSP Actual Setpoint currently used by the PID loop. Per Sensor R
This may not be the same as the requested set-
point in applications using setpoint ramping or
during the auto-tune process.
Error Difference of Process Value and Actual Set- Per Sensor R
point.
ColdJunc Cold Junction Calibration Value N/A R
HCMValue Heater Current mA Input Value 0 – 100.00 R
mA
AckManual Acknowledge Manual mode 0 or 1 (bit) R
AckTune Acknowledge auto-tune request. 0 or 1 (bit) R
TuneDone Auto-tune completed. 0 or 1 (bit) R
TuneFail Auto-tune did not finish successfully. 0 or 1 (bit) R
Alarm1 Alarm 1 status. 0 or 1 (bit) R
Alarm2 Alarm 2 status. 0 or 1 (bit) R
Alarm3 Alarm 3 status. 0 or 1 (bit) R
Alarm4 Alarm 4 status. 0 or 1 (bit) R
HCMAlarmLo Heater Current Monitor low limit alarm. 0 or 1 (bit) R
HCMAlarmHi Heater Current Monitor high limit alarm. 0 or 1 (bit) R
InputAlarm Input out of range. 0 or 1 (bit) R
AckProfile Set if the setpoint profile is enabled. 0 or 1 (bit) R
AckHold Set if manual hold of the setpoint profile is 0 or 1 (bit) R
active.
AutoHold Set if automatic hold of the setpoint profile is 0 or 1 (bit) R
active.
ProfDone Set if the setpoint profile is complete. 0 or 1 (bit) R
ActSegment Currently active segment of the setpoint profile. 0 – 29 R
SegRemain Time remaining for the current setpoint profile 0 - 32767 R
segment.

Crimson® 3.1 User Manual 26-308


GRAPHITE I/O MODULES REVISED 2019-1-15
THE GMPID PID MODULES DRAWING NO. LP1044-F

26.2.8.2 Loop / Control

Data Description Range Access


ReqSP Requested Setpoint written to the controller. Per Sensor R/W
The actual value may be different in applica-
tions using setpoint ramping or in auto-tune
mode.
Power Manual output power setting. +/- 200.00% R/W
AltSP Alternate Setpoint to be used by the controller in 0 or 1 (bit) R/W
place of the ReqSP value if the ReqAltSP bit is
set to 1.
AltPV Alternate Process Value to be used by the con- 0 or 1 (bit) R/W
troller in place of the hardware PV if the ReqA-
ltPV bit is set to 1.
SetHyst Setpoint Hysteresis for On / Off Control. Per Sensor R/W
SetDead Setpoint Deadband for On / Off Control. Per Sensor R/W
SetRamp Setpoint Ramp Rate. Per Sensor R/W
InputFilter Input Filter. 0 – 60.0 sec R/W
InputOffset Input Offset. Per Sensor R/W
InputSlope Input Slope. 0.000 – R/W
10.000
ReqManual Request Manual. Write to 1 to invoke manual 0 or 1 (bit) R/W
mode. In manual mode, writing to the Power
register controls the output power.
ReqTune Request Auto-Tune. Write to 1 to invoke auto- 0 or 1 (bit) R/W
tune.
ReqUserPID Request User PID. Write to 1 to load User Val- 0 or 1 (bit) R/W
ues into the active PID parameter set or to 0 to
load Auto-Tune Results into active PID parame-
ter set.
ReqProfile Request Profile. Write to 1 to start the setpoint 0 or 1 (bit) R/W
profiler, or write to 0 to cancel profile mode.
ReqHold Request Hold. Write to 1 to manually hold the 0 or 1 (bit) R/W
setpoint profiler, or write to 0 to continue.
ReqAltSP Request Alternate Setpoint. Write to 1 to select 0 or 1 (bit) R/W
the alternate setpoint, or write to 0 to use the
regular setpoint.
ReqAltPV Request Alternate Process Value. Write to 1 to 0 or 1 (bit) R/W
select the alternate PV, or write to 0 to use the
hardware input.
ReqSegment Request Segment. Start segment value for pro- 0 – 29 R/W
filing.
EndSegment End Segment. Last active segment plus 1 for 1 – 30 R/W
profiling.
ProfError Profile Error. Sets size of setpoint profile error Per Sensor R/W
band.
ProfHyst Profile Hysteresis – Sets size of hysteresis on Per Sensor R/W
error band

26-309 Crimson® 3.1 User Manual


REVISED 2019-1-15 GRAPHITE I/O MODULES
DRAWING NO. LP1044-F THE GMPID PID MODULES

26.2.8.3 Loop / Power

Data Description Range Access


PowerFault Power Output value for input fault. +/- 200.00% R/W
PowerOffset Power Output Offset value. +/- 100.00% R/W
PowerDead Power Output Deadband value. +/- 100.00% R/W
PowerHeatGain Power Output Heat Gain value. 0 – 500.00% R/W
PowerCoolGain Power Output Cool Gain value. 0 – 500.00% R/W
PowerHeatHyst Power Output SmartOnOff Heat Hysteresis. 0 – 50.00% R/W
PowerCoolHyst Power Output SmartOnOff Cool Hysteresis. 0 – 50.00% R/W
HeatLimitLo Heat Low Limit. 0 – 200.00% R/W
HeatLimitHi Heat High Limit. 0 – 200.00% R/W
CoolLimitLo Cool Low Limit. 0 – 200.00% R/W
CoolLimitHi Cool High Limit. 0 – 200.00% R/W

26.2.8.4 Loop / Alarms

Data Description Range Access


AlarmData1 Alarm 1 Value. Per Sensor R/W
AlarmData2 Alarm 2 Value. Per Sensor R/W
AlarmData3 Alarm 3 Value. Per Sensor R/W
AlarmData4 Alarm 4 Value. Per Sensor R/W
AlarmHyst1 Alarm 1 Hysteresis value. Per Sensor R/W
AlarmHyst2 Alarm 2 Hysteresis value. Per Sensor R/W
AlarmHyst3 Alarm 3 Hysteresis value. Per Sensor R/W
AlarmHyst4 Alarm 4 Hysteresis value. Per Sensor R/W
AlarmAccept1 Alarm 1 Accept bit. 0 or 1 (bit) R/W
AlarmAccept2 Alarm 2 Accept bit. 0 or 1 (bit) R/W
AlarmAccept3 Alarm 3 Accept bit. 0 or 1 (bit) R/W
AlarmAccept4 Alarm 4 Accept bit. 0 or 1 (bit) R/W
HCMLimitLo Heater Current Low Limit Alarm value. 0 – 100.00 R/W
mA
HCMLimitHi Heater Current Low Limit Alarm value. 0 – 100.00 R/W
mA
HCMAcceptLo Heater Current Low Limit Alarm Accept. 0 or 1 (bit) R/W
HCMAcceptHi Heater Current High Limit Alarm Accept. 0 or 1 (bit) R/W
InputAccept Input out of range alarm accept. 0 or 1 (bit) R/W

Crimson® 3.1 User Manual 26-310


GRAPHITE I/O MODULES REVISED 2019-1-15
THE GMPID PID MODULES DRAWING NO. LP1044-F

26.2.8.5 Loop / PID

Data Description Range Access


TuneCode Tune Response Code. 0–4 R/W
UserConstP User Proportional Value. 0 – 1000.0% R/W
UserConstI User Integral Value. 0 – 6000.0 R/W
sec
UserConstD User Derivative Value. 0 – 600.0 sec R/W
UserFilter User Power Filter Value. 0 – 60.0 sec R/W
AutoConstP Auto-tuned Proportional Value. 0 – 1000.0% R
AutoConstI Auto-tuned Integral Value. 0 – 6000.0 R
sec
AutoConstD Auto-tuned Derivative Value. 0 – 600.0 sec R
AutoFilter Auto-tuned Power Filter Value. 0 – 60.0 sec R
ActConstP Active Proportional Value. 0 – 1000.0% R
ActConstI Active Integral Value. 0 – 6000.0 R
sec
ActConstD Active Derivative Value. 0 – 600.0 sec R
ActFilter Active Power Filter Value. 0 – 60.0 sec R

26.2.8.6 Loop / Profile

Data Description Range Access


Seg00Time to Segment Time. Ramp-soak period for given See Below R/W
Seg29Time segment.
Seg00SP to Segment Setpoint. Ramp-soak setpoint for See Below R/W
Seg29SP given segment.
Seg00Mode to Segment Mode. Ramp-soak mode of given seg- See Below R/W
Seg29Mode ment.

Refer to Technical Note TNPC18 for details on ramp-soak operation, available at the following link:

http://files.redlion.net/filedepot_download/1300/4443

26.2.8.7 Outputs / Cycle Times

Data Description Range Access


CycleTime1 Cycle Time for Output 1 0.1 – 60.0 R/W
sec
CycleTime2 Cycle Time for Output 2 0.1 – 60.0 R/W
sec
CycleTime3 Cycle Time for Output 3 0.1 – 60.0 R/W
sec
CycleTime4 Cycle Time for Output 4 (GMPID2 only) 0.1 – 60.0 R/W
sec
 

26-311 Crimson® 3.1 User Manual


REVISED 2019-1-15 GRAPHITE I/O MODULES
DRAWING NO. LP1044-F THE GMSG STRAIN GAUGE INPUT MODULE

26.2.8.8 Outputs / Remote Data

Data Description Range Access


DigRemote1-4 Digital Remote. Outputs mapping to Digital 0 or 1 (bit) R/W
Remote can be controlled by writing the appro-
priate bit to a 1 or 0.
AnlRemote1-4 Analog Remote Value. Outputs mapped to Ana- Per Applica- R/W
log Remote can be controlled by writing a num- tion
ber to this word.

26.2.8.9 Outputs / Information

Data Description Range Access


OP1State State of Output 1. 0 or 1 (bit) R
OP2State State of Output 2. 0 or 1 (bit) R
OP3State State of Output 3. 0 or 1 (bit) R
OP4State State of Output 4. 0 or 1 (bit) R

26.3  The GMSG Strain Gauge Input Module
The GMSG module’s parameters are broken into groups, each with their own page.

26.3.1 General Properties

Crimson® 3.1 User Manual 26-312


GRAPHITE I/O MODULES REVISED 2019-1-15
THE GMSG STRAIN GAUGE INPUT MODULE DRAWING NO. LP1044-F

26.3.1.1 Inputs
The input parameters section contains settings for both inputs. If the module does not have the optional secondary
input fitted, the secondary input parameters can still be configured but they will be ignored.
• The Range property is used to configure the input for various signal levels.
• The Excitation property configures the excitation voltage to either 5V or 10V.
• The Display Low and Display High properties are used together with the Signal Low and Signal High
properties to scale the input voltage into appropriate display units. For example, suppose an
application employs a strain gauge that produces 0 to 21.00mV for a weight of 0 to 1000lbs. Enter 0 for
Display Low and 1000 for Display High to set the display range, and then enter 0 for Signal Low and
21.00 for Signal High to set the input corresponding range.

26.3.1.2 Operation
• The Control Type property allows you to choose from Reverse Only, Direct Only or Reverse and
Direct, depending on the type of process to be controlled.
• PV Assignment selects how the module determines the measured process value that the module’s
PID algorithm will attempt to control. This can simply be the Input 1 value, or one of several
mathematical results of Input 1 and Input 2.
• The PV Limit Low and PV Limit High properties are used to establish the working range of the PV
value, and subsequently, the range over which the module can control. The reported PV value remains
frozen at either limit if the process moves outside these boundaries. Exceeding either limit by more
than 5% of the full range results in the module assuming a process fault, at which time the PV value
reported becomes equal to the PV Limit High value.
• The Input Filter is a time constant used to stabilize fluctuating input signals.
• The Process Units property allows you to enter the engineering units for the process, while the
Decimal Places property is used to allow Crimson to display the engineering units in the proper
resolution. These are only used to identify the appropriate fields throughout the software. The
parameters are saved as part of the Crimson file, but are not used within the module.

26.3.1.3 Initialization
See the GMPID section for information on these properties.

26.3.1.4 SmartOnOff
See the GMPID section for information on these properties.

26-313 Crimson® 3.1 User Manual


REVISED 2019-1-15 GRAPHITE I/O MODULES
DRAWING NO. LP1044-F THE GMSG STRAIN GAUGE INPUT MODULE

26.3.2 Control Properties

See the GMPID section for information on these properties.

26.3.3 Power Properties

See the GMPID section for information on these properties.

Crimson® 3.1 User Manual 26-314


GRAPHITE I/O MODULES REVISED 2019-1-15
THE GMSG STRAIN GAUGE INPUT MODULE DRAWING NO. LP1044-F

26.3.4 Alarm Properties

See the GMPID section for information on these properties.

26.3.5 Output Properties

See the GMPID section for information on these properties.

26.3.6 Auto‐Tuning
See the GMPID section for information on this process.

26.3.7 Available Data
The tables below show the GMSG data values that are available to the Graphite host. Decimal places are used to
denote resolution only and are not read or written. For example, while Power is shown as varying from 0% to
100.00%, it should be written from 0 to 10000. In many cases, these are very similar to those provided by the
 

26-315 Crimson® 3.1 User Manual


REVISED 2019-1-15 GRAPHITE I/O MODULES
DRAWING NO. LP1044-F THE GMSG STRAIN GAUGE INPUT MODULE

GMPID modules, except that the terms Heat and Cool are replaced with Reverse and Direct. You may thus be
referred to that section of this manual for more information.

26.3.7.1 Loop / Status
See the GMPID section for information on these properties, except to note that the GMSG supports two inputs and
thus has two Input values and two InputAlarm values. Note also the comment above about Heat and Cool vs.
Reverse and Direct. Where the team Heat or Cool is used within a property name, it will have been replaced with
Rev or Dir.

26.3.7.2 Loop / Control
See the GMPID section for information on these properties.

26.3.7.3 Loop / Alarms
See the GMPID section for information on these properties.

26.3.7.4 Loop / Power
See the GMPID section for information on these properties, except to note the comment above about Heat and
Cool vs. Reverse and Direct. Where the team Heat or Cool is used within a property name, it will have been
replaced with Rev or Dir.

26.3.7.5 Loop / ScaleInput1

Data Description Range Access


DispLo1 Input 1 Display Low value. +/-30,000 R/W
DispHi1 Input 1 Display High value. +/-30,000 R/W
SiglLoKey1 Input 1 Signal Low configured value. +/-30,000 R/W
SigHiKey1 Input 1 Signal High configured value. +/-30,000 R/W
SigLoApp1 Input 1 Signal Low applied value. +/-30,000 R
SigHiApp1 Input 1 Signal High applied value. +/-30,000 R
StoreSigLo1 Store Input 1 Signal Low. On the positive going 0 or 1 (bit) R/W
edge, the millivolt signal applied to input 1 is
saved as SigLoApp1.
StoreSigHi1 Store Input 1 Signal Low. On the positive going 0 or 1 (bit) R/W
edge, the millivolt signal applied to input 1 is
saved as SigHiApp1.
SelectScaling1 Select Input 1 Applied Signals. When set to 1, 0 or 1 (bit) R/W
the applied signal values are active. When set
to 0, the configured signal values are active

Crimson® 3.1 User Manual 26-316


GRAPHITE I/O MODULES REVISED 2019-1-15
THE GMSG STRAIN GAUGE INPUT MODULE DRAWING NO. LP1044-F

26.3.7.6 Loop / ScaleInput2
The available data for ScaleInput2 is the same as ScaleInput1.

26.3.7.7 Loop / PeakValley

Data Description Range Access


PVPeak The maximum PV value since the last peak +/-30,000 R
reset.
PVVall The minimum PV value since the last valley +/-30,000 R
reset.
ResetPkVall Reset Peak and Valley. When set to 1, the peak 0 or 1 (bit) R/W
and valley registers will be set to the existing PV
value. When set to 0, the peak and valley regis-
ters will capture PV extremes.
ResetPeak Reset Peak. When set to 1, the peak register 0 or 1 (bit) R/W
will be set to the existing PV value. When set to
0, the peak register will capture PV extremes.
ResetVall Reset Valley. When set to 1, the valley register 0 or 1 (bit) R/W
will be set to the existing PV value. When set to
0, the valley register will capture PV extremes.

26.3.7.8 Loop / Tare

Data Description Range Access


PVGross Gross PV value from PV assignment math +/-30,000 R
before tare.
Inp1Gross Gross Input 1 value from input scaling before +/-30,000 R
tare.
Inp2Gross Gross Input 2 value from input scaling before +/-30,000 R
tare.
PVTareTot PV Tare Total. The sum of the tared PV values +/-30,000 R
since the last reset of the PV tare total.
Inp1TareTot Input 1 Tare Total. The sum of the tared input 1 +/-30,000 R
values since the last reset of the input 1 tare
total.
Inp2TareTot Input 2 Tare Total. The sum of the tared input 2 +/-30,000 R
values since the last reset of the input 2 tare
total.
TarePV Tare Process Value. A transition from 0 to 1 will 0 or 1 (bit) R/W
tare the PV value to 0. The tared value is added
to PV Tare Total.
TareInp1 Tare Input 1. A transition from 0 to 1 will tare the 0 or 1 (bit) R/W
Input 1 value to 0. The tared value is added to
Input 1 Tare Total.
TareInp2 Tare Input 2. A transition from 0 to 1 will tare the 0 or 1 (bit) R/W
Input 2 value to 0. The tared value is added to
Input 2 Tare Total.
RstPVTareTot Reset PV Tare Total. A transition from 0 to 1 will 0 or 1 (bit) R/W
reset PV Tare Total to 0.
RstIn1TareTot Reset PV Input 1 Tare Total. A transition from 0 0 or 1 (bit) R/W
to 1 will reset Input 1 Tare Total to 0.

26-317 Crimson® 3.1 User Manual


REVISED 2019-1-15 GRAPHITE I/O MODULES
DRAWING NO. LP1044-F THE GMTC AND GMRTD TEMPERATURE MODULES

RstIn2TareTot Reset PV Input 2 Tare Total. A transition from 0 0 or 1 (bit) R/W


to 1 will reset Input 2 Tare Total to 0.

26.3.7.9 Outputs / Cycle Times
See the GMPID section for information on these properties.

26.3.7.10 Outputs / Remote Data
See the GMPID section for information on these properties.

26.3.7.11 Outputs / Information
See the GMPID section for information on these properties.

26.4  The GMTC and GMRTD Temperature Modules
The GMTC and GMRTD parameters are broken into two groups, each with their own page.

26.4.1 Configuration Properties

26.4.1.1 General
• Temperature Units selects the Kelvin, Fahrenheit, or Celsius temperature scale.
• The Input Filter is a time constant used to stabilize fluctuating input signals.

26.4.1.2 Inputs
• The Enabled property provides a means to disable unused inputs, thereby increasing the rate at which
the remaining inputs are read. See the module hardware bulletin for more information on the resulting
update rates.
• The Thermocouple or RTD property is used to select the sensor standard being used, with the
available options being defined by the module type. The Millivolt option is available on GMTC modules
 

Crimson® 3.1 User Manual 26-318


GRAPHITE I/O MODULES REVISED 2019-1-15
THE GMTC AND GMRTD TEMPERATURE MODULES DRAWING NO. LP1044-F

to indicate that the input is to be used as a linearly-scaled voltage input rather than a thermocouple
input.
• The Slope and Offset properties can be used to adjust or rescale the PV value to compensate for an
error in the attached sensor. They can also allow correction of the PV value in applications in which the
sensor isn’t measuring the process directly, thereby inducing a fixed or variable offset. The GMPID
section above provides a worked example on how to configure these properties.

26.4.2 Millivolt Properties (GMTC Only)

26.4.2.1 General
• The Decimal Places property is used to allow Crimson to display the engineering units in the proper
resolution. This is only used to display the appropriate resolution throughout the software, and is not
used within the module.

26.4.2.2 Millivolt Scaling
• For inputs configured to Millivolt mode on the Configuration tab, the Display Low and Display High
properties are used together with the Signal Low and Signal High properties to scale the input voltage
into appropriate display units. For example, suppose an application employs a sensor that produces 0
to 42.5mV for a pressure of 0 to 1000psi. Enter 0 for Display Low and 1000 for Display High to set the
display range, and then enter 0 for Signal Low and 42.5 for Signal High to set the input corresponding
range.

26-319 Crimson® 3.1 User Manual


REVISED 2019-1-15 GRAPHITE I/O MODULES
DRAWING NO. LP1044-F THE GMTC AND GMRTD TEMPERATURE MODULES

26.4.3 Available Data
The tables below show the module data values that are available to the Graphite host.

26.4.3.1 Input / Status
Data Description Range Access
PV1–8 Process Value, after slope and offset calcula- Per Sensor R
tion.
ColdJunc Cold Junction Calibration value. N/A R
InputAlarm1–8 Input Out of Range indicator. 0 or 1 (bit) R

26.4.3.2 Input / Control

Data Description Range Access


InputFilter Input Filter 0 – 60.0 sec R/W
InputOffset1-8 Offset value added to PV. Per Sensor R/W
InputSlope1-8 Slope value applied to PV. .001 – R/W
10.000

26.4.3.3 Input / ScaleMvInputs

Data Description Range Access


DispLo1-8 Display Low 1-8 +/-30,000 R/W
DispHi1-8 Display High 1-8 +/-30,000 R/W
SigLo1-8 Signal Low 1-8 -10.00 – R/W
+56.00
SigHi1-8 Signal High 1-8 -10.00 – R/W
+56.00

Crimson® 3.1 User Manual 26-320


GRAPHITE I/O MODULES REVISED 2019-1-15
THE GMINI AND GMINV ANALOG INPUT MODULES DRAWING NO. LP1044-F

26.5 The GMINI and GMINV Analog Input Modules
The GMINI and GMINV parameters are configured on a single page.

26.5.1 Configuration Properties

26.5.1.1 General
• The Input Filter is a time constant used to stabilize fluctuating input signals.
• The Input Range property selects between available input ranges.

26.5.1.2 Inputs
These settings allow independent customization of each input’s parameters.
• The Enabled property provides a means to disable unused inputs, thereby increasing the rate at which
the remaining inputs are read. See the hardware bulletin for more information regarding reading rates.
• The Decimals property is used to allow Crimson to display the engineering units in the proper
resolution. This is only used to display the appropriate resolution throughout the software, and is not
used within the module.
• The PV at 0% and PV at 100% properties are used to scale DC input signals. Enter the desired PV
reading for the minimum and maximum input signal levels. For example, if the application accepts an
input from a flow sensor with a 4 to 20 mA output that represents 5 to 105 gallons per minute, select
Process 420mA for the Input Type, enter 5 for PV at 0% and enter 105 for PV at 100%.
• The Square Root property allows the unit to be used in applications in which the measured signal is
the square of the PV. This is useful in applications such as the measurement of flow with a differential
pressure transducer.

26-321 Crimson® 3.1 User Manual


REVISED 2019-1-15 GRAPHITE I/O MODULES
DRAWING NO. LP1044-F THE GMINI AND GMINV ANALOG INPUT MODULES

26.5.2 Available Data
The tables below show the module data values that are available to the Graphite host.

26.5.2.1 Input / Status

Data Description Range Access


PV1-8 Process Value – scaled per channel settings. Per Sensor R
InputAlarm1-8 Input Out of Range indicator. 0 or 1 (bit) R

26.5.2.2 Input / Control

Data Description Range Access


InputFilter Input Filter. 0 – 60.0 sec R/W
ProcessMin1-8 Desired PV at minimum input signal level. +/- 30,000 R/W
ProcessMax1-8 Desired PV at maximum input signal level. +/- 30,000 R/W

Crimson® 3.1 User Manual 26-322


GRAPHITE I/O MODULES REVISED 2019-1-15
THE GMOUT ANALOG OUTPUT MODULE DRAWING NO. LP1044-F

26.6  The GMOUT Analog Output Module
The GMOUT module’s parameters are broken into two groups, each with their own page.

26.6.1 Configuration Properties

26.6.1.1 Output 1 to Output 4
• The Output Type property is used to select between 0-5V, 0-10V, +/-10V, 0-20mA or 4-20 mA outputs.
• The Decimal Places property is used to allow Crimson to display the data values in the proper
resolution. This is only used to display the appropriate resolution within Crimson, and is not used within
the module.
• The Data Low and Data High properties are used in conjunction with the Output Low and Output High
properties to scale the output from raw data value’s unit of measure. For example, if the application
involves a data value of 0.0 to 500.0 that will provide an output of 1.000 to 5.000V, enter 0 for the Data
Low property and 500 for the Data High property to set the data range, and then enter 1V for the
Output Low and 5V for the Output High properties to set the output range.

26-323 Crimson® 3.1 User Manual


REVISED 2019-1-15 GRAPHITE I/O MODULES
DRAWING NO. LP1044-F THE GMOUT ANALOG OUTPUT MODULE

26.6.2 Initial Output Properties

26.6.2.1 Initialization
• The Include in Download property is used to determine whether the initialization values will be
downloaded to the module. Selecting no allows modification and download of databases at will,
without accidentally overwriting the values.
• The Data 1 to Data 4 properties are the initial output values used for Output 1 to Output 4, respectively.
These values are scaled per the Data Low, Data High, Output Low and Output High properties
described on the previous page.

26.6.2.2 Output Action
The output is controlled to “peg” at the Output Low and Output High values. In other words, if a data value that is
less than Data Low is written to the module, the output will remain at Output Low and the alarm will turn on.
Likewise, if a data value that is greater than Data High value is used, the output will go to Output High and the
alarm will again turn on.

Crimson® 3.1 User Manual 26-324


GRAPHITE I/O MODULES REVISED 2019-1-15
THE GMOUT ANALOG OUTPUT MODULE DRAWING NO. LP1044-F

26.6.3 Available Data
The tables below show the module data values that are available to the Graphite host.

26.6.3.1 Data

Data Description Range Access


Data1 Output 1 scaled value. DataLo1 to R/W
DataHi1
Data2 Output 2 scaled value. DataLo2 to R/W
DataHi2
Data3 Output 3 scaled value. DataLo3 to R/W
DataHi3
Data4 Output 4 scaled value. DataLo4 to R/W
DataHi4

26.6.3.2 Scaling

Data Description Range Access


DataLo1 Output 1 data low value. +/-30,000 R/W
DataLo2 Output 2 data low value. +/-30,000 R/W
DataLo3 Output 3 data low value. +/-30,000 R/W
DataLo4 Output 4 data low value. +/-30,000 R/W
DataHi1 Output 1 data high value. +/-30,000 R/W
DataHi2 Output 2 data high value. +/-30,000 R/W
DataHi3 Output 3 data high value. +/-30,000 R/W
DataHi4 Output 4 data high value. +/-30,000 R/W
OutputLo1 Output 1 output low value. Per Mode R/W
OutputLo2 Output 2 output low value. Per Mode R/W
OutputLo3 Output 3 output low value. Per Mode R/W
OutputLo4 Output 4 output low value. Per Mode R/W
OutputHi1 Output 1 output high value. Per Mode R/W
OutputHi2 Output 2 output high value. Per Mode R/W
OutputHi3 Output 3 output high value. Per Mode R/W
OutputHi4 Output 4 output high value. Per Mode R/W

26.6.3.3 Alarms

Data Description Range Access


Alarm1 Output 1 alarm status 0 or 1 (bit) R
Alarm2 Output 2 alarm status 0 or 1 (bit) R
Alarm3 Output 3 alarm status 0 or 1 (bit) R
Alarm4 Output 4 alarm status 0 or 1 (bit) R

26-325 Crimson® 3.1 User Manual


REVISED 2019-1-15 GRAPHITE I/O MODULES
DRAWING NO. LP1044-F THE GMDIO DIGITAL I/O MODULE

26.7 The GMDIO Digital I/O Module
The GMDIO parameters are contained on a single page.

26.7.1 Configuration Properties

• The Mode property determines whether high or low should be considered active for each input
channel. Note that the sourcing or sinking mode of an input is configured via hardware links. See the
product bulletin for more information.

26.7.2 Available Data
The tables below show the module data values that are available to the Graphite host.

26.7.2.1 Variables / Inputs

Data Description Range Access


Input1-8 Input State 0 or 1 (bit) R

26.7.2.2 Variables / Outputs

Data Description Range Access


Output1-6 Output State 0 or 1 (bit) R/W

Crimson® 3.1 User Manual 26-326


GRAPHITE I/O MODULES REVISED 2019-1-15
THE GMUIN UNIVERSAL INPUT MODULE DRAWING NO. LP1044-F

26.8  The GMUIN Universal Input Module
The GMUIN module’s parameters are broken one page for each of the four channels.

26.8.1 Input Properties

26.8.1.1 Operation
• The Input Type property is used to select among the following inputs:
0-10V, 0-50mV, 0-20mA, 4-20mA, RTD or Thermocouple.
• The TC / RTD property is used to select the sensor standard being used.
• The Input Filter is a time constant used to stabilize fluctuating input signals.
• The Slope and Offset properties can be used to adjust or rescale the PV value to compensate for an
error in the attached sensor. They can also allow correction of the PV value in applications in which the
sensor isn’t measuring the process directly, thereby inducing a fixed or variable offset. The GMPID
section above provides a worked example on how to configure these properties.

26.8.1.2 Units
• Temperature Units selects between Kelvin, Fahrenheit or Celsius.
• The Process Units property allows you to enter the engineering units for the process, while the
Decimal Places property is used to allow Crimson to display the engineering units in the proper
resolution. These are only used to identify the appropriate fields throughout the software. The
parameters are saved as part of the Crimson file, but are not used within the module.
• The Process at 0% and Process at 100% properties are used to scale DC input signals. Enter the
desired PV reading for the minimum and maximum input signal levels. For example, if the application
accepts an input from a flow sensor with a 4 to 20 mA output that represents 5 to 105 gallons per

26-327 Crimson® 3.1 User Manual


REVISED 2019-1-15 GRAPHITE I/O MODULES
DRAWING NO. LP1044-F THE GMUIN UNIVERSAL INPUT MODULE

minute, select Process 420mA for the Input Type, enter 5 for the Process at 0% setting and enter 105
for the Process at 100% setting.
• The Square Root property allows the unit to be used in applications in which the measured signal is
the square of the PV. This is useful in applications such as the measurement of flow with a differential
pressure transducer.

26.8.2 Available Data
The tables below show the module data values that are available to the Graphite host.

26.8.2.1 Input / Status

Data Description Range Access


PV1-4 Process Value after slope and offset calculation. Per Sensor R
ColdJunc1-4 Cold Junction Calibration value. N/A R
InputAlarm1-4 Input out of range indicator. 0 or 1 (bit) R

26.8.2.2 Input / Control

Data Description Range Access


InputFilter1-4 Input Filter. 0 – 60.0 sec R/W
InputOffset1-4 Offset value added to PV. Per Sensor. R/W
InputSlope1-4 Slope value applied to PV. .001 – R/W
10.000

Crimson® 3.1 User Manual 26-328

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy