Python Parser Customization in NX CAM Simulation: Debugging

3,796 views · Published 18 July 2017 · 9:18 · Indexed 12 November 2026

Channel: Siemens Software · 2017 · Science & Technology

Watch on YouTube

Overview
The following video training series explores the details of Python parser customization in NX CAM Simulation
 
Basic knowledge and understanding of NX CAM, NC Code, Python, Regular Expressions and the CSE is required.
 
If you are a beginner with the Common Simulation Engine, it is recommended to start with the introductory training videos found here:

Understanding Machine Tool Simulation Concepts: https://community.plm.automation.siemens.com/t5/Tech-Tips-Knowledge-Base-NX/Understanding-Machine-Tool-Simulation-Concepts-13-videos/ta-p/3717
  
NOTE: It will take almost a minute before all of the content on this page is displayed and you can scroll down. Please be patient while the previews for all videos are loaded.
 
Created with NX 11.0.2
 
Details
Contents: This video series is broken down into 3 sections, as described below.  It is helpful to go through them in order at first, but having several chapters makes it easier to return to the material for reinforcement.
Learning Objectives:
1. Gain an understanding of Python parser customization in NX CAM Simulation
2. Become familiar with PLY module in CSE
3. Learn on a generic sample the basics to add and customize Lex and Yacc functions 
Demo File Preparation: Save the attached sim08_mill_5ax_handson.7z file (found at the bottom of the article) locally and follow the instructions in the Session 2: Hands on sessions - 00:00:10 - First Steps: Preparing Hands On Environment
The used CAM setup and sample NC Code file is located in sim08_mill_5ax\cam_setup\
The provided sim08 sample machine found in the zip file is modified and should be used for this video series.
If you want to concentrate on the videos without coding, there is an MCF file (MyController_MCF_ToBe.7z) and the python scripts (MyController_PythonScript _ToBe_Basics.7z) with all shown modifications inside. This file is located in the sim08_mill_5ax\cse_driver\MyController\ folder.

 
Session/Chapter Overview
Session 1: Introduction, Overview and Theory
00:00:00 - Introduction/Overview
00:01:08 - Theory: About Parsing
00:04:57 - Theory: Configurable Parser Architecture in CSE
00:10:48 - Theory: The Lex script
00:13:07 - Theory: The YACC script
00:19:41 - Theory: CSE Python Interface
DOWNLOAD Session 1
Session 2: Hands on sessions
00:00:00 - Introduction
00:00:10 - First Steps: Preparing Hands On Environment
00:02:12 - First Steps: Checking Syntax
00:04:14 - First Steps: G0 X100
00:15:37 - First Steps: G0 X=100
00:21:55 - First Steps: Adding new axis adress
00:23:59 - First Steps: Token Sequence
00:29:43 - First Steps: Adding 'AnyCommand'
00:33:39 - First Steps: Adding parameter to 'AnyCommand'
00:37:53 - First Steps: Adding optional MCParameter to 'AnyCommand'
00:52:18 - First Steps: NC Variables
DOWNLOAD Session 2
Section 3: Debugging
00:00:00 - Introduction and Overview
00:00:33 - Debugging - NX Log file
00:01:28 - Debugging - Lex sequence checker
00:07:31 - Debugging - PLY Logger
00:08:44 - Debugging - Runtime Debugging (will be submitted later)
DOWNLOAD Session 1 

#nxcam

More from this channel