The only SIMPL+ 'event' that will automatically run when the program is
initialized is the Main, so if your Change is running at bootup it's because
something is causing the analog connected to the input to propagate a zero
at bootup (IE: the issue is in your SIMPLWindows code).
There's nothing wrong with encapsulating the output calculation in an IF
statement to prevent a transition of the output you don't want, but it won't
do anything to prevent the unnecessary SIMPL+ thread from being generated.
I'd concentrate my efforts on preventing the input analog from propagating
at bootup.
From: Crestron@... [mailto:Crestron@...] On Behalf
Of constantcharge2
Sent: Friday, May 17, 2013 2:33 AM
To: Crestron@...
Subject: [Crestron] Simpl + Change Analog
Hi All,
Have a issue that has me stumped.
using the below
Change Analog_in
{
Print("Analog_in %d \n",Analog_in);
Level$ = IToHex(Analog_In);
}
When program initializes it enters this module and outputs unwanted code eg
sets hex levels to 0. (turns off amp's)
Is there a way to stop this happening?
my only way of fixing this currently is to do a feedback loop eg
Change Analog_in
{
Print("Analog_in %d \n",Analog_in);
if (Analog_in <> Current_Level)
{
Level$ = IToHex(Analog_In);
}
}