I need to know the exact initialization timestamp value for a PEAK-USB. I know that this time is related with windows start time, but I'm wondering if I can read this value from PEAK. It is very usefull because I can create an absolut zero when messages are comming to synchronize with other HW.
I don't want to wait till first CAN message has arrived to read this value.
Thanks in advanced.
The driver calculates the reception based on "QueryPerformanceCounter" of the WIN-32 API with
the information given by the hardware. You could use the "QueryPerfomanceCounter" to set a reference point.
PCANBasic itself does not have a function to returning this value without having messages involved,
and the above solution is not representative of the actual time the driver initializes the device but
rather when the driver will return to PCANBasic, that it has initialized the device. There'll be deviations
depending on your System (As Windows is no Real-time system) on how close to actual device initialization
this reference point will be.
If this is a valid appraoch for you is dependent on the level of accuracy needed.
THE PCAN-Developer API however has a function returning the current system time retrieved from the driver, look
in your PCAN-Developer 4 documentation.
This might be more appropiate for your intended use.
For further questions feel free to contact me again.