Presenceplus communication testing – Banner PresencePLUS P4 COLOR Series User Manual

Page 75

Advertising
background image

ELSE
PRINT "Received string too long"
.ret_val = -1
END
ELSE
PRINT "Invalid number of elements received"
.ret_val = -1
END
END
.END

;
; Send data over the TCP connection
;
.PROGRAM tcp_send(.ret_val, .$data)

.ret_val = 0 ; Initialize function return code
.$send_buf[1] = .$data ; Data to send
.buf_num = 1 ; Number of array elements
.send_timeout = 60 ; send timeout
.error_return = 0 ; send error return code

TCP_SEND .error_return, tcp_sock_id, .$send_buf[1], .buf_num, send_timeout

IF .error_return < 0 THEN
.ret_val = -1
PRINT "TCP SEND error in SEND, error = ", .error_return
END
.END

PresencePLUS Communication Testing

The RCC interface is not a true Telnet interface, although you can use Telnet to test it. Some of the control keys, such
as Back Space and Delete will not cause mistyped characters to be erased. Instead, they will be passed on and consumed
by the RCC interface. Other control characters will also be consumed by the interface without the usual Telnet actions.

However, you can test the RCC connection by using a Telnet application to connect to the sensor using the port that
you configured for the RCC (20000 by default). To function correctly, you must set the Newline transmit value within
the Telnet application to be the same as the Command Line End delimiter that you selected in the RCC configuration
menu (Carriage Return/Line Feed by default).

After you have successfully connected to the RCC, you can enter RCC commands and observe responses. For example,
you can enter get onlinests to retrieve the online status of the sensor. Another example is you can type in the command
exec trigger , this will result in the sensor to be triggered, the inspection will be executed, and you should see the
inspection output in the GUI. For a complete list of RCC commands and return codes, please refer to the PresencePLUS
electronic documentation - accessible through the PresencePLUS GUI.

6.2.4 Using Custom_ASCII to Communicate with an External Device
Over Ethernet

To select Custom_ASCII, click on the RCC Protocol pull-down menu, and select Custom_ASCII from the menu.
The protocol configuration for Custom_ASCII is displayed as shown below. The default protocol configuration
parameters are:

• Ethernet Socket 1 configured for TCP/IP 20000 as the communications channel

• No Frame Start (Command Start) Delimiter — <none>

• Carriage Return/Line Feed as Frame End (Command End) Delimiter — \r\n

• Comma as the Output Delimiter for the Field Definition — ,

• Space as the Input Delimiter for the Field Definition — <SPC>

75

Minneapolis, MN USA

Banner Engineering Corp.

System Setup Dialog

2/2010

Advertising
This manual is related to the following products: