Devices Points (Reference) represent specific data elements within field devices, mapping PLC registers, I/O values, and variables to platform tags for monitoring and control.
Device Points provide:
Each point links a specific device address to a tag, enabling data exchange between field devices and the platform.
Property | Description | Example |
---|---|---|
TagName | Associated platform tag | Tag.Temperature01 |
Node | Parent device node | PLC_Line1 |
Address | Device register/location | 40001, DB100.DBW10 |
DataType | Data format | Native, Int32, Float |
Modifiers | Byte order adjustments | SwapBytes, SwapWords |
AccessType | Read/Write permissions | ReadWrite, ReadOnly |
Scaling | Value transformation | Div:10, Add:32 |
Protocol-specific formats:
Change addresses at runtime:
csharp
// Retrieve point configuration
DataTable dt = TK.ProjectDB.GetDataTable("DevicesPoints",
"TagName='Tag.Temperature'");
// Update address
DataRow row = dt.Rows[0];
row["Address"] = "Group01/" + @Tag.Gateway + "/Device01";
row.AcceptChanges();
// Apply changes
string error;
TK.ProjectDB.UpdateDataRows("DevicesPoints", row, out error);
TK.ProjectDB.ApplyProjectChanges();
Default - protocol handles conversion automatically
Type | Description | Use Case |
---|---|---|
Boolean | Single bit | Digital I/O |
Int16 | 16-bit signed | Analog values |
Int32 | 32-bit signed | Counters |
Float | 32-bit floating | Measurements |
Double | 64-bit floating | Precision values |
String | Text data | Messages |
Modifier | Description | When to Use |
---|---|---|
SwapBytes | Reverse byte order | Big/Little endian mismatch |
SwapWords | Reverse word order | 32-bit value issues |
SwapDWords | Reverse double word | 64-bit value issues |
BitIndex | Extract specific bit | Packed boolean values |
Tag Value = (Device Value / Div) + Add
Device Value = (Tag Value - Add) * Div
Temperature scaling:
Offset correction:
Configure read/write behavior:
See → Devices AccessTypes for detailed configuration
csharp
public void UpdateMQTTAddress(string tagName, string gateway)
{
string error;
// Get point configuration
DataTable dt = TK.ProjectDB.GetDataTable("DevicesPoints",
$"TagName='{tagName}'");
if (dt.Rows.Count > 0)
{
// Update address with gateway
DataRow row = dt.Rows[0];
row["Address"] = $"/topic/{gateway}/data";
row.AcceptChanges();
// Apply to project
TK.ProjectDB.UpdateDataRows("DevicesPoints",
new DataRow[] { row }, out error);
if (string.IsNullOrEmpty(error))
{
TK.ProjectDB.ApplyProjectChanges();
@Info.Trace($"Address updated: {row["Address"]}");
}
else
{
@Info.Trace($"Error: {error}");
}
}
}
See → Importing PLC Addresses for procedures
Good: 40001-40010 (block read)
Poor: 40001, 40003, 40005 (individual reads)
Point not updating:
Wrong values:
Write failures:
Import issues:
Monitor point communication:
csharp
// Get point status
bool quality = @Tag.Temperature.Quality == 192;
// Check last update
DateTime timestamp = @Tag.Temperature.TimeStamp;
// Monitor errors
string lastError = @Device.Point["Temperature"].LastError;
// Communication statistics
int readCount = @Device.Point["Temperature"].ReadCount;
int writeCount = @Device.Point["Temperature"].WriteCount;