gclib examples  0
Example Projects for the Communications API for Galil controllers and PLCs
jog_example.cpp File Reference
#include "examples.h"
#include <iostream>

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 Main function for Jog Example. More...
 

Detailed Description

See jog() for implementation of logic

Concepts

This example demonstrates:

  • How to connect to a controller via IP Address.
  • How to issue basic commands.
  • A controller in jogging mode.
  • How to utilize keyboard input at the console.

Prerequisites

A Galil controller with a motor connected at the A axis is needed for this example.

Note
Linux users will need to install the ncurses library.

Example Output

Enter a character on the keyboard to change the motor's speed:
<q> Quit
<a> -2000 counts/s
<s> -500 counts/s
<d> +500 counts/s
<f> +2000 counts/s
<r> Direction Reversal
Jog Speed: 0
Jog Speed: 2000
Jog Speed: 4000
Jog Speed: 6000
Jog Speed: -6000
Jog Speed: -8000
Jog Speed: -6000

Definition in file jog_example.cpp.