LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

I can't trigger an analog waveform

I am using a DAQPad-6015, CVI 7.1, DAQmx7.4.

I run the following code and am not able to trigger the
waveform no matter how many times I transition PFI0.
I am also not able to trigger the sample program
"C:\Program Files\National Instruments71\CVI71\samples\DAQmx\Analog Out\Generate Voltage\Mult Volt Updates-Int Clk-Dig Start"
Any help would be appreciated.

//create analog task
if (DAQmxCreateTask ("", &AnalogHandle))
return 1;

//configure analog channel
if (DAQmxCreateAOVoltageChan (AnalogHandle, "Dev1/ao1", "", 0.0, 10.0, DAQmx_Val_Volts, ""))
return 1;

//configure analog channel to regenerate buffer
if (DAQmxSetWriteAttribute (AnalogHandle, DAQmx_Write_RegenMode, DAQmx_Val_AllowRegen))
return 1;
//configure analog channel timing
if (DAQmxCfgSampClkTiming (AnalogHandle, "OnboardClock", 0.6, DAQmx_Val_Rising, DAQmx_Val_ContSamps, 100))
return 1;

//set start trigger
if (DAQmxCfgDigEdgeStartTrig (AnalogHandle, "/Dev1/PFI0", DAQmx_Val_Falling))
return 1;

//write analog channel buffer
if (DAQmxWriteAnalogF64 (AnalogHandle, 100, 0, 10.0,DAQmx_Val_GroupByChannel, AmplitudeArray, NULL, NULL))
return 1;

//start task
if (DAQmxStartTask (AnalogHandle))
return 1;
0 Kudos
Message 1 of 9
(4,401 Views)
Hello Clarkus,

1) How are you generating the trigger signal?
2) Have you tried any of the other Triggering examples (analog input, etc.)?
3) Have you tried any of the other Analog Ouput examples? What were the results?
4) How are you checking to verify the signal coming out of your analog output channels?
5) Are you receiving an error?
6) Do you have any other DAQ hardware you can test the programs on?

Thanks for the info!
E.Lee
Eric
DE For Life!
0 Kudos
Message 2 of 9
(4,379 Views)
1) How are you generating the trigger signal?
I am toggling the trigger pin between ground & 5 volts.
2) Have you tried any of the other Triggering examples (analog input, etc.)?
A DAQPad-6015 can not be trigger by an analog signal.
3) Have you tried any of the other Analog Ouput examples? What were the results?
Yes, as long as a trigger is not needed they work.
4) How are you checking to verify the signal coming out of your analog output channels?
A scope.
5) Are you receiving an error?
No.
6) Do you have any other DAQ hardware you can test the
programs on?
Maybe?
0 Kudos
Message 3 of 9
(4,373 Views)
Hello Clarkus,

1) Which pin on the board are you using for triggering?
2) I actually meant to ask if you tried any of the other digital triggering examples, like analog input that is digitally triggerd. Sorry for the confusion.
3) I'm not sure if you have any other DAQ hardware you can test the programs on, but if you do and it is not to much trouble, I would suggest installing that hardware, running the same example program and seeing what kind of behavior you are getting.

Thanks!
E.Lee
Eric
DE For Life!
0 Kudos
Message 4 of 9
(4,361 Views)
I have gotten the DAQPad-6015 to use a digital trigger if I generate a frequency output on the CTR0 pin. I used PFI6 for the trigger.

I cannot get it to digital trigger an anolog output.

My program works fine on a DAQ 6036 E board.
0 Kudos
Message 5 of 9
(4,359 Views)
Hello Clarkus,

It sounds like the behavior we are seeing might be stemming from damaged hardware. I would suggest calling NI to speak to a engineer and find out if the DAQpad needs to be RMA'd. Just go to the following website and choose the "Phone NI" option. Feel free to reference this discussion forum thread if they ask what troubleshooting you have already done.

http://sine.ni.com/apps/we/niae_asc.main

Take care,
E.Lee
Eric
DE For Life!
0 Kudos
Message 6 of 9
(4,345 Views)
You were correct in stating that the 6015 does not support analog triggering. I jumpered my Ch0 to the PFI0 input. The pin number in the e-series manuals do not correlate with the terminal numbers on the ckt board in the 6015 so this is a challange. For example AI0 is on terminal 1 while PFI0 is on teminal 62. I desired analog triggering with pre-trigger capability but this is not possible. I set the DAQmx trigger vi to Reference-Digital Edge. It always triggers on a negative edge regardless of whether you set raising or falling edge. The trigger time does not correlate with time zero as desired. I was unable to get reliable trigger timing regardless of many attempts. Typically the signal transition resides around 0.1 seconds into the data but varries. Like other M-series devices it is difficult to perform channel scaling from your program, there's no m-series pcmcia hardware choices so you're stuck with the poor performance of the USB hardware or use of traditional DAQ routines for lap-top based applications, you cannot programmatically switch from trigger types such as analog or digital as the polymophic routines change their terminal inputs with different trigger types. The 6015 does not allow you to set the trigger levels of you PFI0 input like on e-series boards. Looks like good hardware for applications that continually monitor inputs, such as a display panel but not appropriate for applications that require triggering.  Too bad.
Message 7 of 9
(4,195 Views)

Hello Clarkus,

Thanks for your posting.  I have exactly the same board and the same task, which I was not able to achieve.  After a long time trying, reading .... I read somewhere in DAQmx help that "Not all E Series, M Series, and S Series devices support analog triggering" - eureka!  And now I found your posting...

I was wondering how did you solve the problem at the end - did you get a new board?  If so, which one?

I was told that "occurrences" can perhaps do similar task:   upon an analog signal reaches a certain level - recognized by "occurrence",  the signal perhaps can be generated fast enough.   Unfortunately, I am not able to implement this function, so I don't know how fast it is, and if it is consistant.  Did you try occurrences? Had any luck?

Thanks a lot,

Branka

 

0 Kudos
Message 8 of 9
(3,905 Views)
I gave up trying to use an analog trigger.
0 Kudos
Message 9 of 9
(3,877 Views)