-
Notifications
You must be signed in to change notification settings - Fork 136
7 Modbus.Net.OPC(E)
OPC is a real time communication protocol by OPC Foundation, based on two ways, OPC DA based on DCOM, and OPC UA based on TCP.
Modbus.Net.Opc has a special Formater called AddressFormaterOpc.
There is a Lambda Function in paramter, the param of this lambda function is machine and address, please create OPC Tag by using these two instances.
e.g.
If your tag is "1.15.Value_Opening", 1 is Id, 15 is station no, and Value_Opening is the name of address.
(baseMachine, addressUnit) => return new string[]{baseMachine.Id+"."+((XXUnitExtend)addressUnit.unitExtend).stationId+"."+addressUnit.Name};
You should run your application as Administrator if your OPC Server is hosted on Administrator, otherwise code will throw error when creating a connection.
OPC DA should like "opcda://PC-Name/OPC-Software-Name".
But when you got E_NOINTERFACE by IOPCServerList2, you should add CLSID to the address.
opcda://PC-Name/OPC-Software-Name/{CLSID}
OPC UA should like "opc.tcp://{PC-Name}/{Opc-Software-Name}"。
Modbus.Net Hangzhou Delian Science Technology Co.,Ltd. © 2023
-
2 Specification of Modbus.Net main framework
- 2.1 Modbus.Net Architecture
- 2.2 Transmission Control Layer Controller
- 2.3 Transmission Link Layer Connector
- 2.4 Concrete Protocol Layer ProtocolLinker
- 2.5 Abstract Protocol Layer Protocol
- 2.6 Protocol Presentation Layer Utility
- 2.7 Device Application Layer Machine
- 2.8 Task Application Layer MachineJob
-
3 Using Modbus.Net to implement a protocol
- 3.1 Global Tools
- 3.2 Extends Protocol and ProtocolUnit according to protocol specification
- 3.3 Extends Connector to create a link method
- 3.4 Extends Machine and Utility, creating two apis
- 3.5 Extends API methods to Machine and Utility
- 3.6 Extends Formater, Translator and Combiner, Creating Encoding,Decoding,Combining methods for address
- 3.7 Extends Controller, to control message