LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get MAX to acquire data only on hardware triggers?

Solved!
Go to solution

Hey,

I need to use the pci-6224 daq card to be hardware triggered. Here is what I did: -

 

1) I set these settings in the configuration setting changed my acquisition mode to 1 sample (HW timed) and set the rate to KHz

2) The trigger type as digital edge, my pfi pin and set the edge to falling edge

 

and here is what Max does it waits for the first pulse before acquiring data and after the first pulse it keeps constantly obtaining the data even without any triggers. I have used an oscilloscope to see whether I was generating any pulses in my pfi input but there are no pulses generated. 

 

So I was wondering whether any one could tell me some reasons as to why MAX keeps obtaining the data after the initial trigger?

 

Thank You

0 Kudos
Message 1 of 9
(3,205 Views)

Muga,

 

What this mode is actually doing is setting your hardware to acquire one point based on a hardware clock's edge, so when it receives your hardware trigger, it will continue to acquire points every time the hardware clock hits the correct edge.  If you wanted to take one sample that is hardware triggered, I would use the same configuration you are using, but simply use the N Samples acquisition mode with the number of samples set to 1.  If you are still seeing the same behavior, confirm that your task's run configuration is set to only run once (as opposed to continuously). Let us know if you are still seeing odd behavior.

 

Timothy

Timothy S.
Senior Technical Support Engineer
0 Kudos
Message 2 of 9
(3,187 Views)

Hey,

Thank you fopr your prompt reply. But i think i worded my previous statement wrong. I mean to say that i want MAX to acquire the data whenever it receives the edge. But what happens is that it waits for the first edge to occur and then obtains the data point and after that it does not wait for the edges. It keeps obtaining the data points. i tested whether any edges were generated with an oscilloscope and no edges were visible. is there a reason as to why this happens?

 

Hope this is clearer than my previous comment.

 

Thank You

0 Kudos
Message 3 of 9
(3,174 Views)

It is probably due to your code.
Would you mind posting what you have so far.

 

Once you have your first edge, and start acquiring data, what criteria do you use to stop collecting points?
For example, number of points, amount of time, etc?

Cory K
0 Kudos
Message 4 of 9
(3,170 Views)

Hey,

 

I have no code i am just running the task i setup in MAX. I enter max setup the previously stated variables and press run. I thought MAX obtains the data only at the edges so i thought it will wait for the edges to obtain the data but it does not it waits for the first trigger in MAX and then runs continuosly obtaing data as though it was running in continuous sample acquistion mode. does this answer your question or did i misunderstand?

 

Thank You 

0 Kudos
Message 5 of 9
(3,159 Views)

Muga,

 

When you are talking about the Trigger with that setup, MAX will wait for the trigger signal, and then begin its acquisition when it has recieved the trigger signal. After that signal is recieved, it will use an internal hardware clock to time the data acquisitions on that clock's edge.

 

To try and clarify, you are trying to make it so that every time you recieve the correct edge from your external trigger signal, MAX will acquire one point and then wait for the next edge from that trigger signal? So you inherently want a retriggerable task?

 

Timothy

Timothy S.
Senior Technical Support Engineer
0 Kudos
Message 6 of 9
(3,134 Views)

hey,

yes thats exactly what i mean. can it be setup in MAX or is there a code that i can use that you can point me towards?

 

Thank You

0 Kudos
Message 7 of 9
(3,131 Views)
Solution
Accepted by topic author Muga

Muga,

 

To make a retriggerable acquisition, we would need to set a property that we don't have access to directly through MAX (Setting Retriggerable to True). However, based on what you've explained, this is a rather simple applications you are getting together. The easiest way to do this is to simply use your trigger signal as an external sample clock. By using that trigger signal as the sample clock, you will only take sample points on the edges of that trigger signal regardless of trigger settings.  So, I'd simply specify that signal as your external sample clock and go from there.

 

Timothy

Timothy S.
Senior Technical Support Engineer
0 Kudos
Message 8 of 9
(3,094 Views)

hey,

Yes hat worked perfect.

 

Thank You

0 Kudos
Message 9 of 9
(3,071 Views)