Web API V1.
1
In order to unify the protocol connection between this controller and various MES systems,
the interface specification is now defined and sample data for calling is provided.
As a server, this controller manages the tightening results and parameters of electric
screwdriver. The client can interact with the tightening results (including final tightening data
and tightening curves), barcode passing and other operations by calling the public http
interface.
Requests and responses content-type: application/json
1. Get tightening results
1.1 Interface definition
Function: Get unmarked tightening result data in the electric screwdriver
controller, including tightening data and curves.
url: http://x.x.x.x:9659/open/result
Request method:GET
Request parameters are defined in the table below:
parameters type info
Get the number of unmarked data. Range (1-20) Default
count int
value is 10
Whether to obtain the curve. 0 means not to obtain, 1
showCurve int
means to obtain, the default value is 0
Product barcode, can be empty, default is not entered to
barcode string
obtain all barcode data
Response data Response body json parameter Description:
parameters type info
code int Response code, 0 indicates success, others indicate failure
Error and prompt information when failure or reminder
msg string
occurs
data Json object Returned list of fastening results
page 1 , 6 pages in total
1.2 Example
Request:
http://127.0.0.1:9659/open/result?showCurve=1&count=1
Success response:
{
"code": 0,
"msg": "success",
"data": [
{
"id": "F9026934-D8E8-402E-A55E-DF6DD5C6B07A", // Unique ID
"angleCurve": "111,151,194,236,283,329,375,421,467 ",// angle curve point
"torqueCurve": "0.32,0.41,0.77,0.57,0.7,0.4,0.81,0.31, ",// torque curve point
"barcode": "SN2302", // barcode
"dateTime": "2023-04-04 15:30:31", // time
"errorReport": 0, // 0 None,1 screw stripped,2 incomplete tightening,3 Bad torque,
4 Bad tightening angle,5 stopover
"Line": "Line1", // Line
"station": "MP11", // station
"position": 1, // Screw position
"direction": 0, // 1 forward,0 reverse
"result": 0, // 0 OK,1 NG
"targetTorque": 1.235, // Torque value
"targetTorqueLo": 0.45, // Torque value lower limit
"targetTorqueUp": 1.45, // Torque value upper limit
"inAngle": 1995, // Angle
"inAngleLo": 1080, // Angle lower limit
"inAngleUp": 3665, // Angle upper limit
"tightenAngle": 50, // Tightening angle
"tightenAngleLo": 10, // Tightening angle lower limit
"tightenAngleUp": 120 // Tightening angle lower upper
}
]
}
Error response:
{
"code": 100,
"msg": "error",
page 2 , 6 pages in total
"data": null
}
2. Mark tightening results
2.1 Interface definition
Function: Mark the data in the controller. The marked data will no longer
be returned when subsequent tightening results are obtained.
url: http://x.x.x.x:9659/open/result/mark
Request method:POST
Request body parameters:
[
"F9026934-D8E8-402E-A55E-DF6DD5C6B07A",
"A0679575-7E94-487B-8301-E7BDE07320AD"
]
// The unique Id of the result , This is an array into which
multiple pieces of data can be inserted.
Response data Response body json parameter Description:
parameters type Info
code int Response code, 0 indicates success, others indicate failure
Error and prompt information when failure or reminder
msg string
occurs
2.2 Example
Request:
http://127.0.0.1:9659/open/result/mark
Request body:
[
"F9026934-D8E8-402E-A55E-DF6DD5C6B07A", // The unique id of the result
"A0679575-7E94-487B-8301-E7BDE07320AD "
]
page 3 , 6 pages in total
Success response:
{
"code": 0,
"msg": "success",
"data": null
}
Error response:
{
"code": 100,
"msg": "error",
"data": null
}
3. Pass-through barcode (Not yet provided)
3.1 Interface definition
Function: Write the barcode that allows passing through the station
url: http://x.x.x.x:9659/open/barcode
Request method:GET
Response data Response body json parameter Description:
parameter type info
barcode string Barcode that allows passing through
Response data Response body json parameter Description:
parameters type Info
code int Response code, 0 indicates success, others indicate failure
Error and prompt information when failure or reminder
msg string
occurs
3.2 Example
Request:
http://127.0.0.1:9659/open/barcode?barcode=SN2302
page 4 , 6 pages in total
Success response:
{
"code": 0,
"msg": "success",
"data": null
}
Error response:
{
"code": 100,
"msg": "error",
"data": null
}
4. Delete transit barcode (Not yet provided)
4.1 Interface definition
Function: Delete the pass-through barcode. I n t h e d e f a u l t s y s t e m , this
barcode will be deleted after tightening in the screws that allow the pass-through
barcode. Therefore, this function is suitable for deletion operations after
mistakenly writing the pass-through barcode.
url: http://x.x.x.x:9659/open/barcode/remove
Request method:GET
Response data Response body json parameter Description:
parameter type info
barcode string barcode to be deleted
Response data Response body json parameter Description:
parameters type Info
code int Response code, 0 indicates success, others indicate failure
Error and prompt information when failure or reminder
msg string
occurs
4.2 Example
Request:
http://127.0.0.1:9659/open/barcode/remove?barcode=SN2302
page 5 , 6 pages in total
Success response:
{
"code": 0,
"msg": "success",
"data": null
}
Error response:
{
"code": 100,
"msg": "error",
"data": null
}
page 6 , 6 pages in total