Local variables don't trigger events. As I already mentioned in my reply above, you need to use a signaling property: [Value(Sgl)]. 🙂
In the attached example I have turned LED1 into a control, but disabled it so it cannot be operated by the user. In a sperate loop I can trigger a value change event by writing to a signaling value propery of LED1. I'm sure you can adapt it for your purpose. It works also if the event structure contains only a local variable of LED1.
Of course you could equally well write to the signaling value property as a function of some computation instead of a FP button. Modify as needed.
Message Edited by altenbach on 11-06-2005 12:07 PM