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.
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
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
Variables and Arrays
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 |
