I am using a transaction group to capture some timestamps in the new Logix DT datatype form a ControlLogix PLC running version 35 firmware. The data posted to the database is all rounded to the nearest second. The transaction group is configured to use the DateTime data type for these values. Is this the expected behaviour? The database shows 0 ms values for all the tags, for example: 2023-06-30 14:34:31.000.
It looks like I can switch the transaction group to Long type, which for some reason rounds off to the millisecond rather than the microseconds in the PLC. This is OK for this application, but I would prefer to stay in DateTime of there is a way to make that work.
Yeah, the database flavor matters for the default precision of datetime data types. PostgreSQL defaults to three decimal places but can go to six decimals. IIRC, MariaDB defaults to zero decimal places. Not sure about MS SQL Server.
The Logix Driver preserves them all the way as well.
But neither of our drivers can overcome the fact that once it hits the Ignition tag system it becomes a Java Date, which only has millisecond precision.