Controller Secondary Development — Creating Job Programs with the Configured Palletizing Process Package

The NexDroid-Controller function library provides a palletizing process package. Once the process package parameters are configured, you can use it by creating a job file.

1/20/2022

  • The NexDroid-Controller function library provides a palletizing process package. Once the process package parameters are configured, you can use it by creating a job file.
  • In this example, we use process number 1 to implement picking from a fixed point and palletizing placement.
  1. First, create a new job file with NRC_CreateJobfile("PALLET");

    • In this example, we use PALLET as the job file name
    • int NRC_CreateJobfile(std::string jobname);
  • jobname is the name of the job file to create
  1. Open the job file with NRC_OpenJobfile("PALLET");

    • int NRC_OpenJobfile(std::string jobname);
  • jobname is the name of the job file to open
  1. Insert motion commands to move the robot to the fixed pick point

    • For example: NRC_Position pickPos; NRC_JobfileInsertMOVJ(1, 100, 100, 100, pickPos, 5);
    • If obstacle avoidance is needed on the way to the pick point, insert additional motion commands as required; this example uses just one
    • int NRC_JobfileInsertMOVJ(int line, int vel, int acc, int dec, const NRC_Position& target, int pl=0,int tm = 0);
  • line inserts the command at the specified line number
  • vel is the robot's motion speed as a percentage of its maximum speed, range: 0 < vel <= 100
  • acc is the robot's acceleration as a percentage of each joint's maximum acceleration, range: 0 < acc <= 100
  • dec is the robot's deceleration as a percentage of each joint's maximum deceleration, range: 0 < dec <= 100
  • target is the robot's target position
  • pl is the smoothing level, which blends smoothly into the next motion command; higher values give smoother motion but greater trajectory deviation, range: 0 <= pl <= 5
  1. Insert a digital output command to output a high level on an I/O port so the gripper or suction cup can pick up the workpiece

    • NRC_JobfileInsertDOUT(2, 1, 1); — this example uses I/O port 1 to control the gripper or suction cup
    • int NRC_JobfileInsertDOUT(int line, int port, int value);
  • line inserts the command at the specified line number
  • port is the digital output port number, range: port > 0
  • value is the output state of the port: 0 — output low level, 1 — output high level
  1. Insert a delay command to wait for the gripper or suction cup to grasp the workpiece

    • NRC_JobfileInsertTIMER(3, 0.5); — this example uses a delay of 0.5 seconds
    • int NRC_JobfileInsertTIMER(int line, double timeSec);
  • line inserts the command at the specified line number
  • timeSec is the delay time in seconds, range: timeSec > 0
  1. Insert the palletizing start command NRC_JobfileInsertPALON(4, 1, 0); — this example uses process number 1 for palletizing

    • int NRC_JobfileInsertPALON(int line, int id, int type, int var1=0, int var2=0, int var3=0);
  • line inserts the command at the specified line number
  • id is the process number of the palletizing process used
  • type is the palletizing type: 0 — palletizing, 1 — depalletizing
  1. Insert the move-to-entry-point command NRC_JobfileInsertPALENTER(5, 1, 1, 100, 100, 100, 5);

    • int NRC_JobfileInsertPALENTER(int line, int id, int moveType, int vel, int acc, int dec, int pl);
  • line inserts the command at the specified line number
  • id is the process number of the palletizing process used
  • moveType is the interpolation mode used by this command: 1 — joint interpolation, 2 — linear interpolation, 3 — circular interpolation
  • vel is the robot's motion speed
    • With joint interpolation, it is a percentage of the robot's maximum speed, range: 0 < vel <= 100
    • With linear or circular interpolation, it is the absolute speed of the robot's end position in millimeters per second (mm/s), range: vel > 1
  • acc is the robot's acceleration, range: 0 < acc <= 100
    • With joint interpolation, it is a percentage of each joint's maximum acceleration
    • With linear or circular interpolation, it is a percentage of the robot's maximum Cartesian acceleration
  • dec is the robot's deceleration, same as acc
  • pl is the smoothing level, which blends smoothly into the next motion command; higher values give smoother motion but greater trajectory deviation, range: 0 <= pl <= 5
  1. Insert the move-to-auxiliary-point command NRC_JobfileInsertPALSHIFT(6, 1, 1, 100, 100, 100, 5);

    • NRC_JobfileInsertPALSHIFT(int line, int id, int moveType, int acc, int dec, int vel, int pl=0);
  • The parameters are the same as for the move-to-entry-point command
  1. Insert the move-to-workpiece-point command NRC_JobfileInsertPALREAL(7, 1, 2, 100, 100, 100, 5);

    • NRC_JobfileInsertPALREAL(int line, int id, int moveType, int acc, int dec, int vel, int pl=0);
  • The parameters are the same as for the move-to-entry-point command
  1. Insert a digital output command to output a low level on an I/O port so the gripper or suction cup releases the workpiece
  • NRC_JobfileInsertDOUT(8, 1, 0);
  1. Insert a delay command to wait for the gripper or suction cup to release the workpiece
  • NRC_JobfileInsertTIMER(9, 0.5);
  1. Insert the move-to-auxiliary-point command
  • NRC_JobfileInsertPALSHIFT(10, 1, 1, 100, 100, 100, 5);
  1. Insert the move-to-entry-point command
  • NRC_JobfileInsertPALENTER(11, 1, 1, 100, 100, 100, 5);
  1. Insert the palletizing end command NRC_JobfileInsertPALOFF(12, 1);
  • int NRC_JobfileInsertPALOFF(int line, int id, int var=0);
    • line inserts the command at the specified line number
    • id is the process number of the palletizing process used

At this point, the job file using the palletizing process package has been fully created.

Appendix:

NRC_CreateJobfile("PALLET");
NRC_OpenJobfile("PALLET");
NRC_Position pickPos;
NRC_JobfileInsertMOVJ(1, 100, 100, 100, pickPos, 5);
NRC_JobfileInsertDOUT(2, 1, 1);
NRC_JobfileInsertTIMER(3, 0.5);
NRC_JobfileInsertPALON(4, 1, 0);
NRC_JobfileInsertPALENTER(5, 1, 1, 100, 100, 100, 5);
NRC_JobfileInsertPALSHIFT(6, 1, 1, 100, 100, 100, 5);
NRC_JobfileInsertPALREAL(7, 1, 2, 100, 100, 100, 5);
NRC_JobfileInsertDOUT(8, 1, 0);
NRC_JobfileInsertTIMER(9, 0.5);
NRC_JobfileInsertPALSHIFT(10, 1, 1, 100, 100, 100, 5);
NRC_JobfileInsertPALENTER(11, 1, 1, 100, 100, 100, 5);
NRC_JobfileInsertPALOFF(12, 1);

文档反馈

Controller Secondary Development — Creating Job Programs with the Configured Palletizing Process Package - iNexBot