|
|
| Line 1: |
Line 1: |
| ==Overview==
| |
|
| |
|
| The post debuger is a tool that can be used by post developers to view the output and logic flow of a running post processor
| |
|
| |
| ==Components==
| |
|
| |
| The post debugger requires 3 separate components to be run properly.
| |
|
| |
| ===Post Debugger Plug-in===
| |
| The plug-in provides the interactive interface to the post debugger and allows developers to view the posting process as it runs.
| |
|
| |
| ====Installation====
| |
| Copy the plugin PostDebug.dll into the Plugins folder
| |
|
| |
| ====Compiler
| |
|
| |
| When you compile a post, click on the "File" menu in Compost3 and select the "Preferences"
| |
| option. On the Preferences dialog, check the "Generate Debug" option near the lower right corner.
| |
|
| |
| When you create code in GibbsCAM, you will see the Post Debugger dialog
| |
| if the following conditions are met:
| |
|
| |
| 1 You must PostDebug.dll in the Plugins folder
| |
| 2 You must have compiled your post with the "Generate Debug" option selected
| |
| 3 Both the prog and form (pst and txt) file must be in the same folder
| |
|
| |
| The debugger will look for a .txt file with the same name as the .pst file
| |
|
| |
| The Debugger dialog is divided into 3 sections. The top section is used to control
| |
| the debugger, the middle section shows the source of the post (with line numbers)
| |
| and the lower section shows the output code.
| |
|
| |
| The top right of the control section provides buttons to control the posting.
| |
| "Next Op", "Next Tool", "Next Flow" will post until the next op, tool or flow
| |
| is reached. "Next NC" line will run until a new line of code is created.
| |
| "Next Post Line" is used to show the execution of the post one line at a time.
| |
|
| |
| Whilst the post is running, you can show each line of the post being executed
| |
| but this can take some considerable time, so there is the "Display Post" option.
| |
| Unchecking this will suppress the updating of the Post section of the dialog.
| |
|
| |
| You can run the post until a break point is reached, by pressing the "Run" button.
| |
| There are 5 types of break point available:
| |
|
| |
| "Break At Op Num", check this option and enter an op number in the box. Execution
| |
| will stop when the given op number is reached. The box next to the op number will
| |
| be updated during posting to indicate the current op number.
| |
|
| |
| "Break At Tool Num", similar to "Break At Op Num" but break at a given tool number.
| |
|
| |
| "Break At NC Code" is used to break when a block of code contains the given text.
| |
| The check for text is not case dependant.
| |
|
| |
| When processing is stopped due to one of these 3 break conditions, the box containing
| |
| the Op number, Tool number or NC text will change to red to highlight the break.
| |
|
| |
| The fourth method of breaking is to stop at a particular line in the post. If you click
| |
| on a line of text in the post display section, that line will change to yellow to show
| |
| that you have added a break point at that line. Click it again to remove the break.
| |
|
| |
| When posting stops due to a break, you can use the "Back" button to step backwards from
| |
| the current line in the post, one line at a time to help to identify the path through
| |
| the post to the current line. The "Fwd" button takes you in the opposite direction.
| |
|
| |
| The "Watch" button provides a method to check the status of some variables and
| |
| internal post registers. Click on the "Watch" button to show the "Watch Variables" dialog.
| |
| The "Add Watch" button will show a list of Number variables, Flags and Internal Registers.
| |
| You can simply watch the value, break when the value changes, or break when it changes to
| |
| to a given value. This is the fifth type of break point available.
| |
|
| |
| Select one of these from the drop down menus, select the Watch action from the 3 radio
| |
| buttons and press the button next to the drop down menu to add it to the watch list.
| |
|
| |
| When you close the Post Debugger dialog, posting will continue as usual until it is completed.
| |
|
| |
| Note: When compiling with the "Generate Debug" option, Compost3 will add information to
| |
| the .pst file that relates to the line numbers in the post. It will not include any of
| |
| the source code itself. This means that the size of the compiled post will not be
| |
| significantly increased, but it also means that you must have both .pst and .txt files
| |
| in the same folder to use the debugger.
| |
|
| |
| You should always remove the debug information (compile with "Generate Debug" unchecked)
| |
| before send a .pst file to a customer. However, if you do forget to do this, the customer
| |
| will not see the debug information, even if they get hold of a copy of the PostDebug
| |
| plugin (unless you also send them a copy of the .txt file).
| |