Think the below information when you are generating parameters.
Transferring Parameters Arguments by Value or by Reference
The below information will assist you to recognize the differences between transferring tags of argument to parameters by value or by reference.
Choosing a Parameter Data Type
The controllers of Logix5000 execute REAL (32 bit) and DINT (32 bit) math operations, which causes data types of DINT to perform quicker than other data types of integer. The rules of data conversion of INT to DINT to SINT are affected automatically, and can put in overhead. When possible, utilize data types of DINT for the Add-On Instruction parameters of Input and Output.
Generating an Parameter of Alias for a Local Tag
Parameters of Alias make simpler linking local tags to an Input or Output tag that is generally utilized in the application of Add-On Instruction with no involving that manual code be made to create the organization. Aliases can be utilized to describe a parameter of Input or Output with direct admittance to a tag of local or its member. Varying the alias parameter value adjusts the local data tag or local tag member it symbolizes and vice versa. The parameters of alias are topic to these constraints:
• The parameters of alias have to be either parameters of Input or Output.
• You can only generate a parameter of alias for a local tag.
• Just one parameter of Input and Output may be mapped to the similar local tag or the equal a local tag member.
• Parameters of Alias may not be steadies.
• The type of External Access an parameter of alias matches the local tag to External Access type which it is planned.
An InOut Parameter Using a Single Dimension Array
The parameter of InOut can be identified to be a particular dimension array. Think that the array your can either when specifying the size of this array:
• Transfer a tag of array that is the similar size as your designation.
• Transfer a tag of array that is bigger than your explanation.
Utilize the instruction size to decide the real size of the referenced array to contain this elasticity when developing your logic.
To aid be confident that particular data is passed into the Add-On Instruction, you can utilize necessary parameters. A necessary parameter has to be passed an argument for a entitle to the instruction to confirm. This is performed by identifying a tag of argument for these parameters in Ladder Diagram and Structured Text. Necessary parameters of Input and Output have to be wired, and parameters of InOut have to have an argument tag in a Function Block Diagram. If a necessary parameter does not contain an argument related, as explained above, then the routine including the name to the Add-On Instruction will not validate.
For parameters of Output, creating a parameter noticeable is helpful if you do not generally require passing the value of parameter out to an argument, but you do desire to show its value importantly for troubleshooting. Necessary parameters are constantly noticeable, and parameters of InOut are always necessary and noticeable. All parameters of Input and Output, regardless of being marked as necessary or noticeable, can be programmatically contacted as a member of the tag of instruction.
• If you desire the value of parameter showed on the instruction features in Ladder, put the parameter as visible.
• An parameter of Output the tag type of BOOL that is not necessary, but noticeable, will display as a flag status on the block right side of the Ladder. This can be applied for flags status like ER or DN.