¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Storing history of analog values


 

I want to keep a history of 5 to 10 changes to a single analog value. Does anyone have a suggestion of how I might accomplish this?

mer


Jeremy Weatherford
 

Quick and dirty SIMPL solution is to use an ABUF to make a sort of
delay line, and send a WPULSE (single logic wave pulse) to the enable
to shift everything by one:

Value -> Value1
Value1 -> Value2
Value2 -> Value3
Value3 -> Value4

etc. Value1 will be the most recent saved, Value4 will be the oldest.
Use an ARAM if it needs to survive program reboots.

On Tue, Feb 22, 2011 at 10:01 AM, merriweather.randolph
<merriweather.randolph@...> wrote:
I want to keep a history of 5 to 10 changes to a single analog value. Does anyone have a suggestion of how I might accomplish this?

mer



------------------------------------



Check out the Files area for useful modules, documents, and drivers.

A contact list of Crestron dealers and programmers can be found in the Database area.
Yahoo! Groups Links





--
Jeremy Weatherford


 

Analog_input analogVal;
Analog_output analogStored[maxNumToStore];
integer x;

change analogVal
{
if(x>=maxNumToStore)
x=1;
else
x++;
analogStored[x]=analogVal;

}

function main()
{
x=0;
}

--- In Crestron@..., "merriweather.randolph" <merriweather.randolph@...> wrote:

I want to keep a history of 5 to 10 changes to a single analog value. Does anyone have a suggestion of how I might accomplish this?

mer


 

?? What is this x++ dream?


_____

From: Crestron@... [mailto:Crestron@...] On Behalf
Of Brian
Sent: Tuesday, February 22, 2011 7:30 AM
To: Crestron@...
Subject: [Crestron] Re: Storing history of analog values




Analog_input analogVal;
Analog_output analogStored[maxNumToStore];
integer x;

change analogVal
{
if(x>=maxNumToStore)
x=1;
else
x++;
analogStored[x]=analogVal;

}

function main()
{
x=0;
}

--- In Crestron@... <mailto:Crestron%40yahoogroups.com> ,
"merriweather.randolph" <merriweather.randolph@...> wrote:

I want to keep a history of 5 to 10 changes to a single analog value. Does
anyone have a suggestion of how I might accomplish this?

mer


mjrtoo2000
 

I might use a ring buffer, and an ABUF with multiple selects defined driven by the ring buffer. Setup the ring buffer clock and Store/Recall on the ABUF as you see fit.

--- In Crestron@..., "merriweather.randolph" <merriweather.randolph@...> wrote:

I want to keep a history of 5 to 10 changes to a single analog value. Does anyone have a suggestion of how I might accomplish this?

mer


mjrtoo2000
 

ARAM, not ABUF

--- In Crestron@..., "mjrtoo2000" <mjrtoo@...> wrote:

I might use a ring buffer, and an ABUF with multiple selects defined driven by the ring buffer. Setup the ring buffer clock and Store/Recall on the ABUF as you see fit.

--- In Crestron@..., "merriweather.randolph" <merriweather.randolph@> wrote:

I want to keep a history of 5 to 10 changes to a single analog value. Does anyone have a suggestion of how I might accomplish this?

mer


 

Yeah, wishful thinking :(

--- In Crestron@..., "Kol Johnson" <kol.mstc@...> wrote:

?? What is this x++ dream?


_____

From: Crestron@... [mailto:Crestron@...] On Behalf
Of Brian
Sent: Tuesday, February 22, 2011 7:30 AM
To: Crestron@...
Subject: [Crestron] Re: Storing history of analog values




Analog_input analogVal;
Analog_output analogStored[maxNumToStore];
integer x;

change analogVal
{
if(x>=maxNumToStore)
x=1;
else
x++;
analogStored[x]=analogVal;

}

function main()
{
x=0;
}

--- In Crestron@... <mailto:Crestron%40yahoogroups.com> ,
"merriweather.randolph" <merriweather.randolph@> wrote:

I want to keep a history of 5 to 10 changes to a single analog value. Does
anyone have a suggestion of how I might accomplish this?

mer






[Non-text portions of this message have been removed]


 

Way cool shift register Jeremy.

--- In Crestron@..., Jeremy Weatherford <xidus.net@...> wrote:

Quick and dirty SIMPL solution is to use an ABUF to make a sort of
delay line, and send a WPULSE (single logic wave pulse) to the enable
to shift everything by one:

Value -> Value1
Value1 -> Value2
Value2 -> Value3
Value3 -> Value4

etc. Value1 will be the most recent saved, Value4 will be the oldest.
Use an ARAM if it needs to survive program reboots.

On Tue, Feb 22, 2011 at 10:01 AM, merriweather.randolph
<merriweather.randolph@...> wrote:
I want to keep a history of 5 to 10 changes to a single analog value. Does anyone have a suggestion of how I might accomplish this?

mer



------------------------------------



Check out the Files area for useful modules, documents, and drivers.

A contact list of Crestron dealers and programmers can be found in the Database area.
Yahoo! Groups Links





--
Jeremy Weatherford


 

Thanks, Jeremy. I thought I had it figured out, but I'm getting an odd behavior that I don't understand.

I setup the abuf as you suggested enabled by the wpulse and I have the output of the abuf feeding an aram (ones on store, recall and select1) whose output feeds the output side of the argument definition.

Watching the signals in debugger the output of the buffer is correct, but I don't get an output from the aram until the program is reset.

--- In Crestron@..., Jeremy Weatherford <xidus.net@...> wrote:

Quick and dirty SIMPL solution is to use an ABUF to make a sort of
delay line, and send a WPULSE (single logic wave pulse) to the enable
to shift everything by one:

Value -> Value1
Value1 -> Value2
Value2 -> Value3
Value3 -> Value4

etc. Value1 will be the most recent saved, Value4 will be the oldest.
Use an ARAM if it needs to survive program reboots.

On Tue, Feb 22, 2011 at 10:01 AM, merriweather.randolph
<merriweather.randolph@...> wrote:
I want to keep a history of 5 to 10 changes to a single analog value. Does anyone have a suggestion of how I might accomplish this?

mer



------------------------------------



Check out the Files area for useful modules, documents, and drivers.

A contact list of Crestron dealers and programmers can be found in the Database area.
Yahoo! Groups Links





--
Jeremy Weatherford


Jeremy Weatherford
 

To use an ARAM this way (with 1s on store, recall, and select1), the
input signal names need to be the same as the output signal names.
While the program runs, it's just storing data to NVRAM. When the
program starts up, it sees the 1 on recall and sends the stored values
to the outputs. It doesn't output anything else until the program
restarts.

On Mon, Mar 7, 2011 at 12:43 PM, merriweather.randolph
<merriweather.randolph@...> wrote:
Thanks, Jeremy. I thought I had it figured out, but I'm getting an odd behavior that I don't understand.

I setup the abuf as you suggested enabled by the wpulse and I have the output of the abuf feeding an aram (ones on store, recall and select1) whose output feeds the output side of the argument definition.

Watching the signals in debugger the output of the buffer is correct, but I don't get an output from the aram until the program is reset.

--- In Crestron@..., Jeremy Weatherford <xidus.net@...> wrote:

Quick and dirty SIMPL solution is to use an ABUF to make a sort of
delay line, and send a WPULSE (single logic wave pulse) to the enable
to shift everything by one:

Value -> Value1
Value1 -> Value2
Value2 -> Value3
Value3 -> Value4

etc. ?Value1 will be the most recent saved, Value4 will be the oldest.
?Use an ARAM if it needs to survive program reboots.

On Tue, Feb 22, 2011 at 10:01 AM, merriweather.randolph
<merriweather.randolph@...> wrote:
I want to keep a history of 5 to 10 changes to a single analog value. Does anyone have a suggestion of how I might accomplish this?

mer



------------------------------------



Check out the Files area for useful modules, documents, and drivers.

A contact list of Crestron dealers and programmers can be found in the Database area.
Yahoo! Groups Links





--
Jeremy Weatherford




------------------------------------



Check out the Files area for useful modules, documents, and drivers.

A contact list of Crestron dealers and programmers can be found in the Database area.
Yahoo! Groups Links





--
Jeremy Weatherford