02-24-2008 09:47 PM - edited 02-24-2008 09:51 PM
02-24-2008 09:52 PM - edited 02-24-2008 09:52 PM
02-24-2008 10:02 PM
Too late to edit now 🙂
control_write.vi uses the event case (not working) and control_write_2.vi uses no event case (working)
02-24-2008 10:32 PM
First, how are you running this VI? Are you allowing it to run once, or are you using the Run Continuously button?
You should have the event structure wrapped in while loop. Have a stop button and an event case for that which will stop the while loop. Move your Okay button inside the event case for the OK:Mouse Up so that it is read in the event case and the button will be allowed to pop back up when it is read.
In your message you talk about using case structures, but I don't see one at all in your VI. Only the event structure.
The VI seems to behave just like I would expect it to, so I don't know what you mean by:
"The problems so far, is that by using the event structure, several other functions do not work. In particular, I am unable to write to a control using local variables when used in an event case." and
"Attached is a block diagram picture of the setup that does not work. Press the Ok button and the Numeric (Control) value is written to Numeric 2 (Control). A constant is also written to Numeric 3 (Control) and to Numeric 4 (Indicator) - all of which are using local variables for the read/writes. The only part that works, is the writing of the constant the Numeric 4 (Indicator) yet when outside of the case structure, everything works."
When I run it the value in Numeric goes to Numeric2, and 100 goes to Numeric3 and Numeric 4 whenever the OK button is pressed.
02-24-2008 10:48 PM
02-24-2008 11:14 PM