ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

capture hold simulation time

I am new to labview and have not be able to figure out how to cature a time given a certain condtion.

In a simulation loop I have  a function which shows the elapsed time of the simulation. I want to capture the time when a simulated frequency signal is at or below a reference frequency.  The vi should still be running with the captured time.

This is want I want to do in pseudo code:

Fref:   The referance frequency, does not change during simulation
Fsim:  The simulated frequency, changes during simulation
time:   The simulation time
Tf:       Fault time, the time captured

While simulation is running
    If Fref >=Fsim
       Tf=time
    end
end
0 Kudos
Message 1 of 3
(2,919 Views)
 
 

Draw a while loop in a case structure inside add the greater or equal function before the case structure and place a get current time function in the true case. To be able to save the time there are several possibilties:

1. Use a LV2 style global (my personal favorite)
2. Add a local to an indicator in the true case wired to the time function.
3. ....

I think looking at your question doing the basics course will be a good starting point.

Have a look at: http://digital.ni.com/demo.nsf/websearch/CE34B1339DE04F2086256E930074129F?OpenDocument&node=1381_US 

 

Message Edited by andre.buurman@carya on 11-02-2007 12:24 PM

Message Edited by andre.buurman@carya on 11-02-2007 12:27 PM

Regards,
André (CLA, CLED)
0 Kudos
Message 2 of 3
(2,906 Views)
Thanks. After reading your comment I looked back at what I was create a conditional loop and if the comparison was true then the true statement and a local variable in it.
0 Kudos
Message 3 of 3
(2,883 Views)