public Cx9020()
        {
            _spsClient = JsonConvert.DeserializeObject <IpAdressen>(File.ReadAllText("IpAdressen.json"));
            _adsClient = new AdsClient();

            System.Threading.Tasks.Task.Run(SPS_Pingen_TaskAsync);
        }
Ejemplo n.º 2
0
        public S7_1200(int anzahlByteDigInput, int anzahlByteDigOutput, int anzahlByteAnalogInput, int anzahlByteAnalogOutput, Action <byte[], byte[]> callbackInput, Action <byte[], byte[]> callbackOutput)
        {
            SPS_Client = JsonConvert.DeserializeObject <IpAdressen>(File.ReadAllText(@"IpAdressen.json"));

            AnzahlByteDigInput     = anzahlByteDigInput;
            AnzahlByteDigOutput    = anzahlByteDigOutput;
            AnzahlByteAnalogInput  = anzahlByteAnalogInput;
            AnzahlByteAnalogOutput = anzahlByteAnalogOutput;

            CallbackInput  = callbackInput;
            CallbackOutput = callbackOutput;

            Array.Clear(DigInput, 0, DigInput.Length);
            Array.Clear(DigOutput, 0, DigOutput.Length);
            Array.Clear(AnalogInput, 0, AnalogInput.Length);
            Array.Clear(AnalogOutput, 0, AnalogOutput.Length);

            System.Threading.Tasks.Task.Run(() => SPS_Pingen_Task());
        }