Sample DMC Code

This comprehensive library is designed to teach programmers about Galil controllers, serving both novice and experienced users. Each example provides working solutions with detailed information on specific applications, recommendations for selecting controllers and components, and actual downloadable software code.

Application-Specific Examples

These detailed implementation guides provide complete solutions for common industrial applications, including component selection, system design, and ready-to-use code.

Sample DMC Code Library

Browse our extensive collection of DMC code examples organized by topic. Each sample includes a readable HTML view and a downloadable .dmc file ready to use with your Galil controller.

Getting Started

Example View Code
Intro to Galil Programming View
Basic Position Relative Move View

Modes of Motion

Example View Code
Coordinated Motion (VM) with segment speeds View
Electronic Gearing Example View
Calculate Settling Time View
Position Absolute Move Example View
S-Curve Creator for Contour Mode View
Position Relative Move Example View
Position Tracking Mode View
Jog Mode Example View
PVT (Position, Velocity, Time) Example View
Vector Mode Example View
Sinusoidal Motion - Continuous View
Linear Interpolation Mode Example View
Optima/Econo Contour Mode Example View
Accelera Contour Mode Example View
ECAM Mode Example View

Program Flow

Example View Code
Using Variables for Axis Designators View
Cycle Motion with Trippoints View
Multi-Tasking Example View
Timer Example View
Passing Parameters with JS (Accelera only) View

Structures

Example View Code
IF Statements View
Conditional Jumps View

I/O Control

Example View Code
High Frequency Noise Filtering for Digital Inputs View
Sample Analog Input Into Array and Find Average View
Use the RIO Analog output to generate a sine wave View
Temperature control with the RIO and SCB View
RIO master/slave connection using two RIO PLCs View
Bounce Off Limits View
RIO as extended I/O of a controller using Modbus View
Use Input to Choose Subroutine View
Bitwise operations View
Change Jog Speed using Analog Input View
Change Speed After Input View
Use Analog Input to Change Vector Feedrate View
Start Motion and Toggle Output after Input View
Moving Average Filter on an Analog Input View
Single Pole Low-Pass Filter on Analog Inputs View

Automatic Subroutines

Example View Code
#AUTO - Automatic Execution on Power Up View
#LIMSWI - Limit Switch Event View
#POSERR - Position Error Routine View

Variables and Arrays

Example View Code
Simple Array Operations View
Specify Target Positions with an Array View
Working with Variables View

Machine Applications

Example View Code
Sampled Dual Loop View
Web Tension Control View
Rotary Table- Shortest Path View
Cut To Length View
Generate Helical Motion Path View
Home Axis to a Limit Switch View
Pick and Place Application View
Record & Playback View
Record Data for Analysis View
Rotating Knife Application View