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_outputs()

get_digital_outputs(bit_list)

Features

This function reads the signals from multiple digital contact points of the controller. The digital signals of the contact points defined in bit_list are input at one.

Parameters

Parameter Name

Data Type

Default Value

Description

index

list (int)

-

List of contact points to read

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

Return

Value

Description

int (>=0)

Multiple contacts to be read at once

(the value of the combination of the bit list where bit_start =LSB and bit_end=MSB)

Negative number

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
# output contacts: No. 1=OFF, No. 2=OFF, No. 3=ON, and No. 4=ON
res = get_digital_outputs(bit_list=[1,2,3,4])
#res 기대값 = 0b1100 (binary number), 12 (decimal number), or 0x0C (hexadecimal number)

# output contacts: No. 5=ON, No. 6=ON, No. 7=OFF, and No. 8=ON
res = get_digital_outputs([5,6,7,8]) 
#res expected value = 0b1011 (binary number), 11 (decimal number), or 0x0B (hexadecimal number)

Keyword

get / digital / outputs / get_ / get_digital / digital_outputs


get_digital_outputs(bit_start, bit_end)

Features

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

Parameters

Parameter Name

Data Type

Default Value

Description

bit_start

int

-

Beginning contact number for output signals (1-16) (1~16)

bit_end

int

-

Ending contact number for output signals (1~16)

Note

Bit_end must be a larger number than bit_start.

Return

Description

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

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
# output contacts: No. 1=OFF, No. 2=OFF, No. 3=ON, and No. 4=ON
res = get_digital_outputs(bit_start=1, bit_end=4)
#res expected value = 0b1100 (binary number), 12 (decimal number), or 0x0C (hexadecimal number)

Keyword

get / digital / outputs / get_ / get_digital / digital_outputs