sample retest
This commit is contained in:
@@ -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},
|
||||
|
||||
Reference in New Issue
Block a user