06-29-2011 03:12 PM
I'm trying to design a VI, in which I have 2 waveforms 1) A pulse Wave 2) Sine Wave
I chose analog output 1 to oputput my pulse wave which lasts for 15 seconds and once this pulse wave is outputted after 7 seconds I want to output my sine wave leaving to continue outputting my pulse wave too simultaneously. How can I create this timing control?
Can somebody please help me?
Thanks in advance.
Diya
06-29-2011 03:29 PM
Are trying to send 1 pulse wave of 15 second duration or 1 pulse for 15 seconds ?
and if my understanding is correct are you in need of program which sends pulse ---> wait time --> sine wave+pulse wave until you hit stop button is this correct ?
Are you giving this type of signal to some device or just for practice purpose?
06-29-2011 03:36 PM
it is true that i didn't understood your requirement well but my suggestion is first you design your waveform with timing requirement you want then you can loop them to continue..
please be more clear on your requirement to get specific ans ..
Thanks
06-30-2011 08:17 AM
Hi all;
I'm trying to design a crank Tester program to test my amplifier.
The first part being a pulse signal which stays OFF initially for 5 sec and then turns ON for 10 sec initially and then goes OFF for 5 sec and then it turns ON for 15 seconds. Now during this final ON period of 15 seconds, at the 10th second I should give some kind of signal for my second part of the program to start execution..
The second part being different frequency sine waves continuously passing in to the channels of my amplifier.
It is basically testing the survival of my amplifier at the 11th second.
To be mopre clear when I pass the different sine waves I should get out put from different channels of my amplifier, this I took care in my programming part.
T he first part being ACC signal it should stay ON till my entire second part is executed( sothis can be taken care by assigning the ffinal ON time to be 11 sec + the total time it takes for the second loop to execute)
Again my question is how can I tell my second part to start execution at the 11 second, so after the 11th second it would be first part+ second part.
For the output of first part I'm using analog output 1 and for th outpput of second part I'm using analog output 0.
Hope this is clear now, if not I can attach my VI.
Thankyou
Dvya
07-02-2011 08:41 PM
Hello,
Based on the information provided thus far, it sounds like you may want to consider a master/slave type architecture specifically perhaps queues or notifier type architecture to acheive this. Please see the links below for more information.
Application Design Patterns: Master/Slave
http://zone.ni.com/devzone/cda/tut/p/id/3022
Creating Parallel Structures
https://decibel.ni.com/content/docs/DOC-16554
Application Design Patterns: Producer/Consumer
http://zone.ni.com/devzone/cda/tut/p/id/3023
Using Local Variables, Queues, and Notifiers to Synchronize Data with Parallel Loop
http://zone.ni.com/devzone/cda/epd/p/id/3717
Regards,
Patricia B.
07-13-2011 02:46 PM
Hello Patricia,
Thankyou for the Reply, I understood the concept behind master slave, but how do I tell my program to start executing after 7th second but keep running the old loop parallelly along with the newly executing loop.
Is there some condition statement to do that?
Please Let me know.
Thanks,
Diya
07-14-2011 06:52 PM
Hello,
My suggestion would be to perhaps use a sequence structure with the Wait (ms) Vi in the first frame and the loop that needs to wait 7 secs in the second frame. Below are some articles that discuss the sequence structure and the Wait (ms) VI:
Execution Structures
http://zone.ni.com/devzone/cda/tut/p/id/12293
Data Types and Structures
http://zone.ni.com/devzone/cda/tut/p/id/12344
The Difference between the Wait (ms) Function and the Wait Until Next ms Multiple Function
http://digital.ni.com/public.nsf/allkb/12B2EA9AD5B265AD86256257004DD8E2?OpenDocument
Software Timed Loops using Wait (ms) and Wait Until Next ms Multiple
http://zone.ni.com/devzone/cda/tut/p/id/4120
Wait (ms) and Wait Until Next ms Multiple Explained
https://decibel.ni.com/content/docs/DOC-14149
Hope this helps,
Patricia B.
07-15-2011 02:01 PM
Hi Patricia,
In a very simple way I've designed the program this way(attached VI).
But for some reason there is no output from the first half.
Could you please help me in figuring out what might be the problem.
Thanks,
Diya
07-18-2011 08:01 PM
Hello,
Would you mind specifyingwhere exactly in your code no data is being output? From taking a look at your code, you will want to use only the DAQmx API or the DAQ Assistant Express VI but typically not both in within the same dataflow. Also, here are some articles that may aid in debugging while we are trying to resolve this issue.
Exercise: Passing Data and Debugging
http://zone.ni.com/devzone/cda/tut/p/id/7537
Tutorial: Debugging Tips and Tricks
https://decibel.ni.com/content/docs/DOC-1695
Execution Highlighting
http://zone.ni.com/reference/en-XX/help/371361F-01/lvhowto/execution_highlighting/
Best,
Patricia B.
08-11-2011 12:38 PM
Hello Patricia,
There is no output from the first part.. i.e. no pulse waveform is being outputted, where as I celarly know that it is being created though.Is it related to some buffer sizes or timing concerns??
Please let me know.
Thanks,
Divya