11-06-2012 04:38 AM - edited 11-06-2012 04:40 AM
First of all, thanks for contributing to the community. You start to dig into more advanced techniques of LV, so this is in general a good thing.
On the hand, i am with Altenbach: Your XControl to start the "edit mode" VI with a UI button element works, but it blurrs the reality. This is only a tool which works within development environment, but will fail for a "real application" because that is expected to be an EXE. See remarks of Altenbach (MS Word).
Your remark about "scripting" somehow fails since there are already two feasable ways to start the VI execution: Press the run button by mouse or press Ctrl+r. So you simply provide a third way for execution VIs in the development environment!
Regarding the discussion about data flow representation of code:
Greg is correct that a branch doesn't create a new thread. This would, in my opinion, also collide with "data flow" because such a feature would better be labeled as "execution control flow".
Data flow ensures two things:
One additional hint:
Overuse of XControl will have a negative impact on edit AND runtime performance (required overhead to execute each XControl).
hope this helps,
Norbert
EDIT: Increased readability.
11-06-2012 06:35 AM
@Norbert_B wrote:
First of all, thanks for contributing to the community. You start to dig into more advanced techniques of LV, so this is in general a good thing.
On the hand, i am with Altenbach: Your XControl to start the "edit mode" VI with a UI button element works, but it blurrs the reality. This is only a tool which works within development environment, but will fail for a "real application" because that is expected to be an EXE. See remarks of Altenbach (MS Word).
Your remark about "scripting" somehow fails since there are already two feasable ways to start the VI execution: Press the run button by mouse or press Ctrl+r. So you simply provide a third way for execution VIs in the development environment!
Regarding the discussion about data flow representation of code:
Greg is correct that a branch doesn't create a new thread. This would, in my opinion, also collide with "data flow" because such a feature would better be labeled as "execution control flow".
Data flow ensures two things:
- Order of execution. This is done by the very basic principal of LV: A node can only execute once it's inputs have valid values. If a node finishes execution, it passes valid values to each output as last action (with the exception of the flat sequence structure). You can display the flow of valid values using "Highlight Mode". But please note that this feature serializes execution making it effectively using only a single thread (no concurrency).
- Data management. During compilation of the block diagram, the LV compiler makes several transforms/optimizations on the code. Those decide about how many threads will be invoked during runtime as well as how many data copies of a single data will be created. The rule of thumb is that a branch creates a copy of the data, but this is not true for certain cases....
One additional hint:
Overuse of XControl will have a negative impact on edit AND runtime performance (required overhead to execute each XControl).
hope this helps,
Norbert
EDIT: Increased readability.
Whoops! You're right about the exe! My control is useless! Well, that rendered this thread a tad superfluous.
You're right about the data flow stuff. I wasn't very precise in my text.
With that I guess this thread can be deleted.
Regards and thanks to you all for the answers.
11-06-2012 11:16 AM
@O.P. wrote:
With that I guess this thread can be deleted.
It is important that the thread is not deleted, otherwise we will have the same discussion again in 6 months and we would need to start over from scratch. 😄
12-03-2012 09:25 AM
Hello again,
I discovered that if I remove run mode check the exe starts just fine. Problem solved for me. So why did I need a big start button? Here's why:
So there, I've solved my problem, and I've explained that under certain conditions, a start button is needed.
Thank you