Main siteMain site  ForumForum  ForumSearch  Private messageEmail contact  RegisterRegister  Log inLog in 
Topic: Saving initial value
Reply to topic
Author Message
GMartin



Joined: Feb 5, 2010
Posts: 308

PostPosted: Jun 17, 2010 7:40 PM    Post subject: Saving initial value

I have a nested design that sends out changes in data every few seconds. Is there an element or arrangement of elements that would allow me to capture and save just the first output sample for use later in a session,

For example the nested element may send out a dominant frequency calculation every 5 seconds. Can I capture that first output and save it for use later?

Thanks

George
jarek



Joined: Oct 22, 2007
Posts: 1075

PostPosted: Jun 17, 2010 11:36 PM    Post subject:

George,

there are probably many ways, one would be to use ExpressionEvaluator

Out1 == 0 ? In1 : Out1

The Out1 variable is set to 0 on start, so if you want to remember a value which is different then 0, then the above might be the easiest. Another way would be to use some events, e.g. PROCESSING_STARTED in SystemEventSource and set a value shortly after that.

Jarek
GMartin



Joined: Feb 5, 2010
Posts: 308

PostPosted: Jun 18, 2010 2:24 PM    Post subject: Saving initial value

Jarek,

Thanks. That function in the ExpressionEvaluator was not one I was familiar with. I looked over the change log and found it there.

George
Reply to topic