l5x-toolkit 1.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- l5x_toolkit-1.2.1/LICENSE +21 -0
- l5x_toolkit-1.2.1/MANIFEST.in +4 -0
- l5x_toolkit-1.2.1/PKG-INFO +160 -0
- l5x_toolkit-1.2.1/README.md +114 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/__init__.py +99 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/accessors.py +908 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/aoi.py +2350 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/component_export.py +1439 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/component_import.py +2040 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/core/__init__.py +40 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/core/cdata.py +219 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/core/config.py +109 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/core/constants.py +119 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/core/fbd_content.py +913 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/core/library.py +55 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/core/motion.py +134 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/core/portability.py +37 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/core/refs.py +304 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/core/sfc_content.py +812 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/core/st_content.py +199 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/core/tree.py +251 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/data_format.py +1416 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/io/__init__.py +1 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/io/transplant.py +241 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/mcp_server.py +2015 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/model/__init__.py +39 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/model/resolve.py +64 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/models.py +279 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/modules.py +401 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/ops/__init__.py +5 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/ops/axes.py +188 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/ops/fbd_layout.py +230 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/ops/graph_utils.py +215 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/ops/modules.py +218 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/ops/sfc_layout.py +306 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/ops/trends.py +197 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/plugin.py +463 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/plugins/__init__.py +9 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/programs.py +916 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/project.py +1089 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/query/__init__.py +14 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/query/constants.py +34 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/query/errors.py +2 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/query/inspect.py +187 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/query/inventory.py +265 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/query/references.py +244 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/query/resolver.py +367 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/refactor/__init__.py +10 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/refactor/alarm_ops.py +778 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/refactor/aoi_ops.py +1367 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/refactor/data_blocks.py +95 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/refactor/planner.py +309 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/refactor/rung_rewriter.py +128 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/refactor/typed_refs.py +351 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/refactor/types.py +208 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/refactor/udt_ops.py +585 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/__init__.py +42 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/catalog.py +436 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Atomic.json +23 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/ALARM_SET_CONTROL.json +16 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/EXT_ROUTINE_CONTROL.json +40 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/EXT_ROUTINE_PARAMETERS.json +9 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/FBD_BIT_FIELD_DISTRIBUTE.json +25 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/FBD_BOOLEAN_AND.json +31 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/FBD_BOOLEAN_NOT.json +17 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/FBD_BOOLEAN_OR.json +31 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/FBD_BOOLEAN_XOR.json +19 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/FBD_COMPARE.json +19 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/FBD_CONVERT.json +17 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/FBD_COUNTER.json +33 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/FBD_LIMIT.json +21 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/FBD_LOGICAL.json +19 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/FBD_MASKED_MOVE.json +21 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/FBD_MASK_EQUAL.json +21 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/FBD_MATH.json +19 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/FBD_MATH_ADVANCED.json +18 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/FBD_ONESHOT.json +17 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/FBD_TIMER.json +33 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/FBD_TRUNCATE.json +17 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/SERIAL_PORT_CONTROL.json +30 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/SFC_ACTION.json +21 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/SFC_STEP.json +43 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/General/SFC_STOP.json +17 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Motion/AXIS_CIP_DRIVE.json +385 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Motion/AXIS_VIRTUAL.json +103 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Motion/CAM.json +15 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Motion/CAM_PROFILE.json +11 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Motion/COORDINATE_SYSTEM.json +44 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Motion/MOTION_GROUP.json +17 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Motion/MOTION_INSTRUCTION.json +27 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Motion/OUTPUT_CAM.json +25 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Motion/OUTPUT_COMPENSATION.json +21 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Predefined/ALARM_ANALOG.json +35 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Predefined/ALARM_DIGITAL.json +105 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Predefined/CONNECTION_STATUS.json +13 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Predefined/CONTROL.json +29 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Predefined/COUNTER.json +23 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Predefined/MESSAGE.json +33 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Predefined/PID.json +107 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Predefined/STRING.json +13 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Predefined/TIMER.json +19 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/ALARM.json +57 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/CC.json +331 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/DEADTIME.json +54 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/DERIVATIVE.json +45 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/DISCRETE_2STATE.json +91 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/DISCRETE_3STATE.json +155 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/DOMINANT_RESET.json +21 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/DOMINANT_SET.json +21 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/FILTER_HIGH_PASS.json +51 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/FILTER_LOW_PASS.json +51 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/FILTER_NOTCH.json +55 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/FLIP_FLOP_D.json +23 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/FLIP_FLOP_JK.json +21 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/FUNCTION_GENERATOR.json +33 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/HL_LIMIT.json +35 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/HMIBC.json +20 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/IMC.json +166 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/INTEGRATOR.json +63 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/LEAD_LAG.json +55 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/LEAD_LAG_SEC_ORDER.json +65 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/MAXIMUM_CAPTURE.json +21 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/MINIMUM_CAPTURE.json +21 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/MMC.json +447 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/MOVING_AVERAGE.json +35 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/MOVING_STD_DEV.json +35 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/MULTIPLEXER.json +39 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/PIDE_AUTOTUNE.json +9 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/PID_ENHANCED.json +175 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/POSITION_PROP.json +71 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/PROP_INT.json +95 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/PULSE_MULTIPLIER.json +39 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/RAMP_SOAK.json +109 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/RATE_LIMITER.json +51 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/SCALE.json +37 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/SEC_ORDER_CONTROLLER.json +75 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/SELECT.json +21 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/SELECTABLE_NEGATE.json +19 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/SELECTED_SUMMER.json +65 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/SELECT_ENHANCED.json +79 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/SPLIT_RANGE.json +59 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/S_CURVE.json +67 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/TOTALIZER.json +99 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/Process_Drives/UP_DOWN_ACCUM.json +25 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/DataTypes/_index.md +49 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/General/01_Bit.json +276 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/General/02_Timer_Counter.json +372 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/General/03_Compare.json +464 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/General/04_Compute_Math.json +454 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/General/05_Move_Logical.json +595 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/General/06_Array_File_Misc.json +563 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/General/07_Array_File_Shift.json +378 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/General/08_Sequencer.json +225 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/General/09_Program_Control.json +440 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/General/10_For_Break.json +94 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/General/11_Special.json +356 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/General/12_Trigonometric.json +331 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/General/13_Advanced_Math.json +151 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/General/14_Math_Conversion.json +222 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/General/15_ASCII_Serial_Port.json +403 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/General/16_ASCII_String.json +309 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/General/17_ASCII_Conversion.json +248 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/General/18_Input_Output.json +222 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/General/19_Alarm.json +246 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/General/20_Debug_License.json +108 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/Motion/01_State.json +376 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/Motion/02_Move.json +1520 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/Motion/03_Group.json +184 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/Motion/04_Event.json +483 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/Motion/05_Configuration.json +200 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/Motion/06_Coordinated.json +1484 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/Process_Drives/01_Process.json +546 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/Process_Drives/02_Drives.json +213 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/Process_Drives/03_Filter.json +151 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/Process_Drives/04_Select_Limit.json +199 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/Process_Drives/05_Statistical.json +152 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/Process_Drives/06_Logical_Move.json +122 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/Process_Drives/07_Equipment_Phase.json +337 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/Process_Drives/08_Equipment_Sequence.json +272 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/Safety/01_Safety.json +1564 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/Safety/02_Metal_Form.json +1563 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/Safety/03_Drive_Safety.json +978 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/Safety/04_Safety_Legacy.json +581 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/_by_language/FBD.json +100 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/_by_language/LD.json +235 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/_by_language/ST.json +193 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/_fbd_structures.json +97 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/_index.json +1988 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/Instructions/_mnemonic_aliases.json +86 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/PROVENANCE.md +80 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/reference/data/validate.py.reference +125 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/rll_content.py +421 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/rungs.py +1284 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/schema.py +1682 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/server/__init__.py +1 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/server/envelope.py +88 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/server/reads.py +141 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/server/tools_lifecycle.py +300 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/server/tools_structural.py +1135 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/server/tools_write.py +2528 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/tags.py +3316 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/type_resolver.py +201 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/udt.py +1356 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/utils.py +304 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/validate/__init__.py +163 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/validate/fbd.py +532 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/validate/instructions.py +217 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/validate/modules.py +40 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/validate/report.py +40 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/validate/sfc.py +632 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/validate/xsd.py +96 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/validator.py +2113 -0
- l5x_toolkit-1.2.1/l5x_agent_toolkit/version.py +423 -0
- l5x_toolkit-1.2.1/l5x_toolkit.egg-info/PKG-INFO +160 -0
- l5x_toolkit-1.2.1/l5x_toolkit.egg-info/SOURCES.txt +298 -0
- l5x_toolkit-1.2.1/l5x_toolkit.egg-info/dependency_links.txt +1 -0
- l5x_toolkit-1.2.1/l5x_toolkit.egg-info/entry_points.txt +2 -0
- l5x_toolkit-1.2.1/l5x_toolkit.egg-info/requires.txt +10 -0
- l5x_toolkit-1.2.1/l5x_toolkit.egg-info/top_level.txt +1 -0
- l5x_toolkit-1.2.1/pyproject.toml +90 -0
- l5x_toolkit-1.2.1/setup.cfg +4 -0
- l5x_toolkit-1.2.1/setup.py +69 -0
- l5x_toolkit-1.2.1/tests/test_alarm.py +658 -0
- l5x_toolkit-1.2.1/tests/test_alarm_array_convention.py +251 -0
- l5x_toolkit-1.2.1/tests/test_alarm_nested_udt.py +410 -0
- l5x_toolkit-1.2.1/tests/test_alarm_rebuild.py +469 -0
- l5x_toolkit-1.2.1/tests/test_aoi.py +189 -0
- l5x_toolkit-1.2.1/tests/test_aoi_call_placeholders.py +70 -0
- l5x_toolkit-1.2.1/tests/test_aoi_construction.py +400 -0
- l5x_toolkit-1.2.1/tests/test_aoi_construction_integration.py +169 -0
- l5x_toolkit-1.2.1/tests/test_aoi_l5k_rebuild.py +347 -0
- l5x_toolkit-1.2.1/tests/test_aoi_rung_edit.py +295 -0
- l5x_toolkit-1.2.1/tests/test_aoi_st_seams.py +84 -0
- l5x_toolkit-1.2.1/tests/test_change_datatype.py +391 -0
- l5x_toolkit-1.2.1/tests/test_config_defaults.py +60 -0
- l5x_toolkit-1.2.1/tests/test_config_references.py +149 -0
- l5x_toolkit-1.2.1/tests/test_create_tag.py +568 -0
- l5x_toolkit-1.2.1/tests/test_data_format.py +318 -0
- l5x_toolkit-1.2.1/tests/test_docs_surface.py +126 -0
- l5x_toolkit-1.2.1/tests/test_envelope.py +90 -0
- l5x_toolkit-1.2.1/tests/test_envelope_conformance.py +104 -0
- l5x_toolkit-1.2.1/tests/test_exception_mapping.py +32 -0
- l5x_toolkit-1.2.1/tests/test_export_component_envelope.py +52 -0
- l5x_toolkit-1.2.1/tests/test_extended_validation.py +913 -0
- l5x_toolkit-1.2.1/tests/test_fbd_content.py +637 -0
- l5x_toolkit-1.2.1/tests/test_fbd_layout.py +515 -0
- l5x_toolkit-1.2.1/tests/test_fbd_pins.py +352 -0
- l5x_toolkit-1.2.1/tests/test_fbd_sfc_seam_fixes.py +233 -0
- l5x_toolkit-1.2.1/tests/test_find_tag_resolution.py +70 -0
- l5x_toolkit-1.2.1/tests/test_gap_p0_fixes.py +88 -0
- l5x_toolkit-1.2.1/tests/test_gap_p1_operand_counts.py +27 -0
- l5x_toolkit-1.2.1/tests/test_gap_p2_aoi_instructions.py +32 -0
- l5x_toolkit-1.2.1/tests/test_graph_utils.py +147 -0
- l5x_toolkit-1.2.1/tests/test_import_alarm_defs.py +489 -0
- l5x_toolkit-1.2.1/tests/test_import_component_envelope.py +69 -0
- l5x_toolkit-1.2.1/tests/test_import_transplant.py +797 -0
- l5x_toolkit-1.2.1/tests/test_instantiate_tag.py +440 -0
- l5x_toolkit-1.2.1/tests/test_instruction_languages.py +536 -0
- l5x_toolkit-1.2.1/tests/test_instruction_validation.py +378 -0
- l5x_toolkit-1.2.1/tests/test_layer_imports.py +55 -0
- l5x_toolkit-1.2.1/tests/test_load_project_envelope.py +41 -0
- l5x_toolkit-1.2.1/tests/test_manage_aoi.py +2236 -0
- l5x_toolkit-1.2.1/tests/test_manage_axes.py +85 -0
- l5x_toolkit-1.2.1/tests/test_manage_blocks.py +802 -0
- l5x_toolkit-1.2.1/tests/test_manage_lines.py +86 -0
- l5x_toolkit-1.2.1/tests/test_manage_modules.py +103 -0
- l5x_toolkit-1.2.1/tests/test_manage_steps.py +797 -0
- l5x_toolkit-1.2.1/tests/test_manage_tags_envelope.py +76 -0
- l5x_toolkit-1.2.1/tests/test_manage_trends.py +103 -0
- l5x_toolkit-1.2.1/tests/test_manage_udt.py +518 -0
- l5x_toolkit-1.2.1/tests/test_mcp_build_tools.py +373 -0
- l5x_toolkit-1.2.1/tests/test_mcp_server.py +2051 -0
- l5x_toolkit-1.2.1/tests/test_member_references.py +261 -0
- l5x_toolkit-1.2.1/tests/test_motion.py +242 -0
- l5x_toolkit-1.2.1/tests/test_motion_seam.py +69 -0
- l5x_toolkit-1.2.1/tests/test_operand_classification.py +51 -0
- l5x_toolkit-1.2.1/tests/test_operand_edge_cases.py +215 -0
- l5x_toolkit-1.2.1/tests/test_p6_4_aoi_timestamp_contract.py +789 -0
- l5x_toolkit-1.2.1/tests/test_p6_5_round_trip_hardening.py +734 -0
- l5x_toolkit-1.2.1/tests/test_plugins.py +620 -0
- l5x_toolkit-1.2.1/tests/test_programs.py +197 -0
- l5x_toolkit-1.2.1/tests/test_propagation_regressions.py +217 -0
- l5x_toolkit-1.2.1/tests/test_reference_bridge.py +380 -0
- l5x_toolkit-1.2.1/tests/test_reference_lookup_tools.py +281 -0
- l5x_toolkit-1.2.1/tests/test_replace_operand.py +50 -0
- l5x_toolkit-1.2.1/tests/test_reserved_cells.py +62 -0
- l5x_toolkit-1.2.1/tests/test_rll_content.py +429 -0
- l5x_toolkit-1.2.1/tests/test_rung_syntax.py +81 -0
- l5x_toolkit-1.2.1/tests/test_rung_types.py +281 -0
- l5x_toolkit-1.2.1/tests/test_schema_arity.py +71 -0
- l5x_toolkit-1.2.1/tests/test_schema_drift.py +106 -0
- l5x_toolkit-1.2.1/tests/test_sfc_content.py +719 -0
- l5x_toolkit-1.2.1/tests/test_sfc_layout.py +432 -0
- l5x_toolkit-1.2.1/tests/test_tool_surface.py +579 -0
- l5x_toolkit-1.2.1/tests/test_topo_sort_on_save.py +420 -0
- l5x_toolkit-1.2.1/tests/test_type_resolver.py +228 -0
- l5x_toolkit-1.2.1/tests/test_udt_bit_overlays.py +417 -0
- l5x_toolkit-1.2.1/tests/test_udt_construction.py +274 -0
- l5x_toolkit-1.2.1/tests/test_udt_rename_and_cdata.py +277 -0
- l5x_toolkit-1.2.1/tests/test_version.py +366 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Megan Fox
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: l5x-toolkit
|
|
3
|
+
Version: 1.2.1
|
|
4
|
+
Summary: AI Agent Toolkit for Rockwell Automation L5X file manipulation
|
|
5
|
+
Home-page: https://github.com/Axiara/l5x-toolkit
|
|
6
|
+
Author: Megan Fox
|
|
7
|
+
License: MIT
|
|
8
|
+
Project-URL: Homepage, https://github.com/Axiara/l5x-toolkit
|
|
9
|
+
Project-URL: Repository, https://github.com/Axiara/l5x-toolkit
|
|
10
|
+
Project-URL: Issues, https://github.com/Axiara/l5x-toolkit/issues
|
|
11
|
+
Project-URL: Changelog, https://github.com/Axiara/l5x-toolkit/blob/main/CHANGELOG.md
|
|
12
|
+
Keywords: rockwell,studio5000,l5x,plc,mcp,automation,logix
|
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Manufacturing
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering
|
|
22
|
+
Requires-Python: >=3.12
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: lxml>=4.9.0
|
|
26
|
+
Provides-Extra: dev
|
|
27
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
28
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
29
|
+
Requires-Dist: ruff>=0.15.7; extra == "dev"
|
|
30
|
+
Requires-Dist: mypy>=1.11; extra == "dev"
|
|
31
|
+
Provides-Extra: mcp
|
|
32
|
+
Requires-Dist: mcp[cli]>=1.2.0; extra == "mcp"
|
|
33
|
+
Dynamic: author
|
|
34
|
+
Dynamic: classifier
|
|
35
|
+
Dynamic: description
|
|
36
|
+
Dynamic: description-content-type
|
|
37
|
+
Dynamic: home-page
|
|
38
|
+
Dynamic: keywords
|
|
39
|
+
Dynamic: license
|
|
40
|
+
Dynamic: license-file
|
|
41
|
+
Dynamic: project-url
|
|
42
|
+
Dynamic: provides-extra
|
|
43
|
+
Dynamic: requires-dist
|
|
44
|
+
Dynamic: requires-python
|
|
45
|
+
Dynamic: summary
|
|
46
|
+
|
|
47
|
+
# L5X Agent Toolkit
|
|
48
|
+
|
|
49
|
+

