LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

record and display data

What I would like to do is: display a data point every 1 sec but record the a data point every 10 sec.

 

I have been playing with the event case and loops to achive these but no mather what I get one or the other; I either record and display every sec or every 10 sec.

 

Thanks...

0 Kudos
Message 1 of 12
(3,744 Views)
I assume you have a loop cycling every sec to display the points.  Wire the iteration number to the integer and quotient function and divide by 10.  Wire the remainder to a case structure.  In the zero case, log your data, in the default case do nothing.
Message 2 of 12
(3,741 Views)
you can use the Elapsed time.vi
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 3 of 12
(3,740 Views)
an example of Darin's:
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 4 of 12
(3,723 Views)

It works pretty good, but what about doing it with and event structure?

I try a couple things like creating and event for when the reminder is zero but that didn't work.

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

Assuming you have a timeout case in your event structure, you can check the status of the remainder every iteration. Make a value change event case for a boolean, and whenever your remainder equals 0, just set the boolean's value using value signaling to generate the value change event.

0 Kudos
Message 6 of 12
(3,679 Views)
I actually did that but I can not get the data to record...
0 Kudos
Message 7 of 12
(3,668 Views)

Let me rephrace that... for some reason the event (for boolean value change) doesn't execute.

Untitled.png

 

0 Kudos
Message 8 of 12
(3,639 Views)

hey roddy..

 

Just a question .. Does the VI actually stops when the stop butoon is hit....

 

I DONT THINK SO....

 

Guru

Regards
Guru (CLA)
0 Kudos
Message 9 of 12
(3,632 Views)

Guru,

 

why doesn't it stop?

 

The timeout is connected with 1000ms so it will stop after 1 sec, doesn't it?

 

roddy,

 

it's right that the event-structure does not execute if you connect the control directly (as you did).

 

Try to connect the control using a property node and its property value (changed).

This will trigger the event-structure.

 

(Maybe you should use the LabVIEW help. I'm pretty much sure there is an example in it how to programatically trigger event structures)

 

IMHO it's not a smart solution anyways. The idea of a event structure is to capture user events (i.e. the frontpanel activities).

 

In your case it'maybe better to use a timed loop with 1000ms loop time,  replace the event-structure with a case-structure, take the Rest from your modulo division and connect "Sine2" inside the case "0" of the case-structure.

 

When the Rest of your modulo division is != 0 then nothing happens.

 

Best regards,

 

Rainer

Message Edited by Balze on 12-18-2009 03:43 AM
0 Kudos
Message 10 of 12
(3,625 Views)