Moving the Robot to the Near Imaging Position The following describes a program that moves the robot to the near imaging position. Executing a Measurement (Near Imaging Position) The following describes a program that executes a measurement at the near imaging position. 48 cal_pos_near_x = param[1] cal_pos_near_y = param[2] cal_pos_near_z = param[3] cal_pos_near_w = param[4] cal_pos_near_p = param[5] cal_pos_near_r = param[6] Assign the values of the received near imaging position to variables. 1 Execute the robot motion function (fhsample move) to move the robot to the acquired _ near imaging position.
;Move the calib position near CALL fhsample_move(cal_pos_near_x, cal_pos_near_y, cal_pos_near_z, cal_pos_near_w, cal_pos_near_p, cal_pos_near_r, err_no) IF err_no success THEN Robot motion sample function GOTO 10 END 1 To send the measurement command to the vision system, set the nonprocedural command name to MEASURE and execute the nonprocedural command transmission function (fhrunsendcmd).
;Send Measure Command $cmd_name = "MEASURE" $cmd_arg[0] = "" $cmd_arg[1] = "" $cmd_arg[2] = "" $cmd_arg[3] = "" $cmd_arg[4] = "" cmd_arg_num = 0 CALL fhrunsendcmd(socket_no, cmd_arg_num, $cmd_name, $cmd_arg[], err_no) IF err_no success THEN nonprocedural command transmission function GOTO 10 END 2 To receive the response to the measurement command from the vision system, execute the command response receiving function (fhrunrecvres). If the response is not OK, execute the processing to end the program. ;Recv Command Response CALL fhrunrecvres(retry_count, time_out, socket_no, cmd_res, err_no) IF err_no success THEN command response receiving function