beautypg.com

Example 2: adding remote/local setpoint switching – Micromod MOD: 30ML Display Script Guide User Manual

Page 62

background image

MOD 30ML Display Guide

Application Examples

5.2 Example 2: Adding Remote/Local Setpoint Switching

The PID100 Smart Symbol assumes the PID block uses local setpoint only, so no
definition is needed for the R/L key. But many applications use a combination of Local
and Remote setpoint and the operator must be able to switch between them from the front
panel. This example adds the R/L key function to the Basic PID Display in Example 1.

All of the script and menus are identical to those given in Example 1, with a small
addition to the Display Script shown in the Figure 5.1. The script to be added is shown in
the next figure. No new inputs, menu entries or tuning parameters are added. Remember
that text inside the symbols /* … */ is for remarks only.

Figure 5 .8.

Script for R/L key
function

RL_PRESSED:

/* when R/L key is pressed, then

*/

{

IF SPMS == 0 THEN /* if setpoint mode is local, then

*/

SPMS = 1;

/* change to remote; */

ELSE

/* otherwise */

SPMS = 0;

/* change setpoint mode to local

*/

}

It does not matter where in the script this is added, however, be sure that it is NOT
nested within any other event script.

5 - 8