LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event structure with value changes

Solved!
Go to solution

I cannot speak for those who have been helping you in this thread, but the general preference on this Forum is to keep things on the Forum. Some of the reasons include:

 

- Most of the people who participate here are volunteers who are willing to share their knowledge.  Keeping it public provides the widest sharing.

- Many people read these threads but never post anything.  They can learn from the discussions. Take the discussion private eleiminates that.

- Often a discussion will reach a point where the direction changes and the person who was helping originally may not have the expertise to help in the new area.  If the discussion was private, then you would need to start over in a new Fourm thread.

- Very much related is that many discussions benefit from having several participants with differing points of view.  Any one person alone might not help you get to a solution but the synergy of the group usually does.

 

If you want to hire someone to do some work for you, by all means contact them privately.  To learn more about using LV, keep it on the Forum,please.

 

Lynn

Message 81 of 92
(1,480 Views)

Alright. This might be the last question in this thread. I already moved the event structure out into the main vi. It worked well with the correct values corresponding to the changed units. However, the unit outputs from the event sturcture are not correct (it's not the same as inputs). It seems to be right when the loop is running, but when I stop the while loop, the units are wrong. I tried to add shift register but it didn't solve the problem. These output units will appear in the text file.

Download All
0 Kudos
Message 82 of 92
(1,469 Views)

What do you think happens when you set an output tunnel to Use Default If Unwried ? 

What do you think comes out on the 2 blue wires when you hit the stop button ?

 

How have you tried with Shift Registers ? You need to show the code you have tried in order for us to help you.

 

And just as a side comments, when you upload a vi that has multiple sub vi's you need to include all the sub vi's to the post. You can do that with a zip file.

And while im at it, it will be good for you to start use the project feature in LabVIEW.

0 Kudos
Message 83 of 92
(1,448 Views)

What do you think happens when you set an output tunnel to Use Default If Unwried ?

- It stores the last output from the loop and send it out.

 

What do you think comes out on the 2 blue wires when you hit the stop button ?

- 2 lastest outputs will be sent out from the loop.

 

How have you tried with Shift Registers ?

I just replaced the normal output tunnel with shift registers. I deleted it out because it didn't work as well

 

What is project feature?

 

0 Kudos
Message 84 of 92
(1,444 Views)
0 Kudos
Message 85 of 92
(1,443 Views)

 


What do you think happens when you set an output tunnel to Use Default If Unwried ?

- It stores the last output from the loop and send it out.


From the Detailed Help for Tunnels on Case Structures:

 

"Right-click the output tunnel and select Use Default If Unwired from the shortcut menu to use the default value for the tunnel data type for all unwired tunnels."

 

I underlined the sectio which differs from what you expect.

 

Lynn

0 Kudos
Message 86 of 92
(1,439 Views)

I canceled "use default if unwired" out and plugged them with local variables. It worked!! But I'm not sure if it's a good idea to have so many local variables in my vi. Anyway thanks!

0 Kudos
Message 87 of 92
(1,431 Views)

@Bombbooo wrote:

You are so nice to answer every question of mine (sometimes my questions are stupid). Can I have byour personal chat address or email or something like that from both of you so that I can ask you personally? It looks bad to keep posting 100 replies in public


There is absolutely nothing wrong with a thread having over 100 posts.  This place is for learning, and if it takes 500 posts, then so be it.  🙂

 

As for taking it offline, I had a really bad experience with that, so I won't be repeating that.  Let's keep the discussion in the forum.

 

Can you post your last attempt? 

0 Kudos
Message 88 of 92
(1,410 Views)

This is my vi. I added a dialog box to show the message to the user. I'm still struggling to set it to be shown before the user can adjust the unit but it's popped up after it.

0 Kudos
Message 89 of 92
(1,402 Views)

If you want the dialog box to run first, use dataflow to force that to happen. Just move the Dialog outside the loop and wire the output to the loop border.

 

Lynn

 

 dialog box.png

0 Kudos
Message 90 of 92
(1,396 Views)