Locking to a Selected Time Reference
Prerequisites: Selecting a Time Reference
Complete the following steps to wait until the module is locked to the selected time reference before continuing the program:
- Place a While Loop.
- Place an niSync Property Node inside the While Loop.
- Select Timing»Is Time Reference Present as the first parameter of the niSync Property Node. This property returns TRUE if your selected time reference is detected.
- Add another parameter to the niSync Property Node and select Timing»Offset from Time Reference (ns). This property returns the offset between your timing module and the selected time reference.
- Determine whether or not the offset from the selected time reference is within an acceptable range for synchronization:
- Place the Less? function on the block diagram.
- Connect the Offset from Time Reference parameter to x of the Less? function.
- Wire a constant to y of the Less? function and set the value as needed to achieve the appropriate level of synchronization for your application.
 |
Note If you are using GPS as the selected time reference, you can achieve higher synchronization accuracy if you wait until the self-survey is complete before continuing. You can monitor the status of the self-survey using the Percent Complete of Self Survey property. |
- Place the And function on the block diagram.
- Wire x < y? of the Less? function to the first input of the And function and the value from the Is Time Reference Present parameter to the second input.
- Wire the output of the And function to the conditional terminal. The conditional terminal automatically stops the While Loop when the selected time reference is present and when the offset is less than the value you set for y of the Less? function.
You created a program that waits until your module is synchronized with the selected time reference before continuing.