08-11-2011 01:20 PM
I will put your requirement in a better way. You have two loops and you want to start the loop2, after 10s of execution of loop1.
A simple solution would be to notify loop2, once the threshold time is reached in loop1. Check out the attached code.
Thanks,
Satish
08-11-2011 01:32 PM
Hi Satish,
Thankyou for the Reply.
Your reply surely helps.But I'm stuck with a wierd problem now.
I've attached my code in the previous post, could you please let me know why am I not getting any output from the loop 1, (I'm trying to output a pulse from the loop1)
Thankyou
Regards,
Divya
08-11-2011 11:21 PM
Hi Divya,
Can you be more specific? Which is your 1st loop and point out the corresponding waveform indicator. I see only 1 independent for loop (it has a for loop inside).
If you are talking about the waveform connected to DAQ box outputs 2, that is because, you are creating an array with 5 as the constant element. Hence, your waveform will be a single line, like a DC voltage
Satish
08-12-2011 07:47 AM
Hey Satish,
Yes I was talking about the same waveform. Here, I created a waveform with 2 elements( 0 and 5), So it should not be a constant DC waveform right?
Divya
08-12-2011 08:06 AM
Hi Divya,
No. You are wiring 5 for all the iterations. There is a simpler way to do this. Use the 'Get Pulse Pattern' from Signal Generator palette. Refer image.
Satish
08-12-2011 08:16 AM
Hey Satish,
Thankyou.I'll try this..
But in my Make waveform.vi , I tried outputting value 0 for the first few seconds and looped it in a for loop.. and hten value 5 for the next few seconds and looped it too in the for loop and then followed by 0 again and a 5.. So where exactly are you saying that I'm outputting a single constant value 5??
Thanks,
Divya
08-12-2011 09:10 AM - edited 08-12-2011 09:12 AM
@Patricia B wrote:
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:
I'm very surprised to see a NI employee suggesting this as a solution. I would expect that NI suggest using best practices and proven architectures for solutions. There is a long list of reasons to avoid using sequence structures. A state machine architecture would be the preferred method. State machines are much easier to maintain, extend and control than sequence structures.
08-12-2011 09:16 AM
Hey Satish,
This is what I've tried with the Pulse pattern.Vi .But when I run it for a single time, I dont see an oputput on my scope again! 😞
Attached Code .
Regards,
Divya
08-12-2011 07:38 PM
Hello Diya,
For clarification purposes, would you mind posting a screenshot of the portion of your VI that you are referring to as the 'first part' highlighted in some way?
Thanks,
Patricia B.
08-13-2011 06:05 AM
Divya,
I'm getting a crank waveform with output2.vi. The waveform graph indicator is showing the same. Check whether your scope is in the propper settings. A triggered acquisition would be the best.
P.S : Since , I didn't have a random period.vi, I used my own values. But that doesn't have anything to do with your issue.
Satish