08-01-2012 09:52 AM
Hi everybody,
I have a problem. I have 8 DO and 8 AI and I want to record my AI but I want to start recording at a specific point. For example of an rising edge of my signal which should at least reach 4 Volts. Is this possible and how to do it.
Another question is I want to know how long it is going to take my device to send out a signal and when I can receive it ( I connected DO with AI). Hoiw can I accomplish this test.
thanks for answering
08-02-2012 12:44 AM
Hi,
1.Before you can set the trigger use for the channel settings
DAQmxErrChk (DAQmxCfgSampClkTiming(g_AItaskHandle,"",g_d_AIFreq,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,g_i_NumOfSampelsToRead));
2.This is for the trigger....
DAQmxErrChk (DAQmxCfgDigEdgeStartTrig(g_AItaskHandle,g_c_triggerSource,g_i_triggerEdge));
3.This function will give you retrigger option....by the g_c_triggerSource ( Digital Soruce )
DAQmxErrChk (DAQmxSetTrigAttribute(g_AItaskHandle,DAQmx_StartTrig_Retriggerable,1));
Hope it helps...
08-02-2012 03:06 AM
Hmm,
my Do and Ai are synced. They are using the same clock. So how do I tell my record that it should start recording when it sees a value over 4 volts.
08-02-2012 03:06 AM
Hi Leee,
you only need to place the triggerfunction before the start function.
You can see it in several examples fron the LabVIEW-Examples library like the Acq&Graph Voltage-Int Clk-Retriggerable.vi.If you use an analog Edge, you can choose a channel and and a level for this function to start.
Regards,
Philipp
AE | NI Germany
08-02-2012 03:17 AM
DAQmxErrChk (DAQmxCfgDigEdgeStartTrig(g_AItaskHandle,g_c_triggerSource,g_i_triggerEdge));
youer DO needs to be read by onw of the DI in the decive then g_c_triggerSource is your DI and g_i_triggerEdge is falling or rising.
when youer seeting this function it's basiclly saing the device when you aquice and DI falling q rising start the g_AItaskHandle Task.
as Philipp said you can use alot of exmples from ni help center or the cvi examples and they will be very helpfull
08-02-2012 03:30 AM
I'm sorry.
I haven't watch the toppic of this thread.
But there are almost the same functions in CVI like Kobi has mentioned.
Regards,
Philipp