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.

PROGRAM PROPERTIES<br />

CRIMSON USER MANUAL - MODULAR CONTROLLER<br />

the value of that calculation to the user. Programs that return values are<br />

described in more detail below.<br />

• The Run In Background property is used to indicate whether Crimson should<br />

wait for the program to complete execution before continuing with processing<br />

whatever task invoked the program. For example, if this property is set to No,<br />

running a program in response to a key being pressed will result in a pause in<br />

display updates until the program completes. (Since most programs take very<br />

little time to execute, this may not even be noticeable.) If this property is set to<br />

Yes, display updates will continue immediately, and the program will execute at<br />

a lower priority in the background. Only one background program will run at<br />

once, so subsequent requests are queued for later execution. Note also that<br />

programs that return values cannot be run in the background, as their return<br />

value would then not be available for the caller to use!<br />

• The External Data and Timeout properties are used to control how the program<br />

interacts with Crimson’s communication infrastructure with respect to external<br />

data items to which the program makes reference. You will recall that Crimson<br />

only reads data items when they are used. This property is used to control the<br />

exact interpretation of this rule with respect to programs…<br />

MODE<br />

Read When Referenced<br />

Read Always<br />

Read When Executed<br />

Read But Run Anyway<br />

BEHAVIOR<br />

External data used by the program will be added to the<br />

comms scan whenever the program is referenced. If the<br />

program is referenced by a display page, the data will be<br />

read when that page is displayed; if the program is<br />

referenced by a global action or a trigger, the data will be<br />

read at all times. This is the default mode, and is<br />

acceptable for all programs, except those that use very<br />

large amounts of external data.<br />

External data used by the program will be read at all<br />

times, whether or not the program is referenced. This<br />

means that the program will always be ready to run, and<br />

that the operator will not see the “NOT READY” message<br />

that might otherwise occur when the program is first<br />

referenced. The downside of this mode is that comms<br />

performance may be reduced if large amounts of data are<br />

referenced by the program.<br />

External data used within the program will be read only<br />

when the program is invoked. The program will wait for<br />

the period defined in the timeout property for such data to<br />

be available. If the data cannot be read—perhaps because<br />

a device is offline—the program will not execute. This<br />

mode is typically used with globally-referenced programs<br />

that consume large amounts of data that would otherwise<br />

slow down the communications scan.<br />

External data will be treated as described for Read Always<br />

mode, but the program will execute whether or not the<br />

data has been read successfully. The operator will<br />

PAGE 226<br />

http://www.redlion.net/controller

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

Saved successfully!

Ooh no, something went wrong!