NI-Sync C API Reference

niSync_init

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

C Function Prototype

ViStatus niSync_init (ViRsrc resourceName, ViBoolean idQuery, ViBoolean resetDevice, ViSession* vi);

Purpose

Creates a new NI-Sync instrument driver session.

You must call this function any time you want to use NI-Sync functions, and you must open a separate section for each device. You can use the instrument handle returned from this function to identify the device to other NI-Sync functions, including NI-Sync external calibration functions.

Parameters

Name Type Description
resourceName ViConstString The resource name of the module to initialize. You can assign the resource name of a device in Measurement & Automation Explorer (MAX).


PXI and DAQ Syntax

PXI[bus number]::device number
NI-DAQmx name

Optional fields are shown in square brackets ([]).


Note  VISA aliases are also valid for the resource name.

Example resource names:
Resource Name Description
Dev1 DAQmx name
pxi1slot5 DAQmx name
PXI0::15::INSTR PXI bus 0, device number 15
PXI::15::INSTR PXI bus 0, device number 15
PXI4::9::INSTR PXI bus 4, device number 9
idQuery ViBoolean This parameter is ignored.

Because NI-Sync supports multiple NI-Sync modules, it always queries the device to determine which device is installed.

Valid Values:
TRUE—Query the device (Default Value)
FALSE—Do not query the device

resetDevice ViBoolean Resets the NI-Sync module during the initialization procedure.

Valid Range:
TRUE (1)—Reset Device
FALSE (0)—Don't Reset (Default Value)

vi ViSession Returns a ViSession handle that you use to identify the instrument in all subsequent instrument driver function calls.

Return Values

Log in to get a better experience