08-27-2008 03:09 AM
Hi Choc,
Thanks for the great feedback! I am afraid that its a different Hillman - sorry.
With your first question (and the code) I have altered the aspect I feel should resolve this. Basically, I would use a task done? vi from the DAQmx pallett within a while loop then use some logic to stop the loop when either the waveform has been outputted i.e. task done or the stop button has been pressed. One issue, as I can't test it, is the AO waveform is buffered in memory, so you may need to add a stop task once the logic has decided the task should end... give it ago and let me know.
I would have thought that it's probably an issue with the number of samples you've generated (maybe). If you could send me your code I could take a look at it for you.
Regards,
08-27-2008 04:36 AM
Hi Hillman,
Thanks for the VI, but I am running LabView 8.2, and I can't open it!
08-27-2008 05:55 AM
Hi Choc,
Im sorry, forgot about that.
Here it is again.
Let me know what you think - I am around for the rest of the day, so if you have any more questions please try to contact me before I dissapear for a few days 🙂
Regards,
08-27-2008 10:13 AM
Hi Hillman,
The VI you sent works great! It does indeed stop immediately when you click the STOP button. Now as for the RAMP-HOLD-RAMP issue, here is the VI I have been working on. I can produce the waveform (as seen on the graph in the VI), but the AO signal is beyond slow (i.e. it does rise, but not at the parameters the user wants). I thought it would be a simple modification from the ON-OFF VI, but as with most things regarding LabView, I was wrong! Hope you can shed some light into this. Thanks again!
08-28-2008 06:35 AM
Hi Choc,
Im glad that works. I've made a few alterations to the vi you posted. Im not sure if this will solve your output issue though.
So what output do you see excatly..and what hardware are you using?
Regards,
08-28-2008 07:18 AM
Hi Hillman,
The VI you sent was written in LV 8.5, but I am running 8.2 so I can't open it. As for hardware, I have a USB-6259 (Mass-Term).
Cheers
08-28-2008 07:31 AM
Here its in LV8.2
Mathan
09-01-2008 02:55 AM
Hi Choc,
Sorry about saving the vi in the wrong version - when will I learn!
Anyways, how did you find the vi?
Regards,
09-11-2008 10:19 AM
Apologies for the long delay in posting...I have been away/busy with other tasks.
The VI works great, but since your last posting, I have been informed that my VI needs to do something else. Basically, I am trying to include a means by which to turn off the AO. So for instance, if the AO is outputting at the defined output (during the HOLD phase), when I flick a switch, it should not just turn off immediately, but rather ramp down immediately from the HOLD value (1 V in this case) to zero. I imagine this is a situation where a case structure would be used, but I can't get it to work, so I was hoping the help forum could help. Cheers for all the help I have received thus far!
09-12-2008 03:20 AM
Hi Choc,
So what happens in the code you posted?
My thoughts are the code I gave you was to output a certain waveform which you produce. Thus, to alter this during run time would cause problems.
I think to gain the effect you need, you may need to just send the data as per sample, and then when the switch is pressed, change the data your sending to the DAQmx write task.
OR
you could stop the task (terminate the while loop). And setup another task to output the 'off' ramp.
Let me know what you think.
Regards,