Home
HP 3852A User's Manual
Contents
1. 3 6 Trigger SOURCES ear ni A ERU VE fore 3 6 Connecting External Triggering 3 7 Configuring Isolated Channels 3 8 Setting Signal Level Jumpers 3 9 Adding Signal Conditioning Elements 3 9 Connecting Field Wiring 3 9 Configuring Non Isolated Channels 3 10 Setting AC TTL Jumpers 3 13 Adding Signal Conditioning Elements 3 13 Connecting Field Wiring 3 13 Using Pullup Resistors 3 13 Typical Connections 3 14 Installation and Checkout 3 14 Chapter 3 Configuring the Counter Introduction Chapter Contents Warnings Cautions and Notes This chapter shows how to hardware configure counter channels and how to check the counter ID Chapter sections are Introduction summarizes chapter contents lists WARNINGS CAUTIONS and NOTES which apply to the counter and shows a suggested sequence to configure the counter channels Setting Counter Jumpers shows how to set the Card Configuration jumper and the Quadrature jumpers resetting required only for Quadrature Count Setting Counter Triggering summarizes counter triggering sources and shows how to use the XTRG terminals for external trigger inputs e Configuring Isolated Channels shows how to configure Isolated input channels It shows how to set the
2. 4 6 Gount Gate Edges EDGE 4 7 Trigger Source TRIG 4 8 Selecting Counts Timing 4 9 Counter Presets CNTSET 4 10 Number or Period NPER 4 1 sample Period SPER 4 12 Time Base TBASE 4 12 Selecting Ri esta 4 15 Single Read CHREAD 4 15 Read Zero Results CHREADZ 4 16 Multiple Reads KRDGS J 4 16 Selecting Interrupts ME kere 4 17 Enabling Interrupts ENABLE INTR 4 17 Disabling Interrupts DISABLE INTR 4 17 Programming Eramples 4 18 Totalize Counts TOTAL TOTALM 4 19 Example Count Switch Closures 4 19 Example Count Switch Closures Modulo 5 UE 4 21 Up Down Counts UDC UDCM EN 4 23 Example Count Pulse Rates 4 23 Example Count Pulse Rates Modulo 5 4 24 Count With Direction Control CD CDM 4 25 Example Determine Shaft Position 4 26 Example Determine Shaft Position Using Quadrature besa a ei diy pe ve hd a ut 4 27 Ratio Measurements RAT 4 29 Example Measure Ratio TT eee 4 29 Period Measurements PER PERD 4 31 Example Measure Average Period 4 32 Example Measure Single Period Pe 4 33 Frequency Measurements FREQ 4 35 Example Measure
3. Totalize Modulo NPER TOTALM 2 NPER 1 NPER 2 to 85535 Rollover overflow interrupt Count With Direction Control CD UP UP que U 2147483648 g 2147483847 EEE nt ER Ei tee Count With Direction Control Modulo NPER CDM UP UP vu NPER 1 DN a DN e Up Down Counts Modulo NPER UDOM NPER 2 TO 65535 3852P A15 2 1 Figure 2 1 Counting Sequences 2 6 Selecting Counter Functions Counting Functions Totalize Counts TOTAL TOTALM This section describes the counting functions shown For convenience the CONF function parameter which sets the function is listed with each function Refer to Table 2 1 for a summary of counting functions e Totalize Counts TOTAL TOTALM e Up Down Counts UDC UDCM Count With Direction Control CD CDM There are four types of Totalize Counts functions Ungated Total Counts TOTAL Gated Total Counts TOTAL Ungated Total Counts Modulo NPER TOTALM Gated Total Counts Modulo NPER TOTALM Ungated Total Counts TOTAL Ungated Total Counts TOTAL can be used to count and totalize single inputs such as switch closures and as desired generate an overflow interrupt after a specified number of counts For Ungated Total Counts only the counter can be preset to any number between 2147483648 and 2147483647 with CNTSET The preset number is used only once and the count then resumes the normal counting seq
4. Input Signals As shown in Figure 1 1 the counter consists of a component module and a terminal module User signals are input to the terminal module to either Isolated 170 V to chassis maximum or to Non Isolated 10 V to chassis maximum channels Each Isolated channel has a 5V 12V 24V signal level jumper which can be set as required User supplied passive R C signal conditioning elements can also be added to each channel Non Isolated channels have AC TTL jumpers for each channel Use the AC jumper position to detect zero crossings or use the TTL position for TTL level signals As required user supplied signal conditioning can be added to each Non Isolated channel For otherwise floating inputs such as relays or open collector outputs the PULLUP resistor and SHIELD connections can be used The counter can also be used for quadrature measurements in 3 CH or 4 CH configuation when the quadrature jumpers on the component module are set to the Quadrature position Operating Modes The counter must be hardware configured with the Card Configuration jumper on the terminal module to specify which function s shown in Table 1 1 can be performed on counter channels The Card Configuration jumper sets allowable counter measurement function s and defines the channels which can be used for the measurement The jumper has four positions TOTAL FREQ 4 CH and 3 CH See Figure 1 1 for counter functions and channel definitions for e
5. 3 1 Chapter Contents 3 1 Warnings Cautions and Notes 3 1 Getting Started 3 3 Setting Counter Jumpers ER Aone WAA 3 4 Setting Card Configuration Jumper 3 4 Setting Quadrature Jumpers 3 5 Setting Counter Triggering 3 6 Trigger SOurces 3 6 Connecting External Triggering 3 7 Configuring Isolated Channels TENE 3 8 Setting Signal Level Jumpers 3 9 Adding Signal Conditioning Elements 3 9 Connecting Field Wiring 3 9 Configuring Non Isolated Channels 3 10 Setting AC TTL Jumperss 3 13 Adding Signal Conditioning Elements 3 13 Connecting Field Wiring 3 13 Using Pullup Resistors 3 13 Typical Connections 3 14 Installation and Checkout 3 14 TABLE OF CONTENTS Cont d Chapter 4 PROGRAMMING THE COUNTER INITOGQUCLIOBE sais ps a ra RR 4 1 Chapter Contents 4 1 Command Summary 4 1 Selecting Channel Parameters 4 3 Selecting Channel Function 4 4 Channel Function Presets CONF 4 4 Channel Function FUNC ssa rt 4 6 Selecting Channel Input 4 6 Input Terminals TERM J
6. 1 to 0 Rollover NPER 1 to 0 rollover NPER 1 to 0 Table 4 3 CONF function Parameters Cont Up Down Counts Up Down UDC Counts Up Down UDCM Counts Mod NPER Count With Direction Control Count CD D Direction Count CDM Direction Mod NPER Quadrature CD Count Quadrature CDM Count Modulo NPER Ratio Measurements Ratio RAT Period Measurements Period PER Delayed PERD Period Frequency Measurements Frequency FREQ S Notes MH input channel Count up on A input count down on B input Result is A B counts Count up on A input count down on B input Result is A B counts modulo NPER Count A input up or down B input cont rols direction Count A input up or down B input cont rols direction Count modulo NPER Count up on all A input transitions when B leads A Count down on all A input transitions when A leads B Same as Quadrature Count except count modulo NPER Measure average Count number of A input counts per B input period Measure average of NPER periods of A input Measure NPERth gated period of A input gate with B input Measure average frequency of A input ee FUNC command does not apply to FREQ parameter il CONF Command Preset Values After NPER B Periods After NPERth Period of A After NPERth Gated Period of A Although B input is not used PER function must be programmed on a d
7. 232 r BO DISKS F DDD ons 1 52 tefie 1 i Ses etse esi Fa Da Se ESSE SEC b 4 74 Connect Gen A io CH OA A input Connect Gen B to CH OB 8 input o x nmn JB t E gs N j mar 2 j SU ry Din 292 OO Q NOTE MAX 1 10 TO CHASSIS CH 0 counts up on A input down on B input Result is A B counts Modulo 5 A B 0 to 4j Lew 3852P A15 4 4 Figure 4 4 Example Count Pulse Rates Modulo 5 Count With Direction Control functions include Count Direction CD Count Direction Modulo NPER CDM Quadrature Count CD and Quadrature Count Modulo NPER CDM Use the Count Direction CD function to determine the net number of counts up counts minus down counts for an input as controlled by a second input Use the Count Direction Modulo NPER to determine the net number of counts modulo NPER where NPER 2 to 65535 is set with the NPER command For these functions the A input is counted up or down depending on the level of the B input the gate level Quadrature Count CD is similar to Count Direction CD except that every transition of the A input is counted and twice the number of counts are returned Quadrature Count Modulo NPER CDM is similar to Count Direction Modulo NPER CDM except that every transition of the A input is counted and twice the number of counts are returned For Quadrature Count the A input is always counted up when the B input leads
8. 24V 24V setting 48V Field Wiring Connections DOA OO Depending on Card Configuration setting connect double input functions to CHOA and CHOB or to CH1A and CHIB Connect single input funclions ta CHO CH1 CH2 CHS or CHA NOTE CAUTION ad MAX INPUT MAX INPUT 1Q TO CHASSIS 3852P A15 35 4 Figure 3 4 Isolated Channel Features 3 8 Configuring the Counter Setting Signal Level Jumpers Adding Signal Conditioning Elements Connecting Field Wiring As shown in Figure 3 4 each Isolated input channel has a separate jumper which sets the channel input voltage level to 5V 12V or 24V where the level refers to the voltage differential between Vhigh and Vlow Maximum differential voltage for the 5V and 12V settings is 24 volts while maximum differential voltage for the 24V setting is 42 volts Set each jumper for the required input level As required you can install a user supplied capacitor in each Isolated input channel Copt connector to act as a low pass filter see Figure 3 4 for Copt location When a capacitor is placed across Copt input signal attenuation for the channel is as shown in the following equation where C capacitance in Farads to be placed across Copt R in Q depends on the range set by the 5V 12V 24V Signal Level Jumper and f frequency of the desired 3 dB point 1100 R Attenuation 1100 R 1100 2af RTC where
9. 3 3852P A15 2 3 Figure 2 3 Example Gated Total Counts TOTAL 2 8 Selecting Counter Functions Up Down Counts UDC UDCM Ungated Total Counts Modulo NPER TOTALM Use Ungated Total Counts Modulo NPER TOTALM to totalize counts and restart the count after a desired number of counts With this function you can set a channel to count up from 0 to a value from 2 to 65534 roll over to 0 and begin counting up again For this function the channel counts the A input LH or HL transitions as programmed starting at O up to NPER 1 where NPER 2 to 65535 is set with the NPER command There is no preset value other than 0 Since this is a single input function the B input is not used Accuracy is 1 count The count sequence continuously repeats as long as the channel is programmed for the TOTALM function Each channel can be enabled for an overflow interrupt when the counter rolls over from NPER 1 to 0 Figure 2 4 shows an example count sequence for A input LH transitions and NPER 4 Gated Total Counts Modulo NPER TOTALM Use Gated Total Counts Modulo NPER TOTALM to totalize counts on one input modulo NPER as gated by a second input An example would be to count the number of stepper motor steps when a control switch is open and reset the counter to zero with each complete revolution of the motor With this function the counter counts programmed A input transitions LH or HL starting at 0 up to NPER 1 NPE
10. PER PERD Period Measure Measure average period of PER Average an input Period Delayed Measure Measure the 100th gated Period Single period of an input PERD Period Frequency Measurements FREQ Frequency Measure Measure paddiewheel flow meter FREQ Flow flow rate by measuring pickup Rate input frequency Totalize Counts functions include Ungated Total Counts TOTAL Gated Total Counts TOTAL Ungated Total Counts Modulo NPER TOTALM and Gated Total Counts Modulo NPER TOTALM Two examples follow which use the TOTAL or TOTALM function The first example Count Switch Closures uses Ungated Total Counts TOTAL to totalize switch closures and generate an OVF interrupt after 10 closures The second example Count Switch Closures Modulo 5 uses Gated Total Counts Modulo NPER TOTALM to count switch closures count modulo 5 only when a control switch is open This program totalizes the number of times a switch S3 closes and generates an OVF interrupt when the switch closes 10 times See Figure 4 1 for typical connections and counter configuration for channel 503 of a counter in slot 5 of the mainframe When the OVF interrupt occurs counter rolls over from 1 to 0 the program returns the time of the interrupt and the message S503 10 Closures Programming the Counter 4 19 The STA command reads the Status Register and clears the FPS LCL INTR LMT and ALRM bits and CLROUT clea
11. Summary channel Since channel functions are programmed with the CONF or FUNC command the function column lists the CONF or FUNC Junction parameter which sets the channel to the function FUNC does not apply to Frequency Measurements As noted counter functions are defined for single input or double input channels A single input channel has one user input the A input while a double input channel has two user inputs the A input and the B input Generally the A input is the primary input to be measured and the B input is the auxiliary input usually a gate In Table 2 1 an S in the Ch column a single input channel and D a double input channel The Period PER function is an exception to the rule Although the Period function is defined for a double input channel the B input comes from the counter and the physical B input is not used Several functions count or measure Modulo NPER where NPER refers to the number of counts or periods used and the value is selected with the NPER function parameter Some functions generate interrupts when the channel is enabled In Table 2 1 OVF a counter overflow interrupt when the counter rolls over from 1 to 0 and MC a measurement complete interrupt when the measurement is complete Refer to the next section Counting Sequences for a description of the counter sequences 2 4 Selecting Counter Functions Table 2 1 Counter Function Summary en Totali
12. connecting field wiring 3 13 pullup resistors using 3 13 NPER 4 11 Number period 4 I1 Operating Modes 1 3 3 4 P Period Measurements PER 2 17 4 31 Presets 4 4 4 10 Programming the counter 4 1 Pullup resistors using 3 13 Q Quadrature count CD 2 14 4 25 Quadrature count mod NPER CDM 2 13 Quadrature jumpers setting 3 5 R Ranges resolution 4 12 Ratio measurements RAT 2 16 4 29 S Sample period 4 12 SPER 4 12 TBASE 4 12 TERM 4 6 Terminal module 3 3 Time base 4 12 TRIG 4 8 Trigger sources 3 6 U Ungated total counts TOTAL 2 7 4 19 Ungated total counts mod NPER TOTALM 2 9 4 19 Up down counts UDC 2 11 4 23 Up down counts mod NPER UDCM 2 11 4 23 Ww Warnings Cautions and Notes 3 1 X XRDOS 4 16 XTRG terminals using 3 7 Index Li Kip HEWLETT 44715 90001 PACKARD ido am AAA
13. 0 1 2 3 4 Counts TOTAL TOTALM only Frequency Measurements 0 1 2 3 4 0 1 2 3 4 FREQ only All functions except Frequency 0A 0B 1 2 3 0 1 2 3 on ch O plus TOTAL TOTALM functions on chs 1 2 and 3 All functions except Frequency OA 0B 1A 18 2 on ch 0 and ch 1 plus TOTAL TOTALM functions on ch 2 To set counter channels for your measurement first determine the function to be used for each channel and the type of channel single input or double input required To set all five channels for Frequency Measurements set the Card Configuration jumper to the FREQ position To set Ungated Total Counts TOTAL or Ungated Total Counts Modulo NPER TOTALM on each channel set the jumper to the TOTAL position For other requirements set the jumper to the 4 CH or 3 CH position as required Example Setting Card Configuration Jumper You want to make a Ratio Measurement RAT an Ungated Total Counts TOTAL measurement and an Up Down Counts UDC measurement on a counter Since Ratio and Up Down Counts each require a double input channel while Ungated Total Counts requires a single input channel set the Card Configuration jumper to the 3 CH position Then typical connections might be to connect the Ratio Measurement input to channels OA and OB or 1A and 1B connect the Up Down Counts input to channels 1A and 1B or 0A and OB and connect the Ungated Total Counts input to channel 2 For Quadrature Count CD or CDM you will need
14. Count Direction Modulo NPER Quadrature Count Quadrature Count Modulo NPER Ratio Measurements Ratio Period Measurements Period Delayed Period Count A input up or down B input controls direction Count A input up or down B input controis direction Count modulo NPER Count up on all A input transitions when B input leads A input Count down on all A input transitions when A input feads B input Same as Quadrature Count except count modulo NPER Measure average number of A input counts per B input period Measure average of NPER periods of A input Measure NPERth gated period of A input gate with B input Frequency Measurements Frequency Measure average frequency of A input Total counts on single input Total counts on single input gated by second input Total counts on single input modulo NPER Total counts on singie input gated by second input count modulo NPER Count difference between counts of two inputs Count difference between counts of two inputs Modulo NPER Count relative number of up counts and down counts Count relative number of up counts and down counts modulo NPER Quadrature counts Quadrature counts modulo NPER Measure average number of counts per period of second input A B Measure average value of NPER periods of input Measure value of single period of input delayed by NPER periods Measure frequency of single input
15. EDGE command has no effect for Quadrature Count the CONF preset value for EDGE EDGE HL HL is used Set Card Configuration dune to ACH 1 IS LO en Set Quadrature Jumpers J602 and 4603 on component module to Quadrature position LEA mm i Set CH OA and OB Signal Level ij Jumpers lo 5 V Connect encoder B signat to CH OB B A T BISE 14 2 4 poa F L 1 DS OO OOOO OA S Coos oOo B5 IPISISISIAS IS RISO I t 1 i Connect encoder A signal to CH OA A input 1 is i E 3 l ENCODER B SIGNAL WER SHAFT ENCODER 4y A SIGNAL P EFT ag 185 A in T Ne woo L o On AAO o NOTE MAX INPUT 410v TO CHASSIS Count up on all A input edges um the B signal leads the A signal CW rotation Count down on all A input edges when the A signal leads the B signal CCW rotation Result is twice the number of CW CCW steps of shaft rotation CW B LEADS A CCW A LEADS B Figure 4 6 Example Determine Shaft Position Using Quadrature 4 28 Programming the Counter 10 OUTPUT 709 RST 500 IReset counter 20 OUTPUT 709 USE 500 Use channel 500 30 OUTPUT 708 CONF CD ISet CD function 40 OUTPUT 709 TRIG SGL Trigger the counter 50 WAIT 60 Wait one minute 60 OUTPUT 709 CHREAD 500 IRead ch 500 net count 70 ENTER 709 A Enter count 80 PRINT M500 Position 5A 2 Deg Display count message 90 END Fo
16. Flow Rate 4 35 Chapter 1 Introduction Manual Contents Counter Description Getting Started Contents rT a SY L E E E a a E E SE E E E e E r A E A E E EE 4 Chapter 1 Introduction Rs Wa RS ae Manual Contents This manual shows how to configure and program the HP 44715A 5 Channel Counter Totalizer 200 kHz counter Refer to the HP 3852A Mainframe Configuration and Programming Manual for additional information on the counter Manual chapters are e Introduction contains a manual overview describes the counter and shows suggested steps to get started Selecting Counter Functions gives guidelines to define your measurement and to select the counter function required for the measurement Configuring the Counter shows how to configure counter channels and how to install and initially check the accessory Programming the Counter shows how to program the counter for counting and measurement functions and how to enable the counter for interrupts Counter Description The HP 44715A 5 Channel Counter Totalizer 200 kHz counter consists of a counter component module and a terminal module The counter has five channels which can be programmed for one of several functions Each channel can be hardware configured to one of four operating modes Counter Functions The counter can be programmed for counting or measurement functions as shown in Table 1 1 Quadrature Count also requires tha
17. HI A input LH transitions marking the start and end of periods and NPER 3 Note that the measurement starts at the beginning of the NPERth period DELAYED PERIOD NPER PERIOD a A INPUT LH TRANS B INPUT GATE HI 3852P A15 2 14 Figure 2 14 Example Delayed Period Measurements PERD Selecting Counter Functions 2 19 Frequency Use Frequency Measurements FREQ to measure the average frequency of Measurements inputs from gt 1 Hz up to 200 kHz With this function all five channels FREQ simultaneously perform Frequency Measurements only the Card Configuration jumper must be set to the FREQ position If enabled each channel generates a measurement complete interrupt when the frequency measurement is complete Frequency is measured by counting the number of programmed A input transitions LH or HL over a selected time base 10 msec to 1 sec The time base is the same for all channels NOTE You can also make Frequency Measurements by setting a channel to Period Measurements PER and taking the reciprocal of the period measured Since the resolution is better for Period Measurements this method offers a more accurate means to measure frequency than Frequency Measurements However PER measurements require two channels while FREQ uses only a single channel Also FREQ takes the measurement for a fixed period of time while PER takes the measurement for a fixed number of periods Measurement accura
18. Interrupts Type When Rollover 1to O Rollover tto 0 Rollover NPER t to 0 Rollover NPER 1 to O After NPER B Periods After NPERth Period of A Afier NPERth Gated Period of A After Gate Time Although B input is not used function must be programmed on a double input channel at FREQ parameter does not apply to FUNC command Selecting Counter Functions 2 5 Counting As noted the counter has two types of functions counting and measuring Sequences The counting functions Totalize Counts Up Down Counts and Count With Direction Control continuously repeat the count sequence while the measurement functions perform a one time measurement Figure 2 1 summarizes the count sequence for the counting functions Example Ungated Total Counts TOTAL TOTALM Count Sequences For example with Ungated Total Counts TOTAL the counter sequence is from 0 or from a preset value to 2147483647 to 2147483648 to 1 and back to O When the counter rolls over from 1 to 0 if the channel is enabled the counter generates an overflow OVF interrupt With Ungated Total Counts Modulo NPER TOTALM the count sequence is from 0 presets do not apply to NPER 1 where NPER 2 to 65535 is selected with the NPER command If the channel is enabled the channel generates an overflow interrupt when the counter rolls over from NPER 1 to 0 COUNT SEQUENCES Roi lover overflow interrupt
19. OUTPUT 709 EDGE LH LO 50 OUTPUT 709 NPER 5 60 OUTPUT 709 TRIG SGL 70 WAIT 60 80 OUTPUT 709 CHREAD 500 90 ENTER 709 A 100 PRINT 5501 Closures 3A 110 END IReset the counter Use channel 500 Set TOTALM function Count 1 LH edges only when S2 open ISet modulo 5 count Trigger the counter Wait one minute Read S1 gated closures modulo 5 IEnter S1 closures Display S1 closures For example assume seven S1 closures occurred with S2 open during the one minute interval Then since the count sequence for modulo is 1 2 S E dd 501 Closures 2 4 22 Programming the Counter the modulo 5 count is 2 and a typical return is Up Down Counts UDC UDCM Example Count Pulse Rates The Up Down Counts functions include Up Down Counts UDC and Up Down Counts Modulo NPER UDCM Use the Up Down Counts functions to measure the difference in counts between two inputs With Up Down Counts the A input always increases the count the B input always decreases the count and the count returned is the difference A B of the the two input counts Up Down Counts Modulo NPER is identical except that the count resets to zero at the next count after NPER I counts where NPER 2 to 65535 is set with the NPER command Two examples using the Up Down Counts functions follow The first example Count Pulse Rates counts the difference between the number of counts output from two pulse generators over a m
20. Total Counts TOTAL Ungated Total Counts Modulo NPER TOTALM and Frequency FREQ are the only single input functions All other functions are double input NOTE The Period Measurements PER function is a double input function However the B input comes from the counter and is NOT a user input For Period Measurements the A input must be connected to channel 0A or IA and the Card Configuration jumper must be set for 4 CH or 3 CH Example Field Wiring Isolated Channels Figure 3 5 shows example field wiring connections to Isolated input channels 0 and and the Card Configuration jumper set to 4 CH For this configuration a double input function can be connected to channel 0A TB4 and channel OB TB5 Also a single input function TOTAL or TOTALM can be connected to channel 1 TB6 For all inputs maximum differential voltage is 24 V Configuring Non Isolated Channels 3 10 There are three steps to hardware configure Non Isolated input channels as shown Figure 3 6 summarizes Non Isolated input channel features and shows Jumper locations e Set AC TTL jumpers Install signal conditioning as required e Connect field wiring Configuring the Counter i Card Configuration Jumper Set Card Configuration jumper to 4 CH posilion Channels are CHOA CHOB CH1 CH2 and CH3 Signal Conditioning Add optional user suppiled C across Copt as required input Signal Level Jumpers Set input signal level
21. all inputs to the counter at a rate specified by number where number sample period in seconds TBASE rbase USE cA For the channel specified by the USE ch command or parameter tbase sets the time base in seconds for use with PER PERD or FREQ functions Default is AUTO selection of time base 4 2 Programming the Counter Table 4 1 Counter Commands Cont d TERM terminal terminal USE cA For the channel specified by the USE ch command or parameter the first terminal parameter sets the terminal for the A input while the second terminal parameter sets the terminal for the B input for double input channels only The second terminal parameter does not apply to single input channels if the second terminal parameter is not used for doubie input channel functions the value of first terminal is used for both parameters TRIG source USE ch For the channel specified by the USE ch command or parameter source sets the trigger mode source to one of five modes AUTO EXT HOLD SGL or SYS When the counter is set to the FREQ function the trigger mode source applies to all five channels USE ch Use the channel specified by the ch command or parameter in commands to follow where ch is the address of the channel When USE ch is executed the address remains active until another USE statement or system reset XRDGS ch number INTO name or fmi For the channel specified by ch transfers the number of readings s
22. available it can be transferred to the mainframe memory or to the output buffer and or display with a CHREAD or XRDGS command Select the data transfer mode required for your measurement Refer to Chapter 6 in the HP 3852A Mainframe Configuration and Programming Manual for details on data transfer methods Interrupt Requirements For the Totalize Counts functions the counter can be enabled to interrupt on counter rollover OVF interrupt For Ratio Period or Frequency Measurements the counter can be enabled to interrupt on measurement complete MC interrupt When enabled interrupts can be handled in the mainframe or in the controller Select the interrupt mode required for your application Refer to Chapter 8 in the HP 3852A Mainframe Configuration and Programming Manual for guidelines on handling interrupts Counter Functions Function Overview When you have characterized your measurement the next step is to select the counter function required for each channel to be used This section describes the counter functions and shows counter operation for each function This subsection summarizes counter functions and describes the count sequence for the counting functions Totalize Counts Up Down Counts and Count With Direction Control Selecting Counter Functions 2 3 Counter Table 2 1 summarizes counter functions shows the purpose of the A input Functions and B input and shows the conditions to generate interrupts on an enabled
23. connect the terminal module to the component module and install the counter in a desired slot Refer to the HP 3852A Mainframe Configuration and Programming Manual to install the accessory 3 14 Configuring the Counter ACHTE Jumpers Set ACITTL jumpers to AC position Signal Conditioning Add optional user supplied C across Copi as required for iow pass filtering Add optional user supplied R across JMXX and Copt for channet attenuation as required i Card Configuration Jumper Set Card Contiguration jumper ta 4 CH position Channeiss are CHOA CHOB CH1 CH2 and CH3 mesece Bman Ors 3 am es aon ooo 1 IS BSS DE QOoQ ROT Y 1 SE 23 OGIO CEOGOCIEXCOCOEO 3 S ng Ea ase IO SHI z N i7 Ss SHIELD CHi INPUT TOTAL TOTALM CH B INPUT CH A INPUT an IO OO OF na H 4 C H 3 M PULL po gt NER e N N i o 3852P A15 5 8 Figure 3 8 Example Non Isolated Channels Field Wiring When the counter is installed enter the ID slot command from the front panel to check the counter identity At power on a counter returns 44715A while a counter component module only no terminal module attached returns 447XXX Note that if the terminal module is removed after power on the ID command returns 44715A If the counter does not return 44715A be sure you have addressed the correct slot and the terminal module is installed
24. edge transition to be counted or to set the gate level The EDGE trans trans USE ch command has four values for the trans parameter LH HL HI and LO For single input functions the second trans parameter is not allowed For double input functions the first trans parameter applies to the A input and the second trans parameter to the B input Power on setting is EDGE LH EDGE LH LH for double input functions Note however that CONF sets EDGE HL HL HL for double input functions NOTE 1 Although the PER function can be used only on a double input channel the second EDGE trans parameter need not be specified since the B input is internally generated by the counter 2 The EDGE command has no effect on Quadrature Count That is for any EDGE setting all A input edges are counted up when B leads A and counted down when A leads B Programming the Counter 4 7 Table 4 5 EDGE trans trans Parameters Gated Total Counts TOTAL TOTALM LH HE Count A input LH edges when the B input is high LH O Count A input LH edges when the B input is iow HL HI Count A input HL edges when the B input is high HLLO Count A input HL edges when the B input is low Up Down Counts UDC UDCM LH LH Count up on A input LH edges Count down on B input LH edges LH HL Count up on A input LH edges Count down on B input HL edges HLLH Count up on input HL edges Count down on B input LH edges HL HL Count
25. function 40 OUTPUT 709 EDGE LH HI Count up for B high down for B low 50 OUTPUT 709 TRIG SGL Trigger the counter 60 WAIT 60 Wait one minute 70 OUTPUT 708 CHREAD 500 Read ch 500 up down count 80 ENTER 709 A Enter count 90 PRINT M500 Position A Deg IDisplay count message 100 END For example assume the shaft starting position is 0 degrees and each step represents one degree of rotation Then if the shaft makes 10 CW steps and 20 CCW steps the number of CW CCW steps 10 and a typical return is M500 Position 10 Deg 4 26 Programming the Counter i CH i E Card Configuration Jumper to A mi alor E r HIELO T n COLS OO Ie c Ro 1 1 Set CH OA and O8 Signal Level Jumpers to 5 V t r 1 d I t 1 1 ae 1 2 DOS p Connect encoder B signal to CH O8 B input Connect encoder A signal to CH OA A input 1 1 TOR RR RES HC EE BSI 3 amp 1 E OE ENCODER ES E a 24V10 oj B SIGNAL e ALR lo t u SHAFT ENCODER d A SIGNAL ii dere lat le F t r E NON ISOLATED lm NOTE CAUTION 7 MAX INPUT MAX INPUT 410V TO CHASSIS sITOY TO CHASSIS S i 3852P A15 4 5 Count up on input LH transitions when the B input is high CW rotation Count down on input LH transitions when the B Input is low CCW rotation Result is number of C
26. is from 0 to 2147483647 to 2147483648 and back to 0 For down counts B input the count sequence is from O to 2147483648 to 2147483647 and back to 0 No interrupts are generated for Up Down Counts Measurement accuracy is 2 counts Figure 2 6 shows an example sequence with LH transitions for both the A and B inputs UP DOWN COUNTS A INPUT Jul LH TRANS B INPUT LH TRANS Wr CTR INCREMENT DECREMENT RESULT 1 2 1 2 3 2 A B 3852P A15 2 6 Figure 2 6 Example Up Down Counts UDC Up Down Counts Modulo NPER UDCM Use Up Down Counts Modulo NPER UDCM to measure the difference A B between two inputs to a channel modulo NPER For this function the counter counts up on programmed A input transitions LH or HL from 0 up to NPER I where NPER 2 to 65535 The counter counts down from NPER 1 to 0 on programmed transitions LH or HL of the B input No interrupts are generated and measurement accuracy is 2 counts Figure 2 7 shows an example sequence for NPER 3 with LH transitions for the A input and HL transitions for the B input Selecting Counter Functions 2 11 UP DOWN COUNTS MODULO 3 A INPUT LH TRANS B INPUT LH TRANS iss CTR INCREMENT DECREMENT RESULT 1 9 1 2 A B 3852P A15 2 7 Figure 2 7 Example Up Down Counts Modulo NPER UDCM Count With Count With Direction Control includes four functions Direction Control e Count Di
27. is the period of the counter internal clock which is counted during NPER periods of the input base values are psec 10 psec 100 usec 1 msec and 10 msec with default value AUTO Refer to Time Base TBASE for details on the fbase parameter Three commands are used to set input channel parameters TERM sets the input path Isolated or Non Isolated channels EDGE sets the input edges to be counted or sets the gate level and TRIG sets the counter trigger source The input signal path Isolated or Non Isolated is set by the TERM terminal terminal USE ch command The first termina parameter sets the A input terminals and the second terminal parameter sets the B input terminals for double input functions only TERM ISO sets Isolated Input terminals and TERM NON sets Non Isolated Input terminals Power on default and CONF settings are TERM ISO for single input functions and TERM ISO ISO for double input functions 4 6 Programming the Counter Count Gate Edges EDGE Example Specifying Input Terminals TERM For example if the Card Configuration jumper is set for 4 CH configuration TERM NON NON USE 200 sets the terminal inputs for channels OA and OB of a counter in slot 2 of the mainframe to Non Isolated input Or if the jumper is set for 3 CH configuration TERM ISO ISO USE 201 sets channels 1A and IB of a counter in slot 2 of the mainframe to Isolated input Use the EDGE command to select the input
28. jumpers to 5V position L Ne 232 000 o CH1 INPUT TOTAL TOTALM CH B INPUT Sio TB m c e gs O co O S 3 i ORE a sm3 Sr pda CH DA INPUT TL Em 12VoOo ES i m 88 E sue zao S O m L NON ISOLATED SL ISOLATED q 10901 xg p ames E fe EET pod tod COL LOEOC OL Ja S td E NOTE CAUTION MAX INPUT MAX INPUT 10V TO CHASSIS N 3852P A15 3 5 Figure 3 5 Example Isolated Channels Fieid Wiring Configuring the Counter 3 11 Card Contiguration Jumper Set Card Configuration jumper for TOTAL FREQ 4CH or 3 CH position as required j input Signal Level Maximum input is x 10V lo chassis For AC TTL jumpers in AC position input must be 220 mV rms and s 20V p p For ACITTL jumpers in TTL position TTL inputs must have Vlow lt 8V and Vhigh z2 25V Yi IS aoa nog Coos IDO i ISCAS ler i i Signal Conditioning I i i 1 amp i is i Connect optional user supplied E 2 S MO m C across Copt in each channel S O copt OF S C art ol EA a R in ko i E TAS S ER C in aF gt roltoff freq i IS So IS in kHz m _ IBi Connect optional usersupplied R e E nn Be across JMXX jumpers and Copt for S O Copt OF S attenuation For example tor a 2 t E e Em o attenuation in CHO use 1 kQ e oy 2 R across JMO1 and JM62 and use 2 a S kn across Copt S La o0 S L a
29. overflow or on measurement complete depending on the function set for the channel Also each channel can be prevented from interrupting with the DISABLE INTR USE ch command Interrupts can be independently enabled for each channel with the ENABLE INTR command Depending on the function set counter overflow OVF or measurement complete MC interrupts can be enabled as shown in Table 4 15 If more than one channel generates an interrupt the mainframe services the lowest numbered channel first then the next lowest etc The counter keeps track of the interrupts which have not been serviced OVF interrupts are automatically disabled and cleared when serviced MC interrupts are automatically disabled when serviced and cleared when the reading is taken from the channel The RST or RST slot reset command disables all channels from interrupting on counter overflow or measurement complete Table 4 15 Interrupts vs Counter Functions When Generated NPER range Count goes from 1 to 0 N A Count goes from NPER 1 to 0 2 to 65535 After NPER B input periods 1 to 65535 After NPER A input periods 1 to 65535 After NPERth gated A input period 1 to 65534 After gate time N A Each counter channel can be independently disabled from generating an OVF or MC interrupt with the DISABLE INTR USE ch command The DISABLE INTR command disables OVF or MC interrupts as applicable interrupts for the channel specified by the USE ch command or p
30. signal level jumpers install user supplied signal conditioning elements and how to connect field wiring _ Configuring Non Isolated Channels shows how to configure Non Isolated input channels It includes setting AC TTL jumpers installing optional user supplied signal conditioning elements using pullup resistors and connecting field wiring This section summarizes WARNINGS CAUTIONS and NOTES which apply to the counter You should review the WARNINGS and CAUTIONS before handling or configuring any accessory Configuring the Counter 3 1 3 2 Configuring the Counter WARNING SHOCK HAZARD Only qualified service trained personnel who are aware of the hazards involved should install remove or configure any accessory Before touching any installed accessory turn off all power to the mainframe extenders and to all external devices connected to the mainframe extenders or accessories WARNING POSSIBLE OPERATOR INJURY For safety consider all accessory channels to be at the highest potential applied to any channel CAUTION MAXIMUM INPUT VOLTAGE Maximum input voltage to Isolated channels is 170 V between any two terminals or between any terminal and chassis Maximum input voltage to Non Isolated channels is 10 V between any two terminals or between any terminal and chassis CAUTION STATIC SENSITIVE Use clean handling techniques when handling the accessory Do not install an accessory without the metal co
31. the A input and is always counted down when A leads B Programming the Counter 4 25 Two examples follow which use the CD function to determine a stepper motor shaft position The first example Determine Shaft Position uses Count Direction to determine the shaft position CW or CCW from a reference point The second example Determine Shaft Position Using Quadrature uses Quadrature Count CD to more accurately measure the shaft position Example This example uses Count Direction CD to measure the relative number of Determine CW and CCW rotations of a shaft during a one minute interval See Figure Shaft 4 5 for typical connections and counter configuration for channel 500 of a Position counter in slot 5 of the mainframe We will assume the shaft encoder generates two square wave signels A and B which are 90 out of phase with each other The shaft encoder A signal is used as the A input count and the B signal as the B input direction Assume that CW rotations of the shaft cause the B input to lead the A input while CCW rotations cause the A input to lead the B input Since EDGE LH HI is set each step of CW rotation causes an up count on the A input LH transition while each CCW step causes a down count on the A input LH transition The result is the number of CW CCW steps of shaft rotation 10 OUTPUT 708 RST 500 Reset counter 20 OUTPUT 709 USE 500 Use channel 500 30 OUTPUT 708 CONF CD ISet CD
32. the counter for your measurement Defining Your Measurement Guidelines to help you characterize your measurement follow The guidelines include a discussion of measurement parameters and data interrupt requirements You should also refer to the Specifications appendix in the HP 3852A Mainframe Configuration and Programming Manual for complete specifications when characterizing your measurement Measurement Guidelines to select these measurement parameters follow Parameters e Type of Measurement e Input Signal Frequency e Input Signal Level e Measurement Accuracy Number of Measurements Modulo Range Requirements Measurement Resolution Seiecting Counter Functions 2 1 Type of Measurement The first step is to select the type of measurement to be made Table 1 1 in Chapter 1 summarizes the types of measurements which can be made with the counter Input Signal Frequency The counter can measure inputs up to 200 kHz minimum period of 5 psec Determine the frequency of the input signal for each channel to be used Input Signal Level Next determine the input signal level If the signal level is gt 10 V the Isolated input terminals must be used For lower level signals the Non Isolated terminals TTL for TTL inputs or AC for zero crossing detection can be used Measurement Accuracy In general measurement accuracy for the counter is 1 or 2 counts or 1 NPER counts for all functions except Period Delayed Perio
33. the switch is closed Configuring the Counter 3 13 SET ACL TTL JUMPER TO TTL POSITION M irl CARD Ri CONF TGURAT ION 8 I FQUIVALENT B CKT WITH PULLUP 40 0 fo O Osten 1 3 fe mf mm u ane SHIELD 1S Ll me ISOLATED 1 AN Aro i gene e EU E no O 4 jslol TT ho ps voo 5 0 Sem we c ci ES WS H 8 Xo zd a ie y MEL Vio a EX AS 4 ed S O mo Te YO _ Tas Mp S Copt OF ma shi O vea u 0 0 a JS C vioo S Ll o HS TB fer o ms 7h clik RE co muc wawi WA SNe O a spin 2 ISA 83 2 P jeune y pe S mo Pr i idee DESC in Br oO 2 SHIELL I eng MEER 3852P A15 3 7 PULLUP WIRING CONNECT IONS A 2 WIRES WORKS WELL IN LOW NOISE ENVIRONMENTS B 4 WIRES WORKS WELL IN LOW AND HIGH NOISE ENVIRONMENTS Figure 3 7 Example Using Pullup Resistors Typical Figure 3 8 shows example field wiring connections to channel 0 CHOA and Connections CHOB and to channel 1 The Card Configuration jumper is set to the 4 CH position and the AC TTL jumpers are set to AC for both channels With this configuration a double input function any function except TOTAL TOTALM or FREQ can be input to channel 0 and a TOTAL or TOTALM function can be input to channel 1 Installation and Checkout When required channels have been configured and field wiring connected replace the terminal module cover
34. to change the settings of the Quadrature jumpers on the counter component module and set the Card Configuration jumper to the 3 CH or 4 CH position When the Card Configuration jumper is set for 4 CH only channel 0 inputs OA and OB can be used for Quadrature Count For 4 CH configuration set jumpers 1602 and J603 to pins 1 and 2 which configures channel 0 for Quadrature Count Configuring the Counter 3 5 When the Card Configuration jumper is set for 3 CH both channels 0 and can be used for Quadrature Count For 3 CH configuration set J602 and J603 to pins 1 and 2 to configure channel 0 and set J600 and J601 to pins l and 2 to configure channel 1 See Figure 3 2 for quadrature jumper locations and settings FOR 4 CH CONFIGURATION MOVE J602 AND J693 TO QUADRATURE POSITION TO SET CHANNEL CH N A FOR 4 CH CONFIGURATION FOR STCH CONFIGURATION MOVE J6 2 AND J683 TO SET CHANNEL C MOVE J600 AND JEM TO SET CHANNEL i NORMAL gfo iff QUADRATURE POSITION iB 4151 POSITION i i J600 Jeg3 Ze f 3 o J6Q1 JEM a 3 CHI CHO QUADRATURE JUMPERS ac ILLI NEL OD SEE a put Figure 3 2 Setting Quadrature Jumpers Setting Counter Triggering Trigger Sources 3 6 Configuring the Counter This section shows counter triggering sources and gives guidelines to connect external trigger sources to the XTRG terminals on the terminal module The counter trigger source or mode is set with the TRIG source USE ch comma
35. up on A input HL edges Count down on B input HL edges Count With Direction Control CD CDM LH HI Count up on A input LH edges when the B input is high Count down on A input LH edges when the B input is low LH LO Count up on input LH edges when the B input is low Count down on A input LH edges when the B input is high HL HI Count up on A input HL edges when the B input is high Count down on A input HL edges when the B input is low HL LO Count up on A input HL edges when the B input is low Count down on A input HL edges when the B input is high Quadrature Count CD CDM N A Count up on all A input edges when B leads A Count down on al A input edges when A leads B Ratio Measurements RAT LH LH LH edges mark A and B input periods LH HL LH edges mark A input periods HL edges mark B input periods HL LH HL edges mark A input periods LH edges mark B input periods HL HL HL edges mark A input and B input periods Delayed Period Measurements PERD LH HI Count A input LH edges when B input is high LH LO Count A input LH edges when B input is low HL HI Count A input HL edges when B input is high HL LO Count A input HL edges when B input is low Hi is equivalent to LH and LO is equivalent to HL Same action for any setting of EDGE Hog Trigger Source When the input terminals and count gate edges have been selected the next TRIG step is to select the counter trigger source with t
36. 0 OUTPUT 709 USE 500 Use channel 500 30 OUTPUT 709 CONF PER ISet PER function 40 OUTPUT 709 EDGE LH Set LH transitions on A input 50 OUTPUT 709 NPER 100 Average 100 periods of input 60 OUTPUT 709 TBASE 00001 ISet 10 usec time base 70 OUTPUT 709 TRIG SGL Trigger the counter 80 OUTPUT 709 CHREAD 500 IRead ch 500 avg period 90 ENTER 709 A Enter avg period 100 PRINT Avg Period A sec Display avg period 110 PRINT Avg Freq 51 A Hz IDisplay avg frequency 120 END If the average period of the input is 0 995 msec the average frequency of the input is 1005 02512563 Hz and a typical return when the measurement completes is Avg Period 000995 sec Avg Freq 1005 02512563 Hz This program measures the period of an input with maximum period 10 msec after 100 gated periods have occurred See Figure 4 9 for typical connections and counter configuration for channel 500 of a counter in slot 5 of the mainframe This program counts A input LH transitions when the B input gate is low and measures the period of the 100th gated period of the A input We will require at least 1 psec of resolution and will set TBASE base 1 psec Then resolution 0 01 psec and maximum period which can be measured 65 535 msec refer to Table 4 12 10 OUTPUT 709 RST 500 Reset counter 20 OUTPUT 709 USE 500 Use channel 500 30 OUTPUT 709 CONF PERD Set PERD function 40 OUTPUT 709 EDGE LH LO Count LH A input
37. 967296 is returned as a negative number Thus for these functions if a negative number is returned use 4297487296 minus the absolute value of the number returned For example for a channel set to the TOTAL function if 1000000000 is returned the actual number of counts on the channel 4294967296 1000000000 3294967296 Programming the Counter 4 15 Table 4 14 Data Returns vs Counter Functions Data Returned TOTAL Total counts on A input TOTALM Total counts on A input modulo NPER Difference between A input and B input counts A B Difference between A input and B input counts A B modulo NPER Net counts on input Net counts on A input modulo NPER Average counts on A input per B input period Average of NPER per ods of the A input Value of NPERth gated period of the A input Average frequency of the A input 2147483648 to 2147483647 0 to 65534 UDC 2147483648 to 2147483647 UDCM O to 65534 1 CD 2147483648 to 2147483647 0 to 65534 0 to 65535 NPER 5 usec to 655 35 NPER sec 5 sec to 655 35 sec 1 Hz to 200 kHz CHREADZ cannot be used for the FREQ function Read Zero Use the CHREADZ command to read and zero the count on a channel Results CHREADZ For measurements which can be read at any time CHREADZ performs the same functions as CHREAD except that the channel cou
38. ESS FOR A PARTICULAR PURPOSE Hewlett Packard shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing performance or use of this material Hewlett Packard assumes no responsibility for the use or reliability of its software on equipment that is not furnished by Hewlett Packard This document contains proprietary information which is protected by copyright All rights are reserved No part of this document may be photocopied reproduced or translated to another language without the prior written consent of Hewlett Packard Company i Copyright 1985 by HEWLETT PACKARD COMPANY D HEWLETT PACKARD CERTIFICATION Hewlett Packard Company certifies that this product met its published specifications at the time of shipment from ihe factory Hewlett Packard further certifies that tis calibration measuremenis are traceable io the Untied States Na tional Bureau of Standards to the extent allowed by the Bureau s calibration facility and to the calibration facilities of other International Standards Organization members WARRANTY This Hewlett Packard instrument product is warranted against defects in materials and workmanship for a period of one year from date of shipment During the warranty period Hewlett Packard Company will at its option either repair or replace products which prove to be defective For warranty service or repair this product must be returned
39. HP 3852A in bereinstimmung mit den Bestimmungen von Postverf gung 1046 84 funkentst rt ist Der Deutschen Bundespost wurde das Inverkehrbringen dieses Ger tes Systems angezeigt und die Berechtigung zur berpr fung der Serie auf Einhaltung der Bestimmungen einger umt Zusatzinformation fur Me und Testger te Werden Me und Testger te mit ungeschirmten Kabeln und oder in offenen Me aufbauten verwendet so ist vom Betreiber sicherzustellen da die Funk Entst rbestimmungen unter Betriebsbedingungen an seiner Grundst cksgrenze eingehalten werden Manufacturer s declaration This is to certify that the equipment __ _ CP 3852A 0000000 is in accordance with the Radio Interference Requirements of Directive FTZ 1046 84 The Ger man Bundespost was notified that this equipment was put into circulation the right to check the series for compliance with the requirements was granted Additional information for Test and Measurement Equipment lf Test and Measurement Equipment is operated with unscreened cables and or used for measurements on open set ups the user has to assure that under operating conditions the Radio interference Limits are still met at the border of his premises NOTICE The information contained in this document is subject to change without notice HEWLETT PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MATERIAL IN CLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITN
40. HP 3852A Data Acquisition Control Unit HP 44715A 5 Channel Counter Accessory Configuration and Programming Manual U Bar Copyright Hewlett Packard Company 1987 Manual Part Number 44715 90001 Printed MARCH 1987 Edition 1 Microfiche Part Number 44715 99001 l Printed in U S A E0387 Printing History New editions are complete revisions of the manual Update packages which are issued between editions contain additional and replacement pages to be merged into the manual by the customer The dates on the title page change only when a new edition or a new update is published No information is incorporated into a reprinting unless it appears as a prior update the edition does not change when an update is incorporated Many product updates and fixes do not require manual changes and conversely manual corrections may be done without accompanying product changes Therefore do not expect a one to one correspondence between product updates and manual updates Edition 1 OED EE ca ated en a MARCH 1987 RESTRICTED RIGHTS LEGEND Use duplication or disclosure by the Government is subject t restrictions as set forth in subdivision b 3 ii of the Rights in Technical Data and Computer Software clause at 52 227 7013 Hewlett Packard Company 3000 Hanover Street Palo Alto California 94304 Cr HEWLETT PACKARD Herstellerbescheinigung Hiermit wird bescheinigt da das Ger t System
41. If these are correct but 44715A is not returned refer to the HP 3852A Assembly Level Service Manual for service procedures This completes hardware configuration for the counter Refer to Chapter 4 Programming the Counter to program counter channels for your application Contiguring the Counter 3 15 Chapter 4 Programming The Counter Contents Intr d ch n CEPS 4 Chapter Contents UN Pn ador TG 4 1 Command Summary RL 4 1 Selecting Channel Parameters 4 3 Selecting Channel Function 4 4 Channel Function Presets CONF 4 4 Channel Function FUNC 4 6 Selecting Channel Input 4 6 Input Terminals TERM 4 6 Count Gate Edges EDGE 4 7 Trigger Source TRIG 4 8 Selecting Counfs Timing 4 9 Counter Presets CNTSET 4 10 Number or Period NPER 4 11 Sample Period SPER nern 4 12 Time Base TBASE 4 12 Selecting Reads 4 15 Single Read CHREAD 4 15 Read Zero Results CHREADZ 4 16 Multiple Reads KRDGS J 4 16 Selecting Interrupts 4 17 Enabling Interrupts ENABLE INTR 4 17 Disabling Interrupts DISABLE INTR 4 17 Programming Er
42. Maximum Resolution 1 sec 65 535 msec 1 psec 10 sec 655 35 msec 10 psec 100 psec 6 5535 sec 100 psec 1 msec 65 535 sec 1 msec 10 msec 655 35 sec 10 msec Setting TBASE base for Frequency Measurements FREQ As shown in Chapter 2 see Figure 2 15 the FREQ function provides the average frequency of the input as measured over an adjustable time base gate time When the Card Configuration jumper is set to the FREQ position you can set the gate time for Frequency Measurements with the TBASE tbase parameter For the FREQ function the TBASE fbase setting applies to ALL five channels Power on default and CONF setting for tbase is AUTO Table 4 13 shows the frequency range and resolution for each of the three thase settings with SPER 1 ysec Table 4 13 TBASE base Settings FREQ Function base Gate Time Frequency Range Resolution 1 sec 1 sec 1 Hz to 65 535 kHz 100 msec 100 msec 10 Hz to 200 kHz 10 msec 10 msec 100 Hz to 200 kHz SPER 1 psec When the Card Configuration jumper is set to the FREQ position SPER and TBASE interact to determine frequency range and resolution For example with SPER 1 psec and TBASE tbase 100 msec the frequency range is from 10 Hz to 200 kHz with 10 Hz resolution For SPER 1 psec the minimum pulse width for the input 1 2 0 5 usec 2 5 psec However if SPER is changed to 10 usec the minumum pulse width 10 2 0 5 usec 20 5 psec
43. N Wa WA OANA TO 184 SJ O ct Ojo oo oz s wes e Lj 9 ova o as Q oi t LI Es O90 eR 1 C NOTE CAUTION d i MAX INPUT MAX INPUT G o 10V TO CHASSIS 170Y TO CHASSIS i t 3852P A15 3 6 Fleid Wiring Depending on Card Confirguration setting connect double input functions to CHOA andd CHOB or to CH1A and CH18 Connect signal input functions to CHO CH1 CH2 CH3 or CHA Figure 3 6 Non isolated Channel Features 3 12 Configuring the Counter Setting ACITTL Jumpers Adding Signal Conditioning Elements Connecting Field Wiring Using Pullup Resistors As shown in Figure 3 6 each Non Isolated input channel has a separate jumper which sets the channel input voltage level to AC or TTL AC inputs must be lt 10 VAC peak to chassis 20 VAC peak to peak input signal and 25 mV rms TTL inputs must have Viow 0 8 volts and Vhigh 22 25 volts Set each jumper to AC or TTL as required for your inputs Each Non Isolated input channel has connections JMXX for optional user supplied resistors and a connector Copt for an optional user supplied capacitor The JM jumpers can be replaced with resistors and Copt can be replaced with a resistor or a capacitor for DC attenuation or for a low pass filter For 2 1 DC attenuation on a channel place 1 kQ resistors across each of the JM jumpers and a 2 kQ resistor across Copt For a low pass filter compute the capacitance va
44. ONTRACT TORT OR ANY OTHER LEGAL THEORY ASSISTANCE Product maintenance agreements and other customer assistance agreements are available for Hewlett Packard products For any assistance contact your nearest Hewlett Packard Sales and Service Office Addresses are provided at the back of this manual vi KIA Sackaro SAFETY SUMMARY The following general safety precautions must be observed during all phases of operation service and repair of this instrument Failure to comply with these precautions or with specific warnings elsewhere in this manual violates safety standards of design manufacture and intended use of the instrument Hewlett Packard Company assumes no liability for the customer s failure to comply with these requirements GROUND THE INSTRUMENT To minimize shock hazard the instrument chassis and cabinet must be connected to an elec trical ground DO NOT OPERATE IN AN EXPLOSIVE ATMOSPHERE Do not operate the instrument in the presence of flammabie gases or fumes Operation of any electrical instrument in such an environment constitutes a definite safety hazard KEEP AWAY FROM LIVE CIRCUITS Operating personnel must not remove instrument covers Component replacement and internal adjustments must be made by qualified maintenance personnel Under certain conditions dangerous voltages may exist even with the instrument switched off To avoid injuries always disconnect input voltages and discharge circuits before tou
45. R 2 to 65535 as gated by the B input There is no preset value other than 0 The count sequence accuracy and interrupt conditions are the same as for Ungated Total Counts Modulo NPER Figure 2 5 shows an example sequence to count A input LH transitions when the B input is low For this example NPER 4 is set Up Down Counts includes two types of functions Up Down Counts UDC Up Down Counts Modulo NPER UDCM Selecting Counter Functions 2 9 UNGATED TOTAL COUNTS MODULO 4 A INPUT LH TRANS CTR INCREMENT RESULT 2 3 1 3852P A15 2 4 Figure 2 4 Example Ungated Total Counts Modulo NPER TOTALM GATED TOTAL COUNTS MODULO 4 as JUL dL LH TRANS GATE B INPUT GATE LO GATE GATE CTR INCREMENT RESULT 2 3 3852P A18 2 5 Figure 2 5 Example Gated Total Counts Modulo NPER TOTALM 2 10 Selecting Counter Functions Up Down Counts UDC Use Up Down Counts UDC to measure the difference in counts between two inputs With this function programmed A input transitions LH or HL increase the count and programmed B input transitions LH or HL decrease the count At any time the count in the counter is the difference A B between the the two input counts The counter counts up on programmed A input transitions LH or HL starting from 0 The counter counts down on programmed B input transitions LH or HL starting at 0 For up counts A input the count sequence
46. R Rsource 5V range R Rsource 27000 12V range R Rsource 66000 24V range C Copt value Farads f Frequency of 3 dB point To determine the value of Copt for a specific frequency let 1100 R 1100 2zf R Copt Then use the following equation to find Copt for a specified 3 dB point 1100 R Copt s unns e a a Copt in Farads 6911 5 Ritf As required determine the capacitance values needed for Copt and install the capacitors in the channels to be used When the signal level jumpers have been set and signal conditioning elements installed as required connect field wiring from your devices to the and terminals on TB4 TB5 TB6 TB7 or TB8 When connecting the wiring route the wires under the strain relief clamp and tighten the clamp screw to reduce the chance of the wires being pulled out of the terminals The additional terminal is for redundancy Configuring the Counter 3 9 Recall that hardware channel numbering depends on the setting of the Card Configuration jumper When connecting field wiring be sure the inputs match the desired channel numbers For example inputs connected to TB7 can be CH3 CH2 or CHIB inputs depending on the Card Configuration jumper setting There are two types of functions for the counter single input and double input Single input functions require only one input the A input while double input functions require two inputs A input and B input Ungated
47. Resolution Time Base Resolution 1 usec 1 NPER asec 10 usec 10 NPER usec 100 sec 100 NPER psec 1 msec T NPER msec 10 msec 10 NPER msec Delayed Period Measurements PERD Use Delayed Period Measurements PERD to measure a single period of the A input as gated by the B input With this function the channel measures the NPERth gated period of the A input where NPER Ito 65534 In contrast to the Period Measurement PER function the B input is used as a gate 2 18 Selecting Counter Functions The B input gate level can be set for LO or HI When the gate level is set for HI A input periods are counted when the B input is high When the gate level is set for LO A input periods are counted when the B input is low If enabled the channel generates a measurement complete interrupt after the NPERth gated period of the A input has been measured For this function as with Period Measurements PER measurement accuracy is 0 01 of reading 1 count of resolution trigger error where trigger error is the maximum time for the input voltage to change from low to high or high to low Table 2 4 shows resolution for the PERD function For PERD note that resolution the Time Base used Table 2 4 Delayed Period Measurements PERD Resolution 1 psec 1 psec 10 asec 10 sec 100 psec 100 sec 1 msec 1 msec 10 msec 10 msec 2 8 Figure 2 14 shows an example measurement with the B input gate set for
48. TPUT 709 EDGE LH 50 OUTPUT 709 TERM NON 60 OUTPUT 709 TBASE 1 70 OUTPUT 709 TRIG SGL 80 OUTPUT 709 CHREAD 500 90 ENTER 709 A 100 PRINT Flow Rate cm sec 3 0 A 110 END Reset counter Use channel 500 ISet FREQ function ICount LH A input transitions Set Non Isolated input terminals Set 100 msec time base l Trigger the counter IRead average frequency IEnter frequency Display flow rate If the average frequency is 100 Hz since K 3 0 cm is assumed a typical return when the measurement completes is Flow Rate cm sec 300 Programming the Counter 4 35 e iat 3 ED qu 32 E 33 io 2E uv c a E E ss gk 25 is s b oc i wk 3 in I ua so 28 to 53 SE E z tx iQ j Ro 2 O ui Su ils E o oz f aim Ss 2 z amp 2 ci p7 To os Qu men 55 oa cy oa we E ez o E ox oz 35 a oz lt L v N n OO OSG E ooo ooo pum aa ja wa gal piso ieisiei eisa Bsa aisia 8 3 p a B E j ge 5 Pug 3852P A15 4 10 Figure 4 10 Example Measure Flow Rate 4 36 Programming the Counter Index Contents E E a E a a E a a a E a a EE A AC TTL jumpers setting 3 13 C Card configuration jumper setting 3 4 CHREAD 4 15 CHREADZ 4 16 CNTSET 4 10 Command summary 4 1 CONF 4 4 Count direction CD 2 12 4 25 Count direction mod NPER CDM 2 13 Count sequences 2 6 Counter configuration 3 3 Counter functions coun
49. W CCW steps of shatt rotation Cw B LEADS A CCW A LEADS B qe tog E UR Figure 4 5 Example Determine Shaft Position Example Determine In the previous example we assumed that the shaft had no vibration Shaft Position However a problem can occur if the shaft vibrates just enough to change Using Quadrature the A signal level without changing the B signal level With Count Direction since only the LH or HL as programmed transition of the A input can generate a count the count may increment without decrementing or vice versa thus giving a false count To correct this problem we will use Quadrature Count to count every transition of the A signal Then if the shaft vibrates enough to change the A signal without changing the B signal the counter will not acknowledge the count and false counts will be eliminated Programming the Counter 4 27 This program uses Quadrature Count CD to measure shaft position as in the previous example Recall that for Quadrature Count each edge of the A input is counted up counts when B leads A and down counts when A leads B Thus the result must be divided by two to get the actual number of CW CCW shaft rotations See Figure 4 6 for typical connections and counter configuration for channel 500 of a counter in slot 5 of the mainframe Note that the Quadrature jumpers on the component module J602 and J603 for 4 CH configuration MUST be set to the Quadrature position Since the
50. With Direction Control functions do not generate interrupts Debouncing Relay Inputs Relay inputs can be digitally debounced by specifying a programmable sampling period from 1 psec default to 160 msec Getting Started There are three main steps to configure and program the counter for your measurement Define Your Measurement e Configure the Counter e Program the Counter Define Your Measurement The first step is to define your measurement requirements and to select the counter function required for the measurement Refer to Chapter 2 Selecting Counter Functions for guidelines to define your measurement and to select the required counter function Configure the Counter The next step is to hardware configure counter channels for your measurement Refer to Chapter 3 Configuring the Counter to hardware configure counter channels When selecting devices to be connected to the counter refer to the Specification appendix in the HP 3852 A Mainframe Configuration and Programming Manual for details on voltage current and frequency limitations Program fhe Counter When you have configured the channels and selected the channel function s the last step is to program each channel for your application Refer to Chapter 4 Programming the Counter for guidelines to select channel parameters and some example programs for counter functions Introduction 1 5 Chapter 2 Selecting Counter Functions Contents Chapter Conten
51. ZVNIWeH3L S ususinseay 2ustboi siveweNseapy poled SyuaWwamseow OS 91i WO JO BU eu Od pe sajunos 198044 O Sjena Dg LX OF 16du QHA iyewa daanos ai 498044 t FOROS UGI QA HINGS sunig umegi n 1un02 SHE pue z y sus uo indul S us snid g yo un indu ejgnop Aouenbed jdesxa suopsuns e HOP Siguultua Bahr gie uo Aug Siusiueinsenu suenbes D3ud i Brod uOHnaunj 1ueuieinsepus JO UNOS 10 jouueuo use Welbog SUOHSUNZ UNAY Sjeuusu3 an e uo Sianga 9271849 jeuuei o ajfuiS 1v LOX uedunf uojsingjuo pres By UA sepo Bungiedo Moj jo euo O Jejunoo Buy 195 sepay Suntiedo 3 IGQOW LN 3NOdWOO X 43 uo indui aj uis smd 5 pue g suo o pidu ejgnop Ksuenbeij 1deoxe suoi2un ge HO Figure 1 1 Counter Features AIN BIpENh oj SINPOU jueuoduo2s uo ssiedwnf Bugies pug joupuay MODS uil steno usn Aq StuBlusinseoul sanseipend IJEN sjuouisihseay SINIEIPEND introduction 1 4 Interrupts Each counter channel can be enabled for measurement complete MC or counter overflow OVF interrupts depending on the function set on the channel When the channel is enabled Totalize Counts functions generate an OVF interrupt when the channel counter rolls over from 1 to 0 Also when the channel is enabled the Ratio Period and Frequency Measurement functions generate a MC interrupt when the measurement is complete The Up Down Count and Count
52. ach position When the jumper is set for TOTAL only Ungated Total Counts and Ungated Total Counts Modulo NPER can be performed on each channel When the jumper is set for FREQ only Frequency Measurements can be performed on each channel For the 4 CH or 3 CH positions any function except Frequency Measurements can be performed on any channel Triggering For either Isolated or Non Isolated channels the counter can be triggered externally with an input to the XTRG terminals Inputs to the XTRG terminals can be from an external user source or from the PACER OUT BNC port In addition the counter can be triggered internally from the mainframe or from the counter component module Introduction 1 3 danau OW SAWA jueuianseow 40 0p16A0 10 sjeuugi 8jqsuZ i BERE RS SAP 98su ogi 0 2097 popad Suydues siwa e Bujfqiseds Aq singup Key e2unoqep AjeipBrg Syjumuam vay Aauanbaiz O popeg Ole 30 10j pouuet 2 ergeua Suojouni SHUNOS 2919 20j idnigyul sidniajut pe4 nbes sg ajuemero Buuonpuo2 pula pps ues sesi pindu Bunto 104 AjHiqudRo qtrring snid siedwnf LOY easy i Sua waja Sujuompuoo jeu js i payddne sesn soy Ay tasdes said graduni 1949 gula BATY xeu ABEL sindu GaLV TOS sindui QALY IOS NON 10 Q31V 10S 9 n sjeu ig indu zv AA e TE Stv dzser Q srssno 0i ADLIF SISSYHO Oi AGI zr GALI NON rr IMNON I
53. amples 4 18 Totalize Counts TOTAL TOTALM 4 19 Example Count Switch Closures 4 19 Example Count Switch Closures Modulo 5 4 2 Up Down Counts UDC UDCM 4 23 Example Count Pulse Rates 4 23 Example Count Pulse Rates Modulo 5 4 24 Count With Direction Control CD CDM 4 25 Example Determine Shaft Position 4 26 Example Determine Shaft Position Using Quadrature esl ae ne ee 4 27 Ratio Measurements RAT 4 29 Example Measure Ratio 4 29 Period Measurements PER PERD 4 3 Example Measure Average Period 4 32 Example Measure Single Period 4 33 Frequency Measurements FREQ 4 35 Example Measure Flow Rate 4 35 Chapter 4 Programming the Counter Introduction This chapter shows how to select channel parameters for your measurement and shows some example programs for counting and measurement functions Chapter Chapter sections are Contents Introduction summarizes chapter contents and includes an alphabetical summary of commands which apply to the counter Selecting Channel Parameters gives guidelines to select channel parameters for your measurement It includes guidelines to select the channel function channel input counts timing reads and interrupts Programming Examples contains example programs to program the counter for counting an
54. and halt the sequence Descriptions of the measurement functions follow Refer to Table 2 1 for a summary of the measurement functions e Ratio Measurements RAT Period Measurements PER PERD Frequency Measurements FREQ Use Ratio Measurements RAT to count the number of programmed A input transitions LH or HL during NPER periods of the B input NPER to 65535 The A input count is divided by NPER to get the average number of A input counts per B input period The maximum number of counts on the A or B inputs is 65535 and measurement accuracy is 1 NPER counts 2 16 Selecting Counter Functions Period Measurements The channel can be enabled to generate a measurement complete interrupt after NPER B periods Figure 2 12 shows an example ratio measurement in which A input LH transitions are counted during 3 periods of the B input NPER 3 For this example LH transitions also mark the B input period start and stop The A B ratio average number of A input transitions per B period 5 3 RATIO MEASUREMENTS RATIO 5 3 Il T TRANS ne Es p f F ao E ONIS En wa PERIOD 1 PERIOD 2 PERIOD 3 CTR INCREMENT A 4 COUNTS l 2 3 5 3852P A15 2 12 Figure 2 12 Example Ratio Measurements RAT Period Measurements include the Period PER and Delayed Period PERD Measurements Period Measurements measures the average of PER PERD NPER periods of the A input while Del
55. arameter For a channel set to TOTAL TOTALM UDC UDCM CD or CDM function DISABLE INTR disables and clears the channel interrupt Then a subsequent ENABLE INTR will not prematurely generate an interrupt For the RAT PER PERD and FREQ functions DISABLE INTR clears but does not disable a pending interrupt so a subsequent ENABLE INTR could generate an interrupt The interrupt is cleared when the measurement is read Programming the Counter 4 17 NOTE I If a parameter edge term etc is changed on a disabled channel the channel remains disabled but any pending interrupts are cleared CONF clears and disables interrupts 2 Even if DISABLE INTR is not used an OVF interrupt is automatically disabled and cleared when the interrupt is serviced An MC interrupt is automatically disabled when it is serviced and is cleared when the reading has been taken on the channel Programming Examples This section shows example programs for several counter functions Refer to Table 4 16 for titles of the example programs Also refer to Chapter 2 Selecting Counter Functions for a description of counter functions The procedure for each example will be to use the CONF command to set the counter to a known state refer to Table 4 4 and then modify the conditions as required with low level commands EDGE etc For all functions except FREQ you can use FUNC rather than CONF to set the counter function However since FUNC does not
56. ayed Period Measurements measures the NPERth gated period of the A input Period Measurements PER With the Period Measurement PER function the counter averages NPER periods of the A input where NPER 1 to 65535 This is a double input function even though the B input is not used directly Minimum period for the A input is 5 psec maximum period is 655 35 seconds Data returned is the average value of NPER periods of the A input If enabled the channel generates a measurement complete interrupt after NPER periods of the A input have been received Figure 2 13 shows an example measurement to average three periods of the A input with LH transitions marking the start of each period Selecting Counter Functions 2 17 PERIOD MEASUREMENTS AVERAGE 3 PERIODS A INPUT LH TRANS PERIOD 1 PERIOD 2 pres gt 3852P A15 2 13 Figure 2 13 Example Period Measurements PER For this function the counter uses a reciprocal counter technique That is a counter clock is used which has a time base faster than the period to be measured With this technique measurement accuracy is 0 01 to reading 1 count of resolution trigger error where trigger error is the maximum time for the input voltage to change from low to high or high to low Measurement resolution can be increased by increasing NPER as shown in Table 2 3 Refer to Chapter 4 Programming the Counter for details Table 2 3 Period Measurements PER
57. ching them DO NOT SERVICE OR ADJUST ALONE Do not attempt internal service or adjustment unless another person capable of rendering first aid and resuscitation is present DO NOT SUBSTITUTE PARTS OR MODIFY INSTRUMENT Because of the danger of introducing additional hazards do not install substitute parts or per form any unauthorized modification to the instrument Return the instrument to a Hewlett Packard Sales and Service Office for service and repair to ensure that safety features are maintained vii Cr HEWLETT PACKARD Operating and Safety Symbols LINE rh R ATTENTION Static Sensitive NOTE CAUTION WARNING Vili Symbols Used On Products And In Manuals AC line voltage input receptacle Instruction manual symbol affixed to product Warns and cautions the user to refer to respective instruction manual procedures to avoid personal injury or possible damage to the product Indicates dangerous voltage terminals connected to interior voltage exceeding 1000 volts Protective conductor terminal Indicates the field wiring terminal that must be connected to earth ground before operating equipment protects against electrical shock in case of fault Clean ground low noise Indicates terminal that must be connected to earth ground before operating equipment for single common connections and protection against electrical shock in case of fault Frame or chassis ground Indicates equipmen
58. ct hardware external or software triggering Hardware lriggering requires conneclion from an external Source to the XTRG terminals baee ER 4 Configure Non isolated Channels For each Non isolated channel used Set ACITTL jumpers lo AC or TEL Add signal cond elements as required LU Connect field wiring max Input 10V to chassis use pullup Be copt 9 8 ME bid sv ISO a E E O O woo ES Hd M 2wioo 8 J o o LDS _ de o ode M a LI ANNO 187 u NO nn t ta i i po Capt 2183 p dao pe o eL mes eL H zoo O i o resistor as required 8 e EN eu S 10 cot oO 1I 2 sv zl 2 L 3 Configure Isolated Channels 12VOO _ AL WA PRO S Li For each Isolated channel used e ACE vva TBA Set 5VI12VI24VI signal level jumpers Ss O Copt Osi 1 Add signal cond elements as required Qu Na 3102 Te connect field wiring max input n LI say e NES 170V to chassis E S jee YA F F t LJ Gussrecobetdecaiosddevsuuvs veivseberviedecussse2oveseusboesesesedssinesseresrasviktberreceaqaahessietvessuareet SBS2P A15 3 1 Figure 3 1 Terminal Module Configuration Configuring the Counter 3 3 Setting Counter Jumpers Setting Card Configuration Jumper 3 4 Configuring the Counter When you have selected the counter function s required refer to Chapter 2 Selecting Counte
59. cy for Frequency Measurements is 0 01 of reading 1 count of resolution trigger error where trigger error is the maximum time for the input voltage to change from low to high or high to low Table 2 5 shows ranges and resolution for the three gate times Refer to Chapter 4 Programming the Counter for details Tabie 2 5 Frequency Measurements FREQ Ranges Resolution Gate Time Resolution 1 sec 1 Hz to 65 535 kHz 1 Hz 100 msec 10 Hz to 200 kHz 10 Hz 10 msec 100 Hz to 200 kHz 100 Hz 2 20 Selecting Counter Functions Figure 2 15 shows an example measurement with gate time time base of 1 sec and LH transitions of the A input used for counting Since 5 transitions occurred during the sec gate time average frequency 5 1 5 Hz FREQUENCY MEASUREMENTS 1 SECOND GATE TIME FREQUENCY 5 1 5 Hz A INPUT LH TRANS 1 A SEC GATE TIME GATE TIME ES 3852P 415 2 15 Figure 2 15 Example Frequency Measurements FREQ Selecting Counter Functions 2 21 Chapter 3 Configuring The Counter Contents EGR OG CHOI ae es ae re 3 1 AN Chapter Contents ee Tone eV Pa ics 3 1 254 Warnings Cautions and Notes 3 1 Tet Getting Started 3 3 Setting Counter Jumpers 3 4 Setting Card Configuration Jumper 3 4 Setting Quadrature Jumpers 3 5 Setting Counter Triggering
60. d and Frequency For these functions accuracy is 0 01 of reading 1 count of resolution trigger error where trigger error maximum time for the input voltage to change from low to high or high to low Therefore for Period Delayed Period or Frequency measurements determine the trigger error to ensure that resulting measurement accuracy will be acceptable Number of Measurements The number of measurements required will determine other factors such as resolution and measurement time Determine the number of measurements required for your application Modulo Range Requirements Normal counter range is from 273 to 231 1 32 bits 2s complement However for modulo NPER functions the counter can be set to count modulo NPER where the range of NPER is from 1 to 65535 counts Select the count range required for your measurement 2 2 Selecting Counter Functions Data Interrupt Requirements Measurement Resolution For Period and Delayed Period Measurements the resolution depends on the time base of the counter and the number of periods required to be measured For Frequency Measurements the range and resolution depend on the gate time Determine required signal resolution for the function s selected When you have defined your measurement parameters determine the data and interrupt requirements for the measurement Two considerations are data transfer mode and interrupt handling Data Transfer Mode When data is
61. d measurement functions Command Table 4 1 is an alphabetical summary of commands which apply to the Summary counter Refer to the HP 3852A Command Reference Manual for a complete description of these commands Programming the Counter 4 1 Table 4 1 Counter Commands CHREAD ch INTO name or fmi For the channel specified by ch reads the counts the period or the frequency of the input to the channel CHREADZ ch INTO name or fmi For the channel specified by ch reads and zeroes the count or the period of the input to the channel CHREADZ does not apply to Frequency Measurements FREQ CNTSET number USE ch Using the channel specified by the USE ch command or parameter sets the channel counter to the number specified by number CNTSET is valid only when the TOTAL function is programmed CONF function USE ch Configure the channel specified by the USE ch command or parameter to a counting TOTAL TOTALM UDC UDCM CD or CDM or to a measurement RAT PER PERD or FREQ function In addition CONF presets the channel to a known state and disables and clears all interrupts on the channel DISABLE INTR USE cA Prevents the counter channel specified by the USE ch command or parameter from generating an interrupt on counter overflow or measurement complete EDGE trans trans USE ch Sets edges to be detected on the channel specified by the USE ch command or parameter The first trans parameter sets the A input
62. e E on gs 2 0 3 x a se 58 o aoe E 55 Sa Zw to zu 32 og Se x2 Ge a 2 2 3 a o m m E i A15 4 7 wal JR mus i i i i 1 Lans cu Bisa er org 3852P Q mehren nee AA Ds TEST Tq FEY u aalis unh e CAUTION MAX INPUT 17O Ti 1CY TO CHASSIS Figure 4 7 Example Measure Ratio 4 30 Programming the Counter Period Measurements PER PERD 10 ON INTR 7 GOSUB Results 20 ENABLE INTR 7 2 30 OUTPUT 709 RST 500 40 OUTPUT 709 USE 500 50 OUTPUT 708 ROS INTR 60 OUTPUT 709 RQS ON 70 OUTPUT 709 CONF RAT 80 OUTPUT 709 ENABLE INTR SYS 90 OUTPUT 709 ENABLE INTR 100 OUTPUT 709 STA 110 OUTPUT 709 CLROUT 120 OUTPUT 709 EDGE LH LH 130 OUTPUT 709 NPER 1000 140 OUTPUT 709 TRIG SGL 150 GOTO 150 160 Results 170 OUTPUT 709 TIME 180 ENTER 709 T 190 PRINT Ch 500 MC O TIMESIT 200 OUTPUT 709 CHREAD 500 210 ENTER 709 A 220 PRINT Ratio SA 230 A SPOLL 709 240 STOP 250 END Call sub Results on interrupt IEnable controller intr on SRO Reset the counter Use channel 503 IEnable ROS Mask Reg INTR bit Set ROS mode ON Set RAT function Enable mainframe intr capability Enable counter intr capability iClear FPS LCL INTR LMT ALRM bits Clear output buffer Count LH trans on A and B input End meas after 1000 B periods Trigger the counter Loop until interrupt occurs IStar
63. e B input to be ignored and is not recommended Figure 2 10 shows an example of Quadrature Count in which the A and B signals are 90 out of phase When A leads B each A input edge LH and HL transitions is a down count When B leads A each A input edge is an up count The result is twice the number of up down counts which would be returned with the Count Direction CD function QUADRATURE COUNT A LEADS B B LEADS A MN a A en ae 0 D u A INPUT ALL TRANS ni ea na m B INPUT CTR INCREMENT DECREMENT RESULT 3852P A15 2 10 Figure 2 10 Example Quadrature Count CD Selecting Counter Functions 2 15 Measurement Functions Ratio Measurements RAT Quadrature Count Modulo NPER CDM Quadrature Count Modulo NPER CDM is similar to Quadrature Count CD except that the count sequence is from 0 to NPER I NPER 2 to 65535 and back to 0 see Figure 2 1 Figure 2 11 shows an example of Quadrature Count Modulo NPER with NPER 4 QUADRATURE COUNT MODULO 4 B LEADS A rere mma l PAEH 2 3 i 2 3 A INPUT ALL TRANS p an B INPUT CTR INCREMENT DECREMENT RESULT 3852P 415 2 11 Figure 2 11 Example Quadrature Count Modulo NPER CDM There are three types of measurement functions as shown In contrast to the counting functions in which the count sequence continuously repeats measurement functions make a one time measurement
64. ector on Power Supply Modules Terminal modules on plug in accessories Component module covers on plug in accessories inside terminal modules on plug in accessories Metal cover on component modules of plug in accessories HP 44701A HP 44702A B HP 44727A B C plug in accessories HP 44711A 44712A 447 13A referenced on HP 44702A and HP 44702B TABLE OF CONTENTS Chapter 1 INTRODUCTION Manual Contents CIC P RN wx 1 1 Counter Description 1 1 Getting Started 1 5 Chapter 2 SELECTING COUNTER FUNCTIONS Chapter Contents 2 1 Defining Your Measurement 2 1 Measurement Parameters 2 1 Data Interrupt Reguirements 2 3 Counter Functions 2 3 Function Overview 2 3 Counter Functions Summary 2 4 Counting Seguences 2 6 Counting Functions 2 7 Totalize Counts TOTAL TOTALM 2 7 Up Down Counts UDC UDCM 2 9 Count With Direction Control CD CDM 2 12 Measurement Functions 2 16 Ratio Measurements RAT eb a hi 2 16 Period Measurements PER PERD 2 17 Frequency Measurements FREQ 2 20 Chapter 3 CONFIGURING THE COUNTER Introduction
65. edges to be detected while the second trans parameter sets the B input edges to be detected The second trans parameter is not valid for single input channels If the second frans parameter is not specified for a double input channel the value for the first trans parameter is used for both ENABLE INTR USE ch Enables the channel specified by the USE ch command or parameter to interrupt Depending on the function set the channel will interrupt on counter overflow for TOTAL or TOTALM or on measurement complete RAT PER PERD or FREQ The command does not generate interrrupts for the UDC UDCM CD or CDM functions FUNC function tbase USE ch Sets the counter to one of nine functions TOTAL TOTALM UDC UDCM CD CDM RAT PER or PERD FUNC does not apply to Frequency Measurements The FUNC tbase parameter is valid only for PER and PERD functions Default for tbase is AUTO NPER number USE ch Use on the channel specified by USE ch command or parameter For the TOTALM UDCM or CDM functions the counter overflows at the next count after NPER 1 counts For the RAT function NPER periods occur on the B input during the measurement For the PER function NPER periods of the A input are averaged For the PERD function NPER 1 gated periods will occur on the A input before the measurement begins and the B input gates the A input count NPER is not valid for the TOTAL UDC CD or FREQ functions SPER number USE ch Samples
66. en up counts and down counts module NPER As with the Count Direction function the counter counts programmed A input transitions LH or HL up or down depending on the level of the B input The count sequence starts at 0 For up counts the count sequence is from O to NPER 1 and back to 0 For down counts the count sequence is from 0 to NPER 1 to O and back up to NPER I see Figure 2 1 Measurement accuracy is 1 count reversals 2 Figure 2 9 shows an example sequence with NPER 3 in which LH transitions of the A input are up counts when the B input is high and down counts when the B input is low B input level is set for HD Selecting Counter Functions 2 13 COUNT DIRECTION MODULO 3 LH TRANS B INPUT T GATE HI DOWN OW CTR INCREMENT DECREMENT RESULT 3 2 3852P A18 2 9 Figure 2 9 Example Count Direction Modulo NPER CDM Quadrature Count CD Quadrature Count CD is similar to Count Direction CD except that every transition LH and HL of the A input is counted This function can be used for applications such as measuring the position of a shaft using the A input and determining the direction of motion CW or CCW using the B input However a problem can occur if the shaft vibrates just enough to change the A input without changing the B input If this happens the count may increment but not decrement or vice versa giving a false count To overcome this you can set jumpers o
67. he TRIG source USE ch command Table 4 6 describes the TRIG source parameters and shows the previous TRIG source state s cancelled Power on and CONF source HOLD and default source SGL Note that TRIG EXT requires a hardware connection from the external trigger source to the XTRG terminals see Figure 3 3 4 8 Programming the Counter Selecting Counts Timing Table 4 6 TRIG source Parameters Cancels Description Previous source s Counter internal triggering TRIG EXT continuous triggering TRIG SYS External trigger source TRIG AUTO requires hardware connnection TRIG SYS from source to XTRG terminals Aborts ongoing measurement TRIG AUTO discards existing count and TRIG EXT disables any trigger source TRIG SGL for the channel s TRIG SYS Immediate single trigger when TRIG AUTO TRIG SGL is executed TRIG EXT TRIG SYS System Triggering used with TRIG AUTO TRG command see Figure 3 3 TRIG EXT The TRIG command should follow all commands which affect counter setup CONF TBASE NPER SPER EDGE TERM or CNTSET since TRIG and these commands aborts any ongoing measurement and destroys existing data Also if CONF is not used TRIG HOLD should be set before configuring the counter since other TRIG sources may send a trigger to the channel before the channel is properly configured TRIG source does not change when a channel is reprogrammed to another function When the Card Configuration jumpe
68. inute time interval The second example Count Pulse Rates Modulo 5 does the same thing except that the result is returned modulo 5 This program counts the difference between the number of pulses output from pulse generators A and B over a one minute period See Figure 4 3 for typical connections and counter configuration for channel 500 of a counter in slot 5 of the mainframe Set Card Configuration Jumper CH Set CH OA CH OB Signal Level dumpers to 5V Connect Gen A to CH OA A input f Connect Gen B to CH OB B input 4N GEN B gy L er o Q tara E 5 i M Figure 4 3 Example Count Puise Rates Programming the Counter 4 23 Example Count Pulse Rates Modulo 5 The program sets channel 500 to count up on generator A input LH pulses and to count down on generator B LH input pulses The program returns the difference A B in the two counts 10 OUTPUT 709 RST 500 20 OUTPUT 709 USE 500 30 OUTPUT 708 CONF UDC 40 OUTPUT 709 EDGE LH LH 50 OUTPUT 709 TRIG SGL 60 WAIT 60 70 OUTPUT 708 CHREAD 500 80 ENTER 709 A 90 PRINT Ch 500 A B Count A 100 END Reset counter Use channel 500 Set UDC function Set LH transitions on A and B Trigger the counter Wait one minute Read ch 500 A B count IEnter count Display count If during the one minute interval generator A outputs 500 pulses and generator B outputs 700 pulses a
69. lue from Copt 1 27f R where R resistor value in kQ to be placed across each of the JM jumpers f desired rolloff frequency in kHz and Copt capacitor value in pF Note that these elements attenuate only normal mode signals and will not help common mode noise rejection For example for filter rolloff frequency 1 kHz in channel 0 use R 1 kQ across JM01 and across JMO2 and use Copt 0 08 pF For filter rolloff frequency 10 kHz on this channel use R 1 kQ across JMOI and across JMO2 and use Copt 0 008 F When the AC TTL jumpers have been set and signal conditioning elements have been installed as required connect field wiring from your devices to terminals TBI TB2 or TB3 When connecting the wiring route the wires under the strain relief clamp and tighten the clamp screw to reduce the chance of the wires being pulled out of the terminals A 3 KQ pullup resistor to 5V is provided on each Non Isolated input channel For inputs such as relays or open collector outputs you can connect field wiring to the PULLUP and SHIELD terminals Connect PULLUP to SHIELD to and set the AC TTL jumper to the TTL position With these connections relay closure causes a low input and relay opening causes a high input Figure 3 7 shows typical connections using the pullup resistor The two wire connection method A is acceptable However the four wire connection method B provides better noise margin on logic low when
70. m periods which can be measured and the resolution for a given base setting divide the values shown in the Resolution column of Table 4 11 by the value of NPER For example if SPER 1 psec NPER 100 and TBASE fbase 10 psec the period range is from 5 psec minimum period for any fbase setting to 6 5535 msec with 0 1 psec resolution With SPER 1 psec minimum pulse width for the input 1 2 0 5 usec 2 5 psec However if SPER is changed to 10 usec minimum pulse width 10 2 0 5 psec 20 5 asec so the minimum period increases from 5 usec to 41 psec Table 4 11 TBASE base Resolution PER Function Period Range Minimum Maximum Resolution 1 psec 65 535 NPER msec 1 NPER psec 10 psec 655 35 NPER msec 10 NPER psec 100 sec 6 5535 NPER sec 100 NPER sec 1 msec 65 535 NPER sec T NPER msec 10 msec 655 35 NPER sec TO NPER msec Setting TBASE base for Delayed Period Measurements PERD As shown in Chapter 2 see Figure 2 14 the PERD function measures the period of the NPERth gated period of the A input Thus the considerations to set TBASE base for PERD are the same as for the PER function except that the NPER range to 65534 for the PERD function and the resolution does not depend on the NPER value Table 4 12 shows the TBASE base resolution for the PERD function Programming the Counter 4 13 Table 4 12 TBASE base Resolution PERD Function Period Range Minimum
71. mber of counts to preset the counter or sets the number of counts required to cause the counter to rollover refer to Table 4 8 Default value and value set by the CONF command is 0 As shown in Chapter 2 see Figure 2 1 without a preset value the count sequence is from 0 to 2147483647 counts to 2147483648 to 1 and back to 0 When the counter rolls over from 1 to 0 if enabled the channel generates a counter overflow OVF interrupt Therefore without a preset 4294967296 counts are needed to generate a counter interrupt Note that the count range is from 0 to 4294967296 while the CNTSET number range is from 2147483648 to 2147483647 The value to use for CNTSET number depends on the number of counts specified as shown in Table 4 8 For example if counts 1000 is desired number 1000 presets the counter to start counting at 1000 counts while number 1000 causes the counter to rollover after 1000 counts Or if counts 3 000 000 000 is desired number 1294967296 counts 4294967296 presets the counter to start counting at 3 000 000 000 counts while number 1294967296 4294967296 counts causes the counter to rollover after 3 000 000 000 counts 4 10 Programming the Counter Number or Period NPER Table 4 8 CNTSET number vs Counts Preset Counter number counts counts lt 2147483648 number counts 4294967296 counts 2147483648 Rollover After Counts number counts count
72. mple Measure Single Period 4 34 Programming the Counter Frequency Use the Frequency Measurements FREQ function to measure the average frequency of inputs from gt 1 Hz up to 200 kHz An example using the Measurements FREQ Example Measure Flow Rate FREQ function follows NOTE The PER function has more resolution and thus is more accurate than the FREO function for measuring frequency Refer to Period Measurements PER PERD for an example program This program measures the flow rate of a paddlewheel flow meter using magnetic pickup See Figure 4 10 for typical connections to channel 500 of a counter in slot 5 of the mainframe Note that the Card Configuration jumper must be set to the FREQ position With this setting all five channels measure frequency and no other function can be programmed on any channel Also note that the input is to the Non Isolated terminals and that the AC TTL jumper is set to the AC position The flow rate can be determined from rate K f where f the frequency of the magnetic pickup AC input and K in cm is a constant For this program we will assume K 3 0 cm and an approximate 100 Hz AC input We will require at least 50 Hz resolution so we will set TBASE tbase 100 msec which will allow the counter to measure a signal from 10 Hz to 200 kHz with 10 Hz resolution refer to Table 4 13 10 OUTPUT 709 RST 500 20 OUTPUT 708 USE 500 30 OUTPUT 709 CONF FREQ 40 OU
73. n the counter component module so that all transitions of the A input are counted Note that Count Direction CD counts programmed A input edges LH or HL up or down according to the programmed B input level LO or HI However with Quadrature Count all edges of the A input are counted The count is ALWAYS up when the B input signal leads the A input signal and ALWAYS down when the A input signal leads the B input signal two signals 90 out of phase are assumed 2 14 Selecting Counter Functions When configured for Quadrature Count the counter counts double the number of counts for Count Direction Table 2 2 summarizes the differences between Count Direction and Quadrature Count functions Table 2 2 Count Direction vs Quadrature Count Count Direction Quadrature Count Jumpers A Normal pins 2 amp 3 A Quad pins 1 amp 2 B Normal pins 2 amp 3 B Quad pins 1 amp 2 Application Non direction changing Direction changing shaft or low accuracy shaft high accuracy Error in 1 count plus t1 count Count Dir reversais 2 Result 1 count A input period 2 counts A input period EDGE cmd EDGE sets A input edge EDGE has no effect with effect to count and sets B input Quadrature Count gate level Other functions No effect l Wili not work Setting the A jumpers to Quad and the B jumpers to Normal causes the TOTAL TOTALM PER and PERD functions to count double the normal counts and th
74. nd Trigger sources are AUTO EXT SGL or SYS plus TRIG HOLD which disables the trigger Figure 3 3 summarizes the trigger sources Note that all sources except EXT are software triggers Refer to Chapter 4 Programming the Counter for a description of the TRIG command If you need to use an external trigger source refer to the next section Connecting External Triggering If not go to Configuring Isolated Channels or to Configuring Non Isolated Channels as required Mainframe Backplane Triggering i Counter Triggering TRIG SGL Single trigger when TRIG AUTO Counter internat command is executed trigger THIG SYS Trigger source is sat 7 TAIG EXT External trigger by TRG command Requires hardware connection lo XTRG ee en Fran HP 44715A Pe MAINFRAME A COMPONENT MODULE TRG mode l XTRG Power On FRIG HOLD i ima No Trigger E HP 3852A GET command annie TRG GET Pr or HP IB t Group Execute Trigger i TRIG SYS SYSTEM TRIGGER IN TAG EXT po BNC i i gt TAG or FRG SGL areal TRG SGL Default Mode i mode Relurns lo HOLD Following Each SGL Trigger Execution 3852P A15 5 5 NOTE for FREQ configuration TRIG source applies to all channels Figure 3 3 Counter Triggering Sources Connecting To externally trigger the counter connect a cable from an external user External triggering source to the XTRG and
75. nter is reset to zero For measurements which can be read only when the measurement is complete CHREADZ performs the same functions as the CHREAD command except that CHREADZ does not apply to the FREQ function Refer to Table 4 14 for the data returned by CHREADZ Multiple Reads To read multiple results use the XRDGS ch number command where XRDGS number specifies the number of readings to be returned on the channel specified by ch To use XRDGS the channel addressed must have been triggered and a reading must be available The range of number 1 to 2147483647 with default 1 For the TOTAL TOTALM UDC UDCM CD and CDM functions only one trigger is required For the RAT PER PERD and FREQ functions the number of valid triggers must be the same as the number of readings transferred Also RAT PER and PERD functions require NPER input periods per measurement When XRDGS is executed the number of readings specified by number are transferred as each becomes available In effect XRDGS acts like several CHREADS XRDGS clears any measurement complete interrupt previously generated by a RAT PER PERD or FREQ measurement Refer to Table 4 14 for data returned by XRDGS 4 16 Programming the Counter Selecting Interrupts Enabling Interrupts ENABLE INTR Disabling Interrupts DISABLE INTR Each channel can be enabled to interrupt with the ENABLE INTR USE ch command When enabled a channel interrupts on counter
76. oller subroutine 170 OUTPUT 709 TIME IQuery time of day 180 ENTER 708 T Enter time of day 190 PRINT Ch 503 Intr 5 TIMES T Print interrupt time message 200 PRINT 5503 10 Closures Display message 210 A SPOLL 709 Read clear SRO bit 220 STOP End controller subroutine 230 END After 10 switch closures an OVF interrupt is generated and a typical return is Ch 503 Intr 02 12 16 5503 10 Closures This example is similar to the previous example except that switch SI closures are counted only when a control switch S2 is open the count is modulo 5 and an OVF interrupt is not generated See Figure 4 2 for typical connections and counter configuration for channel 500 of a counter in slot 5 of the mainframe The example program counts the number of gated S1 closures which occur during a one minute interval and returns the number modulo 5 S1 closures A input LH transitions are counted only when S2 is open B input low Programming the Counter 4 21 an ISOLATED mem TRS 2L ar 5 8 g eg SE 2 24vVjoO S 30 E O Copt e LL wow ISOLATED HL ISOLATED NOTE MAX INPUT 10v TO CHASSIS SE Ch RY Set Card Configuration Jumper to ACH Connect 1 fo CH OA A inpul Connect 52 io CH GB B input Channel 0 counts 1 closures only when S2 is open Figure 4 2 Example Count Switch Closures Modulo 5 10 OUTPUT 709 RST 500 20 OUTPUT 708 USE 500 30 OUTPUT 709 CONF TOTALM 40
77. ouble As noted CONF also presets the counter to a known state That is executing CONF is equivalent to executing the commands in Table 4 4 in the order shown You can then use low level commands as required to modify the CONF settings Programming the Counter 4 5 Table 4 4 CONF Preset Values All Functions Except FREQ Command TRIG FUNC TERM EDGE NPER CNTSET DISABLE INTR SPER Description Trigger mode Counter function Input terminals Counted gated edge Measurement period reset Start count rollover Disable interrupt Sample period Preset Value HOLD Set by CONF ISO ISO HL HL 10 0 Disabled 1 usec a TBASE AUTO is also set TBASE is specified for PER and PERD only b TERM ISO for single input functions EDGE HL for single input functions CNTSET applies to TOTAL functions only FREQ Function TRIG TBASE TERM EDGE DISABLE INTR SPER Trigger mode Time base input terminais Counted gated edge Disable interrupt Sample period HOLD AUTO ISO HL Disabled 1 usec Channel Function You can also use the FUNC function tbase USE ch command to select FUNC any of the functions shown for the CONF command refer to Table 4 3 except FREQ However in contrast to the CONF command FUNC does not preset the channel to a known state Selecting Channel Input Input Terminals TERM For FUNC tbase is valid only for function PER or PERD The thase parameter
78. pecified by number from the counter to the mainframe If a reading is not available the command waits until the readings are available and then transfers the readings Defauit number 1 Selecting Channel Parameters The first step to program the counter is to select the channel parameters required for your measurement Table 4 2 shows suggested steps to select channel parameters The associated command to set the parameter is shown in parentheses A discussion of each parameter area follows When you have selected the channel parameters required refer to Programming Examples for some example programs Table 4 2 Selecting Channel Parameters Select Channel Function Counter Function Presets CONF Counter Function FUNC Select Channel Input input Terminals TERM Count Gate Edges EDGE Trigger Source TRIG Select Counts Timing Counter Presets CNTSET Number or Period NPER Sample Period SPER Time Base TBASE Select Reads Single Read CHREAD Read Zero Resuits CHREADZ Muitiple Reads XRDGS Select Interrupts Enabling Interrupts ENABLE INTR Disabling interrupts DISABLE INTR Programming the Counter 4 3 Selecting Channel Function Channel Function Presets CONF The first channel parameter to select is the function to be set on each channel used The channel function can be set with either the CONF or the FUNC command The easiest way
79. ppropriate time base for Period Measurements PER and PERD or the gate time for Frequency Measurements FREQ However as required you can select the time base for Period Measurements or the gate time for Frequency Measurements with the TBASE tbase USE ch command When tbase AUTO or 0 power on default and CONF setting the counter automatically selects the best time base or gate time NOTE If tbase is not set to one of the values shown in Table 4 11 for the PER function or in Table 4 12 for the PERD function the value is rounded down to the next lower valid time base If tbase is not set to one of the values shown in Table 4 13 for the FREQ function the value is rounded up to the next higher valid gate time 4 12 Programming the Counter Setting TBASE base for Period Measurements PER As shown in Chapter 2 see Figure 2 13 the PER function measures the average of NPER periods of the A input 5 nsec minimum period and 655 35 second maximum period The resolution of the reading can be increased by increasing NPER range 1 to 65535 as shown in Table 4 11 In Table 4 11 the sample period set by SPER number 1 psec and NPER the number of periods to be averaged 1 to 65535 as set with the NPER command Note however that the SPER NPER TBASE and CONF or FUNC commands interact to determine minimum and maximum pulse widths and periods of the input signal which can be measured To compute maximum and minimu
80. preset the counter for other conditions low level commands must be used to set the conditions otherwise set by CONF Table 4 16 Example Program Titles Function Description Totalize Counts TOTAL TOTALM Ungated Count Count number of switch Total Switch closures and generate an OVF Counts Closures interrupt after 10 closures TOTAL Gated Count Count number of switch closures Totai Switch only when a control switch Counts Closures is open Count closures modulo Mod NPER Modulo 5 5 GOTALM Up Down Counts UDC UDCM Up Down Count Measure difference in number Counts Pulse of pulses output from two UDO Rates pulse generators Up Down Count Measure difference in number Counts Pulse of pulses output from two Mod NPER Rates pulse generators count UDCM Modulo 5 modulo 5 4 18 Programming the Counter Totalize Counts TOTAL TOTALM Example Count Switch Closures Table 4 16 Example Program Titles Cont d Function Description Count With Direction Control CDICDM Count Determine Determine shaft position using Direction Shaft a shaft encoder and Count CD Position Direction Quadrature Determine Determine shaft position using Count Shaft a shaft encoder and Quadrature CD Position Count Using Quadrature Ratio Measurements RAT Ratio Measure Determine number of pulses RAT Ratio output from test generator for 1000 pulses output from reference generator Period Measurements
81. r Functions the first step to configure the channels is to set the Card Configuration jumper Also for Quadrature Count or Quadrature Count Modulo NPER the Quadrature jumpers on the component module must be set to the Quadrature position refer to Setting Quadrature Jumpers Use the Card Configuration jumper see Figure 3 1 to set each channel of the counter to one of four operating modes TOTAL FREQ 4 CH or 3 CH Table 3 1 summarizes the four hardware settings and shows channel numbers and counter functions for each setting Channel numbers for each jumper setting are printed on the terminal module in the column under each setting For example with the 4 CH setting the hardware channel numbers are CHOA CHOB CHI CH2 and CH3 Note that hardware channel numbers are not necessarily the same as the channel numbers used for programming For example with the FREQ or TOTAL setting both hardware and software programming channel numbers are 0 1 2 3 and 4 However for the 4 CH setting programming channel numbers are 0 1 2 and 3 but hardware channel numbers are OA OB 1 2 and 3 NOTE The input path Isolated or Non Isolated is selected with the TERM command Refer to Chapter 4 Programming the Counter for a description of the TERM command Setting Quadrature Jumpers Table 3 1 Card Configuration Jumper Settings Channel Numbers Setting Description Hardware Programming Single input Totalize 0 1 2 3 4
82. r example assume the shaft starting position is 0 degrees and each step represents one degree of rotation Then if the shaft makes 10 CW steps 20 counts on Quadrature Count and 20 CCW steps 40 counts a typical return is M500 Position 10 Deg Ratio Use Ratio Measurements RAT to count the number of periods of the A Measurements input for a fixed number of periods of the B input The result is the ratio R AT of the two inputs A B That is the average number of A input periods per B input period Example This example program measures the ratio of the number of pulses output Measure from a test pulse generator A to 1000 pulses output from a reference Ratio pulse generator B When the measurement is complete a MC interrupt is generated and the interrupt time and ratio A B are returned See Figure 4 7 for typical connections and counter configuration for channel 500 of a counter in slot 5 of the mainframe The STA command reads the Status Register and clears the FPS LCL INTR LMT and ALRM bits and CLROUT clears the output buffer SPOLL 709 clears the Status Register service request bit SRQ bit Programming the Counter 4 29 LH TRANS Connect Tesi Gen A to CH OA A in t Connect Ref Gen B to CH O8 B in put put LH TRANS x 4V Y ay et Card Contiguration Jumper for Set CH OA amp CH 08 Jumpers to 5 V REF GEN B TEST GEN A 4 CH can also use 3 CH 2 4 c o
83. r is set to the FREQ position TRIG source applies to all five channels Although multiple channels can be triggered with TRIG EXT or TRIG SYS sources each channel can be assigned to only one source Four commands can be used to set channel counts timing parameters CNTSET NPER SPER and TBASE although not each parameter applies to every function Table 4 7 summarizes these four commands and shows the CONF or FUNC function for which the command is valid Programming the Counter 4 9 Table 4 7 Channel Counts Timing Commands CNTSET Presets counter to begin counting from a specified number of counts OR to rollover after a specified number of counts TOTALM UDCM CDM RAT PER PERD Sets the number of periods over which an input is measured OR sets the value minus 1 at which the counting sequence resets to zero Sets the period over which the All input signal is sampled inputs which do not remain at the required level during the sample period are ignored Sets the time base to be used with Period Delayed Period and Frequency Measuremenis PER PERD FREQ z FUNC does not apply to FREQ parameter Counter Presets For Ungated and Gated Total Counts TOTAL functions ONLY you can CNTSET use CNTSET number USE ch to preset the A input channel to a number from 2147483648 to 2147483647 as specified by number The number parameter specifies the nu
84. rection CD CD CDM Count Direction Modulo NPER CDM Quadrature Count CD e Quadrature Count Modulo NPER CDM Count Direction CD Use the Count Direction CD function to measure the net number of counts up counts minus down counts for an input as controlled by a second input With this function the counter counts A input programmed transitions LH or HL up or down depending on the programmed B input gate level LO or HI With the B input gate level set to HI the counter counts up on programmed A input transitions when the B input is high and counts down when the B input is low With the B input gate level set to LO the counter counts up on programmed A input transitions when the B input is low and counts down when the B input is high The count sequence for Count Direction is the same as for the Up Down Counts UDC No interrupts are generated and measurement accuracy is lcount reversals 2 Figure 2 8 shows an example sequence in which LH transitions of the A input are up counts when the B input is low and down counts when the B input is high B input gate level is set for LO 2 12 Selecting Counter Functions COUNT DIRECTION o INT LH TRANS DOWN B INPUT GATE LO UP CTR INCREMENT d DECREMENT RESULT 1 1 2 1 3852P A15 2 8 Figure 2 8 Example Count Direction CD Count Direction Modulo NPER CDM Use Count Direction Modulo NPER CDM to measure the difference betwe
85. rs the output buffer SPOLL 709 clears the Status Register service request bit SRQ bit 4 20 Programming the Counter Set Card Contiguration Jumper to TOTAL 22 _TB8 mn Ad o ll TE PE pe sug olo FE y Signat Level u umper to bey 19 ar ee oo 2 0 D v UL PULLUP T tT 1 1 t l g OTAS S i 1 309 CIEJCICICIEOIO iens A F t Fd T i SAIS Count 3 closures and generate intr afler 16 closures Line NON ISOLATED JL NOTE CAUTION MAX INPUT t10V TO CHASSIS S8S2P A15 4 1 Figure 4 1 Example Count Switch Closures Example Count Switch Closures Modulo 5 10 ON INTR 7 GOSUB Results ICall sub Results on interrupt 20 ENABLE INTR 7 2 Enable controller intr on SRO 30 OUTPUT 709 RST 500 Reset the counter 40 OUTPUT 709 USE 503 Use channel 503 50 OUTPUT 709 RQS INTR Enable ROS Mask Reg INTR bit 60 OUTPUT 709 RQS ON Set ROS mode ON 70 OUTPUT 709 CONF TOTAL ISet TOTAL function 80 OUTPUT 709 ENABLE INTR SYS Enable mainframe intr capability 90 OUTPUT 709 ENABLE INTR Enable counter intr capability 100 OUTPUT 709 STA Clear FPS LCL INTR LMT ALRM bits 110 OUTPUT 709 CLROUT iClear output buffer 120 OUTPUT 709 EDGE LH Count LH transitions 130 OUTPUT 709 CNTSET 10 IRollover after 10 counts 140 OUTPUT 709 TRIG SGL Trigger the counter 150 GOTO 150 Loop until interrupt occurs 160 Results IStart contr
86. s 2147483648 number 4294967296 counts counts 22147483648 For the TOTALM UDCM CDM RAT PER and PERD functions counting or measurement is done Modulo NPER where the value is specified by NPER number USE ch Modulo NPER mode is useful when you want to count up to a certain value and then generate an interrupt For example with Ungated Total Counts TOTAL unless the counter is preset with CNTSET the channel must count 4294967296 counts before the counter rolls over However with Ungated or Gated Total Counts Modulo NPER the counter counts from 0 to NPER 1 and rolls over to 0 with the next count see Figure 2 1 for counting sequences Depending on the function programmed the NPER command defines either the number of counts or the number of periods to be used for the channel as shown in Table 4 9 Power on number or the value set by CONF is 10 Table 4 9 NPER number vs Counter Functions function s NPER Description NPER Range TOTALM Counting sequence resets to 0 2 to 65535 UDCM CDM at the next count after the NPER 1 vaiue RAT Sets number of B input periods 1 to 65535 to count A input transitions The A input count is divided by NPER to get the average number of A input counts per B input period Sets the number of A input 1 to 65535 periods to be measured The PER function returns the average value of NPER per ods of the A input A single period measurement is 1 to 65534 taken on the NPERth ga
87. so minimum period 41 usec and maximum frequency decreases from 200 kHz to about 24 4 kHz 4 44 Programming the Counter Selecting Reads Single Read CHREAD There are three commands to read the results of channel measurements CHREAD CHREADZ and XRDGS Counting functions TOTAL TOTALM UDC UDCM CD and CDM can be read at any time without disturbing the counting sequence Measurement functions RAT PER PERD and FREQ can be read only when the measurement is complete Use CHREAD to read the results of channel measurements CHREAD returns the current count for the TOTAL TOTALM UDC UDCM CD and CDM functions CHREAD returns the most recently completed measurement ratio period or frequency for the RAT PER PERD and FREQ functions The channel addressed must have been triggered and data must be available before CHREAD will return a reading For measurements which can be read at any time TOTAL TOTALM UDC UDCM CD and CDM CHREAD does not affect interrupts enabled for the channel For measurements which can be read only when the measurement is complete RAT PER PERD and FREQ CHREAD clears the measurement complete interrupt Refer to Table 4 14 for the type of data returned by CHREAD for each counter function NOTE Note that the TOTAL UDC and CD functions return a number between 2147483648 to 2147483647 Since the counter counts from 2147483647 to 2147483648 any number 2147483648 but lt 4294
88. t chassis ground terminal normally connects to equipment frame and all metal parts Affixed to product containing static sensitive devices use anti static handling procedures to prevent electrostatic discharge damage to components NOTE Calls attention to a procedure practice or condition that requires special attention by the reader CAUTION Calls attention to a procedure practice or condition that could possibly cause damage to equipment or permanent loss of data WARNING Calls attention to a procedure practice or condition that could possibly cause bodily injury or death WARNING CAUTION and NOTE Symbois Some labels on the HP 3852A HP 3853A and plug in accessories include an international warning symbol triangle with subscripted number which refers the reader to the manuals for further information This table shows the warning symbols used for the HP 3852A 3853A and plug in accessories Refer to the manual set for specific information on WARNINGS CAUTIONS or NOTES referenced with a warning symbol HP 3852A WARNING CAUTION and NOTE Symbols Meaning Shock hazard originating outside the instrument field wiring Treat all channels as one circuit for safety purposes Maximum number of certain plug in accessories to be installed into an HP 3852A or HP 3853A If High Speed FET multi plexers are used with the HP 44702A B ribbon cable may be connected Location Analog Extender Conn
89. t controller subroutine Query time of day lEnter time of day IPrint interrupt time message Read ratio A B Inter ratio Display ratio IRead clear SRQ bit End controller subroutine When the measurement is complete a typical return for 1500 pulses output from the test generator is Ch 500 MC 02 12 16 Ratio 1 5 Period Measurements functions include Period PER and Delayed Period PERD Use the Period PER function to measure the average period of an input The result is the average of NPER periods where NPER 1 to 65535 is set with the NPER command Use the Delayed Period PERD function to measure the period of the NPERth gated period of an input where NPER 1 to 65534 Two examples using Period Measurement functions follow The first example Measure Average Period uses the PER function to measure the average of 100 periods of the input The second example Measure Single Period uses the PERD function to measure the period of the 100th gated period of the input Programming the Counter 4 31 Example Measure This program averages 100 periods of the input We will assume the signal Average Period has maximum period 1 msec See Figure 4 8 for typical connections and counter configuration for channel 500 of a counter in slot 5 of the mainframe Note that the B input is not used even though Period is a double input function In this program NPER 100 is used to average 100 periods of
90. t direction CD 2 12 4 25 count direction mod NPER CDM 2 13 delayed per od measurements PERD 2 17 4 31 frequency measurements FREQ 2 20 4 35 gated total counts TOTAL 2 7 gated total counts mod NPER TOTALM 2 9 period measurements PER 2 17 4 31 quadrature count CD 2 13 4 25 quadrature count mod NPER CDM 2 16 ratio measurements RAT 2 16 4 29 ungated total counts TOTAL 2 7 4 19 ungated total counts mod NPER TOTALM 2 9 4 19 up down counts UDC 2 11 4 23 up down counts mod NPER UDCM 2 11 4 23 D Debouncing inputs 4 12 Delayed per od PERD 2 17 4 31 Description 1 1 DISABLE INTR 4 17 Disabling interrupts 4 17 EDGE 4 7 ENABLE INTR 4 17 Enabling interrupts 4 17 External triggering connecting 3 7 F Field wiring isolated channels 3 9 non isolated channels 3 10 Frequency measurements FREQ 2 20 4 35 FUNC 4 6 G Gated total counts TOTAL 2 7 Gated total counts mod NPER TOTALM 2 9 Getting Started 1 5 H Hardware triggering setting 3 7 Input terminais 3 4 4 6 Installation and checkout 3 14 Interrupts counter overflow OVF 4 17 measurement complete MC 4 17 Introduction 1 1 Isolated channels configuring connecting field wiring 3 9 signal conditioning 3 9 signal level jumpers 3 9 M Measurement parameters defining 2 1 N Non isolated channels configuring AC TTL jumpers setting 3 13 signal conditioning 3 13
91. t jumper settings be changed on the component module The counting functions continuously repeat the count sequence while the measurement functions perform a one time measurement introduction 1 1 1 2 Introduction Inputs to the counter can be single input A input or double input A input and B input The B input is not used for single input functions For double input functions the A input is defined as the primary measurement input and the B input as an auxiliary input usually a gate Some functions are defined as Modulo NPER where the NPER value is set with the NPER number parameter and the range of NPER number 1 to 65535 In Table 1 1 transitions refers to input state changes from low to high or high to low as programmed Table 1 1 Counter Functions Function Description Application Totalize Counts Ungated Total Counts Gated Total Counts Ungated Total Counts Modulo NPER Gated Total Counts Modulo NPER Up Down Counts Up Down Counts Up Down Counts Modulo NPER Count number of A input transitions Count number of A input transitions gate with B input Count number of A input transitions modulo NPER Count number of A input transitions modulo NPER Gate with B input Count up on A input count down on B input Result is A B counts Count up on A input count down on B input Result is A B counts modulo NPER Count With Direction Control Count Direction
92. ted period of the A input Programming the Counter 4 11 Sample Period You can use the SPER number USE ch command to set the sample SPER period for ALL channels of the counter where number sample period in seconds at which the inputs are sampled This command is useful to digitally filter noisy slow inputs for applications such as debouncing switch closures Input signals which do not remain at the required level during the sample period are ignored The SPER command sets the sample period for ALL channels of the counter even though USE ch is specified for a single channel For example with a counter in slot 4 of the mainframe set for TOTAL function SPER 000001 USE 402 sets a 1 psec sample period for channels 0 1 2 3 and 4 The minimum input pulse width is affected by the SPER command since minimum pulse width number 2 0 5 usec For example if number 20 sec minimum input pulse width 40 5 usec The power on and CONF value for SPER number 1 psec The range of number 1 psec to 0 16 seconds in incremental steps as shown in Table 4 10 The actual sampling period used is rounded up to a valid number closest to the number specified l Tabie 4 10 SPER number Rangelincrements SPER number range 1 asec to 16 psec 20 sec to 160 psec 200 sec to 1 6 msec 2 msec to 16 msec 20 msec to 160 msec Time Base For power on default and CONF settings the counter automatically TBASE selects the a
93. terminals on the terminal module Triggering If the cable has a shield connect the shield to one of the SHIELD terminals The additional SHIELD terminal is provided for redundancy Both SHIELD terminals are at chassis potential You can also provide external triggering by connecting a BNC connector from the PACER OUT BNC terminal on the mainframe to the XTRG XTRG and SHIELD terminals Triggering is on the high to low transition and inputs must have high gt 4 0 volts and low 0 9 volts Refer to the HP 3852A Mainframe Configuration and Programming Manual for details on the PACER OUT BNC terminal Configuring the Counter 3 7 Configuring Isolated Channels There are three steps to configure an Isolated input channel as shown Figure 3 4 shows the jumper and signal conditioning element locations for Isolated input channels e Set signal level jumpers Install signal conditioning as required Connect field wiring Signal Conditioning Connect optional user supplied i Card Configuration Jumper i C across Copt in each channel H for low pass fi tering i Set Card Configuration Jumper t tor TOTAL FREQ 4 CH or 3 CH position as required IN CS aloo g H a 1 IW ua ooo E m i Bo ers gum Signal Level Maximum input is 170V to chassis Maximum differential voltage lo each jumper setting VAZN setting
94. the input Also we will require at least 1 usec of resolution and will set TBASE thase 10 usec Then refer to Table 4 11 resolution 10 NPER psec 10 100 psec 0 1 psec and maximum period which can be measured 655 35 100 msec 6 5535 msec The average frequency can also be calculated by using the reciprocal of the average period measured This provides a way to compute average frequency which is typically more accurate than using the Frequency Measurement FREQ function Therefore this program also calculates the average frequency of the input CH 0 returns ave value of 100 pertods of input S Il ER R Ae Set Card Conti rail 4 zn NN IE AO cl M po ISO0LATED nn ED nn _ IO cope eS E a seo O lj S B 24100 3 182 Wo ver 3 SEEN sm AAO mu ne Li 9 E S A er i f BS E pn vod S 1 a Set cH OA Signal Level Jumper Es Q AN O 786 to 5 mg visa O E INGO E i CHO i E t ze IS FE nol kanena Ni i mus he SB Ze to a double input channet OA or TA Dome ux 9 cet o IS H ps uri 2 SIA o eo i n La NON ISOLATED HL reoLATED E NOTE CAUTION x MAX INPUT MAX INPUT AN 10V TO CHASSIS 2170V TO CHASSIS Q Simsec Period 3852P A15 4 8 ENS Figure 4 8 Example Measure Average Period 4 32 Programming the Counter Example Measure Single Period 10 OUTPUT 709 RST 500 Reset counter 2
95. to a service facility designated by hp Buyer shall prepay shipping charges to hp and hp shall pay shipping charges to return the product to Buyer However Buyer shall pay all shipping charges duties and taxes for products returned to hp from another country Duration and conditions of warranty for this instrument may be superceded when the instrument is integrated into becomes a part of other hp instrument products Hewlett Packard warrants that its software and firmware designated by hp for use with an instrument will execute its programming instructions when properly installed on that instrument Hewlett Packard does not warrant that the operation of the instrument or software or firmware will be uninterrupted or error free LIMITATION OF WARRANTY The foregoing warranty shall not apply to defects resulting from improper or inadequate maintenance by Buyer Buyer supplied software or interfacing unauthorized modification or misuse operation outside of the environmental specifica tions for the product or improper site preparation or maintenance NO OTHER WARRANTY IS EXPRESSED OR IMPLIED HEWLETT PACKARD SPECIFICALLY DISCLAIMS THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE EXCLUSIVE REMEDIES THE REMEDIES PROVIDED HEREIN ARE BUYER S SOLE AND EXCLUSIVE REMEDIES HEWLETT PACKARD SHALL NOT BE LIABLE FOR ANY DIRECT INDIRECT SPECIAL INCIDENTAL OR CONSE QUENTIAL DAMAGES WHETHER BASED ON C
96. to set a channel function is with the CONF function USE ch command CONF sets the channel function presets the channel specified by the USE ch command or parameter to a known state and clears and disables any interrupts on the channel CONF function Parameters For convenience Table 4 3 repeats the functions set with the CONF function parameter shown in Table 2 1 Refer to Chapter 2 Selecting Counter Functions for a definition of each function NOTE 1 Double input functions all except Ungated Total Counts TOTAL Ungated Total Counts Modulo NPER TOTALM and Frequency Measurements FREQ can only be programmed on channels configured for double input 2 When the Card Configuration jumper is set to FREQ only the FREQ parameter can be set For other settings of the Card Configuration jumper power on and CONF function setting is TOTAL for all channels Totalize Counts Ungated Total Counts Gated Total Counts TOTAL TOTALM Ungated Total Counts Modulo NPER Gated Total Counts Modulo NPER TOTALM 4 4 Programming the Counter Table 4 3 CONF function Parameters Function function Description Count number of A N A input transitions Count number of A input transitions gate with B input Count number of A input transitions modulo NPER Count number of A input transitions modulo NPER Gate with B input interrupts Type When Rollover 1 to 0 Rollover
97. ts Ar even 2 1 Defining Your Measurement 2 1 Measurement Parameters 2 1 Data Interrupt Reguirements UAE 2 3 Counter Functions 2 3 Function Overview 2 3 Counter Functions Summary 2 4 Counting Seguences 2 6 Counting Functions 2 7 Totalize Counts TOTAL TOTALM 2 7 Up Down Counts UDC UDCM 2 9 Count With Direction Control CD CDM 2 12 Measurement Functions 2 16 Ratio Measurements RAT 2 16 Period Measurements PER PERD 2 17 Frequency Measurements FREQ 2 20 Chapter 2 Selecting Counter Functions Chapter Contents This chapter gives guidelines to define your measurement and to select counter functions required for the measurement Chapter sections are Chapter Contents summarizes chapter contents Defining Your Measurement gives guidelines to characterize your measurement application including measurement parameters and data interrupt handling requirements i Counter Functions includes an overview of counter functions and defines counting and measurement functions When you have defined your measurement and selected the counter function refer to Chapter 3 Configuring the Counter to hardware configure the counter and then to Chapter 4 Programming the Counter to program
98. typical return is Ch 500 A B Count 200 This program is the same as the previous program except that the count result is returned modulo 5 As with the previous example the program counts the difference between the number of pulses output from pulse generators A and B over a one minute period The program counts up on generator A input LH pulses counts down on generator B input LH pulses and returns the A B difference modulo 5 See Figure 4 4 for typical connections and counter configuration to channel 500 of a counter in slot 5 of the mainframe 10 OUTPUT 709 RST 500 20 OUTPUT 709 USE 500 30 OUTPUT 709 CONF UDCM 40 OUTPUT 709 EDGE LH LH 50 OUTPUT 709 NPER 5 60 OUTPUT 709 TRIG SGL 70 WAIT 60 80 OUTPUT 709 CHREAD 500 90 ENTER 709 A 100 PRINT Ch 500 A B Count A 110 END IReset counter Use channel 500 Set UDCM function Set LH transitions on A and B iSet modulo 5 Trigger the counter IWait one minute IRead ch 500 A B count Enter count Display count If during the one minute interval generator A outputs 5 pulses and generator B outputs 12 pulses the A B difference is 7 counts However since the down count sequence for modulo 5 is 4 3 2 1 0 4 3 the modulo 5 difference is 3 and a typical return is Ch 500 A B Count 3 4 24 Programming the Counter Count With Direction Control CD CDM isi DICE SE wis once o i o f
99. uence Measurement accuracy is lcount For example with CNTSET 1000000000 the count sequence is from 1000000000 to 2147483647 to 2147483648 and back to 0 not to the preset If enabled the channel generates an overflow interrupt when the counter overflows from 1 to 0 Figure 2 2 shows an example sequence for Ungated Total Counts for LH transitions Since this is a single input function the B input is not used Gated Total Counts TOTAL Use Gated Total Counts TOTAL to totalize an input when a second input the gate is high or low as desired For example use this function to totalize switch closures when a second switch is open or closed as required Gated Total Counts is similar to Ungated Total Counts except that the B input gates the A input count You can set the B input so that A input transitions LH or HL as programmed are counted only when the B input is high or low as programmed The count sequence presets accuracy and interrupt conditions are the same as for Ungated Total Counts Figure 2 3 shows an example counter operation to count LH transitions of the A input when the B input is low Selecting Counter Functions 2 7 UNGATED TOTAL COUNTS A INPUT LH TRANS CTR INCREMENT RESULT 1 2 3 4 2 3852P A15 2 2 Figure 2 2 Example Ungated Total Counts TOTAL GATED TOTAL COUNTS A INPUT LH TRANS B INPUT GATE LO GATE GATE CTR INCREMENT RESULT 1 2
100. vers attached NOTE HP IB ADDRESS The example programs in this manual use 709 as the HP IB address for the HP 3852A Specific slot and channel numbers are also used Program syntax and data return formats apply to HP Series 200 300 controllers Modify slot and channel numbers and program syntax as required Getting Started j 1 Set Card Configuration Jumper Set the Card Configuration Jumper to the TOTAL FREQ 4 CH or 3 CH position as required For Quadrature Counts set Quadrature jumpers on component module to Quadrature position To begin hardware configuration of counter channels remove the terminal module cover If the counter is installed in the mainframe or in an extender refer to the HP 3852A Mainframe Configuration and Programming Manual to remove the terminal module There are three steps to configure the counter channel s to be used for your measurement e Set Counter Jumpers e Select Counter Trigger Source Configure Counter Channels Figure 3 1 shows the counter terminal module and summarizes steps to configure counter channels To configure Isolated channels refer to Setting Counter Jumpers then to Setting Counter Triggering then to Configuring Isolated Channels To configure Non Isolated channels refer to Setting Counter Jumpers then to Setting Counter Triggering and then to Configuring Non Isolated Channels 2 Select Triggering Source Sele
101. when B input is low 50 OUTPUT 709 NPER 100 IMeas 100th gated period of A input 60 OUTPUT 709 TBASE 000001 Set 1 usec time base 70 OUTPUT 709 TRIG SGL Trigger the counter 80 OUTPUT 709 CHREAD 500 Read 100th gated period value 90 ENTER 709 A IEnter period 100 PRINT Ch 500 Period A sec Display period 110 END If the value of the 100th gated input period is 9 951 msec a typical return when the measurement completes is Ch 500 Period 009951 sec Programming the Counter 4 33 EEE Ena a PAE A aa a nn a ea na NIA pan ssa hh AA Eh Set Card Configuration Jumper to 4 CH can also use 3 CH Bene g el T RNA oga nun 1 D I I i 1 PERENNI Set CH OA and OB Signal Level Q Jumpers to 5 V Ba Connect A input to CH OA connect B input B to CH t 1 H I d o t E g ANE N 289 289 desc bod BIA BIS Doni ooo o o Cs EXEC t I Nm i Fog wA D 7 10 msec Period AV gn B INPUT 7 BEEN V 8 0 x 10 msec Period in dee E LLLA INPUT IE ION MAX INPUT e MAX INPUT YQ 410V TO CHASSIS HTOV TO CHASSIS LE i Isle Lu i E ST OO 29 LI mE o 1 3852P A15 4 9 Measure 100th gated period of the A input p Count A input LH transitions only when B input is low Assume 8 is tow for first 100 A periods e to 7 M nr l Figure 4 9 Exa
102. ze Counts Ungated TOTAL Total Counts Gated Total Counts Ungated Total Counts Modulo NPER Gated TOTALM Total Counts Modulo NPER TOTALM Up Down Counts Up Down UDC Counts Up Down UDCM Counts Mod NPER Count With Direction Control Count CD D Direction Count CDM Direction Mod NPER Quadrature Count Quadrature CDM Count Modulo NPER Ratio Measurements Ratio RAT Period Measurements Period PER Delayed PERD Period Frequency Measurements Frequency FREQ Notes Description Count number of A input transitions Count number of A input transitions gate with B input Count number of A input transitions modulo NPER Count number of A input transitions modulo NPER Gate with 8 input Count up on A input count down on B input Result is A B counts Count up on A input count down on B input Result is A B counts modulo NPER Count A input up or down B input controls direction Count A input up or down B input controls direction Count modulo NPER Count up on all A input transitions when B leads A Count down on all A input transitions when A leads B Same as Quadrature Count except count modulo NPER Measure average Count number of A input counts per B input period Measure average of NPER periods of A input Measure NPERth gated period of input gate with B input Measure average frequency of A input
Download Pdf Manuals
Related Search
Related Contents
fitxa salquisa 2007 acaricidas ok.FH10 Install Sheet - Xtreme Diesel Performance 1 133 I220 CONTROLLER Series 40 M46 Variable Motors Service Manual Polarímetro de alta precisión para aplicaciones azucareras Optilab LT-1550 User`s Manual II Morrow Inc. 920 GPS Receiver User Manual SR3-mini Demandes de lecteurs : Octobre – Novembre 2013 Copyright © All rights reserved.
Failed to retrieve file