05-05-2016 06:42 AM
Hi,
I am trying to control a liquid injector which requires a 2ms pulse delivered at varying frequency. The problem I have is that with the CO.Pulse generation DAQmx tasks, if I set a long low time (up to 10 seconds) I am not able to interupt this process if I need to quickly increase the frequency. I effectively have to wait for the 10s to elapse before I can change. This won't work in this use case.
So does anybody know how I can create 2ms high pulses, hardware timed (I'm using a 9401 DIO module) where I can dynamically change the frequency and 'interupt' the low time if I need to increase the frequency?
I've attached a snippet of code created in LV2013.
Thanks in advance
05-05-2016 10:35 AM
You can stop - change low time - start task at large periods. If you add Advanced DAQmx -> Control task with commit after you configure the task, restart does not take long.
05-06-2016 04:38 PM
Good advice from Alexander. I'm not near DAQ hw to test, but there are a couple gotchas to watch out for, I've been in recent threads related to each.
1. I'm not certain whether writing only the Low Time will work. You *might* also need to re-write the High Time to make the Low Time take effect. See this thread for more context. On the other hand, it may well work just fine due to the fact that the task is stopped (but committed) at the time of the write. Just bear that other thread in mind for future consideration when you want to change pulse specs on the fly.
2. When you stop and restart the task, you may find that the specs which stay persistent for subsequent stops and restarts are not what you expect. Here's a like to that thread. Fair warning, it's pretty detailed and will require careful reading to absorb and assess the relevance.
-Kevin P
05-09-2016 04:24 AM
Thanks for your help guys, I might not be able to get round to it today, but I hope to be able to try out these ideas soon. I'll let you know how I get on.
03-07-2024 05:16 AM
Hi,
Can you please load the actual VI on this forum
03-07-2024 05:44 AM
Hi gvolkwyn,
@gvolkwyn wrote:
Can you please load the actual VI on this forum
Whom do you ask when you write "you"?
What's wrong with Alexander's 8 year old snippet?
03-07-2024 05:49 AM
Hi,
I was referring to that snippet. Was looking for the actual VI. Thanks for the response.
03-07-2024 05:57 AM
Hi gvolkwyn,
@gvolkwyn wrote:
I was referring to that snippet. Was looking for the actual VI.
Just use the snippet!
03-07-2024 06:00 AM
No worries. I figured out what I was struggling with😁