To provide Add-On Instructions with the same flexibility as built-in instructions, optional Scan mode routines can be configured to fully define the behavior of the instruction. Scan mode routines do not initially exist for Add-On Instructions. You can create them depending upon the requirements of your instruction.
Like all built-in instructions in the controller, Add-On Instructions support the following four controller Scan modes.
Scan Mode | Description |
---|
True | The instruction is scanned as the result of a true rung condition or the EnableIn parameter is set True. |
False | The instruction is scanned as the result of a false rung condition or the EnableIn parameter is set False. Instructions in the controller may or may not have logic that executes only when that instruction is scanned false. |
Prescan | ccurs when the controller either powers up in Run mode or transitions from Program to Run. Instructions in the controller may or may not have logic that executes only when that instruction is executed in Prescan mode. |
Postscan(1) | Occurs as a result of an Action in an Sequential Function Chart (SFC) routine becoming inactive if SFCs are configured for Automatic Reset. Instructions in the controller may or may not have logic that executes only when that instruction is executed in Postscan mode. |
(1) Postscan mode routines cannot be created for safety Add-On Instructions because safety instructions do not support SFC.
The default behavior for executing an Add-On Instruction with no optional scan routines created may be sufficient for the intended operation of the instruction. If you do not define an optional Scan Mode, the following default behavior of an Add-On Instruction occurs.
Scan Mode | Result |
---|
True | Executes the main logic routine of the Add-On Instruction. |
False | Does not execute any logic for the Add-On Instruction and does not write any outputs. Input parameters are passed values. |
Prescan | Executes the main logic routine of the Add-On Instruction in Prescan mode. Any required Input and Output parameters' values are passed. |
Postscan | Executes the main logic routine of the Add-On Instruction in Postscan mode. |
For each Scan mode, you can define a routine that is programmed specifically for that Scan mode and can be configured to execute in that mode.
Scan Mode | Result |
---|
True | The main logic routine for the Add-On Instruction executes (not optional). |
False | The EnableIn False routine executes normally in place of the main logic when a scan false of the instruction occurs. Any required (or wired in FBD) Input and Output parameters' values are passed. |
Prescan | The Prescan routine executes normally after a prescan execution of the main logic routine. Any required Input and Output parameters' values are passed. |
Postscan | The Postscan routine executes normally after a postscan execution of the main logic routine. |
0 comments :