Rc - register counter, Command details, Parameter details – Applied Motion RS-232 User Manual
Page 174: Examples

174
920-0002 Rev. I
2/2013
Host Command Reference
RC - Register Counter
Compatibility: Q drives only
Affects:
Data Register “I” (025)
See also:
RL, RX , RI, RD, TS commands
This command enables a function that increments the “I” data register when the given input condition (determined
by the RC command) is met. Typically the “R” or “F” input condition (see Details below) is used to trigger an
increment. If however the “L” or “H” input condition is used the register will be incremented at a rate of 8000
times per second. In other words the “R” and “F” input conditions are used for true input counting while the “L”
and “H” conditions act as input timers. Use the RL (Register Load - immediate) or RX (Register Load - buffered)
commands to preset or set the “I” data register to a predetermined value. Sending the RC command without a
parameter disables the function.
This command is also used in conjunction with the TS (Time Stamp) command. See the TS command for more
details.
Command Details:
Structure
RC{Parameter #1}
Type
BUFFERED
Usage
WRITE ONLY
Non-Volatile
NO
Register Access
“I” (025)
Parameter Details:
(See Appendix F: Working With Inputs and Outputs)
Examples:
Command
Drive sends
Notes
RC4F
-
Increment data register “I” each time input 4 changes from high to
low (falling edge)
The sample Q program on the following page illustrates the interaction of the RC and TS commands. After
initialization, the program waits for a falling edge event on input X3, at which point a 5 second timer begins
counting down. During this delay, the user may trigger X3 an arbitrary number of times. After 5 seconds,
the motor will execute a series of 5000-step moves, with the delay between each corresponding to the delay
between switch closures on X3. That is, if the user trips X3 four times waiting 1 second between each event,
the motor will execute four 5000-step moves with a 1 second dwell between each.