CheckPort (Check Status of a Control Port)

CheckPort returns the status of a control 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 terminal 1
C2 Control terminal 2
C3 Control terminal 3
C4 Control terminal 4
C5 Control terminal 5
C6 Control terminal 6
C7 Control terminal 7
C8 Control terminal 8

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.