61 lines
1.9 KiB
C#
61 lines
1.9 KiB
C#
// using InnovEnergy.Lib.Devices.Trumpf.SystemControl;
|
|
// using InnovEnergy.Lib.Devices.Trumpf.SystemControl.DataTypes;
|
|
// using InnovEnergy.Lib.Units;
|
|
// using InnovEnergy.Lib.Utils;
|
|
//
|
|
// namespace InnovEnergy.Lib.Devices.Trumpf.TruConvertAc;
|
|
//
|
|
// // TODO :remove
|
|
//
|
|
// public static class Program
|
|
// {
|
|
// public static void Main(String[] args)
|
|
// {
|
|
// var sc = new SystemControlDevice("localhost", 5001);
|
|
// var acDc1 = sc.AcDcSlave(1);
|
|
// var acDc2 = sc.AcDcSlave(2);
|
|
//
|
|
//
|
|
// while (true)
|
|
// {
|
|
// "================================================".WriteLine();
|
|
//
|
|
// var r = sc.Read();
|
|
//
|
|
// Console.WriteLine(DateTime.Now);
|
|
// r.ToString().Replace(",", "\n").Replace(" {", "\n").WriteLine("\n");
|
|
//
|
|
// var c = r with
|
|
// {
|
|
// UseSlaveIdForAddressing = true,
|
|
// ReferenceFrame = ReferenceFrame.Consumer,
|
|
// GridType = GridType.GridTied400V50Hz,
|
|
// SystemConfig = SystemConfig.AcDcAndDcDc,
|
|
// CommunicationTimeout = null,
|
|
// SlaveErrorHandling = SlaveErrorHandling.Relaxed,
|
|
// SubSlaveErrorHandling = SubSlaveErrorHandling.Off
|
|
// };
|
|
//
|
|
// sc.Write(c);
|
|
//
|
|
// var s1 = acDc1.Read();
|
|
//
|
|
// s1.ToCsv().Replace(",", "\n").Replace(" {", "\n").WriteLine("\n");
|
|
//
|
|
//
|
|
// s1.ResetAlarmsAndWarnings = true;
|
|
// s1.PowerStageEnable = true;
|
|
//
|
|
// acDc1.Write(s1);
|
|
//
|
|
// var s2 = acDc2.Read();
|
|
//
|
|
//
|
|
// s2.ToString().Replace(",", "\n").Replace(" {", "\n").WriteLine("\n");
|
|
//
|
|
// acDc2.Write(s2 with { ResetAlarmsAndWarnings = true, PowerStageEnable = true });
|
|
// }
|
|
//
|
|
//
|
|
// }
|
|
// } |