LAVA 1.0 Content Posted November 30, 2007 Report Share Posted November 30, 2007 Hi all, I have never really used the capabilities of VI scripting but I'm really considering starting. Let's say I have a VI with a stack sequence with a fistful of steps and some sequence local to pass data from a step to the next, is it possible to turn it to a state machine, programmatically using scripting ? I suspect the answer is yes, which leads me to ask about the level of difficulty I inherited undreds of VIs made a long time ago with stack sequences and I really don't feel like turning them to state machine one after the other. Maybe some scripting geek out there have done something similar or can give advice on how to do proceed. Thanks for any help EDIT : maybe this could ne a feature request for next LV version Quote Link to comment
gb119 Posted November 30, 2007 Report Share Posted November 30, 2007 QUOTE(TiT @ Nov 29 2007, 02:56 PM) Let's say I have a VI with a stack sequence with a fistful of steps and some sequence local to pass data from a step to the next, is it possible to turn it to a state machine, programmatically using scripting ?I suspect the answer is yes, which leads me to ask about the level of difficulty I would think the difficult bit would be to code the intelligence to analyze what the data flow of the sequence locals was - i.e. you want to turn them into wires that are connected to shift registers but how do you identify whether sequence locals A,B and C are in fact all carrying the same item of data from frame to frame, particularly if the data is passed and in and out of sub-vis in some of the frames. I guess you could look at the data type of each sequence local and then work out the number of reads from each local node and the data types of each node to work out the minimum number of shift registers and wires that you need, but there would be no guarantees that the result would be 'sensible' to a real human coder. Quote Link to comment
Norm Kirchner Posted December 28, 2007 Report Share Posted December 28, 2007 As far as figuring out what data to pass around, the answer is simple.... Everything. It may sound funny, but if you think of how it can be done, you simply make everything that is used as a local var into an element in a single shift register w/ all the elements. and as they are used within each frame(state) you pull them out and push them back into the main cluster. I would have to say this is definetly possible, and if you coded up a little demo stacked seq program, I, as I assume others, would be willing to race to see who can code it up first. Get something up here and let's get it going!!! 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.