Technical Brief: Using the RMC Discrete I/O Command Mode

Abstract

The RMC-DI/O is capable of sophisticated motion control using small and inexpensive Programmable Controllers with simple discrete I/O. An RMC with a DI/O communication interface is capable of four discrete I/O interfaces: Command Mode, Input to Event Mode, Parallel Position Mode, and Parallel Event Mode. Of these four communication modes, Command Mode is the most flexible; it allows changing parameters and retrieving positions, speeds, errors and other status information from the motion controller using simple discrete I/O.

This technical brief will compare the four discrete I/O interfaces of the RMC100 series product-line, describe implementing Command Mode, and finally provide a sample application using Command Mode.

DI/O Communication Mode Comparison

The following chart lists the advantages and disadvantages of each communication mode. Each word or phrase in bold print appears in RMCWin’s online help index.

Interface Mode

Advantages

Disadvantages

Command Mode

  • Any RMC command can be issued

  • Any status information can be retrieved (including Actual Position, Actual Speed, Drive, Error Bits, and other Status Bits)

  • Requires a PLC

  • Requires 2 PLC scans per command

  • Gives commands to only one axis per command cycle

 

 

 

Parallel Event Mode

  • Up to four axes may be commanded at once

  • PLC or thumb-wheel switches may be used

  • Allows use of Event Control feature

  • Requires parallel inputs

  • Returns only a Halted Bit—indicating an error has occurred—and an In Position Bit per axis

  • Sequence must be pre-programmed in Event Control

 

 

 

Input to Event Mode

  • Does not require a PLC

  • Multiple axes may be given commands from a single input

  • Returns only a Halted Bit—indicating an error has occurred—and an In Position Bit per axis

  • Issues only Start Event commands

 

 

 

Parallel Position Mode

  • Any position can be moved to in a single PLC scan

  • Any open loop drive can be triggered in a single PLC scan

  • Multiple profiles can be selected for any move

  • Requires a PLC

  • Returns only a Halted Bit—indicating an error has occurred—and an In Position Bit per axis

  • Issues only Go and Open Loop commands

  • Gives commands to only one axis per scan

 

Implementation

The following diagram shows the electrical control connections of a single-axis hydraulic system using RMC-DI/O in Command Mode (the PC and its RS232 cable are needed only during setup):

image\ebx_1320258578.gif

This document discusses only the connections between the Programmable Controller and the RMC. For details on the transducer and drive wiring, look up Wiring Notes in the RMCWin index.

The RMC accepts commands of up to 32 bits and returns 16-bit data words. However, because it has only half that number of inputs and outputs, an extra input and output on the RMC are used to strobe half of the data at a time. The following timing chart and accompanying list of steps illustrate the sequencing of Command Mode:

image\ebx_1062143137.gif

This process begins assuming that Run/Stop and Command Strobe are set low by the PLC. In the steps below inputs and outputs are labeled as ”r;CPU” or ”r;DI/O”. These labels refer to the CPU and DI/O modules of the RMC product, and not of the PLC:

  1. Raise the Run/Stop (CPU input 0) line on the RMC. This is done on startup of the PLC.

  2. Wait for the Ready (CPU output 0) line on the RMC to go high in response to the Run/Stop line. This begins the first PLC scan.

  3. Place the 16-bit Command on the RMC’s Command Bits (DI/O inputs 0-15).

  4. Raise the Command Strobe (CPU input 1) line on the RMC. This ends the first PLC scan.

  5. Wait for the Acknowledge (CPU output 1) line on the RMC to go high. This begins the next PLC scan.

  6. Read the low byte of the data requested by the command from the Status Bits (DI/O outputs 0-7) on the RMC.

  7. Place the 16-bit Command Value on the RMC’s Command Bits.

  8. Lower the Command Strobe on the RMC. Then ends the next PLC scan.

  9. Wait for the Acknowledge line on the RMC to go low. This begins the next PLC scan.

  10. Read the high byte of the data requested by the command from the Status Bits on the RMC.

The process then repeats from step 3 with the next command.

In the above timing chart, notice two time durations are marked: Input Delay and Output Delay. These intervals can be set using RMCWin to any value between zero and twenty milliseconds.

Input Delay indicates how long the RMC waits after seeing the Command Strobe toggle before reading the command data. Change this setting to account for the PLC outputs’ and the RMC inputs’ settling time.

Output Delay indicates how long the RMC waits after writing the requested data before toggling the Acknowledge line. Change this setting to account for the RMC outputs’ and the PLC inputs’ settling time.

To configure Command mode, do the following:

 

Sample Application

In this application, a single hydraulic cylinder will be moved over a 30 in stroke. It will extend at a rate of 5 in/sec and retract at a rate of 10 in/sec. At each end of the move, there will be a four-inch acceleration/deceleration zone:

image\ebx_320376499.gif

The operator display will include the current actual position.

This application can easily be done using an RMC100-M1-DI/O module using Command Mode. The simplest way to implement this application is to begin by loading the profile table with the two motion profiles used:

image\ebx_-1985927775.gif

The ’r;2’ in the Mode field indicates that the acceleration and deceleration are given as distances. For details on the motion profile table, look up Profiles in the RMCWin online help.

This profile table and the tuning parameters can either be stored in the RMC’s Flash memory, or stored in the Programmable Controller and downloaded using the Set Parameter commands. We’ll assume they are stored in the Flash. See the Set Profile and Set Parameter topics in the RMCWin online help for details on setting these values from the Programmable Controller.

 

Reference

Throughout this technical note, references are made to RMCWin online help index entries. To obtain the RMCWin software package, contact Delta Computer System’s web site (www.deltacompsys.com).

 


Copyright (c) 1997-2015 by Delta Computer Systems, Inc.