Bookmarks

This is a major feature that allows placing bookmarks (one or more) along the G-Code file and later writing (inserting) anything to these bookmark locations. This is extremely useful when something needs to be written at the file or procedure header, but the full extent of the data to be written is not yet known. It will only be known “in the future”, once more data blocks (or even the whole toolpath) have been processed.

By placing bookmarks and writing to them, the EX2 program can effectively write in the “past”, thus completing whatever information was required but not yet available. Writing the past is equivalent to the often requested ability to look ahead into the future.

The following commands are added to GPP2 in order to utilize bookmarks.

SET_BOOKMARK <bookmark ID> <skip-sequencing>;

The <bookmark ID> parameter is an integer numeric expression (usually a constant). It will be later used to refer to that bookmark position for writing.

The <skip-sequencing> parameter is also an integer numeric expression. It makes the auto-sequencing skip some numbers, leaving room for the expected number of lines that will be later inserted to this bookmark. For instance, if 3 or 4 lines are expected, the <skip-sequencing> parameter should be at least 4. If not sure, it is mandatory to leave some spare and skip more lines than expected. GPP2 Variables, such as TOTAL_TOOL_CNT (the total number of tools in the file) can be used in this expression to make sure we leave the right sequencing space for the lines that will eventually be inserted.

Technically, the effect of the <skip-sequencing> parameter is to increase SEQ_NUM by <skip-sequencing> * SEQ_INC.

Later, when writing to the bookmark, GPP2 will automatically temporarily “restore” the correct value of SEQ_NUM to allow continuous sequence numbering.

It is possible to use the same bookmark ID number multiple times. For instance, one can use bookmark number 3 at the beginning of each procedure. All that needs to be done is to use the SET_BOOKMARK command at the BEGINNING OF PROC block, using the same ID number (3). Each time, GPP2 will reset the position of bookmark number 3 to the new location in the G-code file. The previous location of bookmark 3 will no longer be accessible for writing.

OPEN_BOOKMARK <bookmark ID>;

This command opens a previously defined bookmark to writing. Following that command, all OUTPUT statements are directed to the bookmark point instead of the end of the file as usual. Multiple such OUTPUT commands can be used to insert multiple lines to the bookmark. Auto sequencing works as expected, from the number that was recorded when the bookmark was set.

Only one bookmark can be open for writing at once. Two subsequent “open” commands will fail, unless the first bookmark is closed first, as explained below.

CLOSE_BOOKMARK;

This command closes a previously OPEN_BOOKMARK command, and resumes standard output to be sent to the end of the G-Code file. There is no need to specify the bookmark ID, since only one bookmark can be open for writing at the same time.

These two commands, OPEN_BOOKMARK and CLOSE_BOOKMARK must be used in pairs, with one or more OUTPUT commands in between, inserting text to the bookmark position.

The same bookmark can be opened (and closed!) multiple times. Each time, more data can be inserted to the bookmark position, and auto-sequencing keeps track of the number of lines already inserted.

Some functionality may be dependent on the product package. Contact your Reseller if you require a license.