LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

conditional button

Hi everyone.

 

I'm trying to make a program as attached this post.

 

I want to create a button that when an element of the array meets a condition (<45 as in the example):

 

 

         - If you push the button during a limited duration (for example 5sec), the loop will execute continously to finish the program.

         - If you dont push the button in 5sec, the loop will stop.

 

I'm a beginner so hope anyone could help me.

 

0 Kudos
Message 1 of 10
(2,597 Views)

HI Leyenda,

                                   Can you please elobrate what exactly looking for & what limitation is in your program ?

When you want to make the boolean pin ON or OFF

 

Thanks.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 2 of 10
(2,567 Views)

I implemented the same but not included the 45 condition. Please check this & let me know.

 

 

Thanks

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 3 of 10
(2,557 Views)

@Leyenda wrote:

Hi everyone.

 

I'm trying to make a program as attached this post.

 

I want to create a button that when an element of the array meets a condition (<45 as in the example):

 

 

         - If you push the button during a limited duration (for example 5sec), the loop will execute continously to finish the program.

         - If you dont push the button in 5sec, the loop will stop.

 

I'm a beginner so hope anyone could help me.

 


Why not have the button always there, except have it invisible by setting the control's visible property to false.

 

Then if the condition is met i.e. < 45 like you suggest, set the control's visible property to true making the control magically appear...

 

Simples

0 Kudos
Message 4 of 10
(2,546 Views)

Hi guys.

 

Firstly, I'd like to thank all of you for taking care of my problem.

 

Following my VI, my idea could be described like this:

 

- There are 8 loops executed by a for loop. In each loop, it takes 1 element of an array to compare with a constant (45 as I set). When 1 element > 45 (at the 6th loop), the comparison block generates a true signal that will stop the loop. However, I need a kind of permission by using a button, if I push it (on) within 5 secs(for example), it will change the logic signal from the comparison from true to false so that the loop can excute continously. If I dont push it (off) or do it after 5sec, the logic signal will stop the loop immediately.

Is it possible in Labview to implement a function like that? Or do you have any idea to deal with this problem 

 

@Ranjeet_Singh: Thanks for your help but its not the way I'm thinking of. Hope you understand my problem and would help me to solve it.

@Strokes: Sorry, I dont get your point. Could you please show me more detail about your idea?

0 Kudos
Message 5 of 10
(2,511 Views)

Hi Leyenda,

                                         Yes it can be implemented in labview. But the problem is, If inside the for loop if program starts comparing number from array to 45 then it will be completed in <10 ms. Before u try to stop the running VI & before you try to push the button FALSE. How u plan to deal with it.

Tell me this, i will send you the VI in 5 min.

 

Hope you understand what i mean to say. If you need elobration let me know.

 

Thanks

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 6 of 10
(2,500 Views)

Hi Leyenda

 

Maybe the attached VI maybe of some help to you. It uses notifiers to pass information from one loop to another.

 

0 Kudos
Message 7 of 10
(2,491 Views)

Hi Leyenda,

                       Go through this VI. This permission condition added in this VI. now please combine the both VIs sent by me & try to create the required application. Otherwise let me know.

 

Thanks

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 8 of 10
(2,481 Views)

That's great Ranjeet_Singh. Thank you so much for the solution. Also thank Javed_H for your help, it's useful for me. You guys helped me a lot so that I can handle my problem.

 

I greatly appreciate  your helps, especially  Ranjeet_Singh. Hope to see you again in next questions (I think I would have many because I'm learning Labview myself).

 

Have a nice day everyone!

0 Kudos
Message 9 of 10
(2,447 Views)

Hi Leyenda,

                                  Pleasure is entirely mine. As we all learnt from ourselfs & a lot from this forum also. If next time u have any question then send me link of question in my email id also -"rs.century@gmail.com" or scientist_ranjeet@yahoo.com.  so that i can see the question. becasue lots of problems are updating everyday.

 

                                  Your problem was very good & while implementing this VI i also learnt something so thank you.

 

Have a great day ahead & welcome to labview.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 10 of 10
(2,436 Views)