In the Siemens 1500 series and Beckhoff TwinCat3.1 the analog values can be transferred to the PC with a funtion block call. Since the time stamp is already formed in the PLC, we can claim that the recording is thus accurate to the millisecond.
The following is an example for calling the block in the PLC
The function block call controls the recording interval in the controller. Theoretically you can call the block in every PLC cycle. However, you must consider that there are then very many data sets to record.
A small calculation example: 5ms cycle time, call in each cycle = 200 records per second * 3600 = 720'00 records per hour * 24 = 17'280'000 records per day for "only" one analog value.
Since the time stamp is formed in the PLC, it is very important that the time in the PLC is accurate. To achieve this, it is recommended to enter a time server in the device settings of the CPU. Thus the time in the PLC is always corrected and updated accordingly.