BRX Technical Training HighSpeed IO Counters Timers HighSpeed

BRX Technical Training High-Speed I/O (Counters & Timers)

High-Speed I/O � BX 10 ◦ ◦ ◦ 6 discrete IN (all high-speed) 4 discrete OUT (2 high-speed) No analog IN No analog OUT No Ethernet port ◦ ◦ ◦ 6 discrete IN (all high-speed) 4 discrete OUT (2 high-speed) 1 analog IN 1 analog OUT Ethernet port � BX 10 E

High-Speed I/O � BX 18 ◦ ◦ ◦ 10 discrete IN (all high-speed) 8 discrete OUT (4 high-speed) No analog IN No analog OUT No Ethernet port ◦ ◦ ◦ 10 discrete IN (all high-speed) 8 discrete OUT (4 high-speed) 1 analog IN 1 analog OUT Ethernet port � BX 18 E

High-Speed I/O � BX 36 ◦ ◦ ◦ 20 discrete IN (10 high-speed) 16 discrete OUT (8 high-speed) No analog IN No analog OUT No Ethernet port ◦ ◦ ◦ 20 discrete IN (10 high-speed) 16 discrete OUT (8 high-speed) 4 analog IN 2 analog OUT Ethernet port � BX 36 E

High-Speed I/O � High-Speed Inputs � High-Speed Outputs ◦ Counter ◦ Timer ◦ Axis/Pulse Out �Step/Direction �CW/CCW �Quadrature ◦ PWM Outputs ◦ Table Driven Outputs

High-Speed Inputs (Up Counter) Device Name: @Hs. Ctr. Tmr 1, 2 & 3 � Default Structure: $Hs. Ctr. Tmr 1, 2 & 3 � Up Counter – increments on edge � Default ◦ Rising, falling, both ◦ Requires 1 onboard input �Regular-speed inputs can be used here but most counting would require high-speed inputs

High-Speed Inputs (Up Counter) � Up Counter ($Hs. Ctr. Tmr 1, 2 & 3) Structure members: ◦. Acc (signed double-word; RO) – count value ◦. At. Reset. Value (bit; RO) – indicates. Acc is at reset value ◦. Reset. Level (bit; R/W) – set ON to hold. Acc to the reset value ◦. Inhibit. Count (bit; R/W) – set ON to stop. Acc from counting pulses ◦. Reset. Edge (bit; R/W) – rising edge resets. Acc to the reset value ◦. Reset. Value (signed double-word; R/W) – reset value ◦. Scaled. Value (real; RO) – only relevant if scaling is configured (next slides) ◦. Enable. Capture (bit; R/W) – set ON to enable a capture (requires Capture signal input configuration) ◦. Count. Captured (bit; RO) – indicates a count has been captured (requires Capture signal input configuration) ◦. Captured. Value (signed double-word; RO) – captured count value (requires Capture signal input configuration)

High-Speed Inputs (Up Counter) Counter ($Hs. Ctr. Tmr 1, 2 & 3) other features: � Up ◦ Reset Input – hardware reset signal ◦ Inhibit Input – hardware inhibit signal ◦ Position scaling – scales Min/Max raw counts to desired engineering Min/Max units �. Scaled. Value (real; RO) – contains scaled engineering units as configured

High-Speed Inputs (Up Counter) Counter ($Hs. Ctr. Tmr 1, 2 & 3) other features: � Up ◦ Rate scaling – scales raw counts/time base to get a rate �Unit Defintion �Raw Counts/Unit – how many counts per unit �Unit Time Base – how many units per time base �Scale Offset – added to the calculated value �Calc Options �Calc Interval – how often to calculate the value (i. e. how many counts were there in this time? ) �Data Filter – number of seconds over which the calculated scaled values will be averaged (smoothing effect)

High-Speed Inputs (Up Counter) Counter ($Hs. Ctr. Tmr 1, 2 & 3) Rate structure members: � Up ◦. Scaled. Value (real; RO) – contains scaled engineering units as configured ◦. Filter. Time. Const (real; R/W) – how often (in seconds) the rate scale is calculated

