Skip to main content
Skip table of contents

get_digital_inputs(bit_start, bit_end)

Features

This function reads multiple signals at once from the digital input start contact point (start_index) to the end contact point (end_index) of the controller.

Parameters

Parameter NameData TypeDefault ValueDescription

bit_start

int

-

Beginning contact number for input signals (1-16)

bit_end

int

-

Ending contact number for input signals (1-16)


Note

Bit_end must be a larger number than bit_start.

Return

ValueDescription

int (>=0)

Multiple contacts to be read at once

Value of the combination of bits where bit_start =LSB and bit_end=MSB.

Negative number

Failed

Exception

ExceptionDescription

DR_Error (DR_ERROR_TYPE)

Parameter data type error occurred

DR_Error (DR_ERROR_VALUE)

Parameter value is invalid

DR_Error (DR_ERROR_RUNTIME)

C extension module error occurred

DR_Error (DR_ERROR_STOP)

Program terminated forcefully

Example

PY
# input contacts: No. 1=OFF, No. 2=OFF, No. 3=ON, and No. 4=ON 
res = get_digital_inputs(bit_start=1, bit_end=4)
#res expected value = 0b1100 (binary number), 12 (decimal number), or 0x0C (hexadecimal number)
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.