User Manual  Chapter 11 
GFK-1742F  Jan 2020 
 
Local Logic Tutorial  282 
11.6.2  Gain Scheduler Program Example 
The  following  example  illustrates  a  method  to  use  local  logic  to  implement  a  simple 
gainscheduling algorithm. Care should be taken whenever one implements an algorithm 
that  dynamically  changes  the  control  characteristics.  In  many  situations,  dynamically 
changing the control characteristics can cause the controlled process to go unstable. Note 
that the Velocity_Loop_Gain  control  variable may  be written multiple times in the same 
sweep in the following program. However, the final value written in a given sweep is the 
active value since variables are updated at the conclusion of Local Logic execution. Refer to 
Chapters  12  and  13  for  a  detailed  description  of  the  Local  Logic  control  variables  and 
outputs. 
 
11.6.3  Programmable Limit Switch Program Example 
The following example illustrates a method to use local logic to perform a programmable 
limit  switch  function.  This  particular  programmable  limit  switch  turns  on/off  an  output 
based upon the current motor position and block within a motion program 
Figure 139: Programmable Limit Switch Example