Modbus.Net.OPC
Modbus Implementation of Modbus.Net
Table of Content:
Basic Concept
OPC Protocal implements OPC DA and OPC UA protocal.
Address Mapping
Modbus.Net.OPC has a simple address formatting tool. You can find it from AddressFormaterOPC.
You need to use messages in BaseMachine and AddressUnit to create an OPC tag.
Here is a Sample.
If your tag is "1/15/Value_Opening", 1 is MachineId, 15 is StationId and Value_Opening is point name.
Your tagGeter code should be.
(baseMachine, addressUnit) => return new string[]{baseMachine.Id, ((XXUnitExtend)addressUnit.unitExtend).stationId, addressUnit.Name};
If you want change your tag to "1.15.Value_Opening", just set the seperator to '.' .
Regex System
Every tag could be a regex expression, Modbus.Net.OPC will always use regex comparison mode between each tags.
Like if you want to use a wildcard for first tag(or first directory), input your tagGeter code like this:
(baseMachine, addressUnit) => return new string[]{"(.*)", baseMachine.Id, ((XXUnitExtend)addressUnit.unitExtend).stationId, addressUnit.Name};
Link
The link of OPC DA should like "opcda://PC-Name/OPC-Software-Name".
The link of OPC UA should like "opc.tcp://PC-Name/Opc-Software-Name".