Testing the Add-On Instruction

You need to test and troubleshoot the logic of an instruction to get it working.

Before You Test

Before you start to test an Add-On Instruction, do the following.

1. Open a project to debug offline.

2. Add the Add-On Instruction to the project, if it is not already there.

Testing the Flow

1. Add a call to the instruction in a routine in the open project.

2. Assign any arguments to required parameters for your call.

3. Download the project.

Monitoring Logic with Data Context Views

You can simplify the online monitoring and troubleshooting of your Add-On Instruction by using Data Context views. The Data Context selector lets you select a specific call to the Add-On Instruction that defines the calling instance and arguments whose values are used to visualize the logic for the Add-On Instruction.

Follow these steps to monitor the logic.

1. Go into Run mode.

2. Right-click the instruction call and choose Open Instruction Logic.


The logic routine opens with animated logic for the specific calling instance.

Verifying Individual Scan Modes

The most straightforward method to verify Scan mode operation is to execute the instruction first with the Scan mode routine disabled, then again with it enabled. Then you can determine whether the Scan mode routine performed as expected.

InstructionDescription
TrueThis is simply the execution of the main logic routine.
FalseIn a ladder logic target routine, this entails placing an XIC before an instance of the instruction and evaluating instruction results when the XIC is false. In a Function Block target routine, this entails executing an instance of the instruction with the EnableIn parameter set to zero (0).
PrescanPlace the controller in Program mode, then place it in Run mode.
PostscanWith the controller configured for SFC Automatic Reset, place an instance of the instruction into the Action of an SFC. Run the SFC such that this Action is executed and the SFC proceeds beyond the step that is associated with this Action.

0 comments :