NI-FGEN C Function Reference

niFgen_ExportSignal

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

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

Purpose

Routes signals (clocks, triggers, and events) to the output terminal you specify.

Any routes created within a session persist after the session closes to prevent signal glitching. To unconfigure signal routes created in previous sessions, set resetDevice in the niFgen_init function to VI_TRUE or use the niFgen_ResetDevice function.

If you export a signal with this function and commit the session, the signal is routed to the output terminal you specify.

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the niFgen_init, niFgen_InitWithOptions, or niFgen_InitializeWithChannels functions and identifies a particular instrument session.
signal ViInt32 Specifies the source of the signal to route.

Defined Values
NIFGEN_VAL_ONBOARD_REFERENCE_CLOCKOnboard 10 MHz synchronization clock (PCI only)
NIFGEN_VAL_SYNC_OUTSYNC OUT signal

The SYNC OUT signal is normally generated on the SYNC OUT front panel connector.
NIFGEN_VAL_START_TRIGGERStart Trigger
NIFGEN_VAL_MARKER_EVENTMarker Event
NIFGEN_VAL_SAMPLE_CLOCK_TIMEBASEThe clock from which the Sample Clock is derived
NIFGEN_VAL_SYNCHRONIZATIONSynchronization strobe (NI 5404/5411/5431 only)

A synchronization strobe is used to guarantee absolute synchronization between two or more signal generators.
NIFGEN_VAL_SAMPLE_CLOCKSample Clock
NIFGEN_VAL_REFERENCE_CLOCKPLL Reference Clock
NIFGEN_VAL_SCRIPT_TRIGGERScript Trigger
NIFGEN_VAL_READY_FOR_START_EVENTReady For Start Event
NIFGEN_VAL_STARTED_EVENTStarted Event
NIFGEN_VAL_DONE_EVENTDone Event
NIFGEN_VAL_DATA_MARKER_EVENTData Marker Event
signalIdentifier ViConstString Specifies which instance of the selected signal to export.

Defined Values
"" (empty string)Default (for non instance-based signals)
"ScriptTrigger0"Script Trigger 0
"ScriptTrigger1"Script Trigger 1
"ScriptTrigger2"Script Trigger 2
"ScriptTrigger3"Script Trigger 3
"Marker0" Marker 0
"Marker1" Marker 1
"Marker2" Marker 2
"Marker3" Marker 3
"DataMarker0" Data Marker 0*
"DataMarker1" Data Marker 1*
"DataMarker2" Data Marker 2*
"DataMarker3" Data Marker 3*
* These Data Marker values apply only to single-channel devices or to multichannel devices that are configured for single-channel operation. When using a device that is configured for multichannel operation, specify the channel number along with the signal identifier. For example, to export Data Marker 0 on channel 1 of a device configured for multichannel operation, use the value "1/ DataMarker0." If you do not specify a channel when using a device configured for multichannel generation, DataMarker0 generates on all channels.
outputTerminal ViConstString Specifies the output terminal to export the signal.
Note Note   The following Defined Values are examples of possible output terminals. For a complete list of the output terminals available on your device, refer to the Routes topic for your device or the Device Routes tab in MAX.

Defined Values
"" (empty string)Do not export signal
"PFI0"PFI line 0
"PFI1"PFI line 1
"PFI4"PFI line 4
"PFI5"PFI line 5
"PXI_Trig0" PXI or RTSI line 0
"PXI_Trig1" PXI or RTSI line 1
"PXI_Trig2" PXI or RTSI line 2
"PXI_Trig3" PXI or RTSI line 3
"PXI_Trig4" PXI or RTSI line 4
"PXI_Trig5" PXI or RTSI line 5
"PXI_Trig6" PXI or RTSI line 6
"PXI_Trig7" PXI or RTSI line 7
"DDC_ClkOut" Clock out from DDC connector
"PXI_Star"PXI star trigger line

Return Value

Name Type Description
status ViStatus Returns the status code of this operation. The status code either indicates success or describes an error or warning condition. You can examine the status code from each call to an NI-FGEN function to determine if an error occurred. To obtain a text description of the status code, call the niFgen_error_message function. To obtain additional information about the error condition, call the niFgen_GetError function. To clear the error information from NI-FGEN, call the niFgen_ClearError function.

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