Jump to content

Add function in sequence frame


Recommended Posts

I would like to automate something I end up doing fairly routinely...adding a flat sequence around some code and tick counts to determine how long a vi takes to run. After looking at Gavin's vi's (Thanks, Gavin!), I've determined how to add the sequence structure, but can anyone give me hints on tacking in the tick count and having it be _in_ the sequence frame?

Thanks, Denise

Link to comment

Hi David,

Are you advocating scripting of 2 tick count vis into the error chain and then doing the subtraction to determine the measurement? Interesting idea, but then I guess I need to know a way to tack in those vi's into the error chain. And, often times, there may be some unbundling of an input cluster, in which case putting in the sequence structure ensures that you completely measure the timing of the vi.

I'm not sure I would want to do this with a LV2 global because, to have it be useful, it would need to be reentrant (otherwise you might use it in a vi running in parallel and foul up your measurements).

Thanks, Denise

Link to comment

As others have said there may be easier ways to do this, but to answer the original question...

Flat sequences are a bit weird in the LV class heirarchy - you'd expect them to be Generic->GObject->Node->Structure->FlatSequence, but no the whole flat sequence structure is a direct descendent of GObject. That has a Frames property which gives references to a set of FlatSequenceFrame objects which is not even a GObject (!). That has a Diagram property which you can then use for the New VI object primitive for placing the tick count (ms) node.

Not having tried to do this myself, I'd be interested how you are moving the body of the code into the middle frame of the sequence whilst leaving the terminal nodes outside and then rewiring it all up again.

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.