07-19-2006 03:11 AM
07-19-2006 03:25 AM
07-19-2006 03:41 AM
07-19-2006 03:49 AM
07-19-2006 04:05 AM
07-19-2006 04:20 AM
I did not say the timeout is important. What I meant is this: if you placed the string control inside the loop, but outside the eventstructure and wire it into the eventcase, it would have been read and afterwards the eventstructure would have waited. If you then clicked the button, it would not have read the correct value.
I know Java as well and I just use the timeout to control a clock on the LV gui (I don't have to creat a timer task ;)).
If you access a field or object in Java, you have different scopes but you don't have this in LV (ok you could recreate it on your own, but basically a variable is just visible in the vi). In addition to that, LV works with an other paradigm - dataflow. Basically one should stick to it (as I mentioned) but you definitely do not have to. The easy way you're looking for are local variables. Using them you can read the value several times, but you somehow loose the readability of a vi which uses the dataflow. The control itself can just be read at one place using the terminal of the control.
07-19-2006 04:42 AM
07-19-2006 04:55 AM
Yes it's getting long - but there's nothing against good discussions.. 😉
1. I can't give you a simple example. Basically, if I have settings as you mention it, I make a separate gui to edit them. This results in a library to load and save the values, this makes it kind of flexible and I can access them whenever I want. It really depends and this is also where the "handwriting" of the developer plays a role.
2. Obviously, you misunderstood what I wanted to say with the state machines. I also use the event structure for guis, but instead of placing the program logic into the event cases, I just enqueue a state which is dequeued in a second loop and fed into a case structure. Of course I also don't pool for the gui elements any more (wow those times before LV7.X were quite hard.. ).
3. I can't tell you exactly where a value is written to or read from. I assume there is a place in the memory, where the data is placed. The value displayed in the control may be read from there. (Some kind of view and the model is in the memory). But as I said, I'm not sure. What kind of issues did you encounter? Additionally there are some threads on that topic for sure - just search the forums.
4. Basically, there is no difference between the terminal output and a property node. I remember to have read that the property node uses more memory. I always use the terminal - imagine a vi where all terminals are just place in the bottom area of the block diagram. This gets quite hard to read.
Thomas
07-19-2006 06:05 AM
07-19-2006 06:14 AM