03-01-2010 02:01 PM
Solved! Go to Solution.
03-01-2010 02:55 PM
03-01-2010 03:40 PM
03-01-2010 03:42 PM
03-01-2010 04:42 PM - edited 03-01-2010 04:43 PM
Hi,
you can create a simple VI for this...see attached VI..that does what you want...
03-05-2010 10:13 AM
03-05-2010 10:16 AM
03-05-2010 10:21 AM
I think, simple wait (ms) will do the work you are looking for...
03-05-2010 10:22 AM
Interesting question. I'm not sure I understand the implications well enough to answer. Let me try to describe what seemed to be a "helpful" functionality and see what you think would be the best to do.
There are times when you need to give a little time separation between when you want two functions to occur. You want them to be done in a specific order and you don't want to put them in a sequence structure. Both of them have error handeling associated with them.
My thought was that you would be able to use the data flow of the error function to control the flow of the program...and if there was a function with error in and error out that produced a delay of (selectable ) ms, then that would work.
I realize that you may be doing something to the capability of the machine to do other things in other threads, but any suggestions would be welcome.
Thanks.
Hummer1
03-05-2010 01:40 PM
Hummer1 wrote:Interesting question. I'm not sure I understand the implications well enough to answer. Let me try to describe what seemed to be a "helpful" functionality and see what you think would be the best to do.
There are times when you need to give a little time separation between when you want two functions to occur. You want them to be done in a specific order and you don't want to put them in a sequence structure. Both of them have error handeling associated with them.
My thought was that you would be able to use the data flow of the error function to control the flow of the program...and if there was a function with error in and error out that produced a delay of (selectable ) ms, then that would work.
I realize that you may be doing something to the capability of the machine to do other things in other threads, but any suggestions would be welcome.
Thanks.
Hummer1
The basic subVI that you created would accomplish this and I was not asking you to explain your choice for that. What you are describing is perfectly reasonable. I never understood why NI didn't include en error in/error out on the wait VIs. They don't provide any means of using data flow are written.
What I was asking you to think about or answer was why you chose to use the "Wait Until Next ms" delay, which will actually provide you with a varying amount of delay, over the simple Wait VI. You see the Wait Until will ensure that it completes on a specific boundary as opposed to simply waiting x ms. If you wire a 10 to a Wait Until VI you may wait as little as 1 ms or as long as 19 ms before it completes the wait. This VI attempts to synchronize its completion on the boundary that you specified. The simple wait just waits x ms, regardless of the current value of the system clock.
Mind you that these VIs are not exact when running in a Windows environment. Windows is not deterministic and the timing will not be exact. However, for simply delaying something you may not need the timing to be exact. Either way, the Wait Until seems an odd choice for what you are trying to do.