| gclib 2.4.1 Galil Communications Library

Loading...
Searching...
No Matches
Topics | Functions
Controller
C (Legacy)

Manage a Galil controller. More...

## Topics
| Communication
| Send commands.
| Memory
| Manage controller memory, such as program and arrays.
| Unsolicited Data
| Receive messages, interrupts, and data records.

## Functions
GCLIB_DEPRECATED GReturn | GWaitForBool (GCon g, GCStringIn predicate, int trials)
| Blocking call that returns when the controller evaluates the predicate as true.
GCLIB_DEPRECATED GReturn | GMotionComplete (GCon g, GCStringIn axes)
| Blocking call that returns once all axes specified have completed their motion.

## Detailed Description

Manage a Galil controller.

## Function Documentation

## ◆ GWaitForBool()

GCLIB_DEPRECATED GReturn GWaitForBool | ( | GCon | g,
|  | GCStringIn | predicate,
|  | int | trials )

Blocking call that returns when the controller evaluates the predicate as true.

Deprecated
  This function is part of the deprecated C (Legacy) API, which will be removed in a future release.

Polls the message command (MG) to check the value of predicate. Polling will continue until the controller responds with a nonzero value or the number of polling trials is reached.

The amount of time until the function fails with G_GCLIB_POLLING_FAILED is roughly (trials * POLLINGINTERVAL) milliseconds.

Parameters

  g | Connection's handle.
  predicate | A null-terminated string containing the predicate to be polled. The predicate will be enclosed in parentheses and used in the command MG (predicate) to return the value.
  trials | The number of polling cycles to perform looking for a nonzero value. Use -1 to poll indefinitely.

Returns
  The success status or error code of the function. See gclib_errors.h for possible values.

See GMotionComplete() for an example.

## ◆ GMotionComplete()

GCLIB_DEPRECATED GReturn GMotionComplete | ( | GCon | g,
|  | GCStringIn | axes )

Blocking call that returns once all axes specified have completed their motion.

Deprecated
  This function is part of the deprecated C (Legacy) API, which will be removed in a future release.

Note
  This function uses a profiled motion indicator, not the position of the encoder. E.G. see the difference between AM (profiled) and MC (encoder-based).

Although using the _BGm operand is the most generally compatible method, there are higher-performance ways to check for motion complete by using the data record, or interrupts. See examples x_dr_motioncomplete() and x_ei_motioncomplete().

Parameters

  g | Connection's handle.
  axes | A null-terminated string containing a multiple-axes mask. Every character in the string should be a valid argument to MG_BGm, i.e. XYZWABCDEFGHST.

Returns
  The success status or error code of the function. See gclib_errors.h for possible values.