07-27-2017 09:21 AM
Hello,
I would like to reset a feedback node of strings that is within loop.
Regards,
Solved! Go to Solution.
07-27-2017 09:24 AM - edited 07-27-2017 09:26 AM
Use a select node wired to a latch action boolean and either feed it an empty string or the previous data depending on the boolean state.
(What does the subVI do? How do you stop the VI?)
07-27-2017 09:32 AM
Thanks,
Can you help me more?
That VI converts a real numbers to strings. It stops when the while loop does. It has no loop inside it.
07-27-2017 09:42 AM - edited 07-27-2017 09:43 AM
idir93 wrote:Can you help me more?
Are you familiar with the select function? The chances of getting help is typically increased if you attach your VI so we can modify it. Nobody want to waste time and write code from scratch.
@idir93 wrote:
That VI converts a real numbers to strings.
You don't need a subVI for that. LabVIEW has built-in primitives that already do the same thing.
@idir93 wrote:
It stops when the while loop does. It has no loop inside it.
The loop can never stop because a FALSE diagram constant is wired to the loop condition and the loop is set to "stop if true". Since this can never become true, your VI cannot be stopped and needs to be aborted. A loop like that also needs a small wait (e.g. 50ms). There is no need to spin this loop millions of times per second, wasting 100% of at least one CPU core.
07-27-2017 09:48 AM
The SubVI, process the string too. but that doesn't matter I think.
This is the VI
07-27-2017 09:51 AM
@idir93 wrote:
Can you help me more?
07-27-2017 10:01 AM
@idir93 wrote:
The SubVI, process the string too. but that doesn't matter I think.
This is the VI
OK, now your while loop is just a glorified FOR loop that stops after about 10 iterations, (or about after a few nanoseconds). This makes the code unusuable. You cannot press the button that fast!
Here's a quick modification. (note that the button must be latch action. Are you familiar with mechanical action settings?)
07-27-2017 12:42 PM
Thank you very much. This was really helpful.