larsen Posted May 5, 2006 Report Share Posted May 5, 2006 I have a system with a top-level vi which is commanded via events from front panel controls. This is very convenient during development of an application. Now the application has to move to a more autonomous type application which is started and runs autonoumously without a users interaction. But now there is no user to watch the indicators and push the buttons in the right sequence to setup and start the application. I.e. what I need is some kind of scripting support. I have tried to build a sequencer into the top.vi having the event loop, and which manipulates the controls in the proper sequence, but I have not been able to trigger the event-loop. So what I am lacking is a posibilty to generate front-panel events progammatically. But maybe there are other ways of automating execution of an event driven applcation? Any idea's are welcome. regards Henning Quote Link to comment
AMSLLC Posted May 5, 2006 Report Share Posted May 5, 2006 Its all a matter of how much you want to write versus buy and use. If you want to write it, I would look at several items out there including "Test Sequencers". That has always been a positive model for NI and LabViewers. Also take a look at dynamic loading and execution. The ever popular state machine is an alternative. You can always just buy TestStand. One can fairly easily stick to execution of a set of tasks till complete with TestStand. You don't even write anything other than the guts of the test or whatever it is you are doing (you write in LabView). TestStand is a type of model of execution I mention above as a "test sequencer". To some extent I don't advise TestStand if your model does fit what it does. One can modify TestStand but you may as well stay in LabView if you are doing heavy mods of the model. Get your NI sales rep to show you TestStand before you write, and if budget provides. Quote Link to comment
Guillaume Lessard Posted May 5, 2006 Report Share Posted May 5, 2006 I have tried to build a sequencer into the top.vi having the event loop, and which manipulates the controls in the proper sequence, but I have not been able to trigger the event-loop.So what I am lacking is a posibilty to generate front-panel events progammatically. There is a "Value (signalling)" property to controls that triggers the "Changed Value" event. I have been using it in order to avoid duplicating code that is inside event structures. You could put that in a state machine (or a sequence, heh) in parallel to your event structure. GL Quote Link to comment
larsen Posted May 8, 2006 Author Report Share Posted May 8, 2006 Thank you AMSLCC and Guillaume, Thanks AMSLCC for your suggestions. I did not think of Teststand as an option. I will keep that method in mind, but for this particular application its likely to be overkill. The trick with property node-> value(signalling) was just what I was looking for in this situation. I have seen this property several times but did not figure out its use. Exactly as you write Guillaume, this can make reuse of code in event handlers very easy to implement, and a sequencer is also straight forward. To explore the method I also tried generating events from inside an event handler to signal another event handler and it seems to work fine. (cascading events). I am though not 100% certain this is a bullet proff method as I think to have read many years ago that Windows may drop events in case it is overloaded. For sure it drops mouse click events at regular basis. Also for my part it remains to be monitored if the seqence of generating events also defines the sequence of their execution. I.e. maybe they arrive out of order? So I will try to keep theses issues in mind in case obscure problems appears. Comments are as usual welcome. /henning Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.