Part of the vision for the Do-more PLC control engine was to make maximum use of Host Engineering’s next generation High Speed Counter and Pulse Output module, the H2-CTRIO2. Pairing this new module with a Do-more CPU creates a solid motion control package that is easier to use than its predecessors while offering more flexible options and capabilities.
H2-CTRIO: capable, but limited by DirectLOGIC’s architecture
The previous H2-CTRIO module brought high speed counting and pulse output capabilities to the DirectLOGIC PLC line. The H2-CTRIO took on the processing of these functions within the module, and as a result had its own configuration tool and files to save and load. Since the CPU lacked the ability to assist with these tasks, the package was somewhat limited in scope, but the combination satisfied many basic motion applications.
A better way
While developing the Do-more CPUs and the H2-CTRIO2, Host Engineering took ownership of developing a new solution. Having designed the programming software, CPUs and H2-CTRIO2 from the beginning to work in concert, the overall experience is vastly improved, especially writing the application program.
Basics of Do-more with H2-CTRIO2
New hardware outperforms the previous CTRIO, but the specs aren’t the biggest change.
Comparing the specifications of the H2-CTRIO2 to its predecessor shows some obvious improvements, but only begins to tell the story. The H2-CTRIO2 inputs are 2.5 times faster and the outputs are 10 times faster, at 250kHz and 250kHz respectively.
However, the most significant changes aren’t in the specs, they’re in how this unit works with Do-more to simplify and expand motion control capabilities.
The H2-CTRIO2 module is loaded with features which help simplify motion control, such as axis mode instructions.
To greatly simplify tying ladder logic to the desired motion, the new Axis Mode instructions were designed to provide an intuitive interface for commanding moves from the H2-CTRIO2.
After configuring the I/O of the module, you drop in a CTAXCFG (Axis Mode Configuration) ladder instruction to define the limits of maximum speed, start speed, acceleration and deceleration rates. Optionally, you can pick an encoder to use for feedback and configure it.
Once an output is in Axis Mode, use any of the Axis Mode instructions to control the stepper:
CTAXLIMT (Axis Mode Limit) to home the axis
CTAXJOG (Axis Mode Jog) to manually jog
CTAXTRAP to make one move
CTAXDYNP (Axis Mode Dynamic Position) puts the axis in a mode in which it accepts new position commands as quickly as you can generate them. The output will follow the Axis Configuration parameters and immediately head toward a new target.
CTAXDYNV (Axis Mode Dynamic Velocity) puts the axis in a mode to accept new velocity commands as quickly as you can generate them.
When a servo is too much and a stepper isn’t quite enough, simple closed loop control might do the trick
To bridge the gap between stepper control and a servo, Do-more and the H2-CTRIO2 offer integrated Encoder Feedback. It’s part of the CTAXCFG (Axis Mode Configuration) ladder instruction.
Specify an encoder to use for feedback, choose Scaling and Deadband, and your stepper/encoder just became a closed loop system. However, a servo can detect a stalled motor, and additional code would be needed if your system requires this notification.
Once configured for Encoder Feedback, the other Axis Mode instructions are used to command moves using units of the encoder. More on that follows.
Easier programming, commissioning, maintenance
To ease programming and maintenance, the H2-CTRIO2 configuration is part of the CPU’s project. The Do-more CPU configures the module for you, which is handy during commissioning. This greatly simplifies the task of replacing a module; just set the jumpers to match the original and swap the units.
The configuration tells the H2-CTRIO2 whether to expect encoders or discrete devices, such as limit switches or proximity sensors on its inputs; it also defines whether to use outputs for a stepper, as slaves to a PLS or Preset Table or as discretes accessible by the ladder program; it can also define preset tables or PLS tables, or configure timers.
Easily step through a sequence of moves using Stage programming
To easily command a sequence of moves, all the motion instructions now include Stage control. Since Stage programming works well for sequential processes and moves tend to be sequential, the motion instructions can make stage transitions as they complete. As a result, some programs to control motion can be surprisingly short.
Integrated Programmable Limit Switch
To improve upon the precise output control offered by Preset Tables in the H2-CTRIO, the H2-CTRIO2 adds integrated Programmable Limit Switch (PLS) functionality. Where events in the Preset Tables had to occur in a specific sequence, events in a PLS occur based solely on the input counts. Furthermore, PLS entries and Preset Table entries can be added, edited, or deleted using several new intuitive ladder instructions in the Do-more CPUs.
More easily set up the machine using Axis mode/jog
To simplify machine setup, the JOG command makes manual adjustments to position very simple. And, to complement the new PLS functionality, two ladder instructions assist in dynamically editing any PLS from the ladder program. If a PLS will always be dynamic, simply create a blank PLS in the configuration and push values to it from a table in your program as it executes.
We continually strive to improve our products and value your opinion. For additional information on these features and more, and to download the free Do-more Designer software which introduces a powerful, intuitive set of programming tools, visit the Do-more PLC Web site at: www.domoreplcs.com.
This H2-CTRIO2 Module Configuration summary page (picture to the right) shows four channels configured to accept signals from two quadrature encoders; two output channels configured to control a stepper motor; and two other output channels configured to activate based on PLS table events referenced to the quadrature encoders.
By Jason Horine
Originally Posted: Dec. 12, 2012