Jump to content

from stack sequence to state machine


Recommended Posts

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 :o

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 :shifty:

Link to comment

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 :o

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. :(

Link to comment
  • 4 weeks later...

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!!!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.