private void ReadInputs() { iec_type_t iec_type = new iec_type_t(); // Sensor iec_type.iec_uint8 = M1_IR.Value ? (byte)1 : (byte)0; set_variable(iec_type, 0, 0); iec_type.iec_uint8 = M2_IR.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); C3_motor.Value = (iec_type.iec_uint8 == 0) ? true : false; iec_type = read_variable(0, 1); M2_motor.Value = (iec_type.iec_uint8 == 0) ? true : false; }
public static extern void set_variable(iec_type_t input, ulong type, ulong idx);