Hey all,
We're trying to read values from a Beckhoff PLC that is programmed by a third party.
We see in the PLC the value Sensor_Waarde_REAL(%MD100) we are trying to read. (see image below)
When we use next solution we receive a number but not the number showed in the PLC interface. Does anyone knows the solution or who can point us in the correct direction?
TcAdsClient client = new TcAdsClient();
client.Connect(txtIpAddress.Text + ".1.1", 801);
AdsStream stream = new AdsStream(4);
BinaryReader br = new BinaryReader(stream);
client.Read(0x4020, 100, stream, 0, 4);
var valueMeasured = br.ReadSingle();
Log.DebugFormat("Value = {0}",valueMeasured );
We're trying to read values from a Beckhoff PLC that is programmed by a third party.
We see in the PLC the value Sensor_Waarde_REAL(%MD100) we are trying to read. (see image below)
When we use next solution we receive a number but not the number showed in the PLC interface. Does anyone knows the solution or who can point us in the correct direction?
TcAdsClient client = new TcAdsClient();
client.Connect(txtIpAddress.Text + ".1.1", 801);
AdsStream stream = new AdsStream(4);
BinaryReader br = new BinaryReader(stream);
client.Read(0x4020, 100, stream, 0, 4);
var valueMeasured = br.ReadSingle();
Log.DebugFormat("Value = {0}",valueMeasured );