Determining Which Parameters to Make Visible or Required

To help you know that specific data is passed into the Add-On Instruction, you can use required parameters. A required parameter must be passed each argument for a call to the instruction to verify. In Ladder Diagram and Structured Text, this is done by specifying an argument tag for these parameters. In a Function Block Diagram, required Input and Output parameters must be wired, and InOut parameters must have an argument tag. If a required parameter does not have an argument associated, as described above, then the routine containing the call to the Add-On Instruction will not verify.

For Output parameters, making a parameter visible is useful if you do not usually need to pass the parameter value out to an argument, but you do want to display its value prominently for troubleshooting.

Required parameters are always visible, and InOut parameters are always required and visible. All Input and Output parameters, regardless of being marked as required or visible, can be programmatically accessed as a member of the instruction's tag.

Figure 1 - Simulation Instruction in Function Block


Figure 2 - Simulation Instruction in Ladder


This table explains the effects of the Required and Visible parameter settings on the display of the instruction.



If you have a parameter for which the user must specify a tag as its source for input or its destination as output, and you do not want this to be optional, set the parameter as required. Any required parameters are automatically set to visible.

The Visible setting is always set to visible for InOut parameters. All InOut parameters are required.


0 comments :