Introduction
Sysmac Studio contains many objects ready for placement on NA pages. This article introduces these objects and how to configure them. For more information on NA Pages go to 'Introduction to Pages On The NA' article.
Buttons
Buttons are some of the most commonly used objects within an HMI application. The NA series supports five basic types of buttons. These five buttons cover all the basic needs for a button in HMI, as well as being completely programmable to tailor the function even further.
– Button – simple button with no special action Note: It is not possible to change the type of button after it is on the page, therefore selection should be made carefully. |
Using Two State Buttons (Momentary, Reset, Set, Toggle)
Two state buttons modify and reflect the value of a Boolean variable. Although these two state buttons can also generate events, it is good practice to avoid this unless absolutely necessary to ensure it is clear what operation the button performs and when.
Using Image Buttons
Buttons can also be defined as to use an image (from the resources area) rather than a colour. It is then possible to define both an Up and Down image to completely change the appearance of the button. In this way complex button styles can be created.
Understanding Button Events
Events are triggered by many objects but it is important to understand, especially with buttons, when the events or actions are triggered.
Pressed – As soon as your finger touches the button, this event it fired, two state buttons will have their bit set (or unset) at this point.
Released – When your finger moves away from the button, this is when momentary buttons will have their bit unset.
Clicked – As soon as your finger releases while still over the button.
A click and a released event may not always occur when you expect them (or at all) if another page appears in front of the button or you move your finger away. It is most common to use the ‘Clicked’ event for button actions as users usually expect that an accidental press can be cancelled by moving away from the button.
Gauges
A gauge is a visual way to display a single value. As such the gauge object has an expression property that allows a variable to be linked to the object to display the value at runtime. Gauges support all number data types.
Two basic types of gauges are included with Sysmac Studio, namely a rotational gauge and a linear gauge. The linear gauge can be configured to be either vertical or horizontal.
Gauges have many properties so that the appearance can be changed to the desired look. To help the user, a whole set of themed gauges are available for both rotational and linear gauges.
Gauges use the following terms in their properties:
Ascent – The X axis of the gauge
Ticks and Needle thicker on the Rotary gauge
Ticks and Needle longer on linear gauge
Extent – This is the width of the tick, line or needle
Ticks and Needle longer on the Rotary gauge
Ticks and Needle thicker on linear gauge
Offset – The distance from the scale bar
Changing the Gauge Appearance
Is Reversed – clockwise or anticlockwise gauge Minimum and Maximum Values – scale of the gauge Start and End Angles – the angle of the needle at the top and bottom of the range Minor intervals – frequency of small ticks on the gauge Major intervals – frequency of large ticks and the labels on the gauge Gauge text foreground colour – colour of the Text Is Rim Effect Enabled – a graphical effect on the Rim Rim Type and Colour – shape and colour around the edge Background Colour and Type – colour and type of the background |
Ranges
A range is a colour on the gauge that can be configured to be multiple colours at various points, start at a certain place and end. For example the optimum running temperature may be 95 – 105 degrees so this can have a Green range on the gauge.
Multiple ranges can be defined for a gauge just by clicking the add button in the ranges section of the properties.
The ranges can be stepped away from the scale bar by setting the Scale Offset.
Range marker width can be changed and graduated by altering Start and End Ascent/Extend.
HMI Controls
This section contains more complex controls specific to HMI.
The Media Player can be embedded on pages to play videos (see below), the Recipe Viewer displays recipe templates and instances (see'Introduction To Recipes On NA' article), the Trend Graph is linked to a data set and displays the values for analysis (coming soon) and User Alarms Viewer shows either current or historical information on alarms (see 'Introduction To NA Alarms' article). |
Data Display
This object is used for displaying data. Much like the Label object can display text, this object allows you to display the value of a variable or the result of an expression.
In the properties, the data type can be changed between Boolean, Numeric and Text.
When using Boolean, you can choose what is displayed when the value is 0 or 1 e.g. Stopped or Running.
The numeric value can be formatted in one of the following ways:
#
#.#
#.##
#.###
##
##.#
##.##
##.###
###
###.#
###.##
###.###
Custom
You can also choose whether to display the number in Binary, Hex or Decimal. When using Text you can choose the encoding type.
Data Edit
This object is used for data entry. It is similar to the data display object, but this object allows the user to enter a new value. It is linked to the value of a variable.
The data edit object supports the same formats as the data display object.
It is possible to set a background colour and border colour/thickness for the data edit object. This makes it easy to highlight the object for users to enter new values.
Media Control
This control is a simple media player allowing videos or animations to be played on the HMI. It is ideal for playing videos to help the operator deal with problems or servicing on the machine.
From the properties the user chooses which video will play from the HMI resources.
The following formats are supported in v1.0: MPEG 1, MPEG 4 or WMV Format.
Using the resources area, it is possible to automatically play different videos depending on the current language of the HMI (See 'Understanding NA Resources' article).
Global functions are provided to start and stop the videos, but it is also possible to call ‘MediaPlayer1.Play/Stop/Pause’
Shapes
Shapes provide the user with the ability to draw complex graphics for parts of their machines. Vector graphics enable the HMI to easily achieve a high quality look regardless of the size of the graphic.
The following objects are supported :
Ellipse | Drag object on page and resize or change height/width |
Rectangle | Basic rectangle or square |
Triangle | Simple Triangle |
Polygon | Fillable user defined shape with as many points as defined |
Polyline | A user defined line |
Line | A straight line |
Curve | A multi point curve |
All shapes have settings to change the appearance including colours and line styles.
The Polygons & Polylines can be further edited by right clicking and selecting ‘Edit’. Whilst in edit mode further points can be added, or points moved to create a new shape.
Lamps
There are two types of lamp available to use: Bit lamp and Data Lamp. A Bit lamp will switch on and off based on the value of a bit. A Data Lamp will change its behaviour based on an expression it may have multiple states with different appearances (colour or bitmap) depending on the result of the expression.
To configure a data lamp, use a variable in the expression property and then set thresholds in the Animation tab.
Bit Lamps and Data Lamps allow 3 different types:
• Ellipse
• Rectangle
• Image
Additionally, you can change the on and off colours and supply labels to display text based on the current state.
Lamps also have events that allow you to trigger an action at the same time the lamp changes or when the user touches the lamp.
Standard Controls
These are standard controls used in HMI and will be familiar to VB.NET users. Most standard controls will change a variable and also have ability to trigger events
Checkbox toggles a Boolean variable
Date time – Shows a date from a variable
Dropdown and Listbox – Choose from a list
Image – Displays a picture
Label – Shows a word or a value
Radio button – Select a single button from a group
Slider – Change the value of a numerical variable
Textbox – Freeform text entry
Graphics
In addition to primitive objects and shapes there are some graphic objects that depict real items such as pipes and boilers, pumps, blowers etc. These are also located in the toolbox. Simply drag the item onto the page. There is a large choice of graphics so you can browse or make use of the search.
The graphics are all vector based and built up of many grouped parts. Once on the page, using the page explorer you can easily modify the look of any of the objects. Additionally you can ‘ungroup’ the object and remove or animate parts if needed.
In the future it will be possible for users to import their own vector-based images and convert them into Sysmac Studio objects.