LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

measure time and drop in array

Solved!
Go to solution

Hello all,

 

How coul done create a time which is controlled on pressing a button. It than starts the timer and measures till a button is pressed again. Each time this will be done it is added to a array? I made something but it doesnt work at all Smiley Frustrated

0 Kudos
Message 1 of 6
(2,626 Views)

Why don't you attach your code "that doesn't work at all".  We can make some suggestions and point out major errors, then you can finish your class assignment on your own.

 

Bob Schor

0 Kudos
Message 2 of 6
(2,615 Views)

Here is my code but im not sure it will work with others because it uses a DLL for aa Com port connection. But mabe this makes sense. I try to press a button on my Harware device and the counter should run when i press again time stops and it need to add it in a array. When i do this step again it need to add it to the array. 
Yes this is for course but i dont want people tell me how to do it completely i prefer to find it for myself.

 

Anyhow thanks in advance

 

GRTZ

 

Ray

0 Kudos
Message 3 of 6
(2,599 Views)
Solution
Accepted by topic author Ray1981

Try this.

Boolean Crossing Pt by Pt is a nice subVI for looking at transitions.  In this case it resets the timer to 0 on one crossing direction, and logs the elapsed time on the other crossing.

Message 4 of 6
(2,587 Views)

Cool this crossing PT seems to do the job. I was looking all the time for something that works like a latch. I think with this exemple i can make an awesome program and learned some new stuff of LV.

 

Thanks a lot

0 Kudos
Message 5 of 6
(2,559 Views)

Open up that function and look inside of it.  It really isn't complicated, just doing boolean logic.  But it is a nice predefined subVI that keeps you from having to worry about the logic each time you want to implement it, and running wires and shift registers since it encapsulates it all.

0 Kudos
Message 6 of 6
(2,555 Views)