PLC_Generation/L5X2ACD Compiler/compile_MTN6_MCM06.bat
2025-08-26 21:29:02 +04:00

91 lines
3.2 KiB
Batchfile

@echo off
echo ====================================
echo PLC Compilation: MTN6_MCM06
echo ====================================
echo.
cd /d "C:\Users\ilia.gurielidze\Projects\PLC Generation\L5X2ACD Compiler"
echo Working directory: %CD%
echo.
if not exist "C:\Users\ilia.gurielidze\Projects\PLC Generation\L5X2ACD Compiler\MTN6_MCM06.L5X" (
echo ERROR: L5X file not found: C:\Users\ilia.gurielidze\Projects\PLC Generation\L5X2ACD Compiler\MTN6_MCM06.L5X
pause
exit /b 1
)
echo Checking for Python 3.12...
py -3.12 --version >nul 2>&1
if errorlevel 1 (
echo.
echo ====================================
echo ERROR: Python 3.12 not found!
echo ====================================
echo.
echo This compilation requires Python 3.12 specifically.
echo.
echo INSTALLATION STEPS:
echo 1. Download Python 3.12 from: https://www.python.org/downloads/
echo 2. During installation, check 'Add Python to PATH'
echo 3. Verify installation: py -3.12 --version
echo.
echo ====================================
pause
exit /b 1
)
echo ✓ Python 3.12 found
echo Checking for Logix Designer SDK...
py -3.12 -c "import logix_designer_sdk" 2>nul
if errorlevel 1 (
echo.
echo ====================================
echo ERROR: Logix Designer SDK not found!
echo ====================================
echo.
echo The Logix Designer SDK is required for L5X to ACD compilation.
echo.
echo INSTALLATION STEPS:
echo 1. Install the logix_designer_sdk package with Python 3.12:
echo py -3.12 -m pip install logix_designer_sdk-2.0.1-py3-none-any.whl
echo.
echo 2. Or run the setup script first:
echo setup_windows_sdk.bat
echo.
echo 3. Make sure you have Logix Designer installed on this Windows machine
echo.
echo ====================================
pause
exit /b 1
)
echo ✓ Logix Designer SDK found
echo.
echo Input L5X file: C:\Users\ilia.gurielidze\Projects\PLC Generation\L5X2ACD Compiler\MTN6_MCM06.L5X
for %%F in ("C:\Users\ilia.gurielidze\Projects\PLC Generation\L5X2ACD Compiler\MTN6_MCM06.L5X") do echo File size: %%~zF bytes
echo.
echo Starting compilation...
echo Command: py -3.12 l5x_to_acd.py "C:\Users\ilia.gurielidze\Projects\PLC Generation\L5X2ACD Compiler\MTN6_MCM06.L5X"
echo.
py -3.12 l5x_to_acd.py "C:\Users\ilia.gurielidze\Projects\PLC Generation\L5X2ACD Compiler\MTN6_MCM06.L5X"
if exist "C:\Users\ilia.gurielidze\Projects\PLC Generation\L5X2ACD Compiler\MTN6_MCM06.ACD" (
echo.
echo ====================================
echo SUCCESS: Compilation completed!
echo Output: C:\Users\ilia.gurielidze\Projects\PLC Generation\L5X2ACD Compiler\MTN6_MCM06.ACD
for %%F in ("C:\Users\ilia.gurielidze\Projects\PLC Generation\L5X2ACD Compiler\MTN6_MCM06.ACD") do echo ACD size: %%~zF bytes
echo ====================================
) else (
echo.
echo ====================================
echo ERROR: Compilation failed!
echo Expected output: C:\Users\ilia.gurielidze\Projects\PLC Generation\L5X2ACD Compiler\MTN6_MCM06.ACD
echo ====================================
)
echo.
echo Press any key to close...
pause