omron — Executing a Measurement (Far Imaging Position)

Moving the Robot to the Far Imaging Position The following describes a program that moves the robot to the far imaging position. Executing a Measurement (Far Imaging Position) The following describes a program that executes a measurement at the far imaging position. 50 2 To receive the far imaging position from the vision system, execute the numerical sequence receiving function (fhrunrecvval). Store the values of the received far imaging position in variables.

CALL fhrunrecvval(retry_count, time_out, socket_no, param[], err_no) IF err_no success THEN nonprocedural command transmission function GOTO 10 END IF param[0] 0 THEN GOTO 10 END cal_pos_far_x = param[1] cal_pos_far_y = param[2] cal_pos_far_z = param[3] Assign the values of the received far imaging position to cal_pos_far_w = param[4] variables. cal_pos_far_p = param[5] cal_pos_far_r = param[6] 1 Execute the robot motion function (fhsample move) to move the robot to the acquired _ far imaging position.

;Move the calib position Far CALL fhsample_move(cal_pos_far_x, cal_pos_far_y, cal_pos_far_z, cal_pos_far_w, cal_pos_far_p, cal_pos_far_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