In this article we'll learn about Parameter Passing in the Factory Talk View SE application.

Why do we Use Parameter Passing?

Parameter Passing is used to reduce the number of screens we use repetitively in our development.

To reduce the number of screens we use parameter passing. We will understand with a practical example.

Let’s get started.

Parameter Passing

First, open Factory Talk view SE. Choose any option (Network Distributed, Network Station, or Local Station).

After choosing the application type, create a new project and create a new HMI server.

After creating a project, you can see the below-mentioned window. Here, you can see parameter passing:

Now, we will create a new display and add a few numeric displays. We will add more numeric displays and create a tag for them.

For example, let’s take five numeric displays and take a few buttons as shown in the below display.

Here, I am taking an example of compressors that are used in plants. Let’s guess that we have four compressors installed in the plant.

Now, we want to check the pressure value of each compressor. Instead of taking multiple displays to show the data of each compressor, we will create a single display as shown below.

Here, I have added five transmitter and few buttons. Buttons will use to pass the parameter to show correct value of each compressor.

For sake of example, I am only taking values of pressure and no other parameters:

Each compressor has five values. So, a single compressor contains five tags. This means that I have to create 20 tags (4 compressors * 5 transmitters).

Creating a Tag:

To create a tag, open HMI Tags.

Now, I will add twenty tags. Here to show you how I am adding tags, I have created a folder named compressor1. Under this folder, I am adding tags as shown in the below window.

Click on compressor1 folder and type in a name, choose analog, provide min and max values, choose memory and write any value you wish to add.

Hit “Accept” to add a tag. We do the same for other tags but will keep different values so, we can see the difference:

As you can see in the below window, our tags are added now.

I created four folders to make it presentable and to understand which tag belongs to which compressor:

Now, double-click on the first pressure transmitter numeric display and add (#1) as a tag name.

Note: To pass the parameter we have to use “#” and follow it with any number as we use “#1”.

We will know in short why we have added such type of tag name. Do the same for other pressure transmitter numeric displays (#2, #3, #4, and #5):

Adding Parameter File:

After adding a tag name in “#” format, open the parameter as shown in the below window:

Here, we will add tags that we created.

We will create four different files as we have four compressors. Double click on the parameter to open the parameter screen.

As you can see that I have linked all tags to each compressor file.

Under parameter, I have added four compressors and linked them with tags we created. Here, you can see that I have linked each tag with “#” which we defined earlier as we discussed:

To add a tag to the parameter file, first, write a number in “#” format and do double click on the same line. Doing that will open up the following popup.

Here, you can find a list of tags that you have created.

Select a tag and hit “ok” to proceed.

That way we can add all the tags which we have created:

After completing creating parameter files, we will move to the main screen where we will define an action to buttons to perform operations.

As shown in the below-attached window, double click on the compressor1 button, which will open up “button properties”.

In “Button properties” choose action then double click on the blank space of press action or you can click on three dots beside the blank space.

Adding Button Properties:

Clicking on press action will open up a new popup:

Here, choose “Display” and click on “Next” to proceed:

Clicking “Next” opens up the above popup. Here, follows the written information on the attached popup:

Choose display, do a checkmark on the parameter file, and choose the parameter file. Here, as we have an open property of compressor1, we will choose compressor1.

Hit “Finish” to complete the procedure.

Follow the same process for the remaining buttons.

Now, we will open the client file to see our result. Click on the icon shown in the below-mentioned window:

PT1

PT2

PT3

PT4

PT5

Compressor1

2.15

3.15

4.15

5.15

6.15

Compressor2

2.65

3.65

4.65

5.65

6.65

Compressor3

2.5

3.5

4.5

5.5

6.5

Compressor4

2

3

4

5

6

Here is the list of values you can see in the attached sheet. These are the values that I gave while creating tags. So, these are tags value.

We will check it by pressing each compressor button to see if the result matches.

Opening a Client:

Result:

Clicking on Compressor1 will show the below results:

Clicking on Compressor2 will show the below results:

Clicking on Compressor3 will show the below results:

Clicking on Compressor4 will show the below results:

This is how parameter passing works. If the number of screens is the same and the object used is also the same then you can use this to save a number of screens.

Hope those reading this article have enjoyed this. If you have any questions or doubts then put them in the below comment section.

Written by Suhel Patel
Automation Engineer and Freelance Writer

Have a question? Join our community of pros to take part in the discussion! You'll also find all of our automation courses at TheAutomationSchool.com.

Sponsor and Advertise: Get your product or service in front of our 75K followers while also supporting independent automation journalism by sponsoring or advertising with us! Learn more in our Media Guide here, or contact us using this form.

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here