denisetucker Posted May 15, 2007 Report Share Posted May 15, 2007 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 Quote Link to comment
JDave Posted May 15, 2007 Report Share Posted May 15, 2007 QUOTE(denisetucker @ May 14 2007, 08:06 AM) 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? You can take a completely different route and use the OpenG timing VIs. They include a Tick Counts VI that has an error input and output to allow for enforcing dataflow without using a sequence structure. See http://jkisoft.com/vipm/' target="_blank">VI Package Manager for a way to download the OpenG packages. You could also use a Functional Global timer that does all the math for you. I will upload an example if this interests you. David Quote Link to comment
denisetucker Posted May 15, 2007 Author Report Share Posted May 15, 2007 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 Quote Link to comment
Mark Balla Posted May 15, 2007 Report Share Posted May 15, 2007 QUOTE(denisetucker @ May 14 2007, 10:06 AM) 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 If you don't need a permanent solution them I would recommend using a custom probe that tracks time. We talk about them here here is a in BD inline timmer that can be use instead of the sequence option. http://forums.lavag.org/index.php?act=attach&type=post&id=5863 http://forums.lavag.org/index.php?act=attach&type=post&id=5864 Quote Link to comment
gb119 Posted May 16, 2007 Report Share Posted May 16, 2007 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. 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.