Read and update values from Excel or similar
You can link to any data item in the address map using DDE.
The details are:
So, for instance, in an Excel cell, you could get an updating value of register 10001 by inserting something like:
You can't do a DDE write directly within Excel but you can do it using the built in VB script.
If you wanted to update a fixed address 10001 with a value from cell “A1” in Excel, you could do it with the following bit of VB:
Dim nDDEChannel As Long
nDDEChannel = DDEInitiate("WinModbus Master", "Master")
If nDDEChannel = 0 Then
MsgBox "Sorry, failed to open a DDE channel"
DDEPoke nDDEChannel, "10001", Sheets(1).Range("A1")