2.1
External I/OFor more flexible control, refer to Modbus.
get_external_di
Get digital input (external).
get_external_di(dev, pin)
- Parameters
dev
: Device number.pin
: Port number.
2.2
get_external_disGet multiple digital inputs (external) in batch.
get_external_dis(dev, pin, length)
- Parameters
dev
: Device number.pin
: Starting port number.length
: How many consecutive ports.
wait_external_di
Wait for digital input (external).
wait_external_di(dev, pin, value, relation)
- Parameters
dev
: Device number.pin
: Port number.value
: Value to be compared.relation
: Relational judgment operator.
set_external_do
Set digital output (external).
set_external_do(dev,pin,value)
- Parameters
dev
: Device number.pin
: Port, starting from 0.value
: Value to be set.
2.2
set_external_dosSet multiple digital outputs (external) in batch.
set_external_dos(dev, pin, length, values)
- Parameters
dev
: Device number.pin
: Starting port number.length
: How many consecutive ports.values
: Array of values to be set.
get_external_do
Get digital output (external).
get_external_do(dev, pin)
- Parameters
dev
: Device number.pin
: Port number.
2.2
get_external_dosGet multiple digital outputs (external) in batch.
get_external_dos(dev, pin, length)
- Parameters
dev
: Device number.pin
: Starting port number.length
: How many consecutive ports.
get_external_ai
Get analog input (external).
get_external_ai(dev, pin)
- Parameters
dev
: Device number.pin
: Port number.
2.2
get_external_aisGet multiple analog inputs (external) in batch.
get_external_ais(dev, pin, length)
- Parameters
dev
: Device number.pin
: Starting port number.length
: How many consecutive ports.
wait_external_ai
Wait for analog input (external).
wait_external_ai(dev, pin, value, relation)
- Parameters
dev
: Device number.pin
: Port number.value
: Value to be compared.relation
: Relational judgment operator.
set_external_ao
Set analog output (external).
set_external_ao(dev, pin, value)
- Parameters
dev
: Device number.pin
: Port number.value
: Value to be set.
2.2
set_external_aosSet multiple analog outputs (external) in batch.
set_external_aos(dev, pin, length, values)
- Parameters
dev
: Device number.pin
: Starting port number.length
: How many consecutive ports.values
: Array of values to be set.
get_external_ao
Get analog output (external).
get_external_ao(dev, pin)
- Parameters
dev
: Device number.pin
: Port number.
2.2
get_external_aosGet multiple analog outputs (external) in batch.
get_external_aos(dev, pin, length)
- Parameters
dev
: Device number.pin
: Starting port number.length
: How many consecutive ports.
2.3
get_external_iosGet all port values of external device in batch.
get_external_ios(dev)
- Parameters
dev
: Device number.