Adding tags
JMobile Studio uses tag names to access all device data. All fields and reference locations in the device need to be assigned a tag name to be used in the HMI project.
Tag Editor can be used to create and manage tags. After the tags have been defined, they can be used in the project by attaching them to widgets' properties.
See ""Attach to" parameters" for details.
Tag editor
Path: ProjectView > Tags
Adding a tag
- Click + and enter the required data.
- Select the Address from the communication protocol address dialog
- Click on the fields that are inside the property dialog if something is to change (e.g. tag name)
Note that if a tag is selected, the add tag command + will create a new tag using the property of the selected tag.
Tag properties
Some properties depend from the protocol used. See specific protocol documentation for details.
Property | Description |
---|---|
Active |
Update mode.
Important: Leave this value set to false for higher communication performance. |
Description | Tag description |
Encoding |
Encoding type for string data type (UTF-8, Latin1, UTF-2 and UTF-16) |
Groups |
Group names associated to a tag |
PLC tag name |
Original PLC tag name, used to match tags used by HMI application (Tag Name) and tags exported from PLC |
R/W |
R/W tag attribute (R/W, R or W). Note: The content of Write Only tags is always written and never read. When communication is not active, the content of these tags may not be available in widgets. |
Rate |
Tag refresh time. Default: 500ms (except SystemVariable which is 1000ms). When the refresh rate is set to “Manual”, the HMI device will not read the tag from the remote device automatically in background. Tag is read and refreshed into the database only by explicitly required from the “ForceReadTag” action or using the forceRefresh option into the JavaScript getTag(). WARNING: Tags refresh rate is the maximum refresh rate. Actual refresh rate depends on: communication type (serial, fieldbus, Ethernet), protocol, amount of data exchanged. |
Scaling |
Conversion applied to tag before database storage.
|
Simulator |
Tag behavior during simulation. Several profiles are available. |
Tag URI |
Controller memory address. To edit click on the right side of the column to get the dialog box where you can enter the address information. |
Tag name |
Unique tag name at project level. Primary key to identify information in the runtime tag database. WARNING: Duplicate tag names are not allowed. |
Note that is allowed to select multiple tags in Tag Editor and to change the same property to all (e.g. to change refresh time in 10 tags to 500 without change it in all tags one by one).
Managing tag names
Tag names must be unique at project level. If the same tags, from the same symbol file have to be used for two different controllers, use the “Alias” feature to add a prefix to the imported tags and make them unique at project level.
Note: Not all protocols support the “Alias” feature.
Managing tag groups
Tags used in each page are identified as part of a group, so that requests made by the communication protocol to the connected controller(s) can be processed faster: only the tags included in the displayed page are polled from the controller.
Scaling
Using the tag scaling function it is possible to resize the tag values that will be visible from the HMI application.
There is the possibility to configure
- Linear transformation, using the "By Formula" or the "By Range" mode
- Fixed Point transformation
Generally, the data type used inside the HMI is the same data type inherited from the PLC device. When a transformation is used, considerate the possibility to change the HMI's data type to not lose precision.
Example
If your PLC manages value with two decimal digits using an integer in fixed point, you can configure the scaling transformation as the below picture where the value read from the PLC will be divided by 100 and stored inside a float data type. E.g. PLC integer value 12345 will become the float value 123.45 inside the HMI device.