Superio Related downloads: http://pan.baidu.com/s/1pJ7lZWf1.1 Unified IO Interface
The development of a set of equipment drivers at the same time with the serial port and network communication capabilities, communication interface is logically unified, on this basis, the serial port and the network also has its own IO communication characteristics, according to different means of communication, You can convert Iiochannel instances into Isessionsocket or isessioncom instances. Such as:
1.2 Communication requirements
A request command is sent two times, and the serial check digit is different each time the data is sent. First send address information, the configuration of the serial port is baud,m,8,1, and then send the request command information, then the serial port configuration is baud,s,8,1. This completes the command to request data one time. Such as:
1.3 Overriding the Communication interface
Device driver inherits SuperIO.Device.RunDevice1 abstract class, inside there is a virtual function send (Iiochannel io, byte[] sendbytes), io parameter is the communication operation instance, the Sendbytes parameter is the data information to be sent , you can override this interface function to complete a special send data request. Such as:
After receiving the data, you need to change the serial port settings to the default configuration to avoid affecting other device-driven communications, such as:
Author qq:504547114
QQ Group: 54256083
Official website: http://www.bmpj.net
"Industrial serial port and network software communication Platform (Superio) tutorial" nine. Rewrite the communication interface function to implement special communication methods