CheckPort (Check Status of a Control Port)

CheckPort returns the status of a digital terminal.

Syntax

CheckPort ( Port )

Remarks

CheckPort returns True (-1) if the specified digital channel is high or False (0) if the digital channel is low. CheckPort can be used on the right side of an expression (e.g., Variable = CheckPort (Port)) or as an expression. CheckPort has only one parameter:

Parameter

Port

The number of the port to use in this instruction. An alphanumeric code is entered. Right-click to display a list.

Code Description
C1 Control Port 1
C2 Control Port 2
C3 Control Port 3
C4 Control Port 4
U1 Universal terminal 1
U2 Universal terminal 2
U3 Universal terminal 3
U4 Universal terminal 4
U5 Universal terminal 5
U6 Universal terminal 6
U7 Universal terminal 7
U8 Universal terminal 8
U9 Universal terminal 9
U10 Universal terminal 10
U11 Universal terminal 11
U12 Universal terminal 12

Type: Constant

Caution: The value returned may not be valid if using the control port as a serial port or as a pulse counting port.