Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

c# example ni 4050 (pcmcia)

HI, can anyone post a c# code example for measuring resistance with a NI PCMCIA 4050?

All examples (in the NI folder) which i tried don't work. 😞
0 Kudos
Message 1 of 4
(3,255 Views)

Hi programma,

 

perhaps this may help you:

http://zone.ni.com/devzone/cda/epd/p/id/5296

http://zone.ni.com/devzone/cda/epd/p/id/523

 

The first one is about how to measure resistance with DMM

and the second includes an example of how to measure DC voltage

with DMM in c#

Regards
DianaS
0 Kudos
Message 2 of 4
(3,242 Views)

Hi! 

 

I tried to initialize the resistance channel with the following code:

private void button1_Click(object sender, EventArgs e) { Task myTask = new Task(); try { myTask.AIChannels.CreateResistanceChannel("DAQ::1:INSTR", "", 1.0, 200000.0, AIResistanceConfiguration.TwoWire, AIExcitationSource.None, 0.0, AIResistanceUnits.Ohms); myTask.Control(TaskAction.Verify); AnalogSingleChannelReader myAnalogReader = new AnalogSingleChannelReader(myTask.Stream); } catch (DaqException exception) { myTask.Dispose(); MessageBox.Show(exception.Message); }

 

But I don't know which device name i should use? I tried "DAQ::1:INSTR", "DEV0", "DEV1"..... I can't find any information about the device name...

 

0 Kudos
Message 3 of 4
(3,215 Views)

Hi

 

If you go to -> Start -> Programs -> National Instruments -> NI-DMM -> DMM Soft Frontpanel

You can test your DMM. And there is also shown the device name.

I used a PCI-4060 here and the device name is DAQ::1

 

 

 

Regards
DianaS
0 Kudos
Message 4 of 4
(3,198 Views)