Maybe this has been already requested elsewhere and I'm missing it....
but it would be useful to have a Wait (ms) with connectors for error in and out.
This can help keeping the BD clean...
Every company I visit has created this subVI in some way, shape, or form. Like ChrysalTech, I really like having the wait function being 1 terminal high. I took the Wait function in Peter Blume's book and adapted it to add a little more functionality (option to wait when there is an error). But the size is the best part because you can keep other wires (VISA resource, file refnum, etc) straight instead of wrapping around the block. When I manage to get my company to standardize on a user library, this is the first thing I am putting in it.
This idea was discussed in the document "Wait function - now with an error terminal" DOC-12373.
I would recommend to an additional optional Boolean input ('skip on error'). If this input is activated the vi would not wait if an error is pending. This additional input could be helpful and would reduce long response time delays on errors.
Like a lot of folks, this has been in my personal library for a long time. I recommend never waiting if there is an incoming error rather than having an optional input. That would make it simpler and it would behave like all other built-in functions, which for the most part do nothing if there is an error in.
If you need to wait, you should be clearing the error condition first.
A long time ago I got bit using Wait +(ms). I was waiting during the milisecond clock roll-over. I've had a custom delay ever since that first checks to see if rollover will occur.
This is a roll- your- own type of thing I believe since there really is no solution that is both fool proof and optimized for CPU usage.
This VI would be fairly easy to implement in your own code archive, so no breaking due to lack of OpenG, and no waiting for NI to officially include it. Rex1030's subVI is exactly what you want, I believe.
National Instruments need to look through all of the vi's and look to do this where appropriate.
Funnily enough I wrote a sub VI to do the same thing about 4 years ago and have been using it ever since. It's a good idea to have it as a standard VI and fits very comfortably with the notion of data flow/synchronisation. The only thing I did differenyl was pass out the millisecond timer value to maintain full compatibility with the LV millisecond timer VI.
this is absolutely necessary and is strange that it's still not in existence. obviously you can create your own simple sub-vi like people have mentioned, but all that does is add to your source code and muck it up with little patch vi's. i hate placing frame sequence structures with a timer in it just to wire the error line through it. alas, for now i'll just use a homemade version... c'mon NI, this would be a quick fix!
I don't understand all of the comments about the missing functionality. All you have to do is use the Delay function in new code. Surely you can convert milliseconds to wait to seconds to wait. The fix exists and has for quite a while.
personally i try to avoid express vi's as they seem to be bulky and slower than regular functions...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.