Acquiring the Far Imaging Position The following describes a program that acquires the far imaging position registered in Automatic Calibration (Vision Master) . 49 GOTO 10 END ;Command Response Check IF cmd_res 1 THEN GOTO 10 If the response is not OK, exit the program. END 3 To receive the measurement result from the vision system, execute the numerical sequence receiving function (fhrunrecvval) and check the value of the received overall judgment.
This program is created on the assumption that the measurement result from the vision system is sent as “ TJG.” ;Get the Measurement Result CALL fhrunrecvval(retry_count, time_out, socket_no, param[], err_no) IF err_no success THEN numerical sequence receiving function GOTO 10 END ;Total Judge Check IF param[0] 1 THEN If the overall judgment is not OK, exit the program GOTO 10 END 1 To acquire the far imaging position, set the first nonprocedural command argument $cmd arg[0] to 1.
To send the camera calibration imaging position acquisition _ command to the vision system, set the nonprocedural command name to RBCOM GET CALIB POS and execute the nonprocedural command transmission _ _ _ function (fhrunsendcmd). ;Get Calib Position Far $cmd_name = "RBCOM_GET_CALIB_POS" Set this argument to 1 to acquire the far $cmd_arg[0] = "1" imaging position. $cmd_arg[1] = "" $cmd_arg[2] = "" $cmd_arg[3] = "" $cmd_arg[4] = "" cmd_arg_num = 1 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