How to Synchronize the Start Trigger of XNET and Scope Modules?

Updated Dec 17, 2024

Environment

Driver

  • NI-XNET
  • NI-SCOPE

The article describes how to synchronize hardware using the XNET driver and Scope driver, for communication between the devices. Synchronization is important for applications that require precise data acquisition and control.

To complete this, you will need access to the appropriate XNET and Scope drivers, as well as the compatible hardware ( any compatible oscilloscope or XNET interface card) on the same PXI(e) chassis. 

To synchronize the XNET and Scope hardware, with LabVIEW or another development environment with access to the NI-SCOPE and NI-XNET drivers, you can use string-based routing.

This means you do not need export the signal from the CAN device to PXI_0 and allows the routing subsystem to automatically create the full route for you. 

The recommended approach for configuring the trigger source is to use the event terminal of the NI-XNET device.

If you are using the function niScope_ConfigureTriggerEdge, pass the terminal name of the XNET device as the trigger source for the digitizer.

For example, The triggerSource argument in the function should be the string terminal of the XNET device, such as "\PXI1Slot2\TimestampTrigger".

The niScope_ConfigureTriggerEdge has the following signature: 

ViStatus _VI_FUNC niScope_ConfigureTriggerEdge(

ViSession vi,

ViConstString triggerSource,

ViReal64 level,

ViInt32 slope,

ViInt32 triggerCoupling,

ViReal64 holdoff,

ViReal64 delay);

So for example, this would be

niScope_ConfigureTriggerEdge(vi, "\\PXI1Slot2\\TimestampTrigger", 1.0, 1, 1, 0.0, 0.0); 

Verify that the event terminal you’re using is valid for your CAN application. If unsure, consult your XNET documentation for correct terminal names.