The following describes processing that is carried out when AOS camera calibration is normally Ending the Program (Normal End) ended. 51 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 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 nonprocedural command transmission function GOTO 10 END ;Total Judge Check IF param[0] 1 THEN GOTO 10 If the overall judgment is not OK, exit the program END 1 If this processing is successful, the program sends the camera calibration mode change command to manual calibration by the nonprocedural command transmission function (fhrunsendcmd), and then executes the sample program (fhsample main).
_ 11 ;Set Calib mode $cmd_name = "RBCOM_SET_CALIB_MODE" Set the camera calibration mode to manual $cmd_arg[0] = "0" calibration. $cmd_arg[1] = ""