private static void ReadBooleanArray(PlcDeviceConnection connection) { Console.WriteLine(); Console.WriteLine("= Read Boolean Array ="); bool[] values1 = connection.ReadBoolean("DB1.DBX 1.0", 2); Console.WriteLine(); Console.WriteLine("= Read Boolean Array (NoData) ="); bool[] values2 = connection.ReadBoolean("DB10000.DBX 1.0", 2); Console.WriteLine(); Console.WriteLine("= Read PlcBooleanArray ="); PlcBooleanArray plcValueArray1 = new PlcBooleanArray("DB1.DBX 1.0", 2); plcValueArray1.Status.Changed += Program.HandleValueStatusChanged; bool[] values3 = connection.ReadValue(plcValueArray1); Console.WriteLine(); Console.WriteLine("= Read PlcBooleanArray (NoData) ="); PlcBooleanArray plcValueArray2 = new PlcBooleanArray("DB10000.DBX 1.0", 2); plcValueArray2.Status.Changed += Program.HandleValueStatusChanged; bool[] values4 = connection.ReadValue(plcValueArray2); }
private static void ReadBoolean(PlcDeviceConnection connection) { Console.WriteLine(); Console.WriteLine("= Read Boolean ="); bool value1 = connection.ReadBoolean("DB1.DBX 1.0"); Console.WriteLine(); Console.WriteLine("= Read Boolean (NoData) ="); bool value2 = connection.ReadBoolean("DB10000.DBX 1.0"); Console.WriteLine(); Console.WriteLine("= Read PlcBoolean ="); PlcBoolean plcValue1 = new PlcBoolean("DB1.DBX 1.0"); plcValue1.Status.Changed += Program.HandleValueStatusChanged; bool value3 = connection.ReadValue(plcValue1); Console.WriteLine(); Console.WriteLine("= Read PlcBoolean (NoData) ="); PlcBoolean plcValue2 = new PlcBoolean("DB10000.DBX 1.0"); plcValue2.Status.Changed += Program.HandleValueStatusChanged; bool value4 = connection.ReadValue(plcValue2); }