Categories

FactoryTalk View: Parameter Linking Bug Fix

FactoryTalk View: Parameter Linking Bug Fix

Global Objects are a great way to cut down on development time, modularize, and add repeatability to your FactoryTalk HMI project. We previously explored this topic in our blog, Rockwell FactoryTalk Studio Basics: Global Objects and Tag Substitution

This tutorial will first walk new and experienced users alike through how to create a Global Object and utilize many of the advanced features Rockwell Automation's FactoryTalk offers. It will also demonstrate how to resolve potential circular reference problems that may arise when attempting to pass screen parameters in global object parameters. 

Initial Setup

Start by creating a Global Object and adding an instance of it to a Display. One way to assign Global Object Parameter Values is by linking Parameters from a Parameter File. By using the /P option of the Display command, a Parameter File can be passed to a display as a way to associate the tags used at runtime for a particular graphic.

In the example shown, Test_GlobalObject would be displayed on the release of the button while passing all of the parameters defined in the Parameter List VisibilityValues to the screen.

For more information on using Parameter Files in your HMI application, see Chapter 25 of the FactoryTalk View Machine Edition User's Guide or Chapter 16 of the FactoryTalk View Site Edition User's Guide.

Passing a parameter file "VisibilityValues" to the display "Test_GlobalObject" in FactoryTalk
Passing a parameter file "VisibilityValues" to the display "Test_GlobalObject"

Now, instead of linking specific tags to the Global Object parameters, you can link elements from the loaded Parameter File to the Global Object parameters. This offers you another layer of modularity in your program. By dynamically loading Parameter Files to your displays, you can easily change the data sets from which your Global Objects pull information.

Parameter Linking Bug Workaround

In the rest of this tutorial, I will walk you through a bug related to linking Parameters from a Parameter File to Global Objects and the workaround DMC uses to circumvent this issue.

The simple Global Object I created to illustrate the bug and workaround, fp_SixParameters, has six defined boolean Global Object Parameters where #1 determines if the text Parameter #1 is visible, #2 determines if the text Parameter #2 is visible, and so on.

The Parameter File VisibilityValues contains parameters #101-#106 which will be linked to parameters #1-#6 of an instance of fp_SixParameters on the display Test_GlobalObject.

Linking visibility event to global object parameter in FactoryTalk
Visibility event on "Parameter #1" linked to the Global Object Parameter #1

Problem Description

There is an instance of fp_SixParameters on the screen Test_GlobalObject which you would like to link to parameters #101 - #106 of VisibilityValues.

Assign paramter files to global object parameter values
Assigning Parameter File tags to Global Object Parameter Values

Everything looks good… but oh no! When you click OK, you get the following error: "A circular reference is being configured. Please do not use similar numbers [incorrespoinding] columns. Parameter numbers can range from #1 to #999. For example, reserve #1 to #99 for use in the Global Object Name column and #201 to #299 for use in the Value column."

Factory Talk Global Object Parameter Error - A circular reference is being configured. Please do not use similar numbers [incorrespoinding] columns. Parameter numbers can range from #1 to #999. For example, reserve #1 to #99 for use in the Global Object Name column and #201 to #299 for use in the Value column.

You make sure that you didn't accidentally create a circular reference between your Global Object Parameters and assigned Parameter File Parameters (i.e. attempt to assign #1 to #1), but everything looks good. Hmmm…

At the time of release, Rockwell published Known Anomalies in FactoryTalk View SE 6.10 (CPR9 SR4). Under the Global Objects section, there is a note saying: "Circular references can be created when passing screen parameters into global object parameters."

It appears that only the first character after the pound symbol is read.

In this example, our first parameter (#1 --> #101) is resolving to (#1 --> #1), creating our (non-existent) circular reference.

Luckily, DMC has found a workaround so that you can set up your Global Objects without getting the circular reference error when none actually exists!

Solution

In order to assign all of the other parameters, assign a dummy value to the parameter causing the "circular reference." This will allow you to select Ok without the error message and ensure the rest of your parameters are assigned correctly.

Fix FactoryTalk Circular Reference Error
Assigning a dummy value, "DummyValue" to the parameter causing the circular reference error

Next, right-click on the Global Object and select Tag Substitution…

FactoryTalk tag substitution
Right-click the Global Object and select "Tag Substitution…"

Then, under "Search for:", select the dummy value you created and under "Replace With:", type the parameter file you previously could not assign. For this example, we will search for "DummyValue" and replace with "#101".

Assign the correct parameter in FactoryTalk using tag substitution
Using Tag Substitution to assign correct parameter

Select Replace, confirm the tag substitution completed, then click OK.

Result of a successful tag substitution in FactoryTalk
Result of successful Tag Substitution

Congratulations, your parameters are now correctly assigned!

If you feel the need to check the parameter assignments, open the Global Object Parameter Values assigned to the object. But beware! The only way you will be able to close out is by pressing Cancel. If you try to press OK, you will get the same circular reference error as you did earlier.

Conclusion

By using Parameter Files with Global Objects, you can create incredibly flexible HMI programs that are easy to develop. DMC relies on this strategy and other similar programming-best practices to help us Respond To The Customer and to Make Things Happen.

Check out our Rockwell FactoryTalk and HMI and SCADA Systems Programming pages to learn more about what DMC's services and HMI solutions for control systems. Explore our blog posts and case studies for more specific tips, tricks, and examples.

Comments

There are currently no comments, be the first to post one.

Post a comment

Name (required)

Email (required)

CAPTCHA image
Enter the code shown above:

Categories

Related Blog Posts