How to use Data Structures

Introduction

Hello and welcome to the new quick start guide on how to best use Movicon.NExTâ„¢.
In this technote, we will introduce you to Data Structures, and show you how to use them in your Movicon.NExT project.

Data Structures

The Data Structures are complex data types that allow users to configure them with data models.
Like tags, they can also be defined within the I/O Data Server but by using the Data Structures tab instead.
The complex Data Structure types are defined with structure members that represent the elements that compose them.
Structure members have a MemberOrderID property which is used to set the order with which the communication driver will use to exchange data.
To define a Data Structure, open the Movicon.NExT editor and load a project, then:

Once you have defined the Data Structure, create structure type tags:

A structure type tag will be created as indicated containing members.
All members have a "UseShared" option property which is checked by default and, therefore it will not be possible to configure the member's I/O address, user access level and other properties.
When this option is unchecked, you will be able to:

Example

We will now show you how to use Data Structures by using an example.

Creating a Data Structure

Open the Movicon.NExT development environment and load a project, or create a new one, and then create a new Structure:

Creating tags

Now that we have created the structure, we will go ahead and create two Motor type tags:

Creating the screen

Now that the part concerning data has been configured, we shall now create a screen:

Once the screen has been created, change the project's properties by designating the Main screen as the project's startup screen. Therefore:

When you have finished configuring the project startup page, click on the Save All icon located on the toolbar at the top to save the project.

Open the Main screen that you have just created and click on the Toolbox tab on the far right next to the Properties windows to open the Toolbox library provided by Movicon.NExT.
Go to the Buttons > Standard subfolder and select the Standard Metro Style button and drag it onto the screen and assign it Mot1\State tag and enter ON as its text.
Assign it two commands to change the Motor's state from 0 to 1 and its speed from 0 to a fixed value, such as 80 for example. To do this:

  1. Tag Mot1\State
    Value to Set 1
    Command Type Set
    Once the value has been configured for the state of the Motor 1, now configure the command to set the motor's speed in the same way. Therefore, select the Tag Value command again and configure it in this way:

  2. Tag Mot1\Speed
    Value to Set 80
    Command Type Set

Make a duplicate of the Motor 1's ON button and replace the ON text with OFF and the values in the commands from 1 to 0 and from 80 to 0 respectively.

Place a motor with animation on the screen:

Now that you have a motor on screen, place a gauge object on screen in the same way and which can be found either in the Gauge folder or the Advance Gauge folder in the Toolbox. When you have placed the gauge on screen, assign it the Mot1\Speed tag.

Once you have finished configuring the graphical objects associated to Motor1, select and duplicate them by copying and pasting it on the screen.
After duplicating the objects, change the reference in each object from Mot1 to Mot2.

Once you have finished this procedure, save the project by clicking the Save All button.

Runtime Test

Click the "Start Runtime" button to enter runtime mode and test the configured settings.