LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[DAQmx] How to delete a timing source ?

Everything is in the title.
 
I created a timing source in my application, used for defining a hardware frequency control of a timing loop. The problem is that I did not found any VI to delete it, as I would need to modify its parameters.
 
Is there a way to clear a timing source ?
0 Kudos
Message 1 of 14
(4,060 Views)
clearing the task as found in the daqmx palette should do the job.
greetings from the Netherlands
0 Kudos
Message 2 of 14
(4,055 Views)

Well, I think my question was not precise enough. What I am using is the "DAQmx Create Timing Source" function, instance "Digital Edge (Counter)". In this case, there is no task output but only "timing source name" string output, so I am unable to clear anything with that.

Is there a way to clear the timing source from its name, or by any other mean ?

Thanks for help.
 

0 Kudos
Message 3 of 14
(4,048 Views)
In my view this is a forgotten implementation of the output of the task.
Maybe it is on purpose but then somebody from NI will repair that.
If you open up this vi you can see that in the last subvi a task out is not connected to the outside.
You can edit this vi if you have the professional version because it is a polymorphic vi.
Otherwise I can send it to you. 
greetings from the Netherlands
0 Kudos
Message 4 of 14
(4,045 Views)
I wanted to ask why you are trying to clear the task/timing source?  Can you explain a little more what you are trying to do?
 
StuartG
0 Kudos
Message 5 of 14
(4,045 Views)

I have the LV Pro version, so I will try to modify this VI, but I would have to do that on all develoment computers (we are several people working on the same project).

This timing source is used as the real-time cycle of my I/O applicationn, whose parameters can change dinamically. So I have to clear it if the cycle time is modified, without rebooting the controller.

0 Kudos
Message 6 of 14
(4,041 Views)

I'm not at my LV PC to be able to describe exact syntax, but I've done something similar before.  I used a counter output as a timing source for a timed loop, and when other parts of the app changed the pulsetrain frequency, the timed loop ran faster/slower as expected.

As I recall, I just configured the output pulsetrain task explicitly and then queried one of the DAQmx property nodes (something like Pulse.OutputTerminal I think?) and fed the result into the "Create Timing Source" vi.  That left the rest of my app responsible for the actual DAQmx task, while the string output from "Create Timing Source" was used only for the Timed Loop.

Come to think of it, I posted an example about it -- here's the thread.

-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 7 of 14
(4,034 Views)

OK, that is a good idea. If I am not able to delete the timing source to create a new one with new parameters, I will try to modify the "old" one through its property nodes...

But I am not really sure whether or not I would be able to replace the counter associated to the timing loop. I think it could be possible to modify the parameters like edge count, edge type or terminal but I think I may have problems redefining the counter, and even more using the "old" counter for a new purpose.

I will make a try and I keep you informed.

Thanks.

0 Kudos
Message 8 of 14
(4,024 Views)
Not sure if this answers your question...but when you exit the timed loop it will automatically clear the DAQ task.  If you want to reconfigure stuff you are going to need to use the method Kevin suggest.
 
StuartG
0 Kudos
Message 9 of 14
(4,010 Views)

I did the modification that proposed Albert : I modified the VI that creates the timing source for having the task out parameter. To avoid problems for deployment, I saved the file into the project with a new name.

When clearing the corresponding task, the timing source can be created again, with possibly new parameters. So it works now as expected.

About Kevin proposal, I also checked that, but it seems that all properties are "read only" Smiley Sad. Automatic clear of DAQmx task as proposed by Stuart seems to be done only when the application exits, and I do not want to do that on my RT application (to restart the exe, I think I have no other choice than rebooting, and moreover I have a TCP connection with a remote computer that I cannot close).

Well, it would be nice that future version of "DAQmx create timing source" using physical counter also inlcudes this task out terminal, or a dedicated VI able to clear the timing source using its name for example. Smiley Wink

0 Kudos
Message 10 of 14
(3,995 Views)