You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Overview

Points are individual items that can be read or written from/to nodes. They can be registers, I/O values, or variables residing in field devices (nodes). Each Point is bound to a specific Tag in the Solution configuration.


On this page:


Adding and Editing Points

Data Points define specific values for each node that can be accessed using tags. The number of data points you can configure is related to both the ProductModel that is configured for the project and your software license.

To configure points, follow these steps:

  1. Access Unified Namespace Tags.
  2.  Copy the tags to be used.
  3. Access Devices → Points.
  4. Paste the copied tags.
  5. Double click the property you wish to edit on the row corresponding to the tag you want to modify

To add or remove a column, right-click the column heading area and select or deselect columns.

The following table describes each available property you can configure when configuring a Device point:

Column

Description

Tag Name

Enter a tag name or click "..." to select a tag. You can also create a new tag.

Node

Select the node for this data point.

Address

Enter the register address which is based on the PLC and protocol for this data point and tag.

Data Type

Select the data type you want to use. Most protocols should use the native option. When native is used, the protocol will automatically handle the data conversion.

Selecting a different data type overrides the defaults. Some options may not be applicable to the selected node. Make sure you know the applicable data types.

Modifiers

If the PLC uses a different byte order, select the options you want. You can change the position bit, byte, Word, or Dword of the data that is communicated.

Access Type

Select the access type for this data point. You can define and configure the access types. See Access Types below.

Scaling

If you want to manipulate the tag value, select the options you want.

When the data is read in the Equation option:

  • Div - The system will divide the register value by what you enter here. 

  • Add - The system will add the amount you enter here as an offset of the result of the division. 

  • For a write operation, the calculations are the opposite (multiple by the Div value, then subtract the Add value).

Label

A text that represents a label to the point


Dynamic Address Configuration

The example below shows how to configure a dynamic Address using a MQTT telegram, for example:

/topic/gateway/data:

/topic/gatewayX/data

/topic/gatewayY/data

/topic/gatewayZ/data:

In other words: /topic/@Tag.gateway/data:

You can create a standard point in Devices>Points, with Tag name, node, and Address

You can use the following code to change the Address for the desired point:

string error;
DataTable dt_DevicePoints = TK.ProjectDB.GetDataTable("EditDevicesPoints", "TagName='Tag.Tag01.Velocidade'");
DataRow[] rows = new DataRow[1];
rows[0] = dt_DevicePoints.Rows[0];

@Info.Trace(rows[0]["Address"].ToString());
rows[0]["Address"] = "Group01/"+@Tag.Gateway+"/Device01"; 
@Info.Trace(rows[0]["Address"].ToString());
     
rows[0].AcceptChanges();
TK.ProjectDB.UpdateDataRows("EditDevicesPoints", rows, out error);
     
if (String.IsNullOrEmpty(error) == false)
{
   @Info.Trace("Error changing tag address: " + error);
}
else
{
   @Info.Trace("Applying Devices Changes - begin");
   TK.ProjectDB.ApplyProjectChanges();
   @Info.Trace("OK!");
}
  • In the second line when using the code:

    DataTable dt_DevicePoints = TK.ProjectDB.GetDataTable("EditDevicesPoints", "TagName='Tag.Tag01.Velocity'");

    The first parameter refers to the table you want to obtain, in this case, it would be the Points, in the second parameter it would be the TagName column and the tag configured in Points, in this example the tag: Tag.Tag01.Velocidade.

  • In the line with the following code:

    rows[0]["Address"] = "Group01/"+@Tag.Gateway+"/Device01";

    Is where you choose the new desired address, in this case @Tag.Gateway which is a string type tag will receive different names and make this substitution.

  • To internally update this Address you need the following code; 

    K.ProjectDB.UpdateDataRows("EditDevicesPoints", rows, out error);
  • If no error occurs in the update, you can apply the change to the project using the code:

    TK.ProjectDB.ApplyProjectChanges();

    From this moment on your Address is configured with the new value previously entered.



Importing Device Points From PLC Addresses

Addittionally you can simplify the creation of Device Points with various methods for automatic data configuration import. Access the Importing PLC Addresses for further information about the process and configurations available.


In this section:

The root page @parent could not be found in space v10.

  • No labels