User Manual  Chapter 12 
GFK-1742F  Jan 2020 
 
Local Logic Language Syntax  292 
12.2  Enabling and Disabling Local Logic 
Local  Logic  execution  is  enabled  using  a  host  controller  Q  bit.  For  example  if  a  DSM  is 
configured  with  a  starting  %Q  reference  of  %Q0001  then  the  Local  Logic  enable  bit  is 
%Q0002  (beginning  reference  +  offset  of  1  ).  The  Local  Logic  program  name  must  be 
specified  in  the  hardware  configuration  software  and  the  field  for  Local  Logic 
Enabled/Disabled must be set to Enabled. Refer to Chapter 10 for a detailed description of 
configuring Local Logic in hardware configuration. 
Local Logic executes only while the host controller is in RUN mode. If The host controller is 
switched to STOP mode or if the enable Local Logic Q bit is turned off, Local Logic execution 
is halted and all Digital Outputs, Control bits (Jog, Feedhold, Strobe Resets, Follower Enable) 
and CTL bits that are under the control of Local Logic are disabled. 
Attempting  to  execute  Local  Logic  in  the  First  CPU  Sweep  will  result  in  an  error  being 
reported. For example, switching from Stop Mode to Run Mode while the Local Logic Enable 
bit is on  will  generate an error and the Local Logic program will  not  execute. Toggle the 
Enable Q bit to run the Local Logic program. 
Note:  The  Local  Logic  Engine  will  not  run  if  any  custom  Local  Logic  functions  are  enabled  via  the 
Advanced  Parameters  in  Hardware  Configuration.  The  custom  function  will  normally  not  be 
available and is developed for application specific use only by Emerson. 
12.3  Local Logic Outputs/Commands 
DSM command bit outputs (Jog, Feedhold, Follower Enable and Strobe Resets) are OR’ed 
between the host controller command and the Local Logic command. Therefore, either the 
host controller or Local Logic can control them i.e. the command bit output is active if either 
the host controller or Local Logic has turned it on. 
AQ commands are accepted on a last-write basis. For example, if both the host controller 
(%AQ) and Local Logic issue a Follower Ratio command the last value written will be active. 
DSM  faceplate  digital  outputs  (real  outputs  switched  by  the  DSM)  are  individually 
configurable to be either under Local Logic control or host controller control, but not both 
simultaneously.  Refer to Chapter 14 for a detailed  description  on configuring the  Digital 
Outputs. 
Local Logic digital outputs, immediate commands and command bits are updated at the 
end of each Local Logic Sweep (refer to Chapter 13 for a list of the command Variables and 
digital output variables). Therefore if the Local Logic program writes to the same command 
variable or digital output variable multiple times in the same sweep, the last value written 
will be the effective command. 
For example, the sample code below shows the Jog_Plus variable, the Strobe_Reset variable 
and the Follower_Ratio being written multiple times within the same sweep. In all cases the 
final value written is the active value.