From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

7342 read analog

// te.cpp : 定义控制台应用程序的入口点。
//

#include "stdafx.h"
#include "flexmotn.h"

int _tmain(int argc, _TCHAR* argv[])
{
 u8 ADC=0x01;
 i16 ai[16];
 u8 boardID=1;
 flex_set_adc_range(boardID,ADC,NIMC_ADC_BIPOLAR_10);
 flex_enable_adcs(boardID,1,1);
aa:
    flex_read_adc_rtn(boardID,NIMC_ADC1,ai);
 printf ("\n%d",ai[0]);
 Sleep(1000);
 goto aa;

 return 0;
}

 

 

Why i can't get currect voltage?

0 Kudos
Message 1 of 3
(7,522 Views)

PCI-7342 visual c++

0 Kudos
Message 2 of 3
(7,519 Views)

I think this coding can be used in Visual C++

0 Kudos
Message 3 of 3
(6,906 Views)