Add a parameter to the definition of an Add-On Instruction
Use the Tag Editor to add a parameter to an Add-On Instruction. A parameter determines how the instruction appears when the instruction is used. The parameter order defines the order that the parameters appear on the instruction call.
- On the explorer bar, selectLibrary.
- InLibrary, select the Add-On Instruction and then selectView tags and parameters: (name).
- In the last row of the Tag Editor, selectAdd Tag. A row for the tag appears.
- InName, type the name of the tag or program parameter.
- InData Type, type the name of the data type until the data type appears or browse to openSelect Data Type, select the data type from the list, and then selectApply.TIP:
- An Input parameter is a passed by value into the Add-On Instruction and must be a SINT, INT, DINT, REAL, or BOOL data type.
- An instruction with only Input parameters, except EnableOut, is treated as an input instruction in a ladder diagram and appears left justified. Use the EnableOut parameter for the rung-out condition.
- An Add-On Instruction can have up to 64 InOut parameters.
- An InOut parameter is a passed by reference into the Add-On Instruction and can be any data type, including a structure or an array.
- InUsage, select a usage type -- INPUT, OUTPUT, or INOUT.
- InVisible, position the switch to the right to make the parameter visible or position the switch to the left to make the parameter not visible.
- InRequired, position the switch to the right to make the parameter required or position the switch to the left to make the parameter not required. All required parameters must be visible.
- InDefault Value, enter the value of the parameter. The default value entered for the Add-On Instruction appears for any new Input or Output parameter of the Add-On Instruction.
- (optional) InStyle, select a display style to define how the parameter value appears.TIP:
- SINT, USINT, INT, UINT, DINT, UDINT, BYTE, WORD, DWORD and BOOL data types have DECIMAL, BINARY, OCTAL, HEX, ASCII styles.
- REAL and LREAL data types have FLOAT and EXPONENTIAL styles.
- LINT, ULINT, and LWORD data types have DATE_TIME, LONG_DATE_TIME styles.
- InOut parameters of non-atomic data types do not have a style to apply.
- (optional)Description. Enter a description of the tag to indicate the purpose of the parameter or the latest change to the parameter.
- Repeat steps 3-11 to add an additional parameter.
Provide Feedback