Hi,
I'm quite new to programming DAQ cards so I hope you will forgive me if my question sounds a bit stupid...
My Card: AT-MIO-16E-10
My goal: I want to acquire data points in a regulary rhythm. For that I'm using GPCTR0 in the ND_SINGLE_PULSE_GNR-mode. The data acquisition is triggered by the GPCTR0 output. At the same time, I'd like to count the number of pulses given. For doing that I'm using the GPCTR1 counter in the ND_SIMPLE_EVENT_COUNT mode, with the ND_SOURCE = ND_OTHER_GPCTR_TC. Nearly everything is going fine, only that whan I'm reading the value of GPCTR1 with GPCTR_Watch, I got the Impression that the counter is increasing allways by two counts, leaving in my output file a coulumn with only odd numbers...
The Code (VB6.0):
GPCTR0:
Call GPCTR_Control(1, ND_COUNTER_0, ND_RESET) '????????
Call GPCTR_Set_Application(1, ND_COUNTER_0, ND_PULSE_TRAIN_GNR)
Call GPCTR_Change_Parameter(1, ND_COUNTER_0, ND_SOURCE, ND_INTERNAL_100_KHZ)
Call GPCTR_Change_Parameter(1, ND_COUNTER_0, ND_COUNT_1, speed / 2)
Call GPCTR_Change_Parameter(1, ND_COUNTER_0, ND_COUNT_2, speed / 2)
Call GPCTR_Control(1, ND_COUNTER_0, ND_PROGRAM)
GPCTR1:
Call GPCTR_Control(1, ND_COUNTER_1, ND_RESET)
Call GPCTR_Set_Application(1, ND_COUNTER_1, ND_SIMPLE_EVENT_CNT)
Call GPCTR_Change_Parameter(1, ND_COUNTER_1, ND_SOURCE, ND_OTHER_GPCTR_TC)
Call GPCTR_Change_Parameter(1, ND_COUNTER_1, ND_SOURCE_POLARITY, ND_LOW_TO_HIGH)
Call GPCTR_Control(1, ND_COUNTER_1, ND_PROGRAM)
Thanks for any help