Kepware Knowledge Base: Solution
Setting a Table to Always Display the Last Record
Last Update: 11/7/2018
Problem:
An application is logging data to a table. Users need to read the last value after it is logged.
Solution:
Although there is no way to configure the table with an ODBC Client driver setting, users can try the following:
1. If every record has a Unique ID that can be sorted, do a descending order index sort on that number. This will always place the last record at the beginning of the list when using a fixed or dynamic table.
2. For large data tables, do a query of the last 5 or 10 records. Then, order by the Record ID. A descending order index sort can also be used that points to a query in the database or query table when using a fixed or dynamic table.
3. Every time that the record count changes, write a 1 to the _MoveLast Tag when using a dynamic table. This will always place the pointer at the last record. To automate the process, use LinkMaster or the OPC DX Plug-In.
©
2022
PTC Inc. All Rights Reserved.