LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Query regarding event structure

I have created a program as follows.

For the 2nd event I just need to replace the data in the array which is attached to VISA write.

My question is do I need to create a event again and again or is there another way out.

I am new to LABView.

Please Help.

0 Kudos
Message 1 of 12
(4,440 Views)

here is the snapshot

0 Kudos
Message 2 of 12
(4,432 Views)

What is your second event?

 

What do you mean by "create an event again and again"?

0 Kudos
Message 3 of 12
(4,405 Views)

I mean that for the second case which i need to create I just need to change the data in Array attached to VISA write.

And i need to make mutiple cases like this.How do i do it.

0 Kudos
Message 4 of 12
(4,392 Views)
You can create an event for each new front panel control you add. No different than the way you created the event for the button you have now.

P.S. Your array should be changed to a U8.
0 Kudos
Message 5 of 12
(4,383 Views)

Actually for the new control that i want to add, I need just the same structure on block diagram as for the previous case with the change only in data in array.

So is there a way ( like copy+ paste in word) to make this possible because i have to make 3 cases like this.

Thanks

0 Kudos
Message 6 of 12
(4,377 Views)

If all of your event cases will be the same except for the array constant, turn all of that inside a subVI and put it outside of your event structure.  The idea here is that the event structure just passes out the data to send.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 7 of 12
(4,371 Views)

Is it possible in event structure to execute multiple cases sequentially from a single control on front panel..?

0 Kudos
Message 8 of 12
(4,332 Views)

Sure.  Create a Queued State Machine.  Have your "Next" button send the "Next" State to the State machine, which you've programmed to generate the "Next" State (whatever that means).  So if you have Step 1, Step 2, Step 3, Step 1, Step 2, ..., set up your State Machine with these states + Next.  You need a Shift Register to hold Step 1, 2, or 3, then Next simply increments the Shift Register circularly and then queues up the resulting new State.  [It's much easier to "draw a picture" = write the VI than to say in words, but you'll want to have the fun of doing it yourself ...]

 

Bob Schor

Message 9 of 12
(4,316 Views)

You can right click on the event structure and click "Duplicate Event Case...". This will duplicate any controls you have inside the event as well, but you can rename those if you'd like.

Message 10 of 12
(4,309 Views)