pyhoff.devices.KL1512#

class pyhoff.devices.KL1512(bus_coupler, o_b_addr, i_b_addr, o_w_addr, i_w_addr, mixed_mapping)#

Bases: AnalogInputTerminal

KL1512: 2x 16 bit counter, 24 V DC, 1 kHz

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.

Raises:

Exception – If the word offset or count is out of range.

read_counter(channel)#

Read the absolut counter value of a specific channel.

Parameters:

channel (int) – The channel number to read from.

Return type:

int

Returns:

The counter value.

read_delta(channel)#

Read the counter change since last read of a specific channel.

Parameters:

channel (int) – The channel number to read from.

Return type:

int

Returns:

The counter value.

read_normalized(channel)#

Read a normalized value (0…1) from a specific channel.

Parameters:

channel (int) – The channel number to read from.

Return type:

float

Returns:

The normalized value.