Is there a built in function to test if a boolean has changed states? I could always record the state of a boolean and compare the last value to the current value and then update the last value to the current value but am interested in knowing whether a built-in function to handle this scenario.
I think what you described is the way to handle it. Have a second variable to store the previous state. Check if current value is not equal to previous value.
This post is under review.
Responding to oilumiun12, I used JDavis' suggestion. The following code triggers an event only if the a change in boolean status is detected.
'Detect change in ForceModemOn flag and set CELL210 power state accordingly
If ForceModemOn<>ForceModemPrevious Then
If ForceModemOn=True
CELL210_PowerUp
Else
CELL210_PowerDown
EndIf
ForceModemPrevious=ForceModemOn
EndIf