Content Preview
TB173 Rev4 How to Compile a PLC Program
Purpose
Show how to compile a PLC source code file for CPU and PC programs in CNC7 CNC10 CNC11 and CNC12 softw are
Compiling a PLC program in CNC11/ 12 Windows softwar e
1 Press F10 Shutdown then F9 Exit CNC11 to exit the CNC11/12 software
2 Press the Windows key on the keyboard or click th e start button lower left corner Type cmd then select the
Command prompt from the list
3 Type cd\cncm to get to the CNC11/12 mill directory or cd\cnct to get to the CNC11/12 lathe directory
4 To compile the PLC program type mpucomp exe xxxxx src mpu plc press enter Substitute xxxxxx for the PLC file
name
5 If the file compiled correctly type exit press enter to close the Command prompt window
6 Power cycle the control Once your back into the CN C11/12 software press F7 Util then F8 Options to verify the
correct PLC program compiled
Compiling PLC programs in CNC10 software
1 From the main screen on the control press F10 Shutdown then F9 Exit CNC10 software Then press F4 System
Prompt
2 Verify the name of your source code files Type ls * src to display the source files in the CNC10 directory
3 To compile the CPU PLC program type plccomp xxxxxx src cnc10 plc press enter
ex plccomp m400dc3c src cnc10 plc Notice most CPU sou rce file names end with a "c"
Note Systems upgraded to CNC10 that only run the CPU PL C program will need the pc plc file deleted
4 To compile the PC PLC program type xplccomp xxxxxx src pc plc press enter
ex xplccomp m400dc3p src pc plc Notice most PC source file names end with a "p"
5 Once both source files have been successfully comp iled exit out of the system prompt screen by typing exit press
enter Then press F1 CNC10 to load the CNC10 software
6 Verify the PLC programs by pressing F7 Utilities then F8 Options to check the CPU and PC PLC programs
Note Do not compile a CPU source file with xplccomp or a P C source file with plccomp as they will not compile correctly
Compiling a PLC program in CNC7 software
1 From the main screen on the control press Ctrl + Alt + x to exit to DOS
2 Type cd plc press enter to go to the PLC directory
3 Verify the name s for your PLC programs and that they are in the PLC directory Type dir * src press enter which will
display the PLC source files in the PLC directory
4 To compile the CPU PLC program type plccomp xxxxxx src c \cnc7\cnc7 plc press enter
ex plccomp m400scpu src c \cnc7\cnc7 plc sources code n ames for CPU programs have "cpu" "cp" or "c"
Note If compiling in lathe software the destination pat h will change to c \cnc7t\cnc7 plc
5 If the control was shipped with CNC7 v8 20 or hig her you will probably need to compile the PC PLC pro gram as well
To do this type xplccomp xxxxxx src c \cnc7\pc plc press enter
ex xplccomp m400spc src pc plc source code names for P C programs have "pc" or "p"
Note There are some systems that only use the CPU PLC program some after v8 20 and almost all systems bef ore v8 20
software
6 Once both source files have been compiled success fully you will need to power cycle the control
7 If running v8 20 or higher you can verify the PLC programs by pressing F7 Utilities then F8 Options to check the
CPU and PC PLC programs
Document History
Rev4 Created on 2021 09 28 by #446
Rev3 Created on 2011 07 27 by #240
Rev2 Created on 2009 12 22 by #240
Rev1 Created on 2004 11 01 by #000