pyhoff.devices.KL4002#
- class pyhoff.devices.KL4002(bus_coupler, output_bit_addresses, input_bit_addresses, output_word_addresses, input_word_addresses, mixed_mapping)#
Bases:
AnalogOutputTerminal
KL4002: 2x analog output 0…10 V 12 Bit differentiell
- read_channel_word(channel, error_value=-99999)#
Read a single word from the terminal.
- Parameters:
channel (
int
) – The channel number (1 based index) to read from.- Return type:
int
- Returns:
The read word value or provided error_value if read failed.
- Raises:
Exception – If the word offset or count is out of range.
- set_normalized(channel, value)#
Set a normalized value between 0 and 1 to a specific channel.
- Parameters:
channel (
int
) – The channel number to set.value (
float
) – The normalized value to set.
- Return type:
bool
- Returns:
True if the write operation succeeded.
- set_voltage(channel, value)#
Set a voltage value to a specific channel.
- Parameters:
channel (
int
) – The channel number to set.value (
float
) – The voltage value to set in V.
- Return type:
bool
- Returns:
True if the write operation succeeded.
- write_channel_word(channel, value)#
Write a word to the terminal.
- Parameters:
channel (
int
) – The channel number (1 based index) to write to.- Return type:
bool
- Returns:
True if the write operation succeeded.
- Raises:
Exception – If the word offset or count is out of range.