11-16-2019 06:32 AM
Hi,
Can we receive a value F until an Event occurs without using Loops.
regards,
11-16-2019 08:24 AM
Sure. I guess. Receive an "F" from where?
Why do you say "output a value" in your title, and "receive a value" in your message?
11-16-2019 11:24 AM
actually i have two blocks of DAQAssitant in series generating N pulses (30K) with HI/lo time of 1m, 50% duty cycle.
program is running normal
but the issue is when user want to stop at the mid of run time, the problem arises that it cannot stop until 1st DAQblock generates all samples.
So my next approach is to at least stop one block after finishing its task when user presses STOP button.
without Loops is my priority.
thanks
11-16-2019 11:26 AM - edited 11-16-2019 11:27 AM
I used event structure to solve the issue above. please have a look
11-16-2019 11:32 AM
Nothing attached.
But I'm thinking you will be far better off if you ditch the DAQ Assistants and use the regular DAQmx functions. I don't work with counters, so I don't know exactly how you'd do this. But in general, DAQmx tasks can be set up so they are started, and you can loop to check if they are done, or stop them if you want before they are done.
Look in the Example Finder for numerous DAQmx examples. One or a few of those should show you what you can do.
11-16-2019 12:10 PM - edited 11-16-2019 12:12 PM
attached here
actually i have two blocks of DAQAssitant in series generating N pulses (30K) with HI/lo time of 1m, 50% duty cycle. program is running normal but the issue is when user want to stop at the mid of run time, the problem arises that it cannot stop until 1st DAQblock generates all samples. So my next approach is to at least stop one block after finishing its task when user presses STOP button. without Loops is my priority. thanks
11-16-2019 12:25 PM - edited 11-16-2019 12:28 PM
You need to go back to the tutorials and learn about dataflow. You code makes absolutely no sense.