sample retest

This commit is contained in:
luosheng
2023-04-20 13:49:43 +08:00
parent 2687cf7cce
commit 78c305d37e
5 changed files with 7 additions and 9 deletions

View File

@@ -41,7 +41,7 @@ namespace TripleAdd.Controllers
{
if (utility == null)
{
utility = new ModbusUtility(ModbusType.Tcp, "192.168.0.161", 2, 0);
utility = new ModbusUtility(ModbusType.Tcp, "10.10.18.251", 2, 0);
utility.AddressTranslator = new AddressTranslatorModbus();
await utility.ConnectAsync();
}
@@ -54,7 +54,7 @@ namespace TripleAdd.Controllers
{
if (machine == null)
{
machine = new ModbusMachine<string, string>("1", ModbusType.Tcp, "192.168.0.161", new List<AddressUnit>()
machine = new ModbusMachine<string, string>("1", ModbusType.Tcp, "10.10.18.251", new List<AddressUnit>()
{
new AddressUnit() {Id = "1", Area = "4X", Address = 1, CommunicationTag = "Add1", DataType = typeof(ushort), Zoom = 1, DecimalPos = 0},
new AddressUnit() {Id = "2", Area = "4X", Address = 2, CommunicationTag = "Add2", DataType = typeof(ushort), Zoom = 1, DecimalPos = 0},