Add a connection to a program parameter
Connect a parameter in a program to another parameter or controller tag to pass data into and out of the program from a controller, device, or other programs. Program parameter connections improve the reusability of the program. Unlike direct references to tags, program parameter connections reference parameters and the connections update when you reuse the program.
For example, create two programs, add parameter to the programs, and then create the connections. Program A may have a tank pressure sensor that has a program with an Output parameter. Program B may have a light that has an Input parameter. When you connect the Output parameter of the tank pressure sensor to the Input parameter of the light,
FactoryTalk Design Studio
provides the output value of the tank pressure sensor as the input value for the light. The light then turns green when the tank pressure sensor is too high. Prerequisites
Add a connection to a program parameter
- On the explorer bar, selectSystemorExecution.
- Select the element for which you are creating the connection:
- InSystem,select a program.
- InExecution,select a program within a controller.
- In theSystemtitle bar, SelectView tags and parameters. The Tag Editor opens.TIP: To open the Tag Editor, you can also right-click the element and selectTags and parameters.
- On the Tag Editor, select a parameter.Propertiesdisplays properties for the parameter.TIP:
- IfPropertiesdoes not open, in the pane bar, selectProperties.
- InPropertieson theGeneraltab,Usageindicates if a tag is an Input, Output or InOut parameter or a local tag.
- OnProperties, selectConnections.
- UnderConnectionsandWithin Controller, create the connection either:
- Manually. If you know the exact spelling of theFactoryTalk Smart Object, program and parameter names, inConnection, manually enter the connection to the parameter. Use the format SmartObject.Program.Parameter. If the program is in a controller and not associated with aFactoryTalk Smart Object, use the format ControllerName.Program.Parameter.
- Using Data Item Browser:
- AfterNew Connectionor the existing connection path, select .
- Select the view for which you want to display data. For example, selectSystem Viewto display data from theSystemexplorer.
- InData Item Browser, select the parameter. The connection to the program appears inParameter descriptioninPropertiesin the format SmartOjbect.Program.Parameter.TIP:
- The selected path may include theFactoryTalk Smart Object, a device, or a controller, depending on the type of connection.
- You can connect only to parameters of the same data type.
- An output parameter can have multiple controller connections.
- You can connect to parameters within the same controller. To connect to a parameter in a different controller, connect to a controller parameter and have that controller parameter connect to the program parameter in the other controller.
Provide Feedback