LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

PXI Trigger functionality / MUX<->DMM Handshaking

Hello everyone,

 

currently I’m working on an old Labwindows/CVI project and I’m getting timeouts while using internal PXI trigger functionality.

 

Old HW:

Teststand 3.5

PXI-1045

DMM PXI-4070

MUX PXI-2530

 

New HW:

CVI2020 / IVI 2020/ Teststand 2021

PXIe-1084

DMM PXI-4080

MUX PXI-2530B

 

This code worked on old hardware, however on new hardware there seem to be problems with handshaking functionality:

 

Scanlist = “ch0->com1;ch1->com0;”;

 

device = 1;

  checkErr(niSwitch_init(MUXdevice, VI_TRUE, VI_TRUE, &MUXsession));

  checkErr(niSwitch_ConfigureScanTrigger(MUXsession, 0.0, NISWITCH_VAL_TTL0, NISWITCH_VAL_TTL1));

  checkErr(niSwitch_ConfigureScanList(MUXsession, ScanList, NISWITCH_VAL_BREAK_BEFORE_MAKE));

  device = 2;

  checkErr(niDMM_init(DMMdevice, VI_TRUE, VI_FALSE, &DMMsession));

  checkErr(niDMM_ConfigureMeasurementDigits(DMMsession, NIDMM_VAL_DC_VOLTS, Range, Digits));

  checkErr(niDMM_ConfigureMultiPoint(DMMsession, nroutes, 1, NIDMM_VAL_TTL1, -1));

  checkErr(niDMM_ConfigureMeasCompleteDest(DMMsession, NIDMM_VAL_TTL0));

 

 

    device = 1;

    checkErr(niSwitch_InitiateScan(MUXsession));

    // set DMM into armed state (DMM triggers scanning per default)...

    device = 2;

    checkErr(niDMM_Initiate(DMMsession));

    // wait for scan list to be processed once...

    device = 1;

    checkErr(niSwitch_WaitForScanComplete(MUXsession, Timeout_ms));

    // now get measurements (no measurement, just fetching)...

    device = 2;

    checkErr(niDMM_FetchMultiPoint(DMMsession, Timeout_ms, nroutes, reading, &points));

 

When executing the code above I get the error -1074126826 Max Time Exceed (->WaitforScanComplete Timeout).

 

Any ideas?

 

Thanks

0 Kudos
Message 1 of 2
(459 Views)

VI devices can be notoriously difficult to configure in NI-MAX. Are you sure their setups are good ? You should make little test programs for each of them and test them.

 

Also I wonder about all your device=... lines. Is there more than meet the eyes in your code ?

0 Kudos
Message 2 of 2
(423 Views)