I am using C# Windows Form to create an interface with another software.
- My software has different inputs and outputs (boolean) called DI1 DI2 DO1 DO2.
- On my C# app I have a function which allows the synchronization :
public void synchro()
{
if (switchbutton1.Checked)
DI1 = true;
else
DI1 = false;
if (switchbutton1.Checked)
DI2 = true;
else
DI2 = false;
if (D01 == true)
led.Value = true; // turn on a led
else
DI1 = false;
if (D02 == true)
led.Value = true; // turn on a led
else
DI2 = false;
}
I'm beginning in C# and I want to know where I can put my function to keep it continuously synchronized. Except timers because it blinks my leds even when they are turned off.