Dayton ECT 464 - Lecture 24 Siemens Instructions 3

Unformatted text preview:

ECT 464Slide 2Counter InstructionsSlide 4Count Up/DownCounter Example 1Counter Example 2IEC Counter InstructionsSlide 9Slide 10IEC Counter ExampleHigh Speed CounterSlide 13Slide 14High Speed Counter ExampleHigh Speed Counter ControlsPulse OutputsPulse Train OutputsSlide 19Pulse Width OutputsECT 464 ECT 464 Lecture 24Lecture 24Siemens Instructions 3Siemens Instructions 3Today’s Quote:Today’s Quote:The secret of contentment The secret of contentment is the realization that life is is the realization that life is a gift not a right.a gift not a right.But godliness with contentment is But godliness with contentment is great gain. But godliness with great gain. But godliness with contentment is great gain. contentment is great gain. 1 Timothy 6:6,71 Timothy 6:6,7Counter InstructionsCounter InstructionsThe Count Up instruction (CTU) counts up from the current value each time the count up (CU) input makes the transition from off to on. When the current value Cxx is greater than or equal to the preset value PV, the counter bit Cxx turns on. The counter is reset when the Reset (R) input turns on, or when the Reset instruction is executed. The counter stops counting when it reaches the maximum value (32,767). The Count Down instruction (CTD) counts down from the current value of that counter each time the count down (CD) input makes the transition from off to on. When the current value Cxx is equal to 0, the counter bit Cxx turns on. The counter resets the counter bit Cxx and loads the current value with the preset value PV when the load input LD turns on. The counter stops upon reaching zero, and the counter bit Cxx turns on.Counter InstructionsCounter InstructionsCount Up/DownCount Up/DownThe Count Up/Down instruction (CTUD) counts up each time the count up (CU) input makes the transition from off to on, and counts down each time the count down (CD) input makes the transition from off to on. The current value Cxx of the counter maintains the current count. The preset value PV is compared to the current value each time the counter instruction is executed. Upon reaching maximum value (32,767), the next rising edge at the count up input causes the current count to wrap around to the minimum value (--32,768). On reaching the minimum value (--32,768), the next rising edge at the count down input causes the current count to wrap around to the maximum value (32,767). When the current value Cxx is greater than or equal to the preset value PV, the counter bit Cxx turns on. Otherwise, the counter bit turns off. The counter is reset when the Reset (R) input turns on, or when the Reset instruction is executed. The CTUD counter stops counting when it reaches PV.Counter Example 1Counter Example 1Counter Example 2Counter Example 2IEC Counter InstructionsIEC Counter InstructionsIEC Counter InstructionsIEC Counter InstructionsUp CounterThe Count Up instruction (CTU) counts up from the currentvalue to the preset value (PV) on the rising edges of theCount Up (CU) input. When the current value (CV) is greaterthan or equal to the preset value, the counter output bit (Q)turns on. The counter resets when the reset input (R) isenabled. The Up Counter stops counting when it reachesthe preset value.Down CounterThe Count Down instruction (CTD) counts down from thepreset value (PV) on the rising edges of the Count Down(CD) input. When the current value (CV) is equal to zero, thecounter output bit (Q) turns on. The counter resets andloads the current value with the preset value when the loadinput (LD) is enabled. The Down Counter stops countingwhen it reaches zero.IEC Counter InstructionsIEC Counter InstructionsUp/Down CounterThe Count Up/Down instruction (CTUD) counts up or downfrom the current value (CV) on the rising edges of the CountUp (CU) or Count Down (CD) input. When the current valueis equal to preset, the up output (QU) turns on. When thecurrent value is equal to zero, the down output (QD) turnson. The counter loads the current value with the presetvalue (PV) when the load (LD) input is enabled. Similarly,the counter resets and loads the current value with 0 whenthe reset (R) is enabled. The counter stops counting when itreaches preset or 0.IEC Counter ExampleIEC Counter ExampleHigh Speed CounterHigh Speed CounterThe High-Speed Counter Definition instruction (HDEF) selects the operating mode of a specific high-speed counter (HSCx). The mode selection defines the clock, direction, start, and reset functions of the high-speed counter. You use one High-Speed Counter Definition instruction for each high-speed counter.High Speed CounterHigh Speed CounterThe High-Speed Counter (HSC) instruction configures and controls the high-speed counter, based on the state of the HSC special memory bits. The parameter N specifies the high-speed counter number. The high-speed counters can be configured for up to twelve different modes of operation. Each counter has dedicated inputs for clocks, direction control, reset, and start, where these functions are supported. For the two-phase counters, both clocks can run at their maximum rates. In quadrature modes, you can select one times (1x) or four times (4x) the maximum counting rates. All counters run at maximum rates without interfering with one another.High Speed CounterHigh Speed CounterHigh Speed Counter ExampleHigh Speed Counter ExampleHigh Speed Counter ControlsHigh Speed Counter ControlsPulse OutputsPulse OutputsThe Pulse Output instruction (PLS) is used to control the Pulse Train Output (PTO) and Pulse Width Modulation (PWM) functions available on the high-speed outputs (Q0.0 and Q0.1).Pulse Train OutputsPulse Train OutputsPTO provides a square wave (50% duty cycle) output for a specified number of pulses and a specified cycle time. PTO can produce either a single train of pulses or multiple trains of pulses (using a pulse profile). You specify the number of pulses and the cycle time (in either microsecond or millisecond increments):- Number of pulses: 1 to 4,294,967,295- Cycle time: 10 μs to 65,535 μs or 2 ms to 65,535 ms.Specifying an odd number of microseconds or milliseconds for the cycle time (such as 75 ms), causes some distortion in the duty cycle.Pulse Train OutputsPulse Train OutputsPTO provides a square wave (50% duty cycle) output for a specified number of pulses and a specified cycle time. PTO can produce either a single train of pulses or multiple trains of pulses (using a pulse profile). You specify the number of pulses and the cycle time (in


View Full Document

Dayton ECT 464 - Lecture 24 Siemens Instructions 3

Download Lecture 24 Siemens Instructions 3
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 24 Siemens Instructions 3 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 24 Siemens Instructions 3 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?