05.05.2014 Views

csmstr - Omega Engineering

csmstr - Omega Engineering

csmstr - Omega Engineering

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DATA VALUES<br />

CRIMSON USER MANUAL - MODULAR CONTROLLER<br />

WRITING EXPRESSIONS<br />

You will recall from the earlier sections of this manual that many fields within Crimson are<br />

configured as what are called expression properties. You will further recall that these fields<br />

are configured by means of a user interface element similar to that shown below…<br />

In many situations, you will be configuring these properties to be equal to the value of a tag,<br />

or to the contents of a register in a remote communications device, in which case your<br />

selection will be made simply by clicking the appropriate option on the drop-down menu, and<br />

then selecting the required item from the resulting dialog box.<br />

There will be situations, though, when you want to make a property dependent on a more<br />

complex combination of data items, perhaps using some math to combine or compare their<br />

values. Such eventualities are handled via what are known as expressions, which can be<br />

entered in the property’s edit box whenever General mode is selected via the drop-down.<br />

DATA VALUES<br />

All expressions contain at least one data value. The simplest expressions are thus references<br />

to single constants, single tags or single PLC registers. If you enter either of the last two<br />

options, Crimson will simplify the editing process by automatically changing the property<br />

mode as appropriate. For example, if you enter a tag name in General mode, Crimson will<br />

switch to Tag mode, and show the tag name in the selection field.<br />

CONSTANTS<br />

Constants represent—not surprisingly—constant numbers or strings.<br />

INTEGER CONSTANTS<br />

Integer constants represent a single 32-bit signed number. They may be entered in decimal,<br />

binary, octal or hexadecimal as required. The examples below show the same number entered<br />

in the four different number bases…<br />

BASE<br />

EXAMPLE<br />

Decimal 123<br />

Binary<br />

0b1111011<br />

Octal 0173<br />

Hexadecimal<br />

0x7B<br />

The ‘U’ and ‘L’ suffixes supported by earlier versions of software are not used.<br />

PAGE 260<br />

http://www.redlion.net/controller

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!