LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RUNNING LED EVENT STRUCTURE

Hi

I'm new to labview programming. I wanted to create a simple program, a running led.

So I want 4 leds to run in a sequence with a start button and a stop button. I realised to make it with an sequence structure.

Now I want to program it using an eventstructure. I thougth it would be simple, but it's not working.

I hope someone can give me tips.

I've attached the vi.

0 Kudos
Message 1 of 2
(2,865 Views)

Okay there seems to be some misunderstanding of how the event structure works.  A case goes into the event structure when that event is generated by the user interacting with a control.  You have 6 events, one is a timeout that never happens, one is interacting with the control, and the other 4 are interacting with the indicators.  How can a user change the value of an indicator?  You can't, it is an output.  So these cases will never be entered (under normal circumstances).  Also your use of local variables scares me.  Why read the value of LED1, then write that value back to LED1?  This does nothing for you.  Also your stop doesn't work right does it?  What you should do is create an other event case for the value change of stop.  When this case is entered you can wire a true constant from in the case to outside the event structure to the stop terminal.  This way when the button is pressed and event is generated, and the true stops the loop.

 

It isn't clear what you want this to do so I can't really suggest more.  But here is some free training links, I think some cover event structrues.

 

https://decibel.ni.com/content/docs/DOC-40451

0 Kudos
Message 2 of 2
(2,847 Views)