LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Start a VI from a defined Point (like a Breakpoint)

Solved!
Go to solution

Hi people,

 

i have a lets say VI (Q'ed State Machine Template) with a lot of user input to be made. As the development goes further i want to avoid doing all the user inputs in the front.

 

Now sure i can do this by doing a little trick around, but my question is:

 

Is there a way i can set a Breakpoint as a "startpoint" and safe all the User Inputs into this Breakpoint? The behaviour would be like, when i hit the start button the code executes from this point.

 

Thanks much for your advice in advance

 

cheers chris

 

0 Kudos
Message 1 of 6
(2,877 Views)

You can fill all your controls with reasonable default values and make the value the default. Now the user only need to change what differs.

(If the default values should be changeable in the built application, use ini files to load and save the starting values)

 

You cannot execute code from the middle, because it depends on data in wires feeding to that point.

 

If you design your program correctly (e.g. as a state machine) there are easy ways to skip states if they are not needed. It is all in the code architecture. 😄

 

Just guessing: Your question might indicate that your code is a long series of sequence frames with the first few frames dealing with user input. That's a bad design. Please show us your code so we can give more specific advice.

0 Kudos
Message 2 of 6
(2,870 Views)
Solution
Accepted by topic author weigsvader

Well as u mentioned, setting default values, is this little trick around stuff i defenetly dont want to do, as i said...

 

Iam aware of the of the results of saving "the data on the wire" to start from a given point. Where as i dont see any difference to putting data (or default value) into controls and execute a case to handle the values, instead of define a certain point where the code execution can start.

 

In conclusion, if the procedure is always the same, there must be the same "data on the wire" despite a timing race condition, what iam not fighting with.

 

Anyways, as it is not much to do, i guess ill script a bit, would be probably a nice try for a jki plugin...

 

Thanks anyways

0 Kudos
Message 3 of 6
(2,853 Views)

Why is your post marked as solution, it is not a solution to the problem!


@weigsvader wrote:

Well as u mentioned, setting default values, is this little trick around stuff i defenetly dont want to do, as i said...


Where did you say that?


@weigsvader wrote:

 

In conclusion, if the procedure is always the same, there must be the same "data on the wire" despite a timing race condition, what iam not fighting with.


What "procedure"? As I said, in a properly designed state machine any state can be reached at any time. Why is inputting data such a gigantic problem? LabVIEW can read all controls in microseconds. Why does data entry need to be so interactive and circuitous?

 

You haven't shown us any code yet so we cannot tell what the perceived problem really is. You are struggling with an issue that is not a problem with properly designed code.


@weigsvader wrote:

 

Anyways, as it is not much to do, i guess ill script a bit, would be probably a nice try for a jki plugin...


There are all very generic statements that don't really mean anything. I guess I drink some water now....

 

 

 

Message 4 of 6
(2,845 Views)

In your Order.

 

1. If there is no tool like that, my question is answered, so the topic is solved for me

 

2. Read my original post again - not in direct speech but i guess a common person can get this "Now sure i can do this by doing a little trick around, but my question is:"

 

3. Ure assuming a code problem where there is none  - i can reach that case but at a certain point u have to read in values, as u suggested by default values or something like that

 

4. Iam fine thanks

 

5. Thanks for your suggestions and help 🙂

0 Kudos
Message 5 of 6
(2,816 Views)

A common person (whatever that means) cannot guess what "a little trick around" means. Why didn't you say what you had in mind instead? Probably would have required about the same number of words.

 

This does not require a "tool", but a fundamental redesign how LabVIEW and the compiler works, and as I said, it makes no sense to have that capability in my opinion. I still think you have some misconceptions about LabVIEW programming and now would be a good time to explore those. I was just trying to help.

 

A finished and build standalone program runs when opened and only stops when it is closed for good. Start and stop have no meaning for a typical application (internet explorer or msword don't have a run button). A stopped program is only useful in edit mode during development. It is not useful for the operator of the deployed application.

 

Of course during debugging you have all necessary tools to set breakpoints or pause anywhere and then continue from that state by unpausing. You can even single-step. You can even retain wire values so you can probe the wires after the VI has stoppped

 

If you are really convinced  that you found a cool new feature idea that would help a lot of users, Please suggest it in the LabVIEW idea exchange. If it gets a lot of votes, NI might implement it in a future LabVIEW version.

 

Make sure to be a clear as possible. Be very detailed and explicit, not just vague statements like "little tricks around" and such. 

 

  1. What is the idea. 
  2. What is it trying to solve.
  3. How is it supposed to be used.
  4. Why it is needed and why current workarounds are inferior solutions.
  5. Don't forget to include a link to this discussion here.

 

 

0 Kudos
Message 6 of 6
(2,808 Views)