Jump to content

Event Structure Query


Recommended Posts

Refering to the attached VI, please help me make my first while loop behave like the second, upon pressing of the booleon. The labview style guide says I should use "value change" in most cases. I have tried "mouse up" and "mouse down" to no avail. I have also tried all six options for mechanical action on the booleon and tried wait 50 mS instead of the "-1" on timeout.

Flashing string indicator1.vi

Link to comment

Your bottom while loop runs continiously, and the sinus gets simultated every 0 ms (try to add an indicater to the loop counter and see how fast it goes, it also utilizes full power of your CPU, that is bad coding style and the speed of blinking will depend on the used computer.

If you want to flash with every boolean press, you can use the 'New Value' of the Value changed event, for your case structure.

If you want a timed flash, you can abuse the time-out event, the only thing you need to make sure is that you don't have other events that can reset the time-out:



Link to comment

There are several options to do so.

Your first start with a seperate loop will work, however I would use a 'Wait n ms' function instead of your square block function. Where the changing only happens if the button is True (You reset the button with a Value change of the string).

Or a seperate VI that you tell to start and stop, with a reference to the string control.


Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.