100 likes | 230 Views
ECT 464. Lecture 6b High Speed Counter. The best bridge between hope and despair is often a good night’s sleep. In vain you rise early and stay up late, toiling for food to eat— for he grants sleep to those he loves. Psalm 127:2. High Speed Counter.
E N D
ECT 464 Lecture 6b High Speed Counter
The best bridge between hope and despair is often a good night’s sleep. In vain you rise early and stay up late, toiling for food to eat— for he grants sleep to those he loves.Psalm 127:2
High Speed Counter • Used to count inputs changing much faster than the PLC Scan Cycle Time • Pop Cans • Motor Encoder (Position or Velocity) • High speed direct control of outputs (PTO, PLS, PWM)
High Speed Counter • 2 20 kHz high speed counters on M1500 • Independent Counters • HSC0 Inputs 0-3 • HSC1 Inputs 4-7 • Custom circuitry runs in parallel with main processor • 32 bit signed integer data (+/- 2 billion) • High and Low presets • Overflow and Underflow set-points • Automatic Interrupt processing based on accumulator count • Run time editable parameters • Output mask
HSC Modes • Mode 0 Up Counter (high preset reset) • Mode 1 Up Counter with external reset and hold (high preset reset) • Mode 2 Counter with external direction • Mode 3 Counter with external direction, reset, and hold • Mode 4 Two input counter (up/down) • Mode 5 Two input counter with external reset and hold • Mode 6 Quadrature counter (A and B) • Mode 7 Quadrature counter (A and B) with external reset and hold
Programmable Limit Switch • HSC can be used as a programmable limit switch or as a rotary cam switch • HSC counts incoming pulses. When the count reaches the first preset (High - HIP or Low - LOP) defined in the PLS file, the output source data (High - OHD or Low - OLD) will be written through the HSC mask. At that point, the next preset (High - HIP or Low - LOP) defined in the PLS file becomes active. When the HSC counts to that new preset, the new output data is written through the HSC mask. This process continues until the last element within the PLS file is loaded. At that point the active element within the PLS file is reset to zero. This behavior is referred to as circular operation.
Pulse Train Output • PTO functionality allows a simple motion profile or pulse profile to be generated directly from the controller. The pulse profile has three primary components: • Total number of pulses to be generated • Accelerate/decelerate intervals • Run interval
Pulse Width Modulation Output • The PWM function allows a field device to be controlled by a PWM wave form. The PWM profile has two primary components: • Frequency to be generated • Duty Cycle interval
Parallel Processing • The PTO, HSC, and PWM instructions are different than most other controller instructions. Their operation is performed by custom circuitry that runs in parallel with the main system processor. This is necessary because of the high performance requirements of these functions.