-
Notifications
You must be signed in to change notification settings - Fork 136
8 Debug method and issue upload
Modbus.Net directly using Serilog with no LoggerFactory. The reason is that this framework has a task shut down bug in web application caused by web GC.
BackgroundTask in Asp.net BoilerPlate can fix this bug.
If you want to use serilog to output log please add a initialize code at the beginning of codes. Check Serilog Configuration Basics.
The meaning of serilog level for Modbus.Net:
Level | Usage |
---|---|
Debug |
All Debug messages. |
Information |
Connect, Disconnect and all status change. |
Warning |
All problem that will not cause shutdown or throws exception. |
Error |
All problem that will cause shutdown or throws exception. |
Fatal |
Print when application crashed.(Users should define himself/herself) |
Modbus.Net may has bugs. This is caused by imbedded devices, serial ports and Administrations, so it cannot be tested automatically.
And protocol documents itself may not complexable, so I will not promise the correction of the implementation.
Before 1.3.2
Use WireShark2 or Comspy. Describe is issue the print all related messages.
After 1.3.9 Set Serilog level to Verbose, output to a file, describe the issue and print all of them to issue.
.NET has lack capibility with serial port, diagnotics is also hard. If you cannot open serial correctly or throw exceptions, one or some of the following reasons would happen.
- Slave or master wrong. (No response)
- Serial port singal interfere. (Wrong codes or no response)
- Message sends wrong. (Throw exception)
- Chip on serial port line or exchange line burned.(Wrong codes when sending)
- Serial Port No. wrong or not detected.(Open failed)
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