Interface#

Access method#

The PalletStudio provides an HTTP interface, through which users can obtain the status information of the palletstudio, as well as start, stop, and switch project.

Access port: 7410

Example: If the IP address of the PalletStudio controller is 192.168.1.10, you need to obtain the status information of the PalletStudio. Send a GET request: http://192.168.1.10:7410/api/status/system

List of interfaces#

Get status#

Obtain the status machine and basic information of the PalletStudio

URL: /api/status/system

Content-Type: application/json

Method: GET

Response:

{
  "success": true,
  "message": "",
  "data": {
    "system_status": 1,
    "left_status": 1,
    "right_status": 1,
    "system_mode": 1,
    "robot_status": 6,
    "left_enable": false,
    "right_enable": false,
    "left_full_status": false,
    "right_full_status": false,
    "current_project": "test",
    "lift_enable": false,
    "error": "",
    "remote_enable": true
  }
}

Description of Response

Name

Example

Type

Description

success

true

Boolean

response success

message

String

failed message

data

Object

Data

data.system_status

1

Integer

SystemState: 0 Init, 1 Standby, 2 Error, 3 Reset, 4 Running, 5 Paused

data.left_status

1

Integer

Left stack state: 0 Full, 1 Ready 2 Running, 3 Standby

data.right_status

1

Integer

Right stack state: 0 Full, 1 Ready 2 Running, 3 Standby

data.system_mode

1

Integer

System mode: 1 Config, 2 Running

data.robot_status

6

Integer

Robot state: 4 Poweroff, 5 Disable 6 Enable

data.left_enable

false

Boolean

Left Enable

data.right_enable

false

Boolean

Right Enable

data.left_full_status

false

Boolean

Left full

data.right_full_status

false

Boolean

Right full

data.current_project

test

String

Current project

data.lift_enable

false

Boolean

lift enabled

data.error

String

error message

data.remote_enable

true

Boolean

remote control enabled

Get palletizing information#

Get palletizing information

URL: /api/status/pallet

Content-Type: application/json

Method: GET

Response:

{
  "success": true,
  "message": "",
  "data": {
    "left_cur_layer": 0,
    "left_cur_box": 0,
    "left_boxes": 16,
    "left_layers": 4,
    "left_box_curr_layer": 1,
    "right_cur_layer": 0,
    "right_cur_box": 0,
    "right_boxes": 16,
    "right_layers": 4,
    "right_box_curr_layer": 1
  }
}

Description of Response:

Name

Example

Type

Description

success

true

Boolean

response success

message

String

failed message

data

Object

data

data.left_cur_layer

0

Integer

left current layer

data.left_cur_box

0

Integer

left current box

data.left_boxes

16

Integer

left total boxes

data.left_layers

4

Integer

left total layers

data.left_box_curr_layer

1

Integer

left box current layer

data.right_cur_layer

0

Integer

right current layer

data.right_cur_box

0

Integer

right current box

data.right_boxes

16

Integer

right total boxes

data.right_layers

4

Integer

right total layers

data.right_box_curr_layer

1

Integer

right box current layer

Get sensor status#

Get sensor status of PalletStaudio

URL: /api/status/sensor

Content-Type: application/json

Method: GET

Response:

{
  "success": true,
  "message": "",
  "data": {
    "left_stack_in_position": false,
    "right_stack_in_position": false,
    "sucker_vacuum_reached": [
      false,
      false,
      false
    ],
    "pick_station_has_box": false
  }
}

Description of Response:

Name

Example

Type

Description

success

true

Boolean

response success

message

String

failed message

data

Object

data

data.left_stack_in_position

false

Boolean

left stack in position

data.right_stack_in_position

false

Boolean

right stack in position

data.sucker_vacuum_reached

Object

sucker reached

data.pick_station_has_box

false

Boolean

has box in pick

Get statistics#

Get statistics info of PalletStudio, such as total boxes, total stacks, etc.

URL: /api/statistics

Content-Type: application/json

Method: GET

Response:

{
  "success": true,
  "message": "",
  "data": {
    "left_sum_box": 100,
    "left_sum_stack": 8,
    "left_average_beat": 0,
    "left_average_time": 0,
    "right_sum_box": 100,
    "right_sum_stack": 8,
    "right_average_beat": 0,
    "right_average_time": 0,
    "total_sum_box": 100,
    "total_sum_stack": 8,
    "total_average_box_speed": 0,
    "total_average_stack_speed": 0
  }
}

Description of Response:

Name

Example

