01-04-2011 12:44 AM
There are many ways to Rome. Since I haven't got so much experience I would have used Sys Execute and run the shutdown commando there. A shutdown is a shutdown and wich way you do it doesn't really matter unless the rest of your code says so.
01-04-2011 12:50 AM
01-04-2011 02:24 AM
Now we are off topic. If you are interested in helping me, please reread my post
I DID say that I have the shutdown procedure working....so thats not really where I'm seeking assistance.
My issue is using some type of time comparison in an event structure.
Thanks anyway
01-04-2011 02:49 AM
As I said in my first answer, you need a case structure, not an event structure. What's up with your fixation on events?
If you want to use the event structure, you can do more than one thing in the timeout case, e.g. by placing a case structure that depends on state. Where exactly do you still have problems?
01-04-2011 03:08 AM
Hi,
I have attached a VI that might help you.
Martin
01-04-2011 06:27 AM
Hi Marty,
Seems a bit of an overkill creating a custom event to trigger from the timeout event that the custom event then handles when you could just simply put the code in the timeout case.
Rgs,
Lucither.
01-04-2011 01:31 PM
Here is a VI that should accomplish what you want. It is very similar (almost identical) to the above posted VI.
01-04-2011 04:41 PM
Good Morning All
Firstly thank you all for taking an interest in my post and for the help.
Martin.....thta is definitely a way of doing it that I was not aware of. I haven't had much experience with queueing events, so it tends to narrow my vision down to what I do understand.
Lucither......this is very much the way I was contemplating doing it....just couldn't get the germ of an idea onto my desktop....I'll try and incorporate that into my code.
Paul...thanks mate, but I couldn't open it. I'm using LV2009, so if you could convert it for me, I'd be interested in having a look at it.
Altenbach.......no...no fixation with events....as I suggested in my first post.....the snippet was a small part of a very much larger program, with the main suspect being an event structure doing the majority of the work. It seemed sensible to continue using the same coding philosophy, but then nobody ever accused me of being sensible.
Once again, thanks all. Your assistance is appreciated.
Regards
Ray
01-04-2011 09:16 PM
Hello Lucither
I tried out your vi and of course it does work.......however, I am using the timeout event for another use.......with a timeout value of 5 minutes, I'm using the event to return to a default page of a tab control.
The timeout value of 5 minutes is way too long for using as a time shutdown (with your value of 100ms, its fine, but screws up my tabulation process).
Is there another way to incorporate the system time change code into the event structure using another event?
Thanks and best regards
Ray
01-04-2011 09:53 PM
Hi Ray,
All you have to do is have a timer in the timeout section that handles the tab change. Im assuming that you want the timer to reset every time an event is triggered. If so the attached will point you in the right direction.
You may need to add some logic so the tab change to default only happens if the page is not on the default page, otherwise it will do this every 5 mins if no event is triggered,
Rgs,
Lucither