HMC7000 Series I/O Module Guide
40
HMC7000 Series I/O Module Guide
40
Quadrature Inputs
Pair 1
Pair 2
Counter Inputs
X0, X5
X2, X7
Rd Only
Counter Reset Input
X1
X3
Rd Only
Output Flag
Y1
Y7
Rd/Write
PWM Outputs
PWM1
PWM2
Output
Y2
Y4
Rd Only
Reference the table below when configuring each HSC Configuration Register:
Input Mode
Output Mode
Register Value
Normal Input
N/A
0
High Speed,
Single Phase,
Up Counter
Output ON when preset is reached
2
Output ON when counter is enabled,
OFF when preset is reached
258
Quadrature 1X
Output ON when preset is reached
3
Output ON when counter is enabled,
OFF when preset is reached
259
Quadrature 2X
Output ON when preset is reached
67
Output ON when counter is enabled,
OFF when preset is reached
323
Quadrature 4X
Output ON when preset is reached
131
Output ON when counter is enabled,
OFF when preset is reached
387
High Speed Counter Operation
To implement High Speed Counter Operation:
1.
Connect a device that will provide the high speed pulses to one of the four High-Speed inputs on the
expansion module.
2.
Configure the HSC using the configuration register for that channel.
3.
Write the HSC preset count value in the Preset register for that channel.
4.
Enable the HSC by setting the HSC Enable Bit that channel.
5.
HSC increments the current value register for that channel until the preset value is reached.
6.
Enable the HSC Reset Bit by setting for that channel. This will cause the HSC current value to reset back
to 0.
7.
To start the process again, simply reset (clear) the HSC Reset Bit and set the HSC Enable Bit. Note: if the
HSC Enable Bit is still ON, you must reset (clear) this bit, and then set it again.