Guidance Programming Language

The Guidance Programming Language, GPL, is a full-featured language designed to allow you to program and automatically operate motion controllers with machine vision and the mechanical mechanisms (“robots”) that are controlled by these devices.  GPL is intended for use in moderate to sophisticated motion control applications where the flexibility of a programming language is beneficial.

This mode allows a GPL procedure to move the robot. This procedure may be automatically started whenever the system is restarted, or it may be started manually by the console interface or a web-based control panel.

This section describes how to configure a system for automatic startup or manual operation. The following table summarizes the parameters that are used for configuring GPL procedures.

Data ID Parameter Label Description

205

Auto start a GPL project

If TRUE, a GPL project is loaded, compiled, and started whenever the “GPL” mode is started. If the project is already loaded or compiled, no error occurs and the project startup procedure is initiated.  If FALSE, a GPL project can be manually loaded, compiled, and started via the console interface or the web-based control panels.

206

Auto start GPL project file

This string contains the path and file name of the project folder that is loaded when “Auto start a GPL project” (DataID 205) is TRUE. If the project is already loaded, the project name is determined from the files in this folder. Within the string, following the file name, you may add a list of switches that are passed to the “Start” command when the project is initiated.

If you wish to have a GPL procedure start automatically without operator intervention, you must do the following:

  1. Configure your system so that the "GPL" Automatic Execution Mode starts automatically. See the section "Configuring and transitioning in and out of auto execute modes" for details. In particular, you must set "Automatic execution mode" (DataID 200) to the value 1 and "Auto start auto execute mode" (DataID 202) TRUE.
  2. Set the “Auto start GPL project file” parameter (DataID 206) to the file name and path of your project folder. This folder must be present on the non-volatile flash disk so that it can be accessed when the controller is restarted. Following the file name, you can add a list of switches separated by space characters. These switches are as follows:

 

 

Switch Names

Descriptions

-break

Break before the first instruction as if single-step were enabled.

-event

If set, emit thread status as events to the web interface rather than displaying them on the console.

-name threadname

Use the specified threadname as the name of the thread rather than using the project name

-stack stacksize

Set the thread stack size to be stacksize Kbytes.

-trace

Enable tracing of the thread execution on the console.

For example, the following entry loads the project named “Test” and starts it with the stack set to 128 Kbytes:

/flash/Project/Test -stack 128

  1. Set the “Auto start a GPL project” parameter (DataID 205) to TRUE.

Once automatic start is enabled in the GPL mode, the system attempts to load and start the specified project each time Automatic execution mode 1 is entered. The GPL procedure is not started if the system is already in automatic execution mode 1, but only when it is entered. If the specified procedure runs to completion, the system remains in mode 1, but the GPL thread is no longer active.