Tune statement, 6 tune statement – Micromod MOD: 30ML Display Script Guide User Manual
Page 48

MOD 30ML Display Guide
Display Scripts
The example in Figure 3-4 combines an assignment statement, an IF-THEN-ELSE
statement and a CASE statement to change what is displayed on Line 5 and Line 6 of the
display, when the Scroll key is pressed. This is part of the standard Display Script
supplied with Visual Application Designer.
Example:
Changing the
display based on
scroll key
manipulation
SCROLL_PRESSED:
{
IF SCRLCNT >= 1 THEN
SCRLCNT = 0;
ELSE
SCRLCNT = SCRLCNT + 1;
CASE SCRLCNT OF
{
0:
#LINE5 = “OP”;
#LINE6.SRC = OP;
BREAK;
1:
#LINE5 = “SP”;
#LINE6,SRC = SP;
BREAK;
}
}
(When the scroll key is pressed)
(If the input “SCRLCNT” is greater than or
equal to 1, then set it to zero;
else
add 1 to the input SCRLCNT)
(perform the following based on the value
of SCRLCNT):
(If the value is zero:
display the characters OP on Line 5;
display the value of the input OP on Line
6)
(If the value is one:
display the characters SP on Line 5;
display the value of the input SP on Line
6)
Note that the outermost set of brackets encloses the IF-THEN-ELSE statement and the
CASE statement, and associates the entire group with the assignment statement
SCROLL_PRESSED.
3.2.6 TUNE
Statement
The TUNE statement calls the display for the Tune List block associated with that
particular Display Block, to the front panel. Tune List blocks are used to provide operator
access to tunable parameters. TUNE statements can only be invoked with an event,
typically a key event. A common method of calling the Tune List is to hold down the
Scroll key. The required script for this appears in Figure 3-5, and is also included in the
standard Display Script supplied with Visual Application Designer.
Example: Scripting
the SCROLL key to
call the TUNE
display
SCROLL_HELD:
{
TUNE;
}
(When the Scroll key is held down, then
Call the Tune List display.)
3 - 10