LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Switch on Condition

Hi,

 

 I want to capture ON instant in switch. In my application want to clear the Chart's history by switch, when it is changes from OFF to ON . I am using switch when pressed as mechanical action. Please give me some ideas Smiley Tongue help me out...

 

ThankyouSmiley Happy

0 Kudos
Message 1 of 12
(3,142 Views)

Use Latch When Released.  That way the button will be reset when the terminal is read.  Are you using an event structure?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 12
(3,136 Views)

thank you for your speedy reply..

 

actually i will switch off the button using property node after process cmopleted.I want to clear the chat at state change from off to on only..now i captured that using case struture.but i cant detect that chang clearly..because it happens very fast.how can i detect that ? and i wanna do some stuff at that instant ..

 

thank you..

0 Kudos
Message 3 of 12
(3,126 Views)

You should look into event structures. THey are great at handeling what you are trying to do.

Tim
GHSP
0 Kudos
Message 4 of 12
(3,121 Views)

I detected that state change. afterwards switch will wait for another flag. if both are true ,it will plots the graph. before this i want to clear the chart at that state change from off to on .event structure is suits for this operation ? I am not sure. is this work out ?  

 

0 Kudos
Message 5 of 12
(3,115 Views)

Can you share your code so we can get a better idea of what is happening?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 12
(3,108 Views)

here i have attached the snippet of my application. please just have a look on that

and help me out..

 

thank you

0 Kudos
Message 7 of 12
(3,078 Views)

Where is this other flag supposed to be coming from?  In your example, the FLAG will only be set once when the program starts.  Under what conditions should this flag be set?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 12
(3,062 Views)

After i pressed start button , i have to choose file path to log the data,afterwards cycle will start. When Cycle starts flag will sets to true.

Then i need to plot chart .

 

0 Kudos
Message 9 of 12
(3,050 Views)

This will get you closer to what you are going to need. You will have to make the data collection more robust and efficient and I am sure that I did not get everythig you wanted as I was not clear on what you were trying to achive either.

 

In this example I show you how to use an event structure to collect the button pushes. When you do it this way it is less important on how you set your buttons up. It will matter if you need the button to ask a certin way in the future. This should get you started.

 

Example.png

Tim
GHSP
0 Kudos
Message 10 of 12
(3,044 Views)