LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TIME

HELLO,

HOW CAN I ENABLE THE CLOCK TO BEGIN AS SOON AS THERE IS A LOGIN TRUE COMING IN FROM THE TEXT FILE. WHAT I WANT TO DO AT THE END IS TIME STAMP EACH TIME THAT THE OTHER INPUTS WENT TRUE

0 0 0
1 0 0 <-- BEGIN CLOCK
1 1 0 <-- STAMP THE TIME INPUT WENT HIGH
1 1 1 <-- STAMP THIS ONE ALSO

ATTACHED ARE THE VI'S IN 7.0 AND 7.1

THANKS IN ADVANCE!
FRED-FRED
0 Kudos
Message 1 of 4
(2,607 Views)
Fred,

You should easily be able to accomplish this by building your tick counts into a case structure that is monitored in a loop. For the case 100, record the tick count -- this will be the baseline for the other tick counts. For the cases 110 and 111, record the tick count again, subtract the baseline tick count from it, and record the difference as the time stamp. Hope this helps!
E. Sulzer
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,572 Views)
I have tried doing what you stated and put the timing loop in a case structure but it gets stuck in the case and doesn't go to next state
0 Kudos
Message 3 of 4
(2,549 Views)
Fred, The problem with your implementation is that you're only monitoring the value of the first cell. You will need to monitor the values of the entire row and compare them to their previous values to know when they changed, because you should only take the timestamp then.
Additionally, I'm not sure I understand. Does you file have only 3 lines? Is it possible it will have more? Could they come in a different order?
I think what I would do is use Add Array on the original array coming into the loop and if that number has grown I would add a time stamp.
Last thing, you're using shift registers, but you're not doing anything them. You will have to use more shift registers to accomplish this. If you don't know how they work, check the example finder - there should be a few examples.

In general, I suggest you try searching this site and google for LabVIEW tutorials. Here is one you can start with. You can also contact your local NI office and join one of their courses. In addition, I suggest you read the LabVIEW style guide. It has some good tips on design.

___________________
Try to take over the world!
Message 4 of 4
(2,527 Views)