User | Kudos |
---|---|
6 | |
2 | |
2 | |
2 | |
1 |
On a For Loop that is configured to have parallel iterations there is a nifty feature when using errors on a shift register. This feature is explained in an article here. It basically ensures that For Loops that run 0 times, will preserve the incoming error as if the tunnel was a shift register. However this feature also means that errors from iteration 0, won't be passed into iteration 1. What is returned if the loop runs 0 times is just the incoming error. But if it runs for more than that, the errors are all merged and returned will be the first error seen.
This idea is just to allow this already existing feature to work on non-parallel configured For Loops. When would this be useful? Say I want to delete an array of files. I want to attempt to delete all files, even if there is an error in trying to delete some, just keep trying to delete the other files. Initially you may think this:
But that has the clear problem that if the incoming array is empty, then the error will be cleared. So we often do something like this.
And honestly this bit of code isn't that big of a deal, but this feature already exists. However it only works on For Loops that are configured to run iterations in parallel. In this case I might be attempting to delete files in a specific order due to their placement on disk, and running in parallel isn't what I want.
Since not everyone wants all errors in loops to act this way it would need to be a right click menu to turn the tunnel into a normal one, a shift registered one, or a preserve and merge one.
That is what I want.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.