5 using state tables – Micromod MOD: 30ML Display Script Guide User Manual

Page 33

Advertising
background image

MOD 30ML Display Guide

Display Basics

2 -27

2.5

Using State Tables

In many applications it is useful to display more than one message in the same place. It is
also helpful to be able to re-assign keys for various functions, such as clearing totalizers,
advancing steps in a sequence or profile, turning a discrete device on or off, etc. The
State Tables allow the user to show actual text on the front panel, for ease of operation.

Associated with the State Table block is a file that contains the State Tables: one or more
‘tables’, each identified by a 1 – 8 character name, that contain a list of attribute values
and the associated mnemonic (text) strings to be displayed for each value. A default State
Table file is supplied in Visual Application Designer for a standard P,I,D controller
display. This may be used as a starting point for adding sequence text, device display
text, or key assignment text; or, you may create your own. The syntax for State Tables is
:

(tablename),(#chars),”(default)”

{

(n), “(TEXT1)”;

(n1), “(TEXT2)”;

(n2), “(TEXT3)”;

}

where:

(tablename)

is the 8-character name of the table, assigned by the user. For ease of

reference this is often named the same as the mnemonic of the attribute to which text is
being assigned, for example, Opms for “output mode status”.

(#chars)

is the longest number of characters to appear in the text

(default)

is the string that should appear if the value does not correspond to the list

(n), (n1), (n2)

are the values associated with the text

(TEXT1), (TEXT2), (TEXT3)

are the text strings that will appear on the display

for each value.

An example of a state table for Output Mode is shown in Figure 18. Opms is the (user-
defined) table name; the maximum number of characters to be displayed is three; if the
attribute state does not match anything specified in the table, ??? will appear on the
controller display. The numbers 0, 1, 3 and 5 are the numeric codes given in the
Database Reference Manual for the Output Mode attribute’s Manual, Automatic, Track
and Fault status.

Figure 2 .23.

Sample State Table

Opms,3,”???”
{

0, “MAN”;

1, “AUT”;

3, “TRK”;

5, “FLT”;

}

Advertising