LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[DAQmx] How to delete a timing source ?

This may seem to be a moot point since you've got a working solution in hand already, but I wanted to probe at the "read only" issue.  I *think* you have a misconception there and if so, I wouldn't want that stopping you from trying nifty tricks in the future that are, in fact, possible.
 
1. Some of the DAQmx properties are indeed "read only."   Example: the timing property named "TotalSamplesAcquired" (or similar).
 
2. Some DAQmx properties may be "read only" while the task is running.  Example: the counter channel property "count".  Note that it *can* be written while the task is stopped.
 
3. Many DAQmx properties are available for either reading or writing.  However, they may default as read properties in which case you may need to right-click on the property and select from the pop-up menu "Change To...-->Write".  There's also a choice for "Change All to Write."  Examples: high time and low time of a pulse generation task.  These can be changed on the fly while the task is running and pulses are being generated.
 
My impression of your app was that you needed to change the counter's pulse specs on the fly so that the rate of the Timed Loop would change correspondingly.  This is definitely possible!  The example I linked should demonstrate how to write to those properties on the fly while the task is running.
 
Just a tidbit for future reference...
 
-Kevin P.
 
 
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 11 of 14
(861 Views)
Hello Kevin,
I think you missed the link.
 
Concerning the read only stuff, I know the function to modify the properties to write, but in that case the menu was grayed, so I was unable to modify the property access.
 
I understand your proposal of modifying counter parameters on the fly that drives a Timed Loop : I do exactly the same Smiley Wink
I guess you actually modify the counter that drives the timing source (the timebase) but in my case I wanted to modify timing source parameters directly : for a timing loop controlled by a hardware signal I have two counters : 1 for generating a timebase, say 100kHz, and another that is needed to create a timing source for the timing loop, that count edges of the timebase, say 50 to have a 2kHz Timed Loop.
 
Please have a look at "DAQmx Timing Source" property node, available in the DAQmx -> Real-Time -> Timed Loop tab. In my case, all these properties are read-only.
But I agree with you, controlling dynamically a timing loop with a hardware counter is feasible.
0 Kudos
Message 12 of 14
(855 Views)

Sorry Kevin, I did not realize the link was available in your previous post.

I had a look at your VI, and you modify counter task parameters on the fly, indeed. I also use this trick.

The difference with my app is that you create the timing loop with "Signal from task". I experienced that at the beginning of our project and as I remember I had problems to use it as I needed to manage both falling/raise edges of the counter. Nevertheless, I have another timing loop to manage and your VI just recall me this "Signal from task" possibility, so I will probably use it.

Thanks !

0 Kudos
Message 13 of 14
(846 Views)

Yeah, there are *definitely* times when it'd be handy to be able to be sensitive to both Rising and Falling edges.  The semi-period measurement tasks manage to respond to both so it seems to me that there should be a way for other tasks to allow such a polarity designation.  Triggering is another area where it'd often be convenient to trigger off either type of transition (and have a property to query that identifies what type of transition it was...)

Anyhow, glad to hear things are moving along in your app.  Just one other idea that *might* have some promise, but I can't vouch for it 100%:  If you have an M-series board, a high-speed digital board, or perhaps (?) one of the other boards that supports the "change detection" feature on a digital port, you may be able to use the "change detection" pulse as a timing source that's sensitive to either rising or falling transitions.  I'm just not sure whether: (a) M-series boards generate such a pulse on a change detect event, (b) any such pulse may be used as a timing source for a Timed Loop.

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 14 of 14
(837 Views)