Download FGate Drive
Description
Download communication driver between the box and PLC, which will overwrite the previously downloaded driver. You can call Get FGate Drive List, and then append it to the Body to download.
Request Address: (Choose one)
URL1:[Host Server]/api/v2/box/device?boxNo={boxNo}
URL2:
[Host Server]/api/v2/box/{boxId}/device
Address Parameter Description
Field Type Description Host Server string Details inExplanation of terms boxNo string FGate serial number boxId Long Find it in Get FGate list interface: boxRegs->box->id Method
POST
Headers
Field Type Description Authorization string "Bearer " + Access Token obtained from the login interface Body
Collection of PLC driver lists, the properties of a single driver list are as follows:
Field Type Description plcId int ID of the driver, if multiple identical PLCs are connected with an FBox, the ID is not unique plcName string PLC name alias string PLC alias type int 0: serial port communication, 2: network communication advanced json object Advanced parameters for PLC configuration, see details below. If not configured, can be set to null. portNo int PLC Number, 1: serial port 1, 2: serial port 2, 3: serial port 3. (If connected through network port,no need to add this parameter.) interface int Serial port parameter, interface type, 0: RS232, 1: RS485_4, 2: RS485_2, 85: network (serial port 1 supports RS232, RS485_2, and RS485_4, serial port 2 only supports RS485_2, and serial port 3 only supports RS232) baudRate int Serial port parameter, baud rate dataBits int Serial port parameter, data bit stopBits int Serial port parameter, stop bit parityType int Serial port parameter, parity bit class int 0: master device, 1: slave device, 2: master-slave device (currently not supported) ip string Network PLC parameters, IP address port int Network PLC parameters, port number enabledBroadcast boolean Whether to enable broadcast station number broadcasetStationNo int Broadcast station number slaveNo int Slave device number Advanced object properties:
Field Type Description plcResponseTimeout int Communication timeout parameter protocolTimeout1 int Protocol timeout parameter 1 protocolTimeout2 int Protocol timeout parameter 2 maxPacketsWordReg int Maximum number of word registers for packet grouping maxPacketsBitReg int Maximum number of bit registers for packet grouping assembleIntervalWordReg int Interval between packet word registers assembleIntervalBitReg int Interval between packet bit registers protocolInterval int Communication interval time (unit: s) byteOrder16 int 16-bit integer byte order 0: 21, 1: 12 byteOrder32 int 32-bit integer byte order 0: 4321, 1: 3412, 2: 2143, 3: 1234 byteOrderFloat int 32-bit floating byte order 0: 4321, 1: 3412, 2: 2143, 3: 1234 retryType int Retry type, 0: retry, 1: cut off errMsgDispTime int Duration of prompt message Success Response
NUll
Return Codes
Code Description 200 Execution succeeded 400 Error message in HTTP Header[X-FBox-Code],see Appendix Three for details 401 Access token expired 404 The interface does not exist, please check the URL Postman example is as follows:
- Please see the example in the following image.