Type

Description

success

true

Boolean

response success

message

String

failed message

data

Object

data

data.left_sum_box

100

Integer

left total boxes

data.left_sum_stack

8

Integer

left total stacks

data.left_average_beat

0

Integer

left average beat

data.left_average_time

0

Integer

left stack average time

data.right_sum_box

100

Integer

right total boxes

data.right_sum_stack

8

Integer

right total stacks

data.right_average_beat

0

Integer

right average beat

data.right_average_time

0

Integer

right stack average time

data.total_sum_box

100

Integer

total boxes

data.total_sum_stack

8

Integer

total stacks

data.total_average_box_speed

0

Integer

total average speed-box

data.total_average_stack_speed

0

Integer

total average speed-stack

Get list of projects#

Get list of project

URL: /api/project/list

Content-Type: application/json

Method: GET

Response:

{
  "success": true,
  "message": "",
  "data": {
    "list": [
      {
          "name": "pro1",
          "description": ""
      },
      {
          "name": "pro2",
          "description": ""
      }
    ]
  }
}

Description of Response:

Name

Example

Type

Description

success

true

Boolean

response success

message

String

failed message

data

Object

data

data.list

Object

lift of project

data.list.name

pro1

String

project name

data.list.description

String

project description

Get basic info of project#

Get basci info of project

URL: /api/project/info?name=pro1

Content-Type: application/json

Method: GET

URI params:

Name

Example

Type

required

Description

name

pro1

String

Yes

project name

Response:

{
  "success": true,
  "message": "",
  "data": {
    "d1": 1000,
    "d2": 1000,
    "l1": 200,
    "l2": 100,
    "weight": 10
  }
}

Description of Response:

Name

Example

Type

Description

success

true

Boolean

response success

message

String

failed message

data

Object

data

data.d1

1000

Integer

stack d1 length

data.d2

1000

Integer

stack d2 length

data.l1

200

Integer

box l1 length

data.l2

100

Integer

box l2 length

data.weight

10

Integer

box weight

Start pallet#

To start palletizing, the user needs to specify whether to start with the left or right stack. In order to ensure safety, when the palletizing is started through the interface, it is necessary to satisfy: when the remote control interface has been enabled, and there is no material on the corresponding pallet, the corresponding stack is in the Ready or Standby state, and the robot and the lifting column are in place, and the suction cup has been released before it can be started.

URL: /api/action/pallet/start

Content-Type: application/json

Method: POST

Request body:

{
    "password": "1",
    "type": 1
}

Name

Example

Type

Required

Description

password

1

String

Yes

password

type

1

Number

Yes

1: left start 2: right start

Response:

{
  "success": true,
  "message": "",
  "code": ""
}

Description of Response:

Name

Example

Type

Description

success

false

Boolean

response success

message

String

failed message

code

String

code

Switch pallet#

Switch the project used. In order to ensure safety, switching project via this interface takes effect only when remote control is enabled, the left and right stack are free of material, and they are in standby mode.

URL: /api/action/project/switch

Content-Type: application/json

Method: POST

Request body:

{
  "project": "pro1"
}

Name

Example

Type

Required

Description

project

pro1

String

Yes

Project name

Response:

{
  "success": true,
  "message": "",
  "code": ""
}

Description of Response:

Name

Example

Type

Description

success

false

Boolean

response success

message

String

failed message

code

String

code

detect material in stack#

Send information about whether there is material on the stack to the PalletStudio, and it is recommended to send it to the PalletStudio periodically

URL: /api/signal/stack

Content-Type: application/json

Method: POST

Request body:

{
  "left": [false,false],
  "right": [false, false]
}

Name

Example

Type

Required

Description

left

Object

Yes

The signals are false, left stack has no material

right

Object

Yes

The signals are false, right stack has no material

Stop pallet#

Stop pallet

URL: /api/action/pallet/stop

Content-Type: application/json

Method: POST

Request body:

{
  "password": "1"
}

Enable or disable remote control#

When disabled, the PalletStudio does not respond to the remotely started signal. When the PalletStudio is turned on, the remote control interface is disabled by default

URL: /api/action/enable

Content-Type: application/json

Method: POST

Request body:

{
  "enable": false
}

Name

Example

Type

Required

Description

enable

Boolean

Yes

true: enable remote control; false: disable remote control

Response:

{
  "success": true,
  "message": "",
  "code": ""
}

Description of Response:

Name

Example

Type

Description

success

false

Boolean

response success

message

String

failed message

code

String

code