02-26-2013 06:21 AM - edited 02-26-2013 06:25 AM
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 help me out...
Thankyou
02-26-2013 06:24 AM
Use Latch When Released. That way the button will be reset when the terminal is read. Are you using an event structure?
02-26-2013 06:47 AM
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..
02-26-2013 07:16 AM
You should look into event structures. THey are great at handeling what you are trying to do.
02-26-2013 07:31 AM
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 ?
02-26-2013 08:17 AM
Can you share your code so we can get a better idea of what is happening?
02-26-2013 10:35 PM - edited 02-26-2013 10:47 PM
here i have attached the snippet of my application. please just have a look on that
and help me out..
thank you
02-27-2013 05:34 AM
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?
02-27-2013 08:37 AM
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 .
02-27-2013 08:47 AM
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.