|
|
50
|
+

|
|
51
|
+

|
|
52
|
+
|
|
53
|
+
An MCP server that lets Claude safely read and modify Rockwell Studio 5000 L5X files — **every operation produces structurally correct output; the agent never hand-edits XML.**
|
|
54
|
+
|
|
55
|
+
You describe a PLC change in plain English; the toolkit translates it into byte-perfect L5X through validated functions that understand the schema, CDATA encoding, dual data-format synchronization, and Studio 5000's import rules.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Features
|
|
60
|
+
|
|
61
|
+
- **21 tools** covering tags, programs, rungs (RLL), ST lines, SFC charts, FBD sheets, alarms, I/O modules, AOIs, UDTs, axes, trends, and cross-reference analysis.
|
|
62
|
+
- **Native AOI/UDT editing** — Add-On Instructions and User-Defined Types are edited in place, not round-tripped through an export shell.
|
|
63
|
+
- **Pre-flight validation** — catch structural errors, missing references, and naming violations before you save.
|
|
64
|
+
- **Firmware v30–v38** — retarget projects across the supported range.
|
|
65
|
+
- **Plugin support** — register custom tools via entry points (see [PLUGINS.md](PLUGINS.md)).
|
|
66
|
+
- **Minimal dependencies** — `lxml` and the standard library, plus `mcp[cli]` for the server.
|
|
67
|
+
|
|
68
|
+
## Quick Start
|
|
69
|
+
|
|
70
|
+
Install from PyPI:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
pip install "l5x-toolkit[mcp]"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Or from source:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
git clone https://github.com/Axiara/l5x-toolkit.git
|
|
80
|
+
cd l5x-toolkit
|
|
81
|
+
pip install -e ".[mcp]"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Either way this installs `lxml` and `mcp[cli]`. Requires **Python 3.12+** (install 3.13 — see Getting Started). The import package is `l5x_agent_toolkit`.
|
|
85
|
+
|
|
86
|
+
Then register the MCP server:
|
|
87
|
+
|
|
88
|
+
**Claude Code:**
|
|
89
|
+
```bash
|
|
90
|
+
claude mcp add l5x-toolkit -- python -m l5x_agent_toolkit.mcp_server
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Claude Desktop:** Add to your `claude_desktop_config.json`:
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
"mcpServers": {
|
|
97
|
+
"l5x-toolkit": {
|
|
98
|
+
"command": "python",
|
|
99
|
+
"args": ["-m", "l5x_agent_toolkit.mcp_server"],
|
|
100
|
+
"env": {}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**New to Python?** See [Getting Started](docs/getting-started.md) for the full from-scratch setup (installing Python, PATH, and verifying the connection).
|
|
107
|
+
|
|
108
|
+
## Example Conversation
|
|
109
|
+
|
|
110
|
+
> **You:** Load my project at C:\Projects\Line4.L5X and tell me what is in it.
|
|
111
|
+
>
|
|
112
|
+
> **Claude:** *(calls `load_project`)* Loaded: Line4_Controller (1756-L83E, FW 35.11). The project has 12 programs, 847 tags, 6 AOIs, 3 UDTs, and 24 modules.
|
|
113
|
+
>
|
|
114
|
+
> **You:** Create a new program called PalletizerControl and schedule it under MainTask.
|
|
115
|
+
>
|
|
116
|
+
> **Claude:** *(calls `manage_programs` twice — once to create, once to schedule)* Done. Created program 'PalletizerControl' with a MainRoutine and scheduled it under MainTask.
|
|
117
|
+
>
|
|
118
|
+
> **You:** Add a DINT tag called PalletizerState, then add a rung that sets it to 1 when StartPB is pressed.
|
|
119
|
+
>
|
|
120
|
+
> **Claude:** *(calls `manage_tags`, then `manage_rungs`)* Created the tag and added the rung: `XIC(StartPB)MOV(1,PalletizerState);`
|
|
121
|
+
>
|
|
122
|
+
> **You:** Validate and save to C:\Projects\Line4_updated.L5X
|
|
123
|
+
>
|
|
124
|
+
> **Claude:** *(calls `validate`, then `save_project`)* Validation passed with 0 errors. Saved to C:\Projects\Line4_updated.L5X.
|
|
125
|
+
|
|
126
|
+
## Documentation
|
|
127
|
+
|
|
128
|
+
| Document | Description |
|
|
129
|
+
|----------|-------------|
|
|
130
|
+
| [Documentation index](docs/README.md) | The docs hub — Using vs Contributing tracks |
|
|
131
|
+
| [Getting Started](docs/getting-started.md) | Install Python, the toolkit, and the MCP server, from zero |
|
|
132
|
+
| [Cookbook](docs/cookbook.md) | Task recipes — what to ask Claude, and which tools run |
|
|
133
|
+
| [Tool Reference](docs/tool-reference.md) | All 21 tools with parameters and behavior |
|
|
134
|
+
| [Architecture](docs/architecture.md) | The layered design and the 21-tool surface |
|
|
135
|
+
| [Development & Roadmap](docs/development.md) | Status, supported scope, known limitations, roadmap |
|
|
136
|
+
| [Changelog](CHANGELOG.md) | Version history |
|
|
137
|
+
| [Contributing](CONTRIBUTING.md) | Setup, tests, and how to contribute |
|
|
138
|
+
|
|
139
|
+
## Project Structure
|
|
140
|
+
|
|
141
|
+
The package is layered; `lxml` is isolated to `core/`. See [Architecture](docs/architecture.md) for detail.
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
l5x_agent_toolkit/
|
|
145
|
+
core/ XML tree, CDATA, reference scanner, config — the only layer that imports lxml
|
|
146
|
+
model/ typed DTOs / view objects
|
|
147
|
+
query/ read-only projections: inspect, inventory/list, references, resolver
|
|
148
|
+
ops/ language & structural operation helpers
|
|
149
|
+
validate/ typed Finding/Report checks (default + opt-in families)
|
|
150
|
+
server/ MCP tool wrappers (envelope, reads, write/structural/lifecycle dispatch)
|
|
151
|
+
mcp_server.py registers the 21 tools over stdio
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## License
|
|
155
|
+
|
|
156
|
+
MIT License. See [LICENSE](LICENSE) for details.
|
|
157
|
+
|
|
158
|
+
Created by Megan Fox. Uses [lxml](https://lxml.de/) for XML processing and the [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk) for the Model Context Protocol server.
|
|
159
|
+
|
|
160
|
+
Rockwell Automation, Studio 5000, Logix Designer, and RSLogix 5000 are trademarks of Rockwell Automation, Inc. This toolkit is not affiliated with or endorsed by Rockwell Automation.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# L5X Agent Toolkit
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
An MCP server that lets Claude safely read and modify Rockwell Studio 5000 L5X files — **every operation produces structurally correct output; the agent never hand-edits XML.**
|
|
8
|
+
|
|
9
|
+
You describe a PLC change in plain English; the toolkit translates it into byte-perfect L5X through validated functions that understand the schema, CDATA encoding, dual data-format synchronization, and Studio 5000's import rules.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
|
|
15
|
+
- **21 tools** covering tags, programs, rungs (RLL), ST lines, SFC charts, FBD sheets, alarms, I/O modules, AOIs, UDTs, axes, trends, and cross-reference analysis.
|
|
16
|
+
- **Native AOI/UDT editing** — Add-On Instructions and User-Defined Types are edited in place, not round-tripped through an export shell.
|
|
17
|
+
- **Pre-flight validation** — catch structural errors, missing references, and naming violations before you save.
|
|
18
|
+
- **Firmware v30–v38** — retarget projects across the supported range.
|
|
19
|
+
- **Plugin support** — register custom tools via entry points (see [PLUGINS.md](PLUGINS.md)).
|
|
20
|
+
- **Minimal dependencies** — `lxml` and the standard library, plus `mcp[cli]` for the server.
|
|
21
|
+
|
|
22
|
+
## Quick Start
|
|
23
|
+
|
|
24
|
+
Install from PyPI:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install "l5x-toolkit[mcp]"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Or from source:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
git clone https://github.com/Axiara/l5x-toolkit.git
|
|
34
|
+
cd l5x-toolkit
|
|
35
|
+
pip install -e ".[mcp]"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Either way this installs `lxml` and `mcp[cli]`. Requires **Python 3.12+** (install 3.13 — see Getting Started). The import package is `l5x_agent_toolkit`.
|
|
39
|
+
|
|
40
|
+
Then register the MCP server:
|
|
41
|
+
|
|
42
|
+
**Claude Code:**
|
|
43
|
+
```bash
|
|
44
|
+
claude mcp add l5x-toolkit -- python -m l5x_agent_toolkit.mcp_server
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Claude Desktop:** Add to your `claude_desktop_config.json`:
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"mcpServers": {
|
|
51
|
+
"l5x-toolkit": {
|
|
52
|
+
"command": "python",
|
|
53
|
+
"args": ["-m", "l5x_agent_toolkit.mcp_server"],
|
|
54
|
+
"env": {}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**New to Python?** See [Getting Started](docs/getting-started.md) for the full from-scratch setup (installing Python, PATH, and verifying the connection).
|
|
61
|
+
|
|
62
|
+
## Example Conversation
|
|
63
|
+
|
|
64
|
+
> **You:** Load my project at C:\Projects\Line4.L5X and tell me what is in it.
|
|
65
|
+
>
|
|
66
|
+
> **Claude:** *(calls `load_project`)* Loaded: Line4_Controller (1756-L83E, FW 35.11). The project has 12 programs, 847 tags, 6 AOIs, 3 UDTs, and 24 modules.
|
|
67
|
+
>
|
|
68
|
+
> **You:** Create a new program called PalletizerControl and schedule it under MainTask.
|
|
69
|
+
>
|
|
70
|
+
> **Claude:** *(calls `manage_programs` twice — once to create, once to schedule)* Done. Created program 'PalletizerControl' with a MainRoutine and scheduled it under MainTask.
|
|
71
|
+
>
|
|
72
|
+
> **You:** Add a DINT tag called PalletizerState, then add a rung that sets it to 1 when StartPB is pressed.
|
|
73
|
+
>
|
|
74
|
+
> **Claude:** *(calls `manage_tags`, then `manage_rungs`)* Created the tag and added the rung: `XIC(StartPB)MOV(1,PalletizerState);`
|
|
75
|
+
>
|
|
76
|
+
> **You:** Validate and save to C:\Projects\Line4_updated.L5X
|
|
77
|
+
>
|
|
78
|
+
> **Claude:** *(calls `validate`, then `save_project`)* Validation passed with 0 errors. Saved to C:\Projects\Line4_updated.L5X.
|
|
79
|
+
|
|
80
|
+
## Documentation
|
|
81
|
+
|
|
82
|
+
| Document | Description |
|
|
83
|
+
|----------|-------------|
|
|
84
|
+
| [Documentation index](docs/README.md) | The docs hub — Using vs Contributing tracks |
|
|
85
|
+
| [Getting Started](docs/getting-started.md) | Install Python, the toolkit, and the MCP server, from zero |
|
|
86
|
+
| [Cookbook](docs/cookbook.md) | Task recipes — what to ask Claude, and which tools run |
|
|
87
|
+
| [Tool Reference](docs/tool-reference.md) | All 21 tools with parameters and behavior |
|
|
88
|
+
| [Architecture](docs/architecture.md) | The layered design and the 21-tool surface |
|
|
89
|
+
| [Development & Roadmap](docs/development.md) | Status, supported scope, known limitations, roadmap |
|
|
90
|
+
| [Changelog](CHANGELOG.md) | Version history |
|
|
91
|
+
| [Contributing](CONTRIBUTING.md) | Setup, tests, and how to contribute |
|
|
92
|
+
|
|
93
|
+
## Project Structure
|
|
94
|
+
|
|
95
|
+
The package is layered; `lxml` is isolated to `core/`. See [Architecture](docs/architecture.md) for detail.
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
l5x_agent_toolkit/
|
|
99
|
+
core/ XML tree, CDATA, reference scanner, config — the only layer that imports lxml
|
|
100
|
+
model/ typed DTOs / view objects
|
|
101
|
+
query/ read-only projections: inspect, inventory/list, references, resolver
|
|
102
|
+
ops/ language & structural operation helpers
|
|
103
|
+
validate/ typed Finding/Report checks (default + opt-in families)
|
|
104
|
+
server/ MCP tool wrappers (envelope, reads, write/structural/lifecycle dispatch)
|
|
105
|
+
mcp_server.py registers the 21 tools over stdio
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## License
|
|
109
|
+
|
|
110
|
+
MIT License. See [LICENSE](LICENSE) for details.
|
|
111
|
+
|
|
112
|
+
Created by Megan Fox. Uses [lxml](https://lxml.de/) for XML processing and the [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk) for the Model Context Protocol server.
|
|
113
|
+
|
|
114
|
+
Rockwell Automation, Studio 5000, Logix Designer, and RSLogix 5000 are trademarks of Rockwell Automation, Inc. This toolkit is not affiliated with or endorsed by Rockwell Automation.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"""
|
|
2
|
+
L5X Agent Toolkit - AI-driven manipulation of Rockwell Automation L5X files.
|
|
3
|
+
|
|
4
|
+
This toolkit provides validated, atomic operations for reading and modifying
|
|
5
|
+
Studio 5000 Logix Designer L5X project files. It is designed to be invoked
|
|
6
|
+
by an AI agent (via MCP or direct function calls) to ensure hyper-accurate
|
|
7
|
+
L5X file manipulation.
|
|
8
|
+
|
|
9
|
+
Core Design Principle:
|
|
10
|
+
The AI agent never touches raw XML. Instead, it invokes validated tool
|
|
11
|
+
functions that produce structurally correct XML every time.
|
|
12
|
+
|
|
13
|
+
Usage:
|
|
14
|
+
from l5x_agent_toolkit import L5XProject
|
|
15
|
+
|
|
16
|
+
# Load a project
|
|
17
|
+
project = L5XProject('path/to/project.L5X')
|
|
18
|
+
|
|
19
|
+
# Query operations
|
|
20
|
+
programs = project.list_programs()
|
|
21
|
+
tags = project.list_controller_tags()
|
|
22
|
+
summary = project.get_project_summary()
|
|
23
|
+
|
|
24
|
+
# Tag operations
|
|
25
|
+
from l5x_agent_toolkit import tags
|
|
26
|
+
tags.create_tag(project, 'MyTag', 'DINT', description='A counter')
|
|
27
|
+
tags.set_tag_value(project, 'MyTag', 42)
|
|
28
|
+
|
|
29
|
+
# Program/routine operations
|
|
30
|
+
from l5x_agent_toolkit import programs
|
|
31
|
+
programs.create_program(project, 'ConveyorControl', description='Conveyor logic')
|
|
32
|
+
programs.add_rung(project, 'ConveyorControl', 'MainRoutine',
|
|
33
|
+
'XIC(StartPB)OTE(MotorRun);', comment='Start motor')
|
|
34
|
+
|
|
35
|
+
# Rung operations
|
|
36
|
+
from l5x_agent_toolkit import rungs
|
|
37
|
+
errors = rungs.validate_rung_syntax('XIC(tag1)OTE(tag2);')
|
|
38
|
+
new_text = rungs.substitute_tags('XIC(OldTag)OTE(OldOut);',
|
|
39
|
+
{'OldTag': 'NewTag', 'OldOut': 'NewOut'})
|
|
40
|
+
|
|
41
|
+
# Import operations
|
|
42
|
+
from l5x_agent_toolkit import aoi, udt, modules
|
|
43
|
+
aoi.import_from_file(project, 'path/to/MyAOI.L5X')
|
|
44
|
+
udt.import_from_file(project, 'path/to/MyUDT.L5X')
|
|
45
|
+
modules.import_module(project, 'path/to/module_template.L5X',
|
|
46
|
+
name='VFD01', address='192.168.1.100')
|
|
47
|
+
|
|
48
|
+
# Validation
|
|
49
|
+
from l5x_agent_toolkit import validator
|
|
50
|
+
result = validator.validate_project(project)
|
|
51
|
+
if not result.is_valid:
|
|
52
|
+
print(result)
|
|
53
|
+
|
|
54
|
+
# Write the modified project
|
|
55
|
+
project.write('path/to/output.L5X')
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
__version__ = "1.2.1"
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def __getattr__(name):
|
|
62
|
+
"""Lazy import to avoid circular/missing module errors during development."""
|
|
63
|
+
if name == "L5XProject":
|
|
64
|
+
from .project import L5XProject
|
|
65
|
+
|
|
66
|
+
return L5XProject
|
|
67
|
+
if name in ("L5XPlugin", "PluginContext"):
|
|
68
|
+
from .plugin import L5XPlugin, PluginContext
|
|
69
|
+
|
|
70
|
+
return L5XPlugin if name == "L5XPlugin" else PluginContext
|
|
71
|
+
if name in ("core", "model", "query", "ops", "validate"):
|
|
72
|
+
import importlib
|
|
73
|
+
|
|
74
|
+
return importlib.import_module(f"{__name__}.{name}")
|
|
75
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
from l5x_agent_toolkit.refactor import aoi_ops, udt_ops # noqa: E402
|
|
79
|
+
from l5x_agent_toolkit.refactor.types import ( # noqa: E402
|
|
80
|
+
BindingRequirement,
|
|
81
|
+
RefactorAction,
|
|
82
|
+
RefactorPlan,
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
__all__ = [
|
|
86
|
+
"L5XProject",
|
|
87
|
+
"L5XPlugin",
|
|
88
|
+
"PluginContext",
|
|
89
|
+
"aoi_ops",
|
|
90
|
+
"udt_ops",
|
|
91
|
+
"RefactorAction",
|
|
92
|
+
"RefactorPlan",
|
|
93
|
+
"BindingRequirement",
|
|
94
|
+
"core",
|
|
95
|
+
"model",
|
|
96
|
+
"query",
|
|
97
|
+
"ops",
|
|
98
|
+
"validate",
|
|
99
|
+
]
|