Files
2021-12-01 16:47:46 +01:00

40 lines
991 B
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Test_Beckhoff
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
//var myADS = new ADS("local", 851);
var myADS = new ADS("5.97.72.66.1.1", 851);
var myArtCorr = myADS.ReadVariabile("VarADS.NomeDisegno");
myADS.WriteVariabile("VarADS.NomeDisegnoRichiesto", "NUOVO DISEGNO");
myADS.WriteVariabile("VarADS.bCambioArticolo", 1);
myADS.StatusChanged += MyADS_StatusChanged;
}
private void MyADS_StatusChanged(ADS sender, EnuStates newStatus)
{
// notifica evento valore modificato (stato)
}
}
}