Option Timestamp | Reading out timestamp data |
|
|
Using this function will not give you back a whole timestamp, as the timestamp values are wider than 32 bit. Please also refer to the section on the timestamp data format below.
Reading out all the timestamps with SpcGetData
When using the function SpcGetData the data stored in the timestamp FIFO will be read out in one block by the driver. The usage of the function SpcGetData is described in the relating section earlier in this manual. The following list does only show the different parameters in a very short way:
SpcGetData (nr, ch, start, len, data)
•nr: Number of the board (Windows). Linux users please refer to the Driver section for differences using linux.
•ch: Channel to be read out. Must be set to CH_TIMESTAMP (9999) to access timestamp FIFO.
•start: [Windows only:] Differing from the standard use, this parameter gives back the number of actually read timestamps and therefore needs to be a pointer. Please refer to the example at the end of this chapter. Under linux please use the SPC_TIMESTAMP_COUNT regis- ter instead and program the „start“ parameter to zero.
•len: Number of timestamps that fit in the data buffer and so defines the number of timestamps to be read out.
•data: Huge buffer for the read out timestamps, that must have at least enough space for 8*len bytes.
It might be that you try to read out more timestamps than there actually are in the timestamp FIFO bacause you don’t know how many trigger events have been detected. Please make use of the value given back by the parameter start to get to know what parts of your buffer contain valid timestamps.
Register | Value | Direction | Description |
SPC_TIMESTAMP_COUNT | 47020 | r | Return the number of timestamps that have been read be the prior SpcGetData call. Needs only to be |
|
|
| used under Linux. |
Data format
Each timestamp is 56 bit long and internally mapped to 64 bit (8 bytes). The counter value contains the number of clocks that have been recorded with the currently used sample rate since the last
The values the counter is counting and that are stored in the timestamp FIFO represent the moments the trigger event occures internally. Com- pared to the real external trigger event, these values are delayed. The delay is depending on the actual sample rate, the number of activated channels and the used trigger mode. This delay can be ignored, as it will be identically for all recordings with the same setup.
Timestamp Mode | Recording Mode | 1st 4 bytes | 2nd 4 bytes | 3rd 4 bytes | 4th 4 bytes | 5th 4 bytes | 6th 4 bytes |
Standard/StartReset | Normal / Multiple Recording | Trigger 0 | Trigger 0 | Trigger 1 | Trigger 1 | Trigger 2 | Trigger 2 |
|
| LOW part | HIGH part | LOW part | HIGH part | LOW part | HIGH part |
Standard/StartReset | Gated Sampling | Gate Start 0 | Gate Start 0 | Gate End 0 | Gate End 0 | Gate Start 1 | Gate Start 1 |
|
| LOW part | HIGH part | LOW part | HIGH part | LOW part | HIGH part |
RefClock | Normal / Multiple Recording | Trigger 0 | Trigger 0 | Trigger 1 | Trigger 1 | Trigger 2 | Trigger 2 |
|
| Counter value | Seconds | Counter value | Seconds | Counter value | Seconds |
RefClock | Gated Sampling | Gate Start 0 | Gate Start 0 | Gate End 0 | Gate End 0 | Gate Start 1 | Gate Start 1 |
|
| Counter value | Seconds | Counter value | Seconds | Counter value | Seconds |
(c) Spectrum GmbH | 85 |