voraus_ecat package

The Python client API for the voraus auxiliary EtherCAT master.

Generate Python Code

The voraus-ecat Python package provides a command line interface for Python code generation. The example code contains the bus definition (EtherCAT devices and PDOs) and can be used as described below.

voraus-ecat generate URL FILE [--instant-communication]
  • URL: The URL of the OPC UA Server of the voraus EtherCAT Master.

  • FILE: The output file path for the generated code.

  • [instant-communication]: If set, use instant communication mode.

example.py

 1"""Autogenerated code for cyclic communication mode."""
 2
 3from voraus_ecat import EtherCAT, ProcessData, pdo
 4
 5
 6class Inputs(ProcessData):
 7    """Defines process inputs."""
 8
 9    def __init__(self) -> None:
10        """Initializes process inputs."""
11        super().__init__()
12
13        self.term1_vr1122_status = pdo.Unknown("1:Term1 VR1122.Status")
14        self.term1_vr1122_1_analog_input_chn_1 = pdo.Integer8("1:Term1 VR1122.1:Analog Input Chn 1")
15        self.term2_vr1124_1_barcode_input_1 = pdo.VisibleString("1:Term2 VR1124.1:Barcode Input 1")
16        self.term2_vr1124_1_analog_input_chn_2 = pdo.Integer8("1:Term2 VR1124.1:Analog Input Chn 2")
17
18
19class Outputs(ProcessData):
20    """Defines process outputs."""
21
22    def __init__(self) -> None:
23        """Initializes process outputs."""
24        super().__init__()
25
26        self.term2_vr1124_1_analog_output_chn_3 = pdo.Integer8("1:Term2 VR1124.1:Analog Output Chn 3")
27        self.term2_vr1124_1_display_output_1 = pdo.VisibleString("1:Term2 VR1124.1:Display Output 1")
28
29
class voraus_ecat.EtherCAT(inputs, outputs, instant_communication=False)

Bases: EtherCAT[InputsT, OutputsT]

Initializes the EtherCAT bus client.

Parameters:
  • inputs (TypeVar(InputsT, bound= ProcessData)) – The process image inputs.

  • outputs (TypeVar(OutputsT, bound= ProcessData)) – The process image outputs.

  • instant_communication (bool) – Enables the instant communication mode. Defaults to False.

connection(url)

Creates an OPC UA connection to the EtherCAT master.

Parameters:

url (str) – The URL of the EtherCAT master.

Yields:

None.

Return type:

Generator[None, None, None]

get_state()

Gets the EtherCAT state of the master.

Return type:

State

Returns:

The EtherCAT state of the master.

read_pdo_inputs()

Reads the PDO inputs from the OPC UA server if instant communication mode is disabled.

Raises:

RuntimeError – If instant communication mode is enabled.

Return type:

None

read_pdo_outputs()

Reads the PDO outputs from the OPC UA server if instant communication mode is disabled.

Raises:

RuntimeError – If instant communication mode is enabled.

Return type:

None

read_pdos()

Reads the PDO values from the OPC UA server if instant communication mode is disabled.

This method reads all PDO input and output values from the EtherCAT master.

Raises:

RuntimeError – If instant communication mode is enabled.

Return type:

None

set_op_state(timeout=10.0)

Sets the state of the EtherCAT master to OP (operational).

Parameters:

timeout (float) – The timeout in seconds. Defaults to 10.0.

Return type:

None

set_state(state, timeout=10)

Sets the state of the EtherCAT master.

Parameters:
  • state (int | State) – The requested state.

  • timeout (float) – The timeout in seconds. Defaults to 10.

Raises:

TimeoutError – If the state is not reached within timeout.

Return type:

None

write_pdos()

Writes the (changed) PDO outputs to the OPC UA server if instant communication mode is disabled.

Raises:

RuntimeError – If instant communication mode is enabled.

Return type:

None

