LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

ni-6120 PFI0 Analog trigger and also some other issues

ni-6120 w/CVI, If I config hardware analog trigger from analog channel 0(Gain is set as 1),

iStatus = Configure_HW_Analog_Trigger(iDevice[0], ND_ON, lLowValue,lHighValue, ND_ABOVE_HIGH_LEVEL, 0);
/*...*/
iStatus = Select_Signal(iDevice[0], ND_IN_STOP_TRIGGER, ND_PFI_0,ND_LOW_TO_HIGH);

It works fine for me. When I want to config analog trigger from PFI0, I changed the parameters for Configure_HW_Analog_Trigger as following:
iStatus = Configure_HW_Analog_Trigger(iDevice[0], ND_ON, lLowValue,lHighValue, ND_ABOVE_HIGH_LEVEL, ND_PFI_0);
It does not trigger(the analog signal on channel 0 before is connected to PFI0).
What's the problem here? A bug?

I am also having problems in configuring the range for 6120 boa
rd. The manual listed that I could choose input from 200mv to 42volts with proper gain and range combinations. I tried set range with 10Volts and with different gains, I can get all range below 10V working, but when comes to input above 10volts, how can I set up the range? I used
//AI_Configure (deviceNumber, chan, inputMode, inputRange, polarity, driveAIS)
iStatus=AI_Configure (iDevice[i], j, 0, 20,0, 0);
but after this the range is still on 10volts. I also tried with inputRange=50, not working either.

Thanks for your help. i
0 Kudos
Message 1 of 2
(3,074 Views)
I am not sure if you are trying to configure the trigger for PFI 0 or for analog input channel 0, but I will try to answer both. To configure the device for an analog start trigger on PFI 0 you should use the following.

iStatus = Configure_HW_Analog_Trigger (iDevice, ND_ON, lLowValue, lHighValue, ND_ABOVE_HIGH_LEVEL, ND_PFI_0);

//Use PFI0 as the start trigger source when a rising edge appears
Select_Signal (iDevice, ND_IN_START_TRIGGER, ND_PFI_0, ND_LOW_TO_HIGH);

//Changes the PFI0 default AC coupling to DC coupling
iStatus = AI_Change_Parameter (iDevice, ND_PFI_0, ND_AI_COUPLING, ND_DC);

If you would like to use the first channel in you scan list:

iStatus = Configure_HW_Analog_Trigger (iDevice, ND_ON, lLowValue, lHighValue, ND_ABOVE_HIGH_LEVEL
, ND_THE_AI_CHANNEL);


//Use PFI0 as the start trigger source when a rising edge appears
Select_Signal (iDevice, ND_IN_START_TRIGGER, ND_PFI_0, ND_LOW_TO_HIGH);

//Changes the PFI0 default AC coupling to DC coupling
iStatus = AI_Change_Parameter (iDevice, ND_PFI_0, ND_AI_COUPLING, ND_DC);

I hope this helps solve your triggering issues.

Josh
0 Kudos
Message 2 of 2
(3,073 Views)