LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview sequence time function

Solved!
Go to solution

Hello to everyone. I realize I'm asking a pretty easy question, but I've looked at all the examples. AND I am very confused. What I want to do is briefly this: I want to move a directional valve.

15 sec False-False (stop)
10 seconds True-False (up)
15 sec True-False ( down)
next; False-False should stay

 

emre__1-1652521365149.png

 

0 Kudos
Message 1 of 14
(1,628 Views)

You need a simple "State machine" with four main states: idle, wait, up, down

 

What's the difference between "True-False (up)" and "True-False ( down)". How do we know the difference?

Are there any timing precision requirements? Do you want to update and display elapsed time for each state? Should it be interruptible at any time?

 

0 Kudos
Message 2 of 14
(1,583 Views)

Sir first of all thank you for your reply.

 

Are there any timing precision requirements?  - No sir 

Do you want to update and display elapsed time for each state - Yes 

 

What's the difference between "True-False (up)" and "True-False ( down)". How do we know the difference?

-The program I am currently writing does exactly what I want. But I think there may be an easier way to do this.

 

0 Kudos
Message 3 of 14
(1,566 Views)
Solution
Accepted by topic author emre_

See if this can give you some ideas...

 

altenbach_0-1652542968070.png

 

0 Kudos
Message 4 of 14
(1,563 Views)

This is exactly what I was looking for, thank you. 🙂 🤗😎

0 Kudos
Message 5 of 14
(1,557 Views)

@emre_ wrote:

 

-The program I am currently writing does exactly what I want. But I think there may be an easier way to do this.

 


Some glaring flaws:

 

  • Your loop spins as fast as the computer allows, millions of times per second, burning 100% of a CPU core. You need to set a reasonable loop rate using a wait function.
  • There is absolutely no reason to have the front panel maximized to the screen.

 

What's the purpose of the triangle button. That was not described. To be able to manually control the LEDs in the idle state, it would be easy to modify my code accordingly.

0 Kudos
Message 6 of 14
(1,552 Views)

You need to set a reasonable loop rate using a wait function.

-you are right sir , I should add that.

 

What's the purpose of the triangle button. That was not described. To be able to manually control the LEDs in the idle state, it would be easy to modify my code accordingly

 

I operate the valves in two different ways.
triangle mod --> up-down-up-down ( repeat)
normal mode--> up or down

emre__0-1652544189776.png

 

0 Kudos
Message 7 of 14
(1,549 Views)

@emre_ wrote:

 

I operate the valves in two different ways.
triangle mod --> up-down-up-down ( repeat)


 

But UP/DOWN is a control! So it does not cycle "up-down-up-down ..." under program control.

If you want to have a way to do up or down manually while the code is idle, I would do something as follows:

 

altenbach_1-1652545407854.png

 

 

 

 

0 Kudos
Message 8 of 14
(1,538 Views)

I understand better now. Thank you again for this. I edited a little.it was exactly what i needed.😊👍

0 Kudos
Message 9 of 14
(1,530 Views)

hello sir, you replied yesterday.

I have been working on this issue for 2 days.

I need to add one last thing.
Is it possible to program a program that repeats this process n(5) times?

emre__0-1652778126018.png

 

0 Kudos
Message 10 of 14
(1,497 Views)