NI-HSDIO C Function Reference

niHSDIO_ExportSignal

  • Updated2023-02-21
  • 3 minute(s) read

ViStatus = niHSDIO_ExportSignal ( ViSession vi, ViInt32 signal, ViConstString signalIdentifier, ViConstString outputTerminal);

Purpose

Use this function to route signals (clocks, triggers, and events) to the output terminal you specify. Refer to your device documentation for valid signal destinations.

Any routes created within a session persist after the session closes to prevent signal glitching. To unconfigure signal routes created in previous sessions, set the resetInstrument parameter in niHSDIO_InitGenerationSession or niHSDIO_InitAcquisitionSession to VI_TRUE or use niHSDIO_reset.

If you export a signal with this function and commit the session, the signal is routed to the output terminal you specify. If you then reconfigure the signal to have a different output terminal, the previous output terminal is tristated after the session is committed. If you change the output terminal to NIHSDIO_VAL_DO_NOT_EXPORT_STR or an empty string when you commit the operation, the previous output terminal is tristated.

Related topics:

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi was obtained from the niHSDIO_InitAcquisitionSession or niHSDIO_InitGenerationSession function.
Signal ViInt32 Signal (clock, trigger, or event) to export.

Defined Values

NIHSDIO_VAL_SAMPLE_CLOCK (51)—Device Sample clock.
NIHSDIO_VAL_REF_CLOCK (52)—Device Reference clock.
NIHSDIO_VAL_START_TRIGGER (53)—Device Start trigger.
NIHSDIO_VAL_REF_TRIGGER (54)—Device Reference trigger (dynamic acquisition only).
NIHSDIO_VAL_ADVANCE_TRIGGER (61)—Device Advance trigger (dynamic acquisition only)
NIHSDIO_VAL_PAUSE_TRIGGER (57)—Device Pause trigger (dynamic generation only).
NIHSDIO_VAL_SCRIPT_TRIGGER (58)—Device Script trigger (dynamic generation only—requires signalIdentifier to describe a particular Script trigger).
NIHSDIO_VAL_STOP_TRIGGER (82)—Device Stop trigger (dynamic generation only).
NIHSDIO_VAL_DATA_ACTIVE_EVENT (55)— Data Active event (dynamic generation only).
NIHSDIO_VAL_MARKER_EVENT (59)—Marker event (dynamic generation only—requires signalIdentifier to describe a particular marker).
NIHSDIO_VAL_READY_FOR_START_EVENT (56)—Ready for Start event.
NIHSDIO_VAL_READY_FOR_ADVANCE_EVENT (66)—Ready for Advance event (dynamic acquisition only).
NIHSDIO_VAL_END_OF_RECORD_EVENT (68)—End of Record event (dynamic acquisition only).
NIHSDIO_VAL_ONBOARD_REF_CLOCK (60)—Device onboard Reference clock (PCI devices only).
Signal Identifier ViConstString Describes the signal being exported.

Defined Values
  • "ScriptTrigger0"
  • "ScriptTrigger1"
  • "ScriptTrigger2"
  • "ScriptTrigger3"
  • "Marker0"
  • "Marker1"
  • "Marker2"
  • "Marker3"
  • "" (empty String)
  • VI_NULL
Output Terminal ViConstString Output terminal where the signal is exported:
  • NIHSDIO_VAL_PFI0_STR to NIHSDIO_VAL_PFI3_STR : PFI connectors
  • NIHSDIO_VAL_PXI_TRIG0_STR to NIHSDIO_VAL_PXI_TRIG6_STR : the PXI trigger backplane (for PXI devices only)
  • NIHSDIO_VAL_PXI_TRIG7/NIHSDIO_VAL_RTSI0_STR to NIHSDIO_VAL_RTSI6_STR : the RTSI trigger bus (for PCI devices only)
  • NIHSDIO_VAL_RTSI7_STR : RTSI trigger line 7, designated for the Onboard Reference Clock
    Note  NI-HSDIO returns an error if you route any signal other than the Onboard Ref Clock to PXI Trigger Line 7/RTSI 7. The Onboard Ref Clock is only available on PCI devices.
  • NIHSDIO_VAL_CLK_OUT_STR—CLK OUT connector on the front panel
  • NIHSDIO_VAL_DDC_CLK_OUT_STR—DDC CLK OUT terminal in the DDC connector
  • "" (empty string) or VI_NULL—the signal is not exported

    Trigger and event voltages and positions are only relevant if the destination of the event is one of the front panel connectors.

Return Value

Name Type Description
Status ViStatus

Reports the status of this operation. To obtain a text description of the status code, call the niHSDIO_error_message function. To obtain additional information concerning the error condition, use the niHSDIO_GetError and niHSDIO_ClearError functions.

The general meaning of the status code is as follows:

Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

Log in to get a better experience