CommDriver Transport enumerations
VB Imports MBLink ' ********************* ' * Create Controller Dim MBDevice As new Controller ' ********************** ' * create RTU serial transport class ' * COM1, 19200, N, 8, 1 Dim transport as new CommDriver transport.Driver = DRIVERTYPE.SERIAL transport.Protocol = PROTOCOL_MSG.RTU transport.Port = COMPORT.COM1 transport.Baud = BAUD.BAUD_19200 transport.Parity = PARITY_BIT.NONE transport.DataBits = DATA_BITS.DATABITS_8 transport.stopBits = STOP_BITS.STOPBITS_1 ' ************************ ' * assign transport to Controller MBDevice.Transport = transport ' **************************** ' * connect to MODBUS device using transport MBDevice.Connect() C# using MBLink; ///////////////////////////////// // Create Controller Controller MBDevice = new Controller(); ///////////////////////////////// // create RTU serial transport class // COM1, 19200, N, 8, 1 CommDriver transport = new CommDriver(); transport.Driver = DRIVERTYPE.SERIAL; transport.Protocol = PROTOCOL_MSG.RTU; transport.Port = COMPORT.COM1; transport.Baud = BAUD.BAUD_19200; transport.Parity = PARITY_BIT.NONE; transport.DataBits = DATA_BITS.DATABITS_8; transport.stopBits = STOP_BITS.STOPBITS_1; ////////////////////////////// // assign transport to Controller MBDevice.Transport = transport; ////////////////////////////// // connect to MODBUS device using transport MBDevice.Connect();
| Member Name | Description |
|---|---|
| TCP | MODBUS TCP/IP transport |
| SERIAL | MODBUS SERIAL transport |
| SOE | MODBUS SERIAL over ETHERNET transport |
Namespace: MBLink
Assembly: INGEAR.NET.MBLINK (in INGEAR.NET.MBLINK.dll)