05-09-2007 03:54 AM
05-10-2007 04:54 AM
Hi Alexspin,
I'm not sure I've understood you. what I can understand from your post, is that you need to stop the sine generation but it is not clear to me where the problem exactly is.
Below I've attached a screenshot of a Block Diagram where I generate, on an Analog Output, a Sine wave when a counter signal level (used as a reference signal) is high and Nothing when counter signal level is low.
If you need instead a value different from 0 V when Sine Wave generation ends, you have to modify the Block Diagram. For example you can insert into the while loop a stop task.vi, then writing a new wave (in your case a constant function of value different from 0 V) and then restart the task.
I hope this help you, try working a bit on it!
Have a nice day
carlo>
05-11-2007 05:16 AM
05-11-2007 07:55 AM
Hi Alexspin,
About your second question when you stop the task the output value goes to 0 V, but not for a sort of "reset" as you spoke, but because when you stop the task you stop to generate anything and so you read 0 V.
About the first question, you can simply pause the output task using an analog trigger instead of a digital one: you need only to change the properties of the "DAQmx Trigger property node" from "digital" to "analog" [see the attached screenshot]. The problem is that you can't specify as a Source for the pause trigger the analog output itself, you can only select an analog input as a Pause trigger Source, so you have to:
1. Generate the analog output
2. Define an Analog input task that read from the analog output you've created and use this as Pause trigger Source for the analog output task itself.
I hope this help you
Have a nice day
carlo>
05-11-2007 10:33 AM
05-16-2007 08:10 AM
Hi Alexspin,
Take a look to this vi. I think you can work on it in order to have what you need.
Try also looking into LabVIEW Examples (Help >> Find Examples >> Search Tab >> "Keyword", where "Keyword" must be what you're looking for).
You can also find something going to www.ni.com , clicking on Example Library Code and inserting into the search field the "Keyword".
Have a nice day
05-17-2007 04:28 AM