LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

part one to be executed and after certain time part two to be executed

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

0 Kudos
Message 1 of 28
(3,768 Views)

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?

0 Kudos
Message 2 of 28
(3,761 Views)

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

0 Kudos
Message 3 of 28
(3,756 Views)

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

0 Kudos
Message 4 of 28
(3,733 Views)

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

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x1r9CAA&l=en-US

 

Creating Parallel Structures
https://decibel.ni.com/content/docs/DOC-16554 

 

Application Design Patterns: Producer/Consumer

https://www.ni.com/en/support/documentation/supplemental/21/producer-consumer-architecture-in-labvie...

 

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.

National Instruments
Applications Engineer
0 Kudos
Message 5 of 28
(3,683 Views)

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

0 Kudos
Message 6 of 28
(3,639 Views)

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
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P82BSAS&l=en-US

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://forums.ni.com/t5/Example-Code/Wait-ms-and-Wait-Until-Next-ms-Multiple-Explained/ta-p/3497044

 

Hope this helps,

Patricia B.

National Instruments
Applications Engineer
0 Kudos
Message 7 of 28
(3,616 Views)

 

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

Download All
0 Kudos
Message 8 of 28
(3,595 Views)

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

https://www.ni.com/docs/en-US/bundle/labview/page/execution-highlighting.html

 

Best,

Patricia B.

National Instruments
Applications Engineer
0 Kudos
Message 9 of 28
(3,573 Views)

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

0 Kudos
Message 10 of 28
(3,546 Views)