You are on page 1of 11
FA-3S SERIES PROGRAMMABLE CONTROLLERS USER’S MANUAL PF3S-HSC2 HIGH-SPEED COUNTER MODULE idec FA-3S High-speed Counter Module PF3S-HSC2 High-speed Counter Module ‘The PF3S-HSC2 is a 16-bit high-speed counter module for use with any FA-3S series CPU module; PF3S-CPI1, PF3S-CPI1T, PF3S-CP12, or PF3S-CP13. One or more high-speed counter modules can be used with one CPU. Each module occupies 16 input points and the maximum quantity of modules which can be used per CPU is lim- ited only by available input points. High-speed pulse signals from devices such as rotary encoders are counted by the high-speed counter module and the counted value is allocated to 16 input points in the CPU. The 16-bit data can be programmed to compare with preset value and outputs or internal relays can be tured on or off according to the comparison result. ‘The high-speed counter module accepts 16-bit single-phase signals for counting up (adding) and 16-bit two- phase signals for reversible counting, The range of counted value is 0 to 65535. When a high-performance CPU is used, the counted value can be converted into a range from ~32768 to +32767 using an advanced instruction. ‘When used in the two-phase mode, input pulses can be counted at the following factors; x0.25, x0.50, x1, x2, and x4, Select single- or two-phase mode by using a DIP switch inside the module. According to the selected mode, reset input (single-phase) or phase Z (two-phase) is selected automatically, In the two-phase mode, a gate function is available to enable or disable the counting function. GATE LED * RESET LED Lit when gate input ison (wo-phase, Lit when reset inpuc (single-phase) or When it phase A and B inputs can be phase Z input (two-phase) is on counted. ‘When lit counter isin est sate NC Terminals “No connection” terminals. Do nat ‘connect input or any other wiring, GATE Terminal Source current input terminal to receive ga input for Phase A and B inputs ((wo-phase). Current applied to this terminal (on status) enables counting of Phase A and B inpus. ‘When not in use, connect tothe nega- live line ofthe input posrer supply to ‘keep the gate input on. Not used in single-phase mode. COM (4) Terminat Positive common terminal of input iret Connect othe positive line of ‘power supply for phase A, BZ, and ‘ae inputs Phase A Terminal Source current input terminal accept count input ingle phate) or Phase B Terminal 3850 A input (o-phass) asco 3 Soureecurent input terminal Phase Z Terminal accept phase B input (wo phase) es eee Not used in single phase mode. accept counted value reset input (n- sle-phase) or phase Z origin signal = | inp pase When pa ‘is on, counted value is reset to zero. ~ ‘Terminal Cover Ground Terminal Connect shield tine of rotary encoder. Removable Terminal Book ‘Connected internally (othe base wih MSS sre plate. FA-3S High-speed Counter Module General Specifications ‘Module PRIS HSC? TaparType [Sewer aes Required Input Poin | 16 poins eee Rated Input Voltage [12 to 24V DC “Mode ‘Single-phase ‘Two-phase Input Voltage Range 10 30V DC 10 0 30V DC Rated Input Current 7 ‘SA pe point @hasee A,B, andZ) (e205) Smaxperoint toma pe pei ga) Tapa Impedance 4B KA (phases A,B, and Z) (at24V DC) 2.4 KO (gate) ‘Count input Frequency [So ee maximam Input Pulse Width 7 50 usec minimum (phases A, B, and Z) Gate Input Delay ae 70 see maximum (OFF © ON) ‘Mist Turn ON Volnge | 9V BC — ‘Must Tum OFF Volige | 3D Tapa Channel channel — np Signal Phase A, Reset “[ Phases AB, and 7, Gate 7 Count Range Te bis (010 6535) {6 bits w 65535) ‘Input Common Polarity COM (+) terminal a COM (+) terminal UP (adding) on 1 UP: Phase A mus iad B by 0" Grotg Mati Nowerene DOWN, Phase B mutea ty oP Power Faure Frowsion None Operation Indicator Gate, phase Z Taoaton Method Tiernal Curent Draw oe ' [External Connection | M3.5 screw (removable erminal block) —_| Weight (approx.) [180g Wiring Schematic Single-phase Mode [Qe] ‘Two-phase Mode Or Sl we Swe (Sl ne SI ne- Bla hn al wav pc [One 120 24V DC Crs! AA OI 4F eel Rotary Kets co == elt S| 4 Siem ype x Ql se yew + Lis Trower [ef ie g “ferree vy Collector a t Ue fana| one lata} Note: “NC” means “No Connection.” Do not connect input and any other wiring. Maximum recommended wire size is 0.6 mm dia. (AWG #23) Usea shielded cable for input signal wiring. Connect the shield to the ground terminal on the high-speed counter module. Do ‘not run high-speed pulse input lines in the same conduit with high-voltage or motor power lines. Maintain minimum spacing ‘of 200mm (7.87") between such lines. To minimize voltage drop, make the wiring as short as possible, FA-3S High-speed Counter Module DIP Switch Settings [Switch Number ‘Various functions of the high-speed counter . ‘module can be selected by setting the DIP SAE | Whe DIP wiches a sets ‘witches inside the housing before mounting noe jo] sitemon tee he folowing ‘on the baseplate. Remove the side cover from Mbdule Jo | mades ae selected: the high-speed counter module and locate the la DIP switches atthe botiom of the PC board lo inside the housing, Make settings on the DIP switches. Front of Module —— DIP Switch #1: Counting mode selection DIP Switch #2: Reset input level selection swat ‘Counting Mode ‘SW#2 | _ Reset Input Level (Phase Z) OFF Single-phase mode oF | High ON, "Tworphase mode oN Low DIP Switches #3, #4, and #5: Multiplier selection (Two-phase only) swis Swit Swas Multiplier Up Count and Down Count Positions OFF OFF OFF INVALID ON OFF Leading and wailing edges of phases A and B oF ON ‘OFF 2 Leading and tiling edges of phase A ON oN oF | Leading or tailing edge of phase A OFF OFF ON — __ ON oF oN _| Leading or tailing edge of phase A —_| oF ON ding or cling edge of phase AOD ON, on | I Programming Precautions ‘The PF3S-HSC2 high-speed counter module occupies 16 input points. Depending on the installation position of the high- speed counter module, 16 input points are allocated to the module automatically. ‘The high-speed counter counts high-speed pulse input signals using the built-in 16-bit counter and sends the 16-bit (full) data o the CPU module. Since the high-speed counter module does not contain a comparison output function, comparison instructions should be programmed to tum on outputs or internal relays. ‘When the preset value is 9999 or less, the high-speed counter current value can be compared with the preset value without changing the data type. When the preset value is over 9999, te datatype of the preset value or current value must be changed to match either by converting the 16-bit (4-digit) preset value to a 16-bit (Cull) value or by converting the 16-bit (ull current value wo a 16-bit (4-dgit) value. High-performance CPU modules PF3S-CP12 and PF3S-CPI3 have useful instructions to convert data types of values over 9999, When using standard CPU module PF3S-CP11 or PF3S-CP11T, the preset value over 9999 must be converted using division instructions as described later. For applications where the preset value is 9999 or less and the program is not too long, the high-speed counter module can be used with the standard CPU without problem. When the program is long and high-speed execution is critical, use of the high-performance CPU is recommended because the output timing depends on the scan time of the CPU. ‘The high-speed counter module can count up to 65535. When a signed instruction is used with the high-performance CPU, the counter current value can be converted into a range between ~32768 and +32767. ‘When used in the single-phase mode, the high-speed counter only counts up and does not perform reversible counting. When reversible counting is required, select the two-phase mode using the DIP switches inside the module. FA-3S High-speed Counter Module Programming Preset Value 9999 or Less “This example introduces a basic program for the PF3S-HSC2 high-speed counter module when the preset value is 9999 or less. Pulse input signals from a rotary encoder are counted by the high-speed counter module and compared with the preset value. Depending on the comparison result, three outputs are turned on or off. ‘When the counter current value < Preset value Output Q0 is tumed on. ‘When the counter current value = Preset value Output Q1 is tumed on, ‘When the counter current value > Preset value Output Q2 is tumed on, ‘The same program can be used for both standard and high-performance CPU modules. Power Module Standard or High-performance CPU Module Pea eer ere Rotary Encoder {9999 pulsesfrevolution 16-point Input Module Inge lb eTT Howwit? ae Sere an | 'M317 (in-operation output special internal relay) remains on during CPU 1} WLODDO <-S ‘operation. t 1029 F The SLO (word load) instruction Joads 16-bit countercurrent valve from inputs 120 trough 137 to data register DO. cmppo 529 11 the SCM (compare) instruction compares the data in DO (counter cu rent value) with preset value 4536 and sets internal relay M310, M311, or ‘M312 depending on the comparison result. i | @ )7}. when Do data < 4536, M312 is tumed on and outpt Qs tuned on 4 ‘When DO data = 4536, M311 is tumed on and output QI is tumed on. wait (@) ‘When DO data > 4536, M310 is tured on and output Q2 is tuned on, If the rotary encoder is reversed below zero in the two-phase mode, the counter current value becomes larger than the preset value and intemal relay M310 tums on. This accident canbe prevented by programming the highest bt ofthe high-speed counter input points as shown below: () IEMB10 and 137 are tured on, Q2i not wumed on, mio FA-3S High-speed Counter Module Programming Preset Value Over 9999 ‘When programming a preset valve over 9999 up to 65535, a special care is required. The preset value must be converted into 16-bit (ful) value before comparing with the counter current value. Different programs are used for the standard and high- performance CPU modules because of the limited instruction sets for the standard CPU. ‘When Using Standard CPU Module PF3S-CP1 or PF3S-CPLIT For example, when programming preset value 25362, first divide the value by 256 and calculate the quotient and remainder tw separate the preset value into upper and lower bytes of data. 25362 + 256 = 99 (quotient)... 18 (remainder) BLODD! <$ || TheJLDIB (byte load) insuuction loads 8-bit data of constant 18 ele 4 #8 (remainder) to data register D1. BSTRD1 ->D_ || TheJSTIB (byte store) instruction stores the 8-bit data in D1 to 8 points, 4 Mo J) of intemal relays from MO through M7. BLOD D1 <-$_L] The JLDIB (byte load) instruction loads 8-bit data of constant 99 (quo- + “4 99 [7] tient) to data register D1. BSTRDI ->D_L| The JSTIB (byte store) instruction stores the 8-bit data in D1 10 8 points a M10 [7] of internal relays from MIO through M17 ‘The JLDI (word load) instruction loads 16-bit data from intemal relays MO through M7 (lower byte) and M10 through MI7 (upper byte) to data register DI. ‘The JLDO (word load) instruction loads the high-speed counter current value from inputs 120 through 137 to data register DO. ‘The JCMP (compare) instruction compares the counter curent value data in DO with preset value 25362 in D1 and sets internal relay M310, M31, or M312 depending on the comparison result. The same program as on the preceding page can be used to tum on out- puts using M310, M311, and M312. When Using High-performance Module PF3S-CPI2 or PF3S-CP13 ‘When programming a preset value over 9999 for the high-performance CPU, the T3TOD (T® to double word) instruction can be used to convert the preset value to 16-bit ull) data to compare with the counter current value. ‘The T’TOD instruction converts preset value 25362 Kam os 2 3 D H to 32-bit (full) data and stores the result in data reg maiz] 1200 #5362 DIO} sters D1 (upper 16 bits = 0) and D10 (lower 16 bits) WLODDO <-S I ou td ‘The JLODO (word load) and JCMP (compare) instructions are used as with the sample program Jomppo s>sp | above. 13 pf FA-3S High-speed Counter Module Programming High-speed Counter for Standard CPU “This example inrodoces another program for he PF3S-HSC2 high-speed counter module used withthe standard CPU mod- ‘ule when the preset value is 9999 or less. The preset value is set using external digital switches. Pulse input signals from a rotary encoder are counted by the highspeed counter module and compared withthe preset value. Depending onthe com- parson resol, thee ouput are tured on or of. ‘When the counter current value > Preset value ~ 1000 Preliminary output QO is tamed on. ‘When the counter current value = Preset value Equivalent output Q1 is turned on. ‘When the counter curent value > Preset vale ‘Alam output Q2i tured on In addition, the counter current value is displayed on a 4-digit display unit. ‘32-point Input Module 32-point Ourput Module Eee Gero ‘ High-speed Counter Module rexyocyaberthcrmen_ELTisiSams ota EP ‘O Rotary Encoder Preset Yalve iisplay Unit Di Fo Bees falas} LY [G|ex0c27 1M304 is the initialize pulse special 'WNRS NW s D internal relay. ik eS 8 oH M304 ‘The WNRS (word N repeat set) instruction sets 0 to 3 data registers WLODDO {+--+ BT a, SSN iso, the TSUBS instruction subtracts mn 187 1000 from D11 and stores the reslt in 12 (preliminary preset value). WGE = Sio= 2 oir Ho Dio D12_——«Q0._F]_ When M307 (borrow) is off, the WGE aor instrcton is executed, When DIO (current value) > D12 (preliminary value), QO is tuned on. FA-3S High-speed Counter Module ‘When D1O (current value) y WEQ — Sl= 82> __oir__ |_| (preset value), the WEQ instruction 1} —+# 130 DID DT Qt ams Qt (equivalent output) on. When Q1 is off, the WGE instruction p—[Woe sto sz-> oir |} is executed. When D10 (Curent 10 DIo tt _ FY value) = DIN (preset value), Q2 (alarm output is timed on. Programming High-speed Counter for High-performance CPU This example introduces another program forthe PF3S-HSC2 high-sped counter module used with the high-performance (CPU module when the preset value is over 99. The preset value canbe O through 65535 and is set using extemal 8-digit igi switches, Pulse input signals from a rotary encoder are counted by the high-speed counter module ad compared with the preset value. Depending on the comparison result, three outputs are tured on or off. When the countercurrent value 2 Preset value ~ 1000 Preliminary urput QO is turmed on, ‘When the counter current value = Preset value Equivalent output QI is turned on, a ee eed os Bewir tegrets ee — set | a | —— (3) = [ ead lalallala O/0/0/5)\6/ 18/9 930-37, Q20-Q27 root Q14-017 Q10-Q13 M304 is the initialize pulse special instruction sets 0 t0 7 data registers ‘WLODDO <.s 10 through Di6. ‘The JLDO (word load) instruction loads 0 to data register DO. pe wees NWS DL} imemal relay. ms wD M306 ‘The WNRS (word N repeat set) FA-3S High-speed Counter Module WMOV —ispS D 20 mo Io CyDU Dunit SIGN s SIGN oD 124 #108, 0 0) Mie = Dil ‘WLODDO DBW 150 #10006 WCE — SI>= S2-> ir mo Ios @ ‘weQ Sl= S2> oir mo) DIOS a ‘WCE Sl>s St> oir } | 0 DIO a M317 is the on-operation output spe- cial intemal relay. ‘The WMOV (word move) instruction stores 16-bit counter current value from 140 through 157 to D10. ‘The CVDU (convert data type) instruction converts the 16-bit (full) ata in D10 to 16-bit (4-digit) data and stores the result in D12 (upper digits) and D11 lower digits). The JDO (word load) instruction loads D11 data to DO. ‘The JDISP displays DO data on the display unit connected to Q20 through Q27 lower digits) Simitarly, D12 data is displayed on the display unit connected to Q30 through Q37 (upper digits). ‘The WNSET (word N set) stores the preset value from F70 (lower digits) and F71 (upper digits) to D13 and 14, respectively ‘The CVDU converts 16-bit (4-digit) data in D14 and D13 to 16-bit (full) data and:stores the result in DIS. ‘The WMOY stores D1S5 data to D16, ‘The WSUB (word subtraction) sub- tracts 1000 from D16 and stores the result in D16 (preliminary preset value) and borrow. ‘When M307 (borrow) i off, the WGE. (word greater than or equal to) and ‘WEQ (word equal to) instructions are executed. ‘When D10 (current value) 2 D16, QO is tured on. ‘When D10 = DIS (preset value), QL is tumed on. ‘When Q1 is off (current value # preset value), the WGE is executed, When D102 DIS, Q2 is tumed on. FA-3S High-speed Counter Module Dimensions j 96 : 1 ji q 1 q q 1 é D 109, a 5 130 [3] S ‘Specifications and other descriptions in this manual are subject to change without notice. ‘CORPORATE OFFICE CANADIAN LOCATIONS 1213 Elko Drive IDEC Canada LTD. Sunnyvale, CA 94089-2211 TEL: (408) 747-0550 Delta, British Columbia, V4G, 1H9 ‘Toll Free: (800) 262-IDEC Fax: (408) 744-9055 CENTRAL REGION Sterting Heights, Mi 48312 EASTERN REGION Northboro, MA 01532, EASTERN PLC REGION Birmingham, AL 35244 Tel: (205) 987-2377 ‘Toll Free: (800) 732-IDEC Fax: (205)987-3773 Tel: (604) 946-1271 Fax: (604) 946-0368 Mississauga, Ontario, LAZ, 1X3 TEL: (205 goo. gses FAX: (908) 680-8562 Programmable I e Controllers Group ‘Cat. No. EM279 June 1984 Printed in USA

You might also like