Option System Star-Hub
Programming
(c) Spectrum GmbH
125
Compensate injected trigger delays
Due to the combinatorial nature of the distribution card, it injects a certain fixed delay to the distributed trigger events. Depending on the
selected sample rate and the selected trigger sampling edge (either rising edge with using SPC_SYNC_SYSTEMCLOCKTRIG or falling edge
using SPC_SYNC_SYSTEMCLOCKTRIGN) the distributed event might take longer than the sampling period and therefore race the next clock
edge resulting in a shifted trigger position.
To compensate for the possible delays the user cad adjust the trigger position:
By default the trigger position (compared to not using the system trigger synchronization) is delayed by 4 samples. This delay can easily be
compensated by properly incrementing the pre-trigger area by 4 samples and also decrementing the post-trigger area by the same 4 samples.
To compensate for a shorter delay caused by a returned trigger event racing one or two clock edges, additional compensation is required.
The below mentioned sample rate values assume external cables of 2 m length to be used to connect the systems to the distribution card. If
your setup differs please contact Spectrum for further information:
Because the delay compensation affects all cards connected to a Star-Hub, this register is written to the Star-Hub handle itself, instead to the
single cards.
Programming example
To show the required steps when programming the system Star-Hub you’ll find a stripped down simplified example on the included driver
CD. This C++ example is also available from the Spectrum homepage.
For simplicity this „rec_std_system_sync“ example assumes that at least one "system Star-Hub master" and one "system Star-Hub slave" are
both installed in the same PC system, to gain easy software access to both devices without the need for inter-system software communication.
Such a setup is rather unlikely for real-world use, because such setup would render the usage of a system Star-Hub over a standard Star-Hub
rather useless.
Register
Value
Direction
Description
SPC_SYNC_SYSTEM_TRIGADJUST
49240
read/write
Register to adjusting trigger position and therefore compensating for certain combinatorial delays
when using system Star-Hub. Default value is 4. Only values of 4, 3 and 2 are allowed.
Lower/higher range of chosen sample rate
Trigger delay caused by Sys-
tem Star-Hub distribution
Adjustment value written to
SPC_SYNC_SYSTEM_TRIGADJUST
Total trigger delay (no adjusted
pre/post trigger values
Total trigger delay (pre/post
trigger values adjusted(
DC
60.0 MHz
4
4
4
0
60.0 MHz
100.0 MHz
3
3
4
0
100 MHz
125.0 MHz
2
2
4
0
spcm_dwSetParam_i32 (hSync, SPC_SYNC_SYSTEM_TRIGADJUST, 3); // reduce the default delay of 4 by one sample