Example 10: auto-scrolling displays, 10 example 10: auto-scrolling displays – Micromod MOD: 30ML Display Script Guide User Manual
Page 94
MOD 30ML Display Guide
Application Examples
5.10 Example 10: Auto-Scrolling Displays
In this example, MOD 30ML is acting as a multi-point indicator with three indication-
only displays that scroll continuously. When the operator toggles the R/L key, the
scrolling stops on the current display. When the R/L key is pressed again, scrolling
resumes. (Any key not being used by the Display Blocks can be chosen for this function).
Line 4 will display STP (stop) or RES (resume) so the operator can either stop or resume
the scroll action.
In each of the Display Blocks, a count input called STOPSCRL is created. Another count
input is created called STOP. For each of these inputs the Initial Value must be 1. An
example is shown below for ONE of the display blocks with three temperature inputs.
Display Block
inputs (Tag 1)
The following script is added to all existing scripts in displays that will scroll. “RES”
stands for “RESume scrolling”, and “STP” stands for “SToP scrolling”.
Script for toggling
R/L key to halt
scrolling
RL_PRESSED:
{
IF STOPSCRL >= 1 THEN
STOPSCRL = 0;
ELSE
STOPSCRL = STOPSCRL +
1;
CASE STOPSCRL OF
{
0:
STOP = 0;
#LINE4 = “RES”;
BREAK;
1:
STOP = 1;
#LINE4 = “STP”;
BREAK;
}
}
/* when scroll key is pressed */
/* if the input SCRLCNT is >=1 */
/* set SCRLCNT to zero */
/* otherwise add 1 to SCRLCNT */
/* based on value of STOPSCRL */
/* if the value is 0 */
/* set input STOP to 0 (false) */
/* display RES on Line 4 */
/* if the value is 1 */
/* set input STOP to 1 (true) */
/* display STP on Line 4 */
5 - 40