<< Click to Display Table of Contents >> Navigation: CVB with GenICam > SDK > Retrieving time stamps > Get camera timestamp - GenICam driver |
Timestamps could be used to check if several cameras are running synchronously.
But it is still possible that the timestamps can drift apart.
The “TimestampControlReset” must be pressed to check for synchronous acquisition.
Through this timestamp it can be monitored, if the camera is running synchronously to the time of the PC.
For retrieving the timestamp the Common Vision Blox GenICam API (Library or Control)must be used.
Retrieving the timestamp from a GenICam compliant camera may work as the following.
|
- |
The camera timestamp can be retrieved via the Nodemap of the camera. (see screenshot below) |
|
|
- |
The nodes “TimestampControlLatch”, “TimestampTickFrequency”, Timestamp Value” and “TimestampControlReset” are used to retrieve the timestamp.
|
|
|
|
|
TimestampTickFrequency: 64 Bit value indicating the number of timestamp clock ticks in one second. This value varies for different GigE cameras. This value is permanent and must be retrieved only once from the camera.
TimestampValue: The current timestamp from the camera, that is retrieved by pressing the execute button from the node “Timestamp Control Latch”.
TimestampControlLatch: Execute must be pressed to retrieve the current timestamp from the camera in the node “TimestampValue”.
TimestampControlReset: Resets the timestamp count of the device. The current timestamp from the node must be divided by the “Timestamp Tick Frequency”. The calculated value is given in seconds. |
|
|
|
Screenshot of the GeniCam property grid showing the mentionend features (consider possible parameter name variance) :
VB.Net Example: Using the GenICam Library
This example shows how to retrieve the different parameters (mentioned above) for the time stamp evaluation from the Nodemap of the camera.
' get Nodes with the given NodeName Dim _frequency As Long = 0 Dim _frequencyNode As Long = 0 Dim _timestampValue As Long = 0 Dim _nodeTimestampValue As Long = 0 Dim _nodeControlLatch As Long = 0
' get Time Stamp Tick Frequency node Cvb.GenApi.NMGetNode(_Nodemap, "GevTimestampTickFrequency", _frequencyNode)
' get timestamp tick frequency 64 bit value Cvb.GenApi.NGetAsFloat(_frequencyNode, value)
' get timestamp tick value node Cvb.GenApi.NMGetNode(_Nodemap, "GevTimestampValue", _nodeTimestampValue)
' get get current timestamp tick value Cvb.GenApi.NGetAsInteger(_nodeTimestampValue, _timestampValue)
' get Timestamp Control Latch Node Cvb.GenApi.NMGetNode(_Nodemap, "GevTimestampControlLatch", _nodeControlLatch)
' get press the timestamp control latch execute Cvb.GenApi.NSetAsBoolean(_nodeControlLatch, True)
' get current timestamp tick value Cvb.GenApi.NGetAsInteger(_nodeTimestampValue, _timestampValue)
|