3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish
3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish

get_digital_input()

Definition

get_digital_input(index)

Features

This function reads the signals from digital contact points of the controller and reads the digital input contact value.

Parameters

Parameter Name

Data Type

Default Value

Description

index

int

-

A number 1 - 20 which means the contact number of I/O mounted on the controller.

  • 17 - 20 are inputs of the SI1 - SI4 terminals.

Return

Value

Description

1

ON

0

OFF

Negative value

Failed

Exception

Exception

Description

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

Python
in1 = get_digital_input(1)	# Reads the no. 1 contact
in8 = get_digital_input(8)	# Reads the no. 8 contact

Keyword

get / digital / input / get_ / get_digital / digital_input