06-25-2010 05:25 AM
Hello
I am just starting to use LabVIEW and am currently stuck with an application I am making. I hope somebody can help me out with my question.
I need to generate a signal to a NI USB-6211 that increases with 10mV per 100ms while the signal is running. My problem is that I can't figure out how to change the parameters (offset and amplitude) of a signal while running. I can only change start the signal, change it stop it and the changes will apply when I restart it.
So how can I change the amplitude and offset while the signal is running?
This is what I came up with for now:
06-28-2010 06:14 AM
In short:
I can't change the offset and amplitude of the signal while running the VI. Is this possible? I can't seem to figure it out.
06-28-2010 09:59 AM
Hi Daniel,
Maybe you can have a look at the Examples which are standardly shipped with labVIEW.
If you go to the example finder, and then to the following folder:
Hardware In and Output >> DAQmx >> Analog Generation >> Voltage
Then you open the file: Gen Mult Volt Updates-SW Times.vi
This example VI provides you with the most basic (software timed) Analog Output creation task, where you can set the timing to 100ms and you provide a signal to write.
With basic Shift registers and an add function you can add 10mV every while loop iteration.
I hope this will help you design you application!
Best regards,
Peter S
06-29-2010 04:29 AM
OK, thanks a lot! I have got this thing working now, by deleting the for-loop and just putting it all in the while loop.
I only have a new problem. I have to change the amplitude and offset every 100ms. I first had a wait build in that for loop that was doing the job, but in the while loop it isn't. I even got rid of totally and it is still changing every 200ms instead of every 100ms. I have tried to find tutorials about this but can't seem to find the one I need. Could someone point me in the right direction with this?
06-29-2010 08:36 AM - edited 06-29-2010 08:37 AM
Hi Daniel,
I've been looking over your request, and created just a simple VI that is doing exactly what you want it to do:
Please let me know if this is what you're looking for.
Good luck!
Regards,
Peter S
07-01-2010 02:41 AM
wow, thanks for making the example VI, but unfortunately I can't open the VI because I have Labview 8.6
07-01-2010 03:15 AM
Hi Daniel,
I did not know that. If you have any questions in the future, always try to provide software information in your initial post.
Enclosed the v8.6 version of the same example.
Good luck.
Regards,
Peter S