Hello and welcome to a new quick start guide on how to best use
Movicon.NExT™.
In this technote, we shall show you how to customize alarm thresholds
by assigning them to a tag so that they can be changed during a Movicon.NExT™ project runtime.
Example
To do this, we will use a very simple example by creating a Uint16
tag that will be used to simulate the value to trigger the alarm.
We will also create four more tags for the alarm thresholds. When
entering values for the thresholds and then changing the simulation
tag’s value at runtime, a message corresponding to the threshold should
appear in the Alarm Window object.
How to create the simulation tag
First, open the Movicon.NExT editor and create, or load, a project.
Then, create the first tag to simulate the value to trigger the alarm:
Open the I/O Data Server
in the project tree within the Project Explorer window and select
the I/O Driver resource.
Go
to the Tag List by selecting the appropriate I/O Data Server tab.
Right-click
on the workspace and select the Add New Tag from the menu that
appears.
Configure
the tag using the properties window in the following way:
Name
UIntTag
Model Tyoe
Variabile
Data Type
UInt16
Confirm
these changes by clicking on the Accept Changes icon found in
the toolbar at the top of the Properties window.
How to create the alarm's threshold tags
To create the alarm's threshold tags:
Open the I/O Data Server
in the project tree within the Project Explorer window.
Go
to the Tag List by selecting the appropriate I/O Data Server tab.
Right-click
on the workspace and select the Add New Tag from the menu that
appears.
Configure
the tag using the properties window in the following way:
Name
Model Type
Data Type
HiHiThreshold
Variable
UInt16
HiThreshold
Variable
UInt16
LoThreshold
Variable
UInt16
LoLoThreshold
Variable
UInt16
How to create and associate the alarm
To create the alarm:
Open the I/O Data Server
in the project tree within the Project Explorer window.
Go
to the Alarms Tab by selecting the corresponding I/O Data Server
tab.
Expand
the item in the Alarms tab until you reach the source item.
Select
the source and right-click to open the contextual menu.
Select
the Add New Alarm Definition from the menu.
Once
the new alarm prototype has been added, open its Properties Window,
and configure it in the following way:
Alarm
Type: Exclusive Level
Alarm
Limits - Enable High-High Limit: enabled
Alarm
Limits - High-High Limit Value: 3
Alarm
Limits - Enable High Limit: enabled
Alarm
Limits - High Limit Value: 2
Alarm
Limits - Enable Low Limit: enabled
Alarm
Limits - Low Limit Value: 1
Alarm
Limits - Enable Low-Low Limit: enabled
Alarm
Limits - Low-Low Limit Value: 0
Now that we have created and configured the tags and alarm, we can
associate them:
Go to the I/O Data
Server's Alarm tab and select the alarm we just created.
Right-click
it and select the Assign Tag option from the menu that opens.
Select
the UIntTag tag from the table that opens and click OK to confirm.
Assign the previously created alarm threshold tags to the UIntTag
tag:
Select the UIntTag
tag from the Alarms tab and open its Properties Window.
Expand
the Advanced section situated under the General property group.
Assign
each Limit Tag item the corresponding tag that represents the
alarm threshold.
High-High Limit Tag
HiHiThreshold
High Limit Tag
HiThreshold
Low Limit Tag
LoThreshold
Low-Low Limit Tag
LoLoThreshold
How to create the screen
Now that we have created the logical side of the example, we shall
go ahead and create the graphical side.
This will consist of a screen with five Display objects and an Alarm
Window object.
Create the screen in this way:
Look for the Screens resource in the project's tree structure in the Project Explorer window and select it.
Right-click it and select the New option from the menu which opens.
A New Screen popup will appear through which you can set the screen's main properties. Configure the screen as follows:
Width:
1920
Height:
1080
Name:
Main
Click the OK button to confirm the configuration.
Once the screen has been created, we can then change the project's properties by inserting the screen as the project's Main screen to show at project startup. To do this:
Select the name of the project from the application's tree structure.
Open the Properties window.
Change following project's properties as follows:
Startup Page Type: Main Screen
Startup Screen Name: Main
Once you have finished configuring the project startup page, click on the Save All icon found in the toolbar at the top to save the project.
Make sure that the Main screen is open, and then click on the Toolbox tab on the far left of the editor, next to the Properties window, to open the Toolbox library provided by Movicon.NExT. Expand the Display folder, select and drag the Display object onto the screen. Assign the UIntTag tag to this object. To do this:
Select the Display object and open its Properties window located on the right-hand side of the editor.
Search for the Tag property and click its corresponding three dots to open the project's tag list.
Select the UIntTag tag from the list and click OK to confirm.
Make four duplicates of this object by using the Ctrl+C and Ctrl+V keyboard keys so that you have a total of five Display objects. Repeat the above procedure for each Display object to assign the alarm threshold tags:
HiHiThreshold.
HiThreshold.
LoThreshold.
LoLoThreshold.
Open the Toolbox library once again and place an Alarm Window object from the Alarm Viewers folder on the Main screen.
Save the project by clicking on the Save All icon on the toolbar at the top.
Runtime Test
Launch the project into runtime mode by clicking on the Start Runtime button on the editor's toolbar. While the project is running in runtime mode, it will be possible to enter values in the Display objects that represent the alarm's thresholds and change the value in the Display object associated to the UIntTag tag. If this value exceeds one of the alarm thresholds, the alarm associated to the exceeded threshold will show in the Alarm Window.