cpx_io.cpx_system package
Subpackages
- cpx_io.cpx_system.cpx_ap package
- Subpackages
- cpx_io.cpx_system.cpx_ap.builder package
- Submodules
- cpx_io.cpx_system.cpx_ap.builder.ap_module_builder module
- cpx_io.cpx_system.cpx_ap.builder.apdd_information_builder module
- cpx_io.cpx_system.cpx_ap.builder.channel_builder module
- cpx_io.cpx_system.cpx_ap.builder.diagnosis_builder module
- cpx_io.cpx_system.cpx_ap.builder.parameter_builder module
- cpx_io.cpx_system.cpx_ap.builder.physical_quantity_builder module
- Module contents
- cpx_io.cpx_system.cpx_ap.dataclasses package
- Submodules
- cpx_io.cpx_system.cpx_ap.dataclasses.apdd_information module
- cpx_io.cpx_system.cpx_ap.dataclasses.channels module
- cpx_io.cpx_system.cpx_ap.dataclasses.module_diagnosis module
- cpx_io.cpx_system.cpx_ap.dataclasses.module_parameters module
- cpx_io.cpx_system.cpx_ap.dataclasses.system_parameters module
- Module contents
- cpx_io.cpx_system.cpx_ap.builder package
- Submodules
- cpx_io.cpx_system.cpx_ap.ap_docu_generator module
- cpx_io.cpx_system.cpx_ap.ap_modbus_registers module
- cpx_io.cpx_system.cpx_ap.ap_module module
ApModuleApModule.is_function_supported()ApModule.read_output_channels()ApModule.read_channels()ApModule.read_output_channel()ApModule.read_channel()ApModule.write_channels()ApModule.write_channel()ApModule.set_channel()ApModule.reset_channel()ApModule.toggle_channel()ApModule.write_module_parameter()ApModule.get_parameter_from_identifier()ApModule.read_module_parameter()ApModule.read_module_parameter_enum_str()ApModule.read_diagnosis_code()ApModule.read_present_state()ApModule.read_diagnosis_information()ApModule.read_system_parameters()ApModule.read_pqi()ApModule.read_fieldbus_parameters()ApModule.cast_channel_argument_to_list()ApModule.read_isdu()ApModule.write_isdu()ApModule.change_variant()
- cpx_io.cpx_system.cpx_ap.ap_parameter module
- cpx_io.cpx_system.cpx_ap.ap_product_categories module
ProductCategoryProductCategory.INTERFACEProductCategory.ANALOGProductCategory.DIGITALProductCategory.MOTIONProductCategory.SERVO_DRIVESProductCategory.SAFETYProductCategory.IO_LINKProductCategory.INFRASTRUCTUREProductCategory.MPA_LProductCategory.MPA_SProductCategory.VTSAProductCategory.VTUGProductCategory.VTUXProductCategory.VTOMProductCategory.CONTROLLERS
- cpx_io.cpx_system.cpx_ap.ap_supported_datatypes module
- cpx_io.cpx_system.cpx_ap.ap_supported_functions module
- cpx_io.cpx_system.cpx_ap.cpx_ap module
CpxApCpxAp.ApInformationCpxAp.DiagnosticsCpxAp.shutdown()CpxAp.perform_io()CpxAp.delete_apdds()CpxAp.create_apdd_path()CpxAp.create_docu_path()CpxAp.modulesCpxAp.apdd_pathCpxAp.docu_pathCpxAp.set_timeout()CpxAp.read_module_count()CpxAp.print_system_information()CpxAp.print_system_state()CpxAp.read_apdd_information()CpxAp.read_diagnostic_status()CpxAp.read_global_diagnosis_state()CpxAp.read_active_diagnosis_count()CpxAp.read_latest_diagnosis_index()CpxAp.read_latest_diagnosis_code()CpxAp.write_parameter()CpxAp.read_parameter()
- Module contents
- Subpackages
- cpx_io.cpx_system.cpx_e package
- Submodules
- cpx_io.cpx_system.cpx_e.cpx_e module
- cpx_io.cpx_system.cpx_e.cpx_e_enums module
- cpx_io.cpx_system.cpx_e.cpx_e_modbus_registers module
- cpx_io.cpx_system.cpx_e.cpx_e_module_definitions module
- cpx_io.cpx_system.cpx_e.cpx_e_supported_datatypes module
- cpx_io.cpx_system.cpx_e.e16di module
- cpx_io.cpx_system.cpx_e.e1ci module
CpxE1CiCpxE1Ci.StatusWordCpxE1Ci.ProcessDataCpxE1Ci.read_value()CpxE1Ci.read_latching_value()CpxE1Ci.read_status_word()CpxE1Ci.read_process_data()CpxE1Ci.write_process_data()CpxE1Ci.read_status()CpxE1Ci.configure_signal_type()CpxE1Ci.configure_signal_evaluation()CpxE1Ci.configure_monitoring_of_cable_brake()CpxE1Ci.configure_monitoring_of_tracking_error()CpxE1Ci.configure_monitoring_of_zero_pulse()CpxE1Ci.configure_pulses_per_zero_pulse()CpxE1Ci.configure_latching_signal()CpxE1Ci.configure_latching_event()CpxE1Ci.configure_latching_response()CpxE1Ci.configure_upper_counter_limit()CpxE1Ci.configure_lower_counter_limit()CpxE1Ci.configure_load_value()CpxE1Ci.configure_debounce_time_for_digital_inputs()CpxE1Ci.configure_integration_time_for_speed_measurement()
- cpx_io.cpx_system.cpx_e.e4aiui module
CpxE4AiUICpxE4AiUI.read_channels()CpxE4AiUI.read_status()CpxE4AiUI.read_channel()CpxE4AiUI.configure_diagnostics()CpxE4AiUI.configure_power_reset()CpxE4AiUI.configure_data_format()CpxE4AiUI.configure_sensor_supply()CpxE4AiUI.configure_diagnostics_overload()CpxE4AiUI.configure_behaviour_overload()CpxE4AiUI.configure_hysteresis_limit_monitoring()CpxE4AiUI.configure_channel_diagnostics_limits()CpxE4AiUI.configure_channel_diagnostics_wire_break()CpxE4AiUI.configure_channel_diagnostics_underflow_overflow()CpxE4AiUI.configure_channel_diagnostics_parameter_error()CpxE4AiUI.configure_channel_range()CpxE4AiUI.configure_channel_smoothing()CpxE4AiUI.configure_channel_limits()
- cpx_io.cpx_system.cpx_e.e4aoui module
CpxE4AoUICpxE4AoUI.read_channels()CpxE4AoUI.read_status()CpxE4AoUI.read_channel()CpxE4AoUI.write_channels()CpxE4AoUI.write_channel()CpxE4AoUI.configure_diagnostics()CpxE4AoUI.configure_power_reset()CpxE4AoUI.configure_behaviour_overload()CpxE4AoUI.configure_data_format()CpxE4AoUI.configure_actuator_supply()CpxE4AoUI.configure_channel_diagnostics_wire_break()CpxE4AoUI.configure_channel_diagnostics_overload_short_circuit()CpxE4AoUI.configure_channel_diagnostics_parameter_error()CpxE4AoUI.configure_channel_range()
- cpx_io.cpx_system.cpx_e.e4iol module
CpxE4IolCpxE4Iol.read_status()CpxE4Iol.read_channels()CpxE4Iol.read_channel()CpxE4Iol.write_channel()CpxE4Iol.write_channels()CpxE4Iol.configure_monitoring_uload()CpxE4Iol.configure_behaviour_after_scl()CpxE4Iol.configure_behaviour_after_sco()CpxE4Iol.configure_ps_supply()CpxE4Iol.configure_cycle_time()CpxE4Iol.configure_pl_supply()CpxE4Iol.configure_operating_mode()CpxE4Iol.read_line_state()CpxE4Iol.read_device_error()CpxE4Iol.read_isdu()CpxE4Iol.write_isdu()
- cpx_io.cpx_system.cpx_e.e8do module
- cpx_io.cpx_system.cpx_e.eep module
- Module contents
Submodules
cpx_io.cpx_system.cpx_base module
CPX Base
- exception cpx_io.cpx_system.cpx_base.CpxInitError(message='Module must be part of a Cpx class. Use add_module() to add it')
Bases:
ExceptionError should be raised if a cpx-… module is instanciated without connecting it to a base module. Connect it to the cpx by adding it with add_module(<object instance>)
- exception cpx_io.cpx_system.cpx_base.CpxRequestError(message='Request failed')
Bases:
ExceptionError should be raised if a parameter or register request is denied
- exception cpx_io.cpx_system.cpx_base.CpxConnectionError(message='Failed to connect to the CPX system.Check your connection and network configuration.')
Bases:
ExceptionError should be raised when a connection to the CPX system fails.
- class cpx_io.cpx_system.cpx_base.CpxBase(ip_address: str | None = None)
Bases:
objectA class to connect to the Festo CPX system and read data from IO modules
Constructor of CpxBase class.
- Parameters:
ip_address (str) – Required IP address as string e.g. (‘192.168.1.1’)
- update_module_names()
Updates the module name list and attributes accordingly
- shutdown()
Shutdown function
- reconnect()
Shutdown modbus connection and reconnect
- connected() bool
Returns information about connection status
- check_connection_and_try_reconnect()
checks the modbus connection and tries to reconnect if the connection is timedout
- read_device_info() dict
Reads device info from the CPX system and returns dict with containing values
return: Contains device information values rtype: dict
- read_reg_data(register: int, length: int = 1) bytes
Reads and returns register(s) from Modbus server without interpreting the data
- Parameters:
register (int) – adress of the first register to read
length (int) – number of registers to read (default: 1)
- Returns:
Register(s) content
- Return type:
bytes
- write_reg_data(data: bytes, register: int) None
Write bytes object data to register(s).
- Parameters:
data (bytes) – data to write to the register(s)
register (int) – adress of the first register to write
- write_reg_data_with_single_cmds(data: bytes, register: int) None
Write bytes object data to register(s), with only single register writes. This is necessary for some firmware on particular addresses, where multiple register writes are not supported.
- Parameters:
data (bytes) – data to write to the register(s)
register (int) – adress of the first register to write
- static require_base(func)
For most module functions, a base is required that handles the registers, module numbering, etc.
cpx_io.cpx_system.cpx_dataclasses module
CPX SystemEntryRegisters dataclass
cpx_io.cpx_system.cpx_module module
CpxModule
cpx_io.cpx_system.io_thread module
cpx_io - IOThread class for handling I/O transfers in a separate thread.
- class cpx_io.cpx_system.io_thread.IOThread(perform_io=None, cycle_time: float = 0.01)
Bases:
ThreadClass to handle I/O transfers in a separate thread.
Constructor of the IOThread class.
- Parameters:
perform_io (function) – function that is called periodically (with interval cycle_time) and performs the I/O data transfer
cycle_time (float) – Cycle time that should be used for I/O transfers
- run()
Method that needs to be implemented by child.
- start()
Starts the thread.
- stop()
Stops the thread.