User`s manual

12-6 Motion Mate DSM314 for Series 90-30 PLCs User's Manual
January 2001 GFK-1742A
12
Enabling and Disabling Local Logic
Local Logic execution is enabled using a PLC 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 VersaPro Hardware
Configuration 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 Versapro Hardware
Configuration.
Local Logic executes only while the PLC is in RUN mode. If The PLC 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 PLC 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 VersaPro Hardware Configuration. The custom function will normally not
be available and is developed for application specific use only by GE Fanuc.
Local Logic Outputs/Commands
DSM command bit outputs (
Jog, Feedhold, Follower Enable
and
Strobe Resets
) are
OR
ed
between the PLC command and the Local Logic command. Therefore, either the PLC or Local
Logic can control them i.e. the command bit output is active if either the PLC or Local Logic has
turned it on.
AQ commands are accepted on a last-write basis. For example, if both the PLC (%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 PLC 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.