Banner PresencePLUS BCR 1.3 Series User Manual
Page 76
CALL tcp_open(.ret_val, 20000)
IF .ret_val < 0 THEN
PRINT "Unable to connect to RCC"
RETURN
END
;
; Trigger the camera and wait for the inspection to complete
;
; Send Trigger to camera and wait for the inspection to complete
.$cmd_str = "EXEC TRIGGER"+$cmd_del
CALL tcp_send(.ret_val, .$cmd_str)
IF .ret_val < 0 GOTO tcp_error
; Read command response from camera
.$rcv_str = ""
CALL tcp_recv(.ret_val, .$rcv_str)
IF .ret_val < 0 GOTO tcp_error
; Decode command response - a response of zero indicates that
; the command was accepted for processing, a negative value
; indicates that an error has occurred.
.$rsp_str = $DECODE(.$rcv_str, $cmd_del, 0)
.ret_val = VAL(.$rsp_str)
IF .ret_val < 0 GOTO cmd_error ; Trigger failed
;
; Determine whether the inspection passed or failed
;
; Send command to camera to determine if the inspection passed
; the inspection and found the desired part
.$cmd_str = "GET PASSFAILFLG"+$cmd_del
CALL tcp_send(.ret_val,.$cmd_str)
IF .ret_val < 0 GOTO tcp_error
; Read command response from camera
.$rcv_str = ""
CALL tcp_recv(.ret_val, .$rcv_str)
IF .ret_val < 0 GOTO tcp_error ; Get command failed
; Decode command response
.$rsp_str = $DECODE(.$rcv_str, $cmd_del, 0)
.ret_val = VAL(.$rsp_str)
IF .ret_val < 0 GOTO cmd_error ; Get Pass/Fail failed
$temp = $DECODE(.$rcv_str, $cmd_del, 1) ; Remove frame delimiter
; Decode the Pass/Fail status data returned by the Get command
.$rsp_str = $DECODE(.$rcv_str, $coord_del, 0)
.passfail = VAL(.$rsp_str)
IF .passfail <> 1 GOTO notfnd_error
P/N 000000
Banner Engineering Corp. - Minneapolis, MN USA - www.bannerengineering.com
Tel: 763.544.3164
76
7/2009
System Setup Window Overview