class voraus_ecat.ProcessData

Bases: ProcessData

Initializes the EtherCAT process data inputs or outputs.

class voraus_ecat.State(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: IntEnum

Represents the EtherCAT states.

INIT = 1
OP = 8
PRE_OP = 2
SAFE_OP = 4

Submodules

voraus_ecat.pdo module

The public-facing interface for PDOs.

class voraus_ecat.pdo.ArrayOfDInt(name)

Bases: _ArrayOfDInt

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

list[int]

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (list[int]) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.ArrayOfInt(name)

Bases: _ArrayOfInt

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

list[int]

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (list[int]) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.ArrayOfSInt(name)

Bases: _ArrayOfSInt

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

list[int]

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (list[int]) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.ArrayOfUDint(name)

Bases: _ArrayOfUDint

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

list[int]

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (list[int]) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Bit1(name)

Bases: _Bit1

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Bit10(name)

Bases: _Bit10

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Bit11(name)

Bases: _Bit11

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Bit12(name)

Bases: _Bit12

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Bit13(name)

Bases: _Bit13

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Bit14(name)

Bases: _Bit14

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Bit15(name)

Bases: _Bit15

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Bit16(name)

Bases: _Bit16

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Bit2(name)

Bases: _Bit2

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Bit3(name)

Bases: _Bit3

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Bit4(name)

Bases: _Bit4

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Bit5(name)

Bases: _Bit5

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Bit6(name)

Bases: _Bit6

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Bit7(name)

Bases: _Bit7

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Bit8(name)

Bases: _Bit8

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Bit9(name)

Bases: _Bit9

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

PY_TYPE: str = 'int'
UA_VARIANT: Variant = 5
decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.BitArr16(name)

Bases: _BitArr16

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.BitArr32(name)

Bases: _BitArr32

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.BitArr8(name)

Bases: _BitArr8

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Boolean(name)

Bases: _Boolean

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

bool

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (bool) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Byte(name)

Bases: _Byte

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.DWord(name)

Bases: _DWord

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Guid(name)

Bases: _Guid

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

UUID

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (UUID) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Integer16(name)

Bases: _Integer16

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Integer24(name)

Bases: _Integer24

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Integer32(name)

Bases: _Integer32

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Integer40(name)

Bases: _Integer40

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Integer48(name)

Bases: _Integer48

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Integer56(name)

Bases: _Integer56

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Integer64(name)

Bases: _Integer64

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Integer8(name)

Bases: _Integer8

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.OctetString(name)

Bases: _OctetString

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

list[int]

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (list[int]) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Real32(name)

Bases: _Real32

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

float

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (float) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Real64(name)

Bases: _Real64

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

float

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (float) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.UnicodeString(name)

Bases: _UnicodeString

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

list[int]

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (list[int]) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Unknown(name)

Bases: _Unknown

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

list[int]

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (list[int]) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Unsigned16(name)

Bases: _Unsigned16

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Unsigned24(name)

Bases: _Unsigned24

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Unsigned32(name)

Bases: _Unsigned32

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Unsigned40(name)

Bases: _Unsigned40

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Unsigned48(name)

Bases: _Unsigned48

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Unsigned56(name)

Bases: _Unsigned56

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Unsigned64(name)

Bases: _Unsigned64

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Unsigned8(name)

Bases: _Unsigned8

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.VisibleString(name)

Bases: _VisibleString

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

str

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (str) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.

class voraus_ecat.pdo.Word(name)

Bases: _Word

Initializes the PDO.

Parameters:

name (str) – The name of the PDO OPC UA node.

decode(value)

Decodes the PDO value received over OPC UA.

Parameters:

value (Variant) – The OPC UA value as variant.

Return type:

int

Returns:

The decoded PDO value.

encode(value)

Encodes the PDO value for OPC UA communication.

Parameters:

value (int) – The new PDO value.

Return type:

Variant

Returns:

The encoded PDO value.