LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case structure and event structure with an indicator (boolean) condition

Solved!
Go to solution

Hello,

 

I've read many posts but I can't solve my problem. I want to implement a case structure and event structure, and the condition to execute the code inside is a boolean indicator, in this case called Interruptor (screenshot). I know that I should use Value signal property, but I don't know how implement it. Here's the program:

 

screenshot.png

Any help will be grateful 😉

0 Kudos
Message 1 of 37
(4,345 Views)

The Value signaling ( and other property's ) are avaleble by clicking with the right mouse button on the interuptor, select create, propperty node and then select the correct propperty. 

an other option is to criate and work with dynamic events

http://ekerry.wordpress.com/2011/09/15/using-events-for-communication-between-asynchronous-labview-l...

 

 


Learning LabVIEW since January 2013
0 Kudos
Message 2 of 37
(4,325 Views)

What are you trying to do with these indicators?  Why can you just put the code inside of that while loop instead of dealing with event structures?


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 3 of 37
(4,298 Views)

I want to program an acquisition during 2 minutes and wait 5 minutes to start it again. Screenshot:

screenshot.png

 

PD: If I have a flat sequence in a while structure, when the last sequence is ended it starts again in the first sequence?

 

Thanks!!

0 Kudos
Message 4 of 37
(4,279 Views)

I think you might be better off making a state machine.  States I'm seeing here are Start Aquisition, Wait, Log Data, Stop Acquisition.  From the wait state, you can figure out if you want to abort, continue logging, or keep waiting your 5 minutes.  That would be easier and a lot more extensible than trying to figure a communications between loops that just cause an action to happen every so often.


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
Message 5 of 37
(4,274 Views)

Can you give me more help? Otherwise can you tell me how can I make what I asked first (curiosity)?

 

Thanks

0 Kudos
Message 6 of 37
(4,268 Views)
Solution
Accepted by SEGIO

a state machine with elapsed timer...

 

Spoiler
acquisition_BD.png

 

Message 7 of 37
(4,254 Views)

I didn't know anything about state machines and it's so interesting. The program that you put was exactly what I wanted to make except one thing. The data is stored in the same tdms file every time it starts the acquisition again, and in my case, I want to send one data file (2 minutes acquisition) to the PC (using FTP Put File). So I want to put this FTP Put File.vi in the wait state. And then when the acquisition state starts again, a TDMS file will be created (replacing the other). Any advice to do that?

 

Thank you so much!

0 Kudos
Message 8 of 37
(4,207 Views)

you could still use the state machine....

 

list the sequences of events that you want to happen and for how long(example timing chart of events), do you want it to cycle or terminate at a certain point in time...and will go from there.

Message 9 of 37
(4,195 Views)

The problem is that I don't know how to close TDMS file completely, because I want to replace this TDMS file by the TDMS file generated in next acquisition.

0 Kudos
Message 10 of 37
(4,184 Views)