NI-HSDIO C Function Reference

niHSDIO_ConfigureDigitalLevelScriptTrigger

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

ViStatus = niHSDIO_ConfigureDigitalLevelScriptTrigger ( ViSession vi, ViConstString triggerID, ViConstString source, ViInt32 level);

Purpose

Configures the Script trigger for level triggering. This function is valid only for generation sessions that use scripting.

"ScriptTrigger3" is not available when using the NI 6544/6545/6547/6548.

Related topics:

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi was obtained from the niHSDIO_InitAcquisitionSession or niHSDIO_InitGenerationSession function.
Trigger ID ViConstString Identifies which Script trigger this function configures.

Defined Values

"ScriptTrigger0"
"ScriptTrigger1"
"ScriptTrigger2"
"ScriptTrigger3"
Source ViConstString You may specify any valid source terminal for this trigger. Trigger voltages and positions are only relevant if the source of the trigger is from the front panel connectors.
Note  Only NI 6555/6556 devices support PFI <24..31> and PXIe DStarB.


Defined Values:

NIHSDIO_VAL_PFI0_STR ("PFI0") PFI 0 on the front panel connector.
NIHSDIO_VAL_PFI1_STR ("PFI1") PFI 1 on the front panel DDC connector.
NIHSDIO_VAL_PFI2_STR ("PFI2") PFI 2 on the front panel DDC connector.
NIHSDIO_VAL_PFI3_STR ("PFI3") PFI 3 on the front panel DDC connector.
NIHSDIO_VAL_PFI24_STR ("PFI24") PFI 24 on the front panel connector.
NIHSDIO_VAL_PFI25_STR ("PFI25") PFI 25 on the front panel DDC connector.
NIHSDIO_VAL_PFI26_STR ("PFI26") PFI 26 on the front panel DDC connector.
NIHSDIO_VAL_PFI27_STR ("PFI27") PFI 27 on the front panel DDC connector.
NIHSDIO_VAL_PFI28_STR ("PFI28") PFI 28 on the front panel connector.
NIHSDIO_VAL_PFI29_STR ("PFI29") PFI 29 on the front panel DDC connector.
NIHSDIO_VAL_PFI30_STR ("PFI30") PFI 30 on the front panel DDC connector.
NIHSDIO_VAL_PFI31_STR ("PFI31") PFI 31 on the front panel DDC connector.
NIHSDIO_VAL_PXI_TRIG0_STR ("PXI_Trig0") PXI trigger line 0. (PXI/PXI Express devices)
NIHSDIO_VAL_PXI_TRIG1_STR ("PXI_Trig1") PXI trigger line 1. (PXI/PXI Express devices)
NIHSDIO_VAL_PXI_TRIG2_STR ("PXI_Trig2") PXI trigger line 2. (PXI/PXI Express devices)
NIHSDIO_VAL_PXI_TRIG3_STR ("PXI_Trig3") PXI trigger line 3. (PXI/PXI Express devices)
NIHSDIO_VAL_PXI_TRIG4_STR ("PXI_Trig4") PXI trigger line 4. (PXI/PXI Express devices)
NIHSDIO_VAL_PXI_TRIG5_STR ("PXI_Trig5") PXI trigger line 5. (PXI/PXI Express devices)
NIHSDIO_VAL_PXI_TRIG6_STR ("PXI_Trig6") PXI trigger line 6. (PXI/PXI Express devices)
NIHSDIO_VAL_PXI_TRIG7_STR ("PXI_Trig7") PXI trigger line 7. (PXI/PXI Express devices)
NIHSDIO_VAL_RTSI0_STR ("RTSI0") RTSI trigger line 0. (PCI devices)
NIHSDIO_VAL_RTSI1_STR ("RTSI1") RTSI trigger line 1. (PCI devices)
NIHSDIO_VAL_RTSI2_STR ("RTSI2") RTSI trigger line 2. (PCI devices)
NIHSDIO_VAL_RTSI3_STR ("RTSI3") RTSI trigger line 3. (PCI devices)
NIHSDIO_VAL_RTSI4_STR ("RTSI4") RTSI trigger line 4. (PCI devices)
NIHSDIO_VAL_RTSI5_STR ("RTSI5") RTSI trigger line 5. (PCI devices)
NIHSDIO_VAL_RTSI6_STR ("RTSI6") RTSI trigger line 6. (PCI devices)
NIHSDIO_VAL_RTSI7_STR ("RTSI7") RTSI trigger line 7. (PCI devices)
NIHSDIO_VAL_PXI_STAR_STR ("PXI_STAR") The device uses the PXI_STAR signal which is present on the PXI backplane. This selection is valid only for PXI devices in slots other than Slot 2.
NIHSDIO_VAL_PXI_DSTARB_STR ("PXIe_DStarB") The device uses the PXIe_StarB signal which is present on the PXI Express backplane. This selection is valid only for NI 6555/6556 devices.
Trigger When ViInt32 Specifies the active level for the desired trigger.

Defined Values

NIHSDIO_VAL_HIGH (34)—Trigger is active while its source is high level.
NIHSDIO_VAL_LOW (35)—Trigger is active while its source is low level.

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