Back
| Compare allows you to compare two NC programs. Two methods are available, Automatic Compare and Manual Compare. Compare is a function available
under the Analysis
menu item. |
Automatic Compare
The screen above highlights the first mismatched block found in a numeric compare.
To compare the files, click the Compare button under Numeric Compare or Character Compare.. A numeric compare ignores sequence numbers, comments, EOB characters, and format differences (For example, N0040 X3.100 F30.0 will match X3.1F030.) You can specify a comparison tolerance for numeric compares. Two numbers that match within this tolerance are considered equal. For example, with a tolerance of 0.001, Z3.0 and Z2.9999 are considered matched.
A character compare is an exact, character by character comparison. However, sequence numbers (“N words”), comments, and/or blanks can be ignored by checking the appropriate Ignore boxes.
After the compare is done, new lines will be shown with blue backgrounds and deleted lines with red. You can click the ¯ and buttons to jump to the next or previous mismatch.
In both comparison methods, the editor will attempt to resynchronize, or seek matching blocks after a mismatch is located. If the character compare is active, then the program looks ahead up to fifty blocks to determine if a mismatch represents just a few added or deleted blocks or if the NC programs are completely different. If the numeric compare is active, the editor only looks ahead five blocks, unless you change the Resync value. This is necessary because the numeric compare function is more likely to find false matches - many NC programs contain several lines reading, for example, X0.000 Y0.000 throughout. Larger resync values will improve compare results in some CNC programs but this value should generally be set to a low number.
If the files are different, you can save a Differences file by selecting Save on the Compare window. This file shows the two compared files as a single, merged, file with changes relative to the left file. Additions are prefixed with a +, deletions with a -, and replacements with < and >, indicating a blocks presence in the left or right file.
Manual Compare
The Manual Compare method can be used when you anticipate making changes to one or both files as a result of the comparison. It is important to realize that most operations start at the text cursor (insertion point) location in each file, and that the text cursors may be on different blocks in each file. Use the mouse or arrow keys to position the text cursors as necessary.
The larger up/down arrow keys move the text cursor in both files, while the smaller arrow keys move it independently in the left or right file. Position the mouse pointer over the various buttons to display their hints describing what they do.
Either file can be changed during a Manual Compare.
Return to SURFCAM Index