01-06-2008 10:51 PM
01-06-2008 10:52 PM
01-07-2008 12:46 AM
01-07-2008 07:45 AM
AE's should be coded to stop quickly.
It almost sounds like like you have an AE that waits for something and does not return until that thing is detected.
If the code and callers can't be re-arranged to avoid this situation there is an option available if the AE is coded such that it can be set as a sub-routine.
If "Skip if busy" is set for the sub-VI call, LV will skip calling the VI if it is busy doing something already. If the AE is not busy, the AE will be called.
Ben
01-07-2008 08:24 AM
Thanks Pnt and Ben,
I check the "subroutine" option and found it's something I need as it doesn't allow other part of caller vi (such as execution of timed loop) to interrupt it. I think all the AE should set this property to function properly. This is like the "atomic subsystem" in Matlab/Simulink which execute as a single unit which only give its thread away after its execution.
I will try this and let you know.
In my AEs, there's only file operation and normal variable access which I think shouldn't wait for something else. Please correct me if I am wrong. The purpose of the 2 file access AEs are to control the access to the data files. The purpose of the other AE_syncstop.vi is just to notify all the caller the program is stopping.
Feilong
01-07-2008 09:41 AM
Just a update.
I found the reason of not starting second time is (one of problems I proposed in my first post) , my AE is still remember the old value when its caller runs last time. So after I add a init action to this AE and call it before other part of caller vi runs, there's no problem for the re-start of caller vi.
but I am still have the problem of run the vi for the first time. I am using Labview 7.1 and doubt if upgrade could help this. ANyway, it's not critical though a bit annoying as you need to close the labview and re-open it.
Feilong
01-07-2008 10:00 AM
01-07-2008 10:20 AM
01-07-2008 10:30 AM