private void ReadInputs() { iec_type_t iec_type = new iec_type_t(); // Sensor iec_type.iec_uint8 = C1_startIR.Value ? (byte)1 : (byte)0; set_variable(iec_type, 0, 0); iec_type.iec_uint8 = C1_endIR.Value ? (byte)1 : (byte)0; set_variable(iec_type, 0, 1); }
// FIXME private void SetOutputs() { iec_type_t iec_type = new iec_type_t(); // Conveyor iec_type = read_variable(0, 0); C1_motor.Value = (iec_type.iec_uint8 == 0) ? true : false; iec_type = read_variable(0, 1); R1_fwd_motor.Value = (iec_type.iec_uint8 == 0) ? true : false; }
public static extern void set_variable(iec_type_t input, ulong type, ulong idx);