In Method

Description
Returns the status of the specified input port. Each port contains 8 input bits (one byte).

Syntax
Function In (PortNumber As Integer) As Integer
Function In (Label As String) As Integer

Parameters

  • PortNumber
    An integer indicating the input port. Each port comprises 8 input bits (one byte).
  • Label
    A string expression indicating the input byte label.

Return Value
Integer from 0 to 255 representing the status of the input port.

See Also
InBCD Method, Out Method, OpBCD Method, Sw Method

In Example
VB Example:

Dim port1Value As Integer  
port1Value = m_spel.In(1)  

C# Example:

int port1Value;  
port1Value = m_spel.In(1);