Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Traditional NI-DAQ (nidaq32.dll) function How to change to nidaqmx (C #)

nStatus = GPCTR_Control(nDevice, NiDaq_Const.ND_COUNTER_0, NiDaq_Const.ND_RESET);
nStatus = GPCTR_Set_Application(nDevice, NiDaq_Const.ND_COUNTER_0, NiDaq_Const.ND_PULSE_TRAIN_GNR);
nStatus = Line_Change_Attribute(nDevice, NiDaq_Const.ND_PFI_39, NiDaq_Const.ND_LINE_FILTER, NiDaq_Const.ND_100_NANOSECONDS);
nStatus = GPCTR_Change_Parameter(nDevice, NiDaq_Const.ND_COUNTER_0, NiDaq_Const.ND_SOURCE, NiDaq_Const.ND_PFI_39);
nStatus = GPCTR_Change_Parameter(nDevice, NiDaq_Const.ND_COUNTER_0, NiDaq_Const.ND_COUNT_1, anValue1);
nStatus = GPCTR_Change_Parameter(nDevice, NiDaq_Const.ND_COUNTER_0, NiDaq_Const.ND_COUNT_2, anValue2);
nStatus = Select_Signal(nDevice, NiDaq_Const.ND_GPCTR0_OUTPUT, NiDaq_Const.ND_GPCTR0_OUTPUT, NiDaq_Const.ND_LOW_TO_HIGH);
nStatus = GPCTR_Control(nDevice, NiDaq_Const.ND_COUNTER_0, NiDaq_Const.ND_PROGRAM);

 

How to change the above functions to nidaqmx
Does it work the same?

0 Kudos
Message 1 of 4
(2,355 Views)
0 Kudos
Message 2 of 4
(2,320 Views)

Used in Traditional NI-DAQ (nidaq32.dll)
Line_Change_Attribute (nDevice, NiDaq_Const.ND_PFI_35, iDaq_Const.ND_LINE_FILTER, NiDaq_Const.ND_100_NANOSECONDS);


GPCTR_Change_Parameter (nDevice, NiDaq_Const.ND_COUNTER_1, NiDaq_Const.ND_SOURCE, NiDaq_Const.ND_PFI_35);

 

How can I use ND_PFI_35 Source setting in NIDAQMX?

0 Kudos
Message 3 of 4
(2,309 Views)

I'm sorry, I'm not familiar with traditional DAQ. As I understand you wanna configure the counter function. 

I think you should check a counter function example first. You can find the information for .net examples.

https://www.ni.com/docs/en-US/bundle/ni-daqmx-.net-framework-4.5.1-class-library-getting-started/pag...

0 Kudos
Message 4 of 4
(2,296 Views)