High-Speed Inputs (Up Counter) � R: Rate U: “Unit Time Base” (in sec) P: (time of sample)/(counts in sample) C: “Raw Counts/Unit” S: “Scale Offset”

High-Speed Inputs (Down Counter) � Down Counter – decrements on edge ◦ Exactly like the Up Counter

High-Speed Inputs (Quad Counter) � Quad Counter – increments/decrements according to A/B signals ◦ 1 X, 2 X or 4 X ◦ Requires 2 onboard inputs �Regular-speed inputs can be used here but most counting would require high-speed inputs

High-Speed Inputs (Quad Counter) Counter ($Hs. Ctr. Tmr 1, 2 & 3) Structure members: � Quad ◦ Same as Up & Down Counter with the addition of: �. Quad. Error (bit; RO) – indicates both A & B inputs came on at the same time �Inputs are not actual quadrature signals �Frequency of A & B signals is too fast

High-Speed Inputs (Quad Counter) � Quad Counter other features: ◦ Same as Up & Down Counters with the addition of: �Rotary Mode – pulses coming from a rotary source that wrap back to a count of 0 at a certain value (specify the total number of counts in the rotary range) �E. g. Rotary Count of 3600 yields count values from 0 to 3599

High-Speed Inputs (Quad Counter) � Quad Counter Position & Rate Scaling: ◦ Position & Rate scaling – exactly same as Up & Down Counter

High-Speed Inputs (Bidirectional Counter) � Bidirectional Counter – increments/decrements count based on pulses on Count Input according to state of Direction Input ◦ All other functions are exactly the same as Quad Counter

High-Speed Inputs (Up/Down Counter) � Up/Down Counter – increments count for pulses on Count Up Input and decrements count for pulses on Count Down Input ◦ All other functions are exactly the same as Quad Counter

High-Speed Inputs (Edge Timer) Device Name: @Hs. Ctr. Tmr 1, 2 & 3 � Default Structure: $Hs. Ctr. Tmr 1, 2 & 3 � Edge Timer – measures time (µsec) between edges � Default ◦ Rising-rising, rising-falling, falling-rising, falling-falling ◦ Requires 1 onboard input �Regular-speed inputs can be used here but most counting would require high-speed inputs

High-Speed Inputs (Edge Timer) � Edge Timer ($Hs. Ctr. Tmr 1, 2 & 3) Structure members: ◦. Acc (signed double-word; RO) – current time value (µsec) ◦. Last. Time (signed double-word; RO) – last measured time (µsec) ◦. Timer. Started (bit; RO) – indicates. Acc is timing (i. e. 1 st edge seen) ◦. Timer. Complete (bit; RO) – indicates. Acc has new time in it (i. e. 2 nd edge seen) ◦. Timeout (bit; RO) – indicates Timeout time has past (requires Enable Timeout & Timeout value to be configured) ◦. Enable. Timer (bit; R/W) – if Free Run is not enabled, this bit must be set ON for the Edge Timer to begin looking for 1 st edge ◦. Scaled. Value (real; RO) – only relevant if scaling is configured (next slides) ◦. Filter. Time. Const (real; R/W) – how often (in seconds) the interval scale is calculated (next slides)

High-Speed Inputs (Edge Timer) � Edge Timer other features: ◦ Interval scaling – converts µsec time values to units per time period (e. g. calculating RPM from the time between gear teeth on a rotating shaft) �Unit Defintion �Timed Intervals/Unit – ratio of timed edges to desired unit (e. g. 20 gear teeth = 1 revolution; thus 20) �Unit Time Base – how many units per time base (e. g. for 1 revolution per minute, RPM, choose “units per minute”) �Calc Options �Data Filter – number of seconds over which the calculated scaled values will be averaged (smoothing effect)

High-Speed Inputs (Edge Timer) � S: Scaled unit U: “Unit Time Base” (in sec) T: “Timed Intervals/Unit” E: Edge Time measured (in sec) O: “Scale Offset”

High-Speed Inputs (Dual-Edge Timer) � Dual-Edge Timer – measures time (µsec) between edges of 2 different pulses ◦ Requires 2 onboard inputs �Regular-speed inputs can be used here but most counting would require high-speed inputs ◦ Otherwise identical to Edge Timer
- Slides: 23