If the main control board you are using is 86Duino Zero, in order to quickly and neatly connect multiple servos to 86Duino Zero, it is strongly recommended to manually make an electronic expansion board. It consists of 3 3×4 DuPont pins and 1 1×2 DuPont pin. Each 3×4 pin can be plugged into 4 servos, […]
Origin of the project This project originated one day when Soldier B came to the company with a magic cube and was bumped into by the boss."So you can turn magic cubes! Then making a magic cube robot should be a piece of cake for you!" The boss said, and Soldier B was assigned the […]
Description Receive and parse Modbus packets, and send them to the corresponding node according to the packet address. Syntax gateway.poll() Parameters gateway: ModbusGateway object. Return int: Length of the received Modbus packet. Example 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 […]
Description Set the timeout. Syntax gateway.setTimeout(timeout) Parameters gateway: ModbusGateway object. timeout: Set the timeout in milliseconds. If the timeout occurs during the poll phase, the EXCEPTION_CODE will be returned to the Modbus Master. Example 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 […]
Description Establishes a connection between this gateway and a ModbusMasterNode object, which corresponds to a channel and node number. Syntax gateway.connect(node) Parameters gateway: ModbusGateway object. node: ModbusMasterNode object, which corresponds to a channel and node number. Return bool: If successful, return true, otherwise return false Example 1 2 3 4 5 6 7 8 9 […]
Description Initializes a ModbusGateway object and specifies the communication mode between this object and the Modbus master. Syntax gateway1.begin(mode, serial) gateway2.begin(mode) Parameters gateway1/gateway2: ModbusGateway object. mode: Specifies the communication mode between the ModbusGateway object and the Modbus master. Arguments are MODBUS_RTU, MODBUS_ASCII, or MODBUS_TCP. serial: Specifies the Serial class as the transmission channel. Return Value […]
Modbus86 Gateway can make 86Duino simulate a Modbus Gateway, which is a gateway that forwards Modbus Master communication data. Example Use Modbus TCP as the communication method with Modbus Master and forward its communication data to the node on Modbus RTU 1 2 3 4 5 6 7 8 9 10 11 12 13 14 […]
Description Sends a packet command to read and write the holding registers of a slave node. Syntax node1.readWriteMultipleRegisters(read_address, read_size, write_address, write_size) node2.readWriteMultipleRegisters(read_address, read_size) - Different parameter function and usage. See Example for details. Parameters node1/node2: ModbusMasterNode object. read_address: Starting address of the holding register to read. read_size: Size of holding register to read. write_address: Starting […]
Description Sends a packet mask operation instruction to the Slave node to write into the Holding Register register. The operation formula is as follows: (Current_Contents AND and_mask) OR (or_mask AND (NOT and_mask)) Syntax node1.maskWriteRegister(write_address, and_mask, or_mask) Parameters node1: ModbusMasterNode object. write_address: The address of the Holding Register to be written. and_mask: "AND" gate mask parameter. […]
Description Returns the data of the private array readData in the ModbusMasterNode class. readData is the array stored after reading back the Slave device register using the Read function code. Syntax node1.receive() Parameters node1: ModbusMasterNode object. Return uint16_t: Returns the data of the private array readData in the ModbusMasterNode class Example 1 2 3 4 […]