background image

150

Using with CS1-series PCs

Appendix D

Transferring Data Using the IOWR Instruction

• With the execution start bit as the input condition, the IOWR instruction is executed and the present value

of counter 1 is transferred to the High-speed Counter Unit.

• The Equals Flag turns ON when data has been transferred normally using the IOWR instruction. If the data

could not be transferred normally, the Equals Flag turns OFF and an error is registered with the N.C. con-
dition of the Equals Flag.

• When the Data Transfer Completion Flag turns ON (word n+6, bit 14), a signal indicating that writing has

been completed turns ON.

@IOWR (223)

   #F100

   D00000

   #00020000

200606

200607

a

DIFU (013)

   b

DIFD (014)

   c

200614

b

c

Start

Counter 
Operating 
Flag
(word n+6, 
bit 06)

Unit Busy Flag
(word n+6, 
bit 07)

Equals Flag

Data Transfer 
Completion Flag 
(word n+6, bit 14)

Data has been written.

Data has been written.

200615

Error Flag 
(word n+6, 
bit 15)

The present counter value 
of counter 1 is written.

Unit number 0

Number of words
(2 words required 
for present value)

#F100

#0002 0000

Summary of Contents for C200H-CT021

Page 1: ...C200H CT021 High speed Counter Unit Operation Manual Revised December 2000 ...

Page 2: ...iv ...

Page 3: ...s word and is abbreviated Wd in documentation in this sense The abbreviation PC means Programmable Controller and is not used as an abbreviation for any thing else Visual Aids The following headings appear in the left column of the manual to help you locate different types of information Note Indicates information of particular interest for efficient and convenient opera tion of the product 1 2 3 ...

Page 4: ...vi ...

Page 5: ...mponents 12 SECTION 3 Wiring 15 3 1 External Connector Pins 16 3 2 Connector Wiring Method 16 3 3 I O Circuit Configurations 18 3 4 Wiring Examples of Encoder Inputs 20 3 5 Wiring Example of External Control Inputs 22 3 6 Example of External Output Wiring 23 SECTION 4 Functions and Operating Modes 25 4 1 Operating Modes 26 4 2 DM and IR Bit Allocation 27 4 3 Linear Mode 29 4 4 Circular Mode 31 4 5...

Page 6: ...a Transfer Programs 75 7 6 Program Example for Linear Mode 80 7 7 Program Example for Circular Mode 82 SECTION 8 Program Development with Preset Function 85 8 1 Performance Specifications of Preset Function 86 8 2 DM Area Settings and Functions 87 8 3 IR Area Settings and Functions 89 8 4 I O Signal Timing Chart 92 8 5 Data Transfer Programs 93 8 6 Program Example for Preset Mode 97 SECTION 9 Prog...

Page 7: ... with IORD Instruction 123 10 5 Program Examples with IOWR Instruction 124 10 6 Flags Used for IOWR Instruction and Data Transfer 126 SECTION 11 Error Processing and Troubleshooting 127 11 1 Error Processing 128 11 2 Errors Monitored with CPU 130 Appendices A Comparison with C200H CT001 V1 133 B Data Area Allocation 135 C DM Coding Sheet Unit Number DM 00 to DM 99 145 D Using with CS1 series PCs 1...

Page 8: ... the steps required to operate the High speed Counter Unit in each mode the DM required for unit number settings and IR bit allocation Section 7 describes program development using the drum function in linear and circular modes Section 8 describes program development using the preset function Section 9 describes program development using the counting function in gate latch and sampling modes Secti...

Page 9: ...is section is important for the safe and reliable application of the PC and the High speed Counter Unit You must read this section and understand the information contained before attempting to set up or operate a PC system 1 Intended Audience xiv 2 General Precautions xiv 3 Safety Precautions xiv 4 Operating Environment Precautions xv 5 Application Precautions xv ...

Page 10: ...PCs and the High speed Counter Unit Be sure to read this manual before attempting to use the High speed Counter Unit and keep this manual close at hand for reference during operation WARNING It is extremely important that a PC and all PC Units be used for the specified purpose and under the specified conditions especially in applications that can directly or indirectly affect human life You must c...

Page 11: ...ent countermeasures when installing systems in the following locations Locations subject to static electricity or other forms of noise Locations subject to strong electromagnetic fields Locations subject to possible exposure to radioactivity Locations close to power supplies Caution The operating environment of the PC system can have a large effect on the longevity and reliability of the system Im...

Page 12: ...ds may result in burning Disconnect the functional ground terminal when performing withstand voltage tests Not disconnecting the functional ground terminal may result in burning Be sure that all the mounting screws terminal screws and cable connec tor screws are tightened to the torque specified in this manual Incorrect tightening torque may result in malfunction Leave the label attached to the Un...

Page 13: ...bles Do not place objects on top of the cables or other wiring lines Doing so may break the cables Use crimp terminals for wiring Do not connect bare stranded wires directly to terminals Connection of bare stranded wires may result in burning When replacing parts be sure to confirm that the rating of a new part is correct Not doing so may result in malfunction or burning Before touching a Unit be ...

Page 14: ...1 SECTION 1 Features and System Configuration This section provides a list of features and a system configuration example 1 1 Features 2 1 2 System Configuration 3 ...

Page 15: ...he count value in hexadecimal Seven Operating Modes The High speed Counter Unit has the following three functions and seven operating modes None of the three functions are available to the High speed Counter Unit in simple counter mode which is the basic operating mode of the High speed Counter Unit Simple Counter Mode Counts the number of input pulses Drum Function Linear Mode Controls outputs wh...

Page 16: ...mple the size of each product on the belt conveyor is mea sured and improper sized products are removed from the line using the sole noid The High speed Counter Unit counts the number of pulses that is input from the encoder while each product is passing between the emitter and receiver of the through beam photoelectric sensor When the count value of a product is not within the range preset with t...

Page 17: ...ion I O Rack or Slave Rack is 16 and the maximum number of those mounted to any other PC is 10 Note 1 A maximum of four High speed Counter Units can be mounted to the Slave Rack 2 Do not mount the High speed Counter Unit to the two slots on the right of the CPU 3 Do not mount the High speed Counter Unit to the Slave Rack if the IORD or IOWR instruction is to be used with the C200HX C200HG or C200H...

Page 18: ... Specifications 6 2 1 2 Characteristics 6 2 1 3 I O Electrical Specifications 7 2 1 4 Counting Speed 9 2 1 5 BCD or Hexadecimal Count Values 10 2 1 6 Dimensions 11 2 1 7 Dimensions with High speed Counter Unit Mounted 11 2 2 High speed Counter Unit Components 12 2 2 1 Nomenclature 12 2 2 2 Indicator Functions 12 2 2 3 Switch Settings 13 2 2 4 Rear Setting Switch 13 ...

Page 19: ... rate of 75 000 cps max The counting speed of the number of offset phase input pulses varies with the encoder Refer to page 9 for details Others The multiple function x 1 x 2 or x 4 can be selected for offset phase input External inputs Input signal Counter 1 input Z Counter 2 input Z Signal levels RS 422 line driver signal equivalent to Am26LSS31 12 or 24 VDC selectable Input signal Counter 1 ext...

Page 20: ...ctor of 50 10 µs min 3 µs max 3 µs max Relationship between A and B phases with offset phase input 20 µs min Phase B T1 T2 T3 and T4 4 5 µs min The switching time between A and B phases must be 4 5 µs min Counter Input Z A pulse width of 100 µs min is required 100 µs min 100 µs min 20 µs min min 10 µs Phase A Counter Inputs A and B Waveform At 75 kHz with pulses with a duty factor of 50 13 3 µs mi...

Page 21: ...e built in fuse will blow out The built in fuse cannot be replaced by the user Item External Outputs 0 to 7 Max switching capacity 16 mA at 4 5 VDC to 80 mA at 26 4 VDC See the following graph 320 mA max common Leakage current 0 1 A max Residual voltage 0 8 V max ON OFF response time 0 2 ms max External power supply 5 to 24 VDC 10 50 mA max at 26 4 VDC VDC 80 50 16 External power supply voltage Ma...

Page 22: ...hase behind phase B Item Specification Power supply voltage 5 VDC 5 to 12 V 10 with a peak to peak rip ple rate of 5 max Current consumption 50 mA max Resolution P R 500 Output phases Phase A phase B phase Z Output type Open collector output Output capacity Applied voltage 30 VDC max Sink current 80 mA max Residual voltage 1 V max when the sink current is 80 mA 0 4 V max when the sink current is 2...

Page 23: ...peed Counter Unit can set the present counter value and the upper and lower limit count values in BCD or hexadecimal The High speed Counter Unit can process hexadecimal values faster than BCD values because it need not convert the hexadecimal values into BCD values Refer to the following for the data configuration s BCD and hexadecimal count values BCD Example Present counter value The above is th...

Page 24: ...e following example the count value is 800000 1000000 800000 800000 8 388 608 Hex Hex Hex BCD Therefore the following counting range can be obtained Hexadecimal BCD 800000 8 388 608 to to FFFFFF 1 0 0 to to 7FFFFF 8 388607 2 1 6 Dimensions 2 1 7 Dimensions with High speed Counter Unit Mounted Connecting cable Backplane Approx 200 ...

Page 25: ...hen counter 1 input B is ON 1 Counter 1 external control input IN1 Lit when external control input IN1 is ON 2 Counter 1 external control input IN2 Lit when external control input IN2 is ON CH2 A Counter 2 input A Lit when counter 2 input A is ON B Counter 2 input B Lit when counter 2 input B is ON 1 Counter 2 external control input IN1 Lit when external control input IN1 is ON 2 Counter 2 externa...

Page 26: ...wise a setting error will result Each unit number in the system must be unique The unit number can be set within a range of 0 to 9 if the C200H C200HS C200HE CPU11 32 42 Z C200HG CPU33 43 Z or C200HX CPU34 44 Z is used with the High speed Counter Unit The operating mode must be set within a range of 0 to 6 Do not set the oper ating mode to 7 8 or 9 otherwise the High speed Counter Unit will not op...

Page 27: ...NG Do not touch the terminals while the power is being supplied Otherwise an electric shock may occur 3 1 External Connector Pins 16 3 2 Connector Wiring Method 16 3 3 I O Circuit Configurations 18 3 4 Wiring Examples of Encoder Inputs 20 3 5 Wiring Example of External Control Inputs 22 3 6 Example of External Output Wiring 23 ...

Page 28: ... max Row B Pin no Row A Counter 1 external control input IN2 12 or 24 VDC 20 Counter 2 external control input IN2 12 or 24 VDC Counter 1 external control input IN1 12 or 24 VDC 19 Counter 2 external control input IN1 12 or 24 VDC Counter 1 external control input IN1 IN2 COM 18 Counter 2 external control input IN1 IN2 COM Counter 1 input Z 24 VDC 17 Counter 2 input Z 24 VDC Counter 1 input Z 12 VDC...

Page 29: ...eparation Assembling Connectors The following Fujitsu 360 series parts are available 1 FCN 361J040 AU solder terminal FCN 360C040 B cover 2 FCN 363J040 solderless terminal housing FCN 363J AU contact 3 FCN 367J040 AU F solderless terminal Insulating tube Wire Thickness 0 3 mm2 max Connector Connector terminal side Input cable Output cable Two M2 pan head screws 8 mm long Connector jack Four M2 nut...

Page 30: ...Be sure to connect wires to a 5 to 24 VDC output power supply terminal and COM 0 V terminal correctly If the wires are connected to these ter minals reversely the built in fuse will blow out The built in fuse cannot be replaced by the user 3 3 I O Circuit Configurations Input Configuration Terminals numbers in parentheses are used with counter 2 filter filter filter Rectifier Rectifier Terminal nu...

Page 31: ...unter 1 input B Counter 1 input B Counter 1 input A Counter 1 input A Terminal number Name Internal circuitry Fuse 1 A NPN PNP output Fuse 1 A A1 5 to 24 VDC power supply for external outputs 0 to 7 B5 External output 0 B4 External output 1 B3 External output 2 B2 External output 3 A5 External output 4 A4 External output 5 A3 External output 6 A2 External output 7 B1 External output 0 to 7 COM 0 V...

Page 32: ...put to the Unit will be turned ON when an output from the encoder is L C200H CT021 High speed Counter Unit Counter input A Rectifier filter Counter input B Counter input Z 24 V 12 V 0 V 24 V 12 V 0 V 24 V 12 V 0 V 12 VDC 12 VDC power supply 0 V Shielded twisted pair cable Encoder Power A phase Encoder output B phase Z phase Rectifier Rectifier filter Rectifier Counter input A Counter input B Count...

Page 33: ...der Rectifier filter Rectifier Counter input A Counter input B Counter input Z C200H CT021 High speed Counter Unit Shielded twisted pair cable 24 V 12 V 0 V 24 V 12 V 0 V 24 V 12 V 0 V 12 VDC 12 VDC power supply 0 V Encoder A phase B phase Z phase C200H CT021 High speed Counter Unit Counter input A Counter input B Counter input Z Shielded twisted pair cable Encoder Power ...

Page 34: ... to the positive terminal and L will be output to the negative terminal of the C500 AE001 when an input to the C500 AE001 is H 3 5 Wiring Example of External Control Inputs In order to prevent chatter at the input use solid state as much as possible Counter input A Counter input B Counter input Z Shielded twisted pair cable Encoder Shielded twisted pair cable 12 VDC12 VDC power supply 0 V 0 V 0 V ...

Page 35: ... power supply voltage must be higher than the load supply voltage and if the external power supply is differ ent from the load power supply make sure that the external power supply volt age is the same as or higher than the load supply voltage C200H CT021 High speed Counter Unit Fuse 1 A Driving circuirtry Output 0 Relay Pull up resistor 4 7 kΩ Fuse 1 A Output 1 Output 7 Output 0 Output 1 Relay 5 ...

Page 36: ...ation Example 29 4 3 2 Configuration of Range 29 4 4 Circular Mode 31 4 4 1 Configuration of Range 32 4 5 Preset Mode 33 4 5 1 External Output Pattern 34 4 5 2 Count Range for Output Control 34 4 5 3 Configuration of Range 34 4 6 Gate Mode 36 4 7 Cumulative Gate Mode 37 4 8 Sampling Mode 37 4 8 1 Configuration of Sampling Time 38 4 9 Input Types 38 4 10 Counter Reset Conditions 41 4 11 Data Proces...

Page 37: ...o 65 535 is counted The count value is reset to 0 after it reaches the maximum countable value set and the High speed Counter Unit continues counting the number of pulses 31 3 Preset Mode Counter value is decremented beginning with a preset value whenever a counter input is turned ON Both counters 1 and 2 have three external outputs that will be turned ON and OFF while the count is decremented and...

Page 38: ...o IR 199 or IR 400 to IR 459 is allocated to the Special I O Unit The words allocated to the Special I O Unit are within the following range Words n to n 9 n 100 10 Unit No 0 to 9 or 400 10 Unit No 10 Unit No 10 to 15 Note Unit numbers 10 to 15 A to F are available only when the C200HX C200HG or C200HE is used with the C200H CT021 IR words n and n 1 are used for outputs from the PC to the Special ...

Page 39: ...179 IR 180 to 189 IR 190 to 199 IR 400 to 409 IR 410 to 419 IR 420 to 429 IR 430 to 439 IR 440 to 449 IR 450 to 459 Optional bit areas DM fixed DM EM IR LR HR and AR IR area Initial data transfer Executed when the CT021 is turned ON or restarts Data area READ DATA and WRITE DATA By e x e cuting IORD and IOWR instructions data can be written to and read from the data area of the High speed Counter ...

Page 40: ...ges 0 and 3 In the case where ranges of counters 1 and 2 are different from each other if the present counter value is within a range of counter 1 or 2 the OR of out puts corresponding to the range will be turned ON 4 3 2 Configuration of Range Note The configuration of the range in linear mode is briefly described in the follow ing to explain the functions of the High speed Counter Unit Besides t...

Page 41: ...88 608 and 8 388 607 The following is an example of range 0 Lower Limit BCD Range 8 388 608 to 8 388 607 Hexadecimal Range 800000 to FFFFFF 8 388 608 to 1 and 000000 to 7FFFFF 0 to 8 388 607 Upper Limit The configuration of the upper limit is the same as that of the lower limit Replace word m 16 with m 18 and word m 15 with m 17 Lower limit Upper limit Output pattern Range 0 to to to Range 1 Range...

Page 42: ...Mode The High speed Counter Units in this mode counts the number of pulses within a range of 0 to 65 535 The count value is reset to 0 after it reaches the maximum countable value set and the High speed Counter Unit continues counting the number of pulses A total of 16 ranges with upper and lower lim its can be set and when the count value is within the ranges the High speed Counter Unit will turn...

Page 43: ... tings such as operating mode input type and counter reset condition set tings are required Refer to 5 2 DM Area Allocation in Linear and Circular Modes for data area allocation in detail Circular mode requires settings for the maximum count value of the High speed Counter Unit Except for the maximum count value the configuration of the High speed Counter Unit in circular mode is the same as that ...

Page 44: ...in decrement counting operation in this mode Therefore sensor inputs such as encoder inputs to the High speed Counter Unit must be in decrement mode The High speed Counter Unit in this mode counts down the number of pulses whenever a counter input is turned ON beginning with a preset value Both counters 1 and 2 have three external outputs that will be turned ON and OFF while the count is being dec...

Page 45: ...ter 2 Count values can be set within a range of 0 to 8 388 607 Values in parentheses are for counter 2 in the following diagram Output Output pattern 0 4 Turned ON when the counter starts and turned OFF at count value 0 A 1 2 5 6 Turned ON at the counter preset value B and the counter preset value D and turned OFF at count values 0 C and 0 E 3 7 Turned ON for a preset interval after the counter fi...

Page 46: ...ng count values for external out puts 0 2 4 5 and 6 Example 2 ON Time of External Output 3 External output 3 will be kept ON until the counter starts again if the time is set to FFFF Set value 0 to 9999 0 to 99 99 s Unit 0 01 s Counter Preset Values The maximum number of counter preset values is 20 within a range of 1 to 8 388 607 any of which can be chosen Set to 0 Counter preset value 0 Counter ...

Page 47: ...in detail 4 6 Gate Mode The High speed Counter Unit in this mode counts the number of pulses within a range of 8 388 608 to 8 388 607 while control input IN1 is turned ON The count value is reset at the rising edge of control input IN1 An external control input or an IR bit can be used as the control input In this mode the present counter value will start counting from 0 when control input IN1 is ...

Page 48: ... Sampling Mode The High speed Counter Unit in this mode counts the number of pulses between for a preset interval The High speed Counter starts counting the number of pulses from the rising edge of the control input IN1 within a range of 8 388 608 to 8 388 607 An external control input or an IR bit can be used as the control input In this mode the number of pulses will start counting from 0 when c...

Page 49: ...ulative Gate and Sampling Modes for data area allocation in detail Sampling Time A sampling time can be set within a range of 1 to 9 999 ms Set value 0001 to 9999 ms Unit 1 ms 4 9 Input Types Any one of the following types of inputs can be selected for the High speed Counter Unit Offset phase inputs Up and down pulse inputs Pulse and direction inputs The High speed Counter Unit has a function to m...

Page 50: ...eration Reset input High speed Counter Unit Counter input A Forward rotation Reverse rotation When the A phase is 90 in advance of the B phase the count is incremented at the rising edge of the A phase input When the A phase is 90 behind the B phase the count is decremented at the falling edge of the A phase input Multiplier x 1 Counter input B Counter input Z B phase Z phase A phase B phase x 2 x...

Page 51: ...when the direction signal is OFF The High speed Counter Unit counts pulses when the pulses are turned ON Note A counter can be reset with a Z phase input from the encoder Refer to 4 10 Counter Reset Conditions Encoder or sensor for decrementing Encoder or sensor for incrementing Sensor or switch Down pulses Up pulses Reset inputs etc High speed Counter Unit Counter input A Counter input B Counter ...

Page 52: ...Z 1 to 11 Counter reset modes In the following table when two or more conditions are combined they are treated as a logical AND For example Z E I means that the count value will be reset when counter input Z is H external control input IN1 is L and internal Reset Bit is 1 0 to 11 Modes 0 to 11 Input Counter reset condition and timing Internal Reset Bit 0 1 Not reset Counter input Z external contro...

Page 53: ...sh The data transfer completion bit will be turned ON or OFF whenever data is transferred External control input IN1 10 11 Input Counter reset condition and timing E Reset E E Reset E Cycle time Com mon proces sing Host link service Periph eral de vice service Arithmetic operation I O refresh Cycle time Host link service Periph eral de vice service Arithmetic operation I O refresh Com mon proces s...

Page 54: ...rocessing with PC Section 4 11 Note When the High speed Counter Unit is mounted to a Slave Rack there may be a data transfer delay between the Master and the Slave Refer to C200H PCs Operation Manual for details ...

Page 55: ...tion on the DM and IR bit allocation in each mode 5 1 DM Area Allocation in Simple Counter Mode 46 5 2 DM Area Allocation in Linear and Circular Modes 48 5 3 DM Area Allocation in Preset Mode 54 5 4 DM Area Allocation in Gate Cumulative Gate and Sampling Modes 60 ...

Page 56: ...t starts operating when this bit is OFF and stops operating when this bit is ON 01 to 03 Not used 04 RESET Counter 1 Command Counter 1 reset at the rising edge of this bit Refer to 4 10 Counter Reset Conditions 05 RESET Counter 2 Command Counter 2 reset at the rising edge of this bit Refer to 4 10 Counter Reset Conditions 06 READ ERROR command Error codes are read at the rising edge of this bit Wh...

Page 57: ...ting 07 Unit Busy Set to 1 while the IOWR instruction is processed for the C200HX C200HG or C200HE PC or the Unit is initialized 08 Counter 2 Counting Refer to the information on the above counter 1 09 Input Z 10 Control Input IN1 11 Control Input IN2 12 Counter Overflow 13 Reset 14 Data Transfer Comple tion Set to 0 from 1 or vice versa when the Unit has completed process ing the IOWR instruction...

Page 58: ...put types and counter reset conditions m 3 00 to 15 First word number of PC storing transfer data and number of transfer data blocks Transfer data can be stored in consecutive words in a data area of the PC which can be used to change the upper and lower limits of the count value and present counter value of the Unit A transfer data block uses six words Three transfer data blocks i e 18 word data ...

Page 59: ...ransfer data The EM area is available for the C200HX and C200HG PCs The following is the data configuration to transfer upper and lower limits from a data area of the PC PC data area Set range 00 to 15 Lower limit Upper limit Sign Set in hexadecimal when counter value mode is hexadecimal Bit output 0 OFF 1 ON Set to 0 External outputs Internal outputs N First word number set with PC The following ...

Page 60: ...count value of counter 1 in circular mode only BCD Range 1 to 65 535 Hexadecimal Range 0001 to FFFF In the above example the maximum value of counter 1 is specified Words m 10 and m 9 are used for counter 2 Set to 0 Set to 0 Lower limit of range 0 BCD Range 8 388 608 to 8 388 607 Hexadecimal Range 800000 to FFFFFF 8 388 608 to 1 and 000000 to 7FFFFF 0 to 8 388 607 Set to 0 Sign Upper limit of rang...

Page 61: ...0 to m 64 Output pattern and lower and upper limits of range 9 Refer to the information on the settings of range 0 m 65 to m 69 Output pattern and lower and upper limits of range 10 Refer to the information on the settings of range 0 m 70 to m 74 Output pattern and lower and upper limits of range 11 Refer to the information on the settings of range 0 m 75 to m 79 Output pattern and lower and upper...

Page 62: ...ds error codes at the rising edge of this bit When this bit is ON while the Error Flag word n 6 bit 15 is 1 error codes will be output to word n 7 The error code will be 0 when the last error code is read Repeatedly turn this bit ON until the error code is set to 0 The Error Flag will still be 1 after the last error code is read To reset the Error Flag use the control code EC after correcting the ...

Page 63: ...ntrol Input IN1 11 Control Input IN2 12 Counter Overflow 13 Reset 14 Data Transfer Completion Set to 0 from 1 or vice versa when the Unit has completed data transfer or processing the IOWR instruction 15 Error Set to 1 when an error results The error code and error location will be output to word n 7 by setting the READ ERROR Command to 1 n 7 00 to 15 Error Data n 8 00 to 15 Operating Range No Bit...

Page 64: ... 2 00 to 15 Counter 2 input types and counter reset conditions Refer to the information on counter 1 input types and counter reset conditions m 3 00 to 15 First word number of PC storing transfer data and number of transfer data blocks Transfer data can be stored in consecutive words in a data area of the PC which can be used to change the preset counter value of the Unit Be sure to create the PC ...

Page 65: ...vailable to the C200HX and C200HG PC data area 01 to 06 The following is the data configuration to transfer counter preset values from a data area of the PC Counter preset value numbers 0 to 19 Preset value range 0 to 8 388 607 Set in hexadecimal when counter value mode is hexadecimal Range 000000 to 7FFFFF N First word number set with PC Set to 0 W d N 2 W d N 3 Wd Number of transfer data blocks ...

Page 66: ...f external output 5 Range 0 to 8 388 607 000000 to 7FFFFF m 34 m 35 00 to 15 OFF count value of external output 5 Range 0 to 8 388 607 000000 to 7FFFFF m 36 m 37 00 to 15 ON count value of external output 6 Range 0 to 8 388 607 000000 to 7FFFFF m 38 m 39 00 to 15 OFF count value of external output 6 Range 0 to 8 388 607 000000 to 7FFFFF m 40 00 to 15 ON hold time of external output 7 Range 0000 to...

Page 67: ...8 m 69 00 to 15 Counter preset value 9 m 70 m 71 00 to 15 Counter preset value 10 m 72 m 73 00 to 15 Counter preset value 11 m 74 m 75 00 to 15 Counter preset value 12 m 76 m 77 00 to 15 Counter preset value 13 m 78 m 79 00 to 15 Counter preset value 14 m 80 m 81 00 to 15 Counter preset value 15 m 82 m 83 00 to 15 Counter preset value 16 m 84 m 85 00 to 15 Counter preset value 17 m 86 m 87 00 to 1...

Page 68: ...it ON until the error code is set to 0 The Error Flag will be still 1 after the last error code is read To reset the Error Flag use the control code EC after correcting the errors Refer to 11 1 Error Processing 07 ENABLE External Output Command External outputs 0 to 7 will be enabled if this bit is set to 1 Data is transferred to word n 9 regardless of the setting of this bit 08 to 15 Forced Exter...

Page 69: ...on on the above counter 1 09 Input Z 10 Control Input IN1 11 Control Input IN2 12 Counter Overflow 13 Reset 14 Data Transfer Completion Set to 0 from 1 or vice versa when the Unit has completed data transfer and processing the IOWR instruction 15 Error Set to 1 when an error results The error code and error location will be output to word n 7 by setting the Error Read Flag to 1 n 7 00 to 15 Error ...

Page 70: ...s and control mode Counter 2 control mode The following bits are used for the internal control inputs Word n bit 10 Internal control IN1 Word n bit 11 Internal control IN2 m 3 to m 99 00 to 15 Not used Counter 1 input types and control mode Input types 0 x 1 1 x 2 2 x 4 3 Up and down pulses input 4 Pulse and direction input Offset phase inputs counter 1 Counter 1 control mode Set control inputs IN...

Page 71: ...ntil the error code is set to 0 The Error Flag will be still 1 after the last error code is read To reset the Error Flag use the control code EC of the IOWR instruction after correcting the errors Refer to 11 1 Error Processing 07 Not used 08 Counter 1 Internal Control IN1 Specify internal control inputs with bits 04 to 07 of words m 1 and m 2 09 Counter 1 Internal Control IN2 10 Counter 2 Interna...

Page 72: ...00HX C200HG or C200HE PC or the Unit is initialized after restarted 08 Count er 2 Counting Refer to the information on the above counter 1 09 Input Z 10 Control Input IN1 11 Control Input IN2 12 Counter Overflow 13 Not used 14 Data Transfer Completion Set to 0 from 1 or vice versa when the Unit has completed process ing the IOWR instruction 15 Error Set to 1 when an error results The error code an...

Page 73: ... Program Development This section describes the steps required to operate the High speed Counter Unit in each mode the DM required for unit number settings and IR bit allocation 6 1 Operating Steps 64 6 2 Unit Number Setting 65 ...

Page 74: ... Use the commands sent from the PC to the High speed Counter Unit and the status data of the High speed Counter Unit to write programs for sys tem control Set the MACHINE No switch within a range of 0 to F Set the MODE switch within a range of 0 to 6 for the following modes 0 Simple counter mode 1 Linear mode 2 Circular mode 3 Preset mode 4 Gate mode 5 Cumulative gate mode 6 Sampling mode Note Ref...

Page 75: ... the PC to the Special I O Unit and IR words n 2 to n 9 are used for inputs from the Special I O Unit to the PC After setting the unit number check the DM and IR areas allocated to the High speed Counter Unit and write programs Unit No DM Unit No DM 0 DM 1000 to 1099 8 DM 1800 to 1899 1 DM 1100 to 1199 9 DM 1900 to 1999 2 DM 1200 to 1299 A DM 2000 to 2099 3 DM 1300 to 1399 B DM 2100 to 2199 4 DM 1...

Page 76: ...8 7 2 DM Area Settings and Functions 68 7 3 IR Area Settings and Functions 71 7 4 I O Signal Timing Chart 74 7 5 Data Transfer Programs 75 7 5 1 Data Transfer Steps 75 7 5 2 Transfer Data Format IR and DM Areas of PC 76 7 5 3 Program Example for Range Change 77 7 5 4 Program Example for Present Counter Value Change 78 7 6 Program Example for Linear Mode 80 7 7 Program Example for Circular Mode 82 ...

Page 77: ... present counter value and upper and lower limits can be changed with the C200HX C200HG or C200HE PC by using the IOWR instruction Re fer to SECTION 10 Using IORD and IOWR Instructions Description In this manual the words and bits of counter 1 are described first followed by the words and bits of counter 2 In the following example word m 1 bit 04 is for counter 1 and word m 2 bit 05 is for counter...

Page 78: ... Type Word m Bits 15 to 12 These bits are used to set the counter value upper limit and lower limit data in BCD or hexadecimal Counter Input Type Word m 1 or m 2 Bits 03 to 00 Offset phase pulse inputs must be multiplied by 1 2 or 4 Reset Mode Word m 1 or m 2 Bits 15 to 08 These bits are used to specify the counter reset mode Operating mode 1 Linear mode 2 Circular mode Forced external output 0 Di...

Page 79: ...imum count value of a counter is 9 999 9997 9998 9999 0 1 2 Upper and Lower Limits and Output Pattern A maximum of 16 ranges can be set within a range of word m 15 for range 0 and word m 94 for range 15 Each range uses five words Example Range 0 BCD Lower and Upper Limits Lower and upper limits must satisfy the following conditions otherwise an error will result when the High speed Counter Unit is...

Page 80: ...e An error will result if the relationship between a valid range and the corresponding maxi mum count value is incorrect 7 3 IR Area Settings and Functions IR bits can be used to check the I O data of the High speed Counter Unit such as the commands in use and the status data of the Unit n 100 10 x Unit No Unit No 0 to 9 n 400 10 x Unit No 10 Unit No 10 to 15 Output data means any data output from...

Page 81: ...led with words m 5 and m 6 to the data of word n 1 at the rising edge of this bit Take the following steps to change the ranges 1 2 3 1 Set word n 1 to the data to enable or disable ranges 2 Enable the ranges by setting word n bits 01 or 02 to 1 This function will be effective immediately even when the High speed Counter Unit is counting Read Error Word n Bit 06 If an error results the Error Flag ...

Page 82: ...status of control input IN1 Indicates the status of control input IN2 1 ON 0 OFF 02 Control Input IN1 03 Control Input IN2 04 Counter Overflow Set to 1 when the count value is not within a range of 8 388 608 to 8 388 607 Reset the counter when this bit is set to 1 05 Reset Set to 1 during a scan of the PC after the counter is reset 06 Counter operating Set to 1 and the RUN indicator is lit while e...

Page 83: ...peed Counter Unit will stop counting when the Start Stop Bit is set to 0 The previous internal and external outputs will be kept on hold 4 If these bits are turned ON while the High speed Counter Unit has forced external outputs the High speed Counter Unit will have normal external outputs and no forced external output will be available External outputs Internal outputs Start Stop Word n bit 00 Op...

Page 84: ...Values can be written to the data area or DM area of the PC with ladder programs or the Programming Console Six Words Used by Transfer Data A transfer data block uses six words Three ranges with range numbers can be transferred at a time Write these ranges to consecutive words in the same area Transfer the present counter value in a data block 4 Data Transfer Set word n bit 03 to 1 to execute data...

Page 85: ...pper limit in circular mode Example Present Counter Value Transfer the present counter value in a block of data If there is more than one block of transfer data set the first block to the present counter value The High speed Counter Unit ignores the data in the succeeding blocks Range 00 to 15 Lower limit Upper limit Sign Set in hexadecimal when counter value mode is hexadecimal Output pattern of ...

Page 86: ...words must be from DM 0900 on To transfer more than three transfer data blocks store them in a different area and move three data blocks to DM 0900 to DM 0917 to transfer each time A total of three blocks of transfer data can be transferred at a time Unit No 0 Rotary encoder SW1 00000 Start switch SW2 00001 Data transfer switch 16 points Wd 0 First word no of source No of transfer data blocks and ...

Page 87: ... 13 03000 10003 25315 DIFU 13 03001 DIFD 14 03002 03003 10614 10000 10007 03000 00001 03000 03003 00000 00000 10000 03001 03002 00001 03003 1 cycle ON SW2 SW1 SW1 SW2 Data transfer switch Data transfer instruction Start instruction Enable external output Start Stop Data transfer completion Unit No 1 Wd 0 Wd 3 Wd 4 Rotary switch Leftmost digit of present counter value preset data Rotary switch Righ...

Page 88: ...witches Sign SW1 MOV 21 0000 030 DIFU 13 03000 11003 00000 MOV 21 00F1 002 DIFU 13 03001 DIFD 14 03002 03003 11000 11007 25315 00001 03000 11614 00000 03000 11000 03002 03001 03003 00001 SW2 SW1 03003 1 cycle ON Start Stop Data transfer switch Wd 002 Present counter value preset code Data transfer instruction Start instruction Enable external output SW2 Data transfer completion ...

Page 89: ...phase inputs multiplied by 1 are input to the encoder BCD data is used in the system The counter is reset at the rising edge of external control input IN1 Switch Settings The unit number of the High speed Counter Unit is set to 1 and the Unit will have NPN external outputs Wiring Connect the outputs of the photoelectric sensor to external control IN1 Connect the A and B phase outputs of the increm...

Page 90: ...s 09 08 and 02 ON Range 3 9501 to 8388607 past the gripper hand position External output 3 ON Internal output 0408 bits 10 and 03 ON 11909 11910 11000 11007 Station 1 processing 11909 11908 11910 11908 11909 11910 11908 11910 11909 11908 Gripper pro cessing Cycle and processing Station 2 processing While the start switch is ON external outputs are enabled and the counter continues counting When th...

Page 91: ...Counter Unit in circular mode Note After writing a program make sure that the program works properly System Configuration Cam Timer Control 11801 11000 11007 Station 1 processing 11802 Gripper pro cessing Cycle and processing Station 2 processing 11800 Start switch 11803 C200H CT021 High speed Counter Unit External outputs 1 6 and 7 Encoder Conversion Adapter Encoder inputs A B and Z Incremental e...

Page 92: ...er 1 inputs A B and Z Connect external outputs 1 6 and 7 the control component of the system DM Settings Program Example DM 1115 DM 1116 DM 1117 DM 1118 DM 1119 DM 1120 DM 1121 DM 1122 DM 1123 DM 1124 DM 1125 DM 1126 DM 1127 DM 1128 DM 1129 DM 1100 DM 1101 DM 1105 DM 1107 DM 1108 Circular mode external NPN outputs BCD data offset phase pulse inputs x 4 reset mode 6 Enabled ranges 0 to 2 Maximum co...

Page 93: ...function 8 1 Performance Specifications of Preset Function 86 8 2 DM Area Settings and Functions 87 8 3 IR Area Settings and Functions 89 8 4 I O Signal Timing Chart 92 8 5 Data Transfer Programs 93 8 5 1 Data Transfer Steps 94 8 5 2 Program Example for Preset Value Change 95 8 6 Program Example for Preset Mode 97 ...

Page 94: ...irection input Counter input A Direction input Counter input B Pulse input External input signal External control input IN1 Counter reset signal External control input IN2 Preset count start External output signal External output 0 or 4 Turned ON when the count starts and turned OFF when the counter has counted value 0 A External output 1 or 5 External output 2 or 6 Turned ON when the counter has ...

Page 95: ...irst followed by the words and bits of counter 2 In the following example word m 1 bit 04 is for counter 1 and word m 2 bit 05 is for counter 2 Example Counter input type Word m 1 or m 2 bits 03 to 00 Counter reset Word n bits 04 or 05 Operating Mode Word m Bits 03 to 00 Set these bits so that the setting will correspond to the MODE switch setting Forced External Output Word m Bits 04 to 07 Forced...

Page 96: ...s 0 x 1 1 x 2 2 x 4 3 Up and down pulse inputs 4 Pulse and direction inputs Offset phase inputs Reset mode 00 to 11 modes 0 to 11 Symbol DM Counter 1 DM Counter 2 A m 11 m 10 m 31 m 30 B m 13 m 12 m 33 m 32 C m 15 m 14 m 35 m 34 D m 17 m 16 m 37 m 36 E m 19 m 18 m 39 m 38 T m 20 m 40 Leftmost word Rightmost word BCD Range 0 to 8 388 607 0 to 8 388 606 for A External output retention time Range 0 t...

Page 97: ...set in word n 1 Before starting set in word n 1 the preset value number to be enabled The High speed Counter Unit turns external outputs from 0 to 2 or from 4 to 6 at the external output ON OFF count values If the present counter value reaches 0 the counter stops counting and exter nal output 3 or 7 is turned ON for the preset retention time in which case reset bit 00 or 01 to 0 Operating Counter ...

Page 98: ...o 0 5 Turn ON any external outputs out of external outputs 0 to 7 to by setting the corresponding bits to 1 Read Error Word n Bit 06 If an error results the Error Flag word n 6 bit 15 is set to 1 at which time the error codes will be output to word n 7 when word n bit 06 is set to 1 The error data is set to 0 when all the error data is read Repeatedly turn this bit ON until the error data is set t...

Page 99: ...ontrol input IN1 03 Control input IN2 04 Counter overflow Set to 1 when the count value exceeds 8 388 607 Reset the counter when this bit is set to 1 05 Reset Set to 1 during a scan of the PC after the counter is reset 06 Counter operating Set to 1 and the RUN indicator is lit while either of the counters is counting 07 Unit busy Set to 1 while the IOWR instruction is processed for the C200HX C200...

Page 100: ...l outputs 0 to 2 4 to 6 are turned ON or OFF according to the preset external output ON OFF count values 3 The counter will stop counting if the count value reaches 0 and external output 3 7 will be turned ON for the preset retention time Counter preset value Count value Start Word n bit 00 01 or exter nal control input IN2 Count value 0 Counting Word n 6 bit 00 08 Internal External output 0 or 4 ...

Page 101: ... are enabled while the counter is not operating 5 The counter will be in normal operation when the counter is started while the forced external outputs of the counter are turned ON 6 Forced external outputs will be disabled when the counter is in operation 7 Forced external outputs will be turned OFF the moment the counter is re set but the forced external outputs will be turned ON again 8 5 Data ...

Page 102: ...rs can be transferred at a time Write these counter preset values to consecutive words in the same area Transfer Data Format IR and DM Areas of PC N The first word number of the area set in the PC 4 Data Transfer Execution Set word n bit 03 to 1 to execute data transfer 1 2 3 1 Set the data storage area of the source 2 Turn ON or restart the High speed Counter Unit 3 Set the counter preset values ...

Page 103: ...move three data blocks to the DM area from DM 0900 to transfer each time A total of six blocks of transfer data can be transferred at a time 2 Store the counter preset value data to be used in a DM area that is not used by the Special I O Unit The words must be from DM 0900 on Unit No 0 Wd 0 Rotary encoder SW1 00000 Start switch SW2 00001 Data transfer switch 16 points First word number of source ...

Page 104: ...003 00001 00000 DIFU 13 03001 DIFD 14 03002 03003 10000 10007 25315 03000 10000 10614 00000 00001 03003 03001 03002 03003 03000 1 cycle ON Start Stop Data transfer switch Data transfer instruction Data transfer completion Start in struction Enable external output SW 1 SW 2 SW2 SW1 ...

Page 105: ... motor is slowed back to low speed 4 The motor is stopped ahead of the target position taking into account the travel distance due to momentum 5 The brake is turned ON just before the target position 6 When the target position is reached the cutter is activated Offset phase inputs multiplied by 2 are input to the encoder BCD data is used in the system The counter is reset at the rising edge of the...

Page 106: ...of the motor controller Connect external output 3 to the cutter DM Settings Item Set value Counter preset value 10 000 A 100 B 150 C 200 D 0 E 50 T 500 ms Counter preset value Count value Motor operation External output 0 Speed high low External output 1 High Low Brake External output 2 Cutter External output 3 Preset mode external NPN outputs BCD data offset phase pulse inputs x 2 and reset mode ...

Page 107: ...D 14 03000 11007 25313 11000 03001 11903 03000 11000 03001 Always ON Reset switch Counter 1 reset and operation reset Enable external output Start switch Start preset value number External output 3 Cutter operation completion falling edge detected Cut completed indicator output Start ...

Page 108: ... sampling modes 9 1 Performance Specifications of Counting Function 102 9 2 DM Area Settings and Functions 102 9 3 IR Area Settings and Functions 103 9 4 I O Signal Timing Chart 105 9 5 Program Example for Gate Mode 107 9 6 Program Example for Cumulative Gate Mode 109 9 7 Program Example 1 for Sampling Mode 111 9 8 Program Example 2 for Sampling Mode 112 ...

Page 109: ... 1 and word m 2 and bit 02 are for counter 2 Example Counter input type Word m 1 or m 2 bits 03 to 00 Counter reset Word n bits 01 or 02 Operating Mode Word m Bits 03 to 00 Set these bits so that the setting will correspond to the MODE switch setting Item Specification Count input signal Offset phase input Counter input A A phase of encoder Counter input B B phase of encoder Up and down pulse inpu...

Page 110: ...o 15 Output data means any data output from the PC to the High speed Counter Unit and input data means any data input from the High speed Counter Unit to the PC Set Time Word n Bits 01 or 02 These bits are used only for sampling mode The sampling time set in word n 1 is enabled at the rising edge of bit 01 or 02 If bit 01 or 02 is turned ON while the High speed Counter Unit is operating the sampli...

Page 111: ...s counting at the falling edge of control input IN2 and the count value is kept on hold The counter is in operation again at the rising edge of control input IN2 start ing from the count value kept on hold Read Error Word n Bit 06 If an error results the Error Flag word n 6 bit 15 will be set to 1 at which time the error codes will be output to word n 7 when word n bit 06 is set to 1 The error dat...

Page 112: ...hat the PC can properly read the sta tus of external control inputs IN1 and IN2 03 Control input IN2 Indicates the status of external control input IN2 1 ON 0 OFF 04 Counter overflow Set to 1 when the count value is not within a range of 8 388 608 and 8 388 607 Reset the counter with control input IN1 or restart the counter when this bit is set to 1 05 Not used 06 Counter operating Set to 1 and th...

Page 113: ...ling time must be set by turning word n bit 01 or 02 ON 2 The counter resets the count value and starts counting at the rising edge of control input IN1 The counter stops counting after the sampling time elapses The count value is kept on hold until the counter restarts 3 If the new sampling time is set and word n bit 01 or 02 is turned ON while the counter is counting the new sampling time will b...

Page 114: ...control input IN1 are used in the system Switch Settings The unit number of the High speed Counter Unit is set to 1 Wiring The A and B phase outputs of the incremental encoder are connected to counter 1 inputs A and B Connect the outputs of the photoelectric sensor to external control input IN1 DM Settings C200H CT021 High speed Counter Unit External control input IN1 Photoelectric sensor for dete...

Page 115: ...1600 Counting Always ON CY Flag CY Flag Always ON Checks whether count value is lower limit Outputs if dimensions are too small Checks whether count value is upper limit Outputs if dimensions are too large Outputs if dimensions are within standards Lower limit Upper limit DM 0000 DM 0001 DM 0002 DM 0003 DM 0004 DM 0005 Work Comparison Data Areas Output Results 00000 ON 00001 ON 00002 ON Dimensions...

Page 116: ...ble External control inputs are used as control inputs The count value is reset when the mark is detected The value in the parentheses is for counter 2 Offset phase inputs multiplied by 1 are input to the encoder BCD data is used in the system The counter is reset when external control input IN1 is turned ON C200H CT021 High speed Counter Unit Use an Encoder Conversion Adapter to connect line driv...

Page 117: ...pulse inputs x 1 and external control inputs DIFD 14 03000 MOV 21 112 D0002 MOV 21 113 D0003 11600 03000 CMPL 60 112 D0000 25313 KEEP 03001 25506 S R 11600 CLC 41 25313 SUBL 55 D0002 D0004 D0006 03001 KEEP 00000 25504 S R Counting CY Flag Error reset Outputs if length is incorrect Checks whether count value is comparison value Detects mark and check whether reset is executed Present counter value ...

Page 118: ...re input to the encoder to keep the preci sion of the system BCD data is used in the system External control input IN1 is used Switch Settings The unit number of the High speed Counter Unit is set to 1 Wiring The A and B phase outputs of the incremental encoder are connected to counter 1 inputs A and B Connect the outputs of the proximity sensor to external control input IN1 Product 1 External con...

Page 119: ...ling mode BCD data offset phase pulse inputs x 4 and external control inputs MOV 21 3000 111 25315 11001 DIFD 14 03000 MOV 21 112 DM0000 MOV 21 113 DM0001 11600 03000 1 scan ON Sets sampling time to 3 s Counting Sets sampling time data Detects completion of measurement when Counting Flag goes OFF Present counter value is stored in DM 0000 and 0001 after measurement is completed C200H CT021 High sp...

Page 120: ...tput is connected to counter 1 input B Nothing is connected to counter 1 input A The forward direction is used DM Settings Encoder input Internal control input IN1 Word n bit 01 10 Counting Word n 6 bit 00 08 Present counter value Number of revolutions conversion value DM 0004 and 0005 Sampling time 1 2 Sampling time Number of revolutions conversion rpm Number of pulses s x 60 Number of pulses rev...

Page 121: ...V 21 0000 DM0003 TIM 000 TIM001 TIM 001 TIM000 11008 11600 DIVL 57 DM0004 DM0002 DM0004 0020 0010 Always ON Sets sampling time to 1 000 ms Sets values 0000 and 0003 in DM 0000 and DM 0001 Internal control input IN1 is turned ON and OFF every 3 s Value is multiplied by 3 10 and stored in DM 0004 and DM 0005 on completion of sampling Sets values 0000 and 0010 in DM 0002 and DM 0003 ...

Page 122: ...es set in the High speed Counter Unit The IORD and IOWR instructions can be used only if word n 6 bit 06 is set to 0 i e the High speed Counter Unit is not operating 10 1 IORD and IOWR Instructions 116 10 1 1 IORD Instruction 116 10 1 2 IOWR Instruction 117 10 2 Control Codes of IORD and IOWR Instructions 119 10 3 Types of Data Written with IOWR Instruction 121 10 4 Program Examples with IORD Inst...

Page 123: ... A counter preset value in preset mode uses two words Therefore a block of two words must be set Example Set C to 0005 and S to F005 to read range 5 of Unit F in linear or circular mode Control Code CCXX A total of 1 to 99 words can be specified Specify the total number of words from which data is read Example Set C to CC00 and S to F001 to read the operating mode set in word m of Unit F in linear...

Page 124: ...ts in circular or linear mode uses five words Therefore a block of five words must be set A counter preset value in preset mode uses two words Therefore a block of two words must be set IOWR C S D C Control code S Source address D Destination unit number and number of words Bits 15 to 08 Bits 07 to 00 Description 00 00 to 15 Ranges 0 to 15 are written in linear and circular modes 00 to 19 Counter ...

Page 125: ... them uses two words F3 is used to write the present counter values of both counters 1 and 2 Set D to X004 because F3 uses four words Example Set C to F100 and D to F002 to write the present counter value of counter 1 of unit number F in linear or circular mode Set C to F300 and D to 1004 to write the present counter values of counters 1 and 2 of unit number 1 in linear or circular mode S Source A...

Page 126: ...t item IORD instruction control code IOWR instruction control code 00XX CCXX 00XX CCXX FX00 XX 0 to 15 XX 0 to 99 XX 0 to 15 XX 0 to 99 X 1 2 3 m Operating mode NG OK NG NG m 1 Counter 1 input NG OK NG NG m 2 Counter 2 input NG OK NG NG m 3 First word num ber of block of words storing data transferred NG OK NG OK m 4 Number of data blocks trans ferred NG OK NG OK m 5 Counter 1 ranges enabled NG OK...

Page 127: ...N count value NG OK NG OK m 14 to m 15 External output 1 OFF count value NG OK NG OK m 16 to m 17 External output 2 ON count value NG OK NG OK m 18 to m 19 External output 2 OFF count value NG OK NG OK m 20 External output 3 ON hold time NG OK NG OK m 21 to m 29 Not used NG OK NG OK m 30 to m 31 External output 4 OFF count value NG OK NG OK m 32 to m 33 External output 5 ON count value NG OK NG OK...

Page 128: ...available Present counter value Not available Available DM Set item Data transfer IOWR instruction m Operating mode Not available Not available m 1 Counter 1 input Not available Not available m 2 Counter 2 input Not available Not available m 3 First word number of block of words storing data transferred Not available Available m 4 Number of data blocks transferred Not available Available m 5 Count...

Page 129: ...ON hold time Not available Available m 21 to m 29 Not used Not available Not available but no error results m 30 to m 31 External output 4 OFF count value Not available Available m 32 to m 33 External output 5 ON count value Not available Available m 34 to m 35 External output 5 OFF count value Not available Available m 36 to m 37 External output 6 ON count value Not available Available m 38 to m ...

Page 130: ...ter Unit to the DM area of the PC The data will be read when the IORD instruction has been executed Bit 25506 will be turned ON when the IORD instruction is executed with no errors and turned OFF if an error results xxxxx 25506 IORD 0000 0010 D0000 10606 10607 Operating Unit Busy Data of ranges 0 and 1 is read from DM 0000 Error Start xxxxx 25506 IORD CC03 0001 D0000 10606 10607 Operating Unit Bus...

Page 131: ...e the data of range 0 is changed Bit 25506 will be turned ON when the IOWR instruction is executed with no errors and turned OFF if an error results DIFU 13 XXXX1 XXXXX DIFD 14 XXXX2 XXXXX XXXX1 XXXX2 IOWR F100 D0080 0002 10606 10607 Operating Unit Busy 25506 10614 Error Data has been written Data Transfer Completion Error Flag 10615 Start DIFU 13 XXXX1 XXXXX IOWR 0000 D0000 0005 DIFD 14 XXXX2 XXX...

Page 132: ...a Transfer Completion Flag or Unit Busy Flag to check the completion of data transfer xxxxx 25506 IOWR CC15 D6015 0080 10606 10607 Operating Unit Busy Error DIFU 13 XXXX1 DIFD 14 XXXX2 XXXXX XXXX1 XXXX2 10614 Data Transfer Completion Error Flag 10615 to to DM 1000 DM 1015 DM 1094 DM 6000 DM 6015 DM 6094 Initial settings Range 0 Range 0 Range 15 Range 15 New settings Data has been written Start xxx...

Page 133: ...Instruction Executed Data Transfer Executed IOWR execution PC s cycle Program execution Com mon Com mon I O RF Com mon I O RF I O RF Program execution Program execution Unit Busy word n 6 bit 07 Data Transfer Completion word n 6 bit 14 or Unit Busy word n 6 bit 07 Data Transfer Completion word n 6 bit 14 I O refresh Data transfer Data Transfer word n bit 03 Unit Busy word n 6 bit 07 Data Transfer ...

Page 134: ...hooting This section provides information on error processing and troubleshooting procedures 11 1 Error Processing 128 11 2 Errors Monitored with CPU 130 11 2 1 Special I O Unit Errors 130 11 2 2 Functions of Special I O Unit s AR and IR Bits 131 ...

Page 135: ...red the ERR indicator will be lit and word n 6 bit 04 or 12 will be set to 1 No Error Flag or error code will be output when a counter overflow has occurred Reset the counter if a counter overflow has occurred When an error has occurred while the High speed Counter Unit is operating the error code will be output to n 7 automatically When more than one error has occurred while the High speed Counte...

Page 136: ... 388 607 in linear mode or the count value is not within a range of 0 to 65 535 in circular mode For the preset mode it means that the count value is less than 1 or more than 8 388 607 13 The upper limit is smaller than the lower limit 14 The operating mode set in the DM is different from the setting of the MODE switch on the front panel of the Unit 15 The wrong operating mode is selected 16 The o...

Page 137: ...O Unit malfunction The PC does not start operating if a Special I O Unit mounted to the PC has a fault in operation Replace the Special I O Unit Only will be indicated if the I O table is read from a Special I O Unit that has a fault in operation I O Unit Over The PC does not start operating and AR 25415 is turned ON if the same unit number is allocated to more than one Special I O Unit Set so tha...

Page 138: ...ON if Unit 5 has an error AR 0006 Turned ON if Unit 6 has an error AR 0007 Turned ON if Unit 7 has an error AR 0008 Turned ON if Unit 8 has an error AR 0009 Turned ON if Unit 9 has an error Bit Function 28200 Turned ON if Unit 0 has an error 28201 Turned ON if Unit 1 has an error 28202 Turned ON if Unit 2 has an error 28203 Turned ON if Unit 3 has an error 28204 Turned ON if Unit 4 has an error 28...

Page 139: ... 3 AR 0104 Restarts Unit 4 AR 0105 Restarts Unit 5 AR 0106 Restarts Unit 6 AR 0107 Restarts Unit 7 AR 0108 Restarts Unit 8 AR 0109 Restarts Unit 9 Bit Function 28100 Restarts Unit 0 28101 Restarts Unit 1 28102 Restarts Unit 2 28103 Restarts Unit 3 28104 Restarts Unit 4 28105 Restarts Unit 5 28106 Restarts Unit 6 28107 Restarts Unit 7 28108 Restarts Unit 8 28109 Restarts Unit 9 28110 Restarts Unit ...

Page 140: ...HS C200HX C200HG and C200HE Impossible to change the transfer area or num ber of transfer data blocks after the Unit is turned ON Transfer area DM 0000 to DM 1999 for the C200H C200HS C200HX C200HG and C200HE IORD IOWR instructions Available Unavailable External forced output Set with IR bits Not controlled with ladder programs Available only when external outputs are not inhibited Enabled with a ...

Page 141: ...ng MACHINE No 0 to F MODE 0 Simple counter mode 1 Linear mode 2 Circular mode 3 Preset mode 4 Gate mode 5 Cumulative gate mode 6 Sampling mode DM m Present counter value 0 BCD 1 Hexadecimal 0 0 Operating mode 0 Simple m 1 to m 99 Not used 15 00 Bit Word Output n n 1 00 Stop both Counters Not used 01 Not used 02 03 04 RESET Counter 1 05 RESET Counter 2 06 READ ERROR 07 Not used 08 09 10 11 12 13 14...

Page 142: ...Counter 1 present value x105 x165 Counter 2 present value x101 x161 Counter 2 present value x105 x165 Counter 1 Counter overflow Error location x101 05 Counter 1 Reset 06 Counter operating 07 Unit busy 08 Counter 1 present value x102 x162 Counter 1 present value x106 0 Counter 2 present value x102 x162 Counter 2 present value x106 0 Counter 2 counting Error code x100 09 Counter 2 Input Z 10 Counte...

Page 143: ...R 5 EM x101 x100 0 m 5 Counter 1 range enabled Each bit 00 to 15 1 Enabled 0 Disabled m 6 Counter 2 range enabled Each bit 00 to 15 1 Enabled 0 Disabled m 7 Maximum count value of counter 1 in circular mode only x103 x163 x102 x162 x101 x161 x100 x160 m 8 Range 1 to 65 535 0001 to FFFF 0 0 0 0 0 0 x104 0 m 9 Maximum count value of counter 2 in circular mode only x103 x163 x102 x162 x101 x161 x100 ...

Page 144: ...Bit Word Output n n 1 00 Start Stop Valid value range number Each bit 1 Enabled 0 Disabled 01 Change ranges for counter 1 02 Change ranges for counter 2 03 Data transfer 04 RESET Counter 1 05 RESET Counter 2 06 Read error 07 ENABLE External Output 08 0 Forced external output 1 ON 0 OFF 09 1 10 2 11 3 12 4 13 5 14 6 15 7 ...

Page 145: ...low Error location x101 05 Counter 1 Reset 06 Counter operating 07 Unit busy 08 Counter 1 present value x102 x162 Counter 1 present value x106 0 Counter 2 present value x102 x162 Counter 2 present value x106 0 Counter 2 counting Error code x100 09 Counter 2 Input Z 10 Counter 2 Control input IN1 11 Counter 2 Control input IN2 12 Counter 1 present value x103 x163 Sign 0 0 F Counter 2 present value ...

Page 146: ...101 x161 x100 x160 m 17 External output 2 ON count value 0 0 x106 0 x105 x165 x104 x164 m 18 External output 2 OFF count value x103 x163 x102 x162 x101 x161 x100 x160 m 19 External output 2 OFF count value 0 0 x106 0 x105 x165 x104 x164 m 20 External output 3 ON hold time Unit 1 s FFFF ON hold x101 x100 x10 1 x10 2 m 21 to m 29 Not used m 30 External output 4 OFF count value x103 x163 x102 x162 x1...

Page 147: ...03 x163 x102 x162 x101 x161 x100 x160 0 0 x106 0 x105 x165 x104 x164 m 90 to m 99 Not used DM 15 00 Preset value Range External output ON OFF value Words m 10 to m 20 Words m 30 to m 40 External output 0 4 0 to 8 388 606 000000 to 7FFFFE External output 1 2 5 6 0 to 8 388 607 000000 to 7FFFFF Counter preset value Words m 50 to m 89 1 to 8 388 607 000001 to 7FFFFF Counter 2 does not start if this v...

Page 148: ...mber x101 05 Counter 1 Reset 06 Counter operating 07 Unit busy 08 Counter 1 present value x102 x162 Counter 1 present value x106 0 Counter 2 present value x102 x162 Counter 2 present value x106 0 Counter 2 counting Error code x100 Counter 2 preset value number x100 09 Counter 2 Input Z 10 Counter 2 Control input IN1 11 Counter 2 Control input IN2 12 Counter 1 present value x103 x163 Counter 1 pres...

Page 149: ...ed Sampling time Unit ms 0001 to 9999 x100 01 Set time for counter 1 02 Set time for counter 2 03 Not used 04 Sampling time x101 05 06 Read error 07 Not used 08 Counter 1 internal control IN1 Sampling time x102 09 Counter 1 internal control IN2 10 Counter 2 internal control IN1 11 Counter 2 internal control IN2 12 Not used Sampling time x103 13 14 15 ...

Page 150: ...01 x161 Counter 2 present value x105 x165 Counter 1 Counter overflow Error location x101 Counter 1 sampling time x101 Counter 2 sampling time x101 05 Not used 06 Counter operating 07 Unit busy 08 Counter 1 present value x102 x162 Counter 1 present value x106 0 Counter 2 present value x102 x162 Counter 2 present value x106 0 Counter 2 counting Error code x100 Counter 1 sampling time x102 Counter 2 ...

Page 151: ... Range 2 26 27 Upper limit 28 29 Output pattern 30 Lower limit Range 3 31 32 Upper limit 33 34 Output pattern 35 Lower limit Range 4 36 37 Upper limit 38 39 Output pattern 40 Lower limit Range 5 41 42 Upper limit 43 44 Output pattern 45 Lower limit Range 6 46 47 Upper limit 48 49 Output pattern 50 Lower limit Range 7 51 52 Upper limit 53 54 Output pattern 55 Lower limit Range 8 56 57 Upper limit 5...

Page 152: ...nal output 5 ON count value 33 0 34 External output 5 OFF count value 35 0 36 External output 6 ON count value 37 0 38 External output 6 OFF count value 39 0 40 External output 7 ON hold time 41 Not used 42 43 44 45 46 47 48 49 50 Counter preset value 0 51 0 52 Counter preset value 1 53 0 54 Counter preset value 2 55 0 56 Counter preset value 3 57 0 58 Counter preset value 4 59 0 60 Counter preset...

Page 153: ... speed Counter set values can be specified in the DM Area m 3 m 4 in the follow ing way Specification Method Example Linear Circular Modes or Preset Mode m D20000 unit number 10 Note Only the CS1 memory addresses in the above table can be specified Area Address in CS1 See note Specification method with DM Area allocation PC data area m 4 bits 00 to 03 BCD 1 digit First word m 3 bits 00 to 15 BCD 4...

Page 154: ...s Connect a Programming Device Turn ON the power supply to the PC Create an I O table Initial Software Settings Set the parameters in allocated words of the DM Area m to m 99 Reset the power supply or restart the Unit Operating Commands Start counter operation by turning ON the Start command word n bit 00 using OUT or another instruc tion Bit Instructions from CPU Unit High speed Counter status St...

Page 155: ...r one cycle a is used as a switch for data transfer Start Stop Command Bit word n bit 00 Bits a to d initialized to OFF MOV 021 0000 a to d DIFU 013 a 200003 DIFU 013 b DIFD 014 c d A20011 SW1 a 200614 a 200000 SW2 SW2 200000 c b SW1 d d Data Transfer Completion Flag word n 6 bit 14 Data Transfer Command Bit word n bit 03 If a is ON and the counter is stopped data is transferred Start Stop Command...

Page 156: ... and an error is registered with the N C con dition of the Equals Flag When the Data Transfer Completion Flag turns ON word n 6 bit 14 a signal indicating that writing has been completed turns ON IOWR 223 F100 D00000 00020000 200606 200607 a DIFU 013 b DIFD 014 c 200614 b c Start Counter Operating Flag word n 6 bit 06 Unit Busy Flag word n 6 bit 07 Equals Flag Data Transfer Completion Flag word n ...

Page 157: ...mode 121 simple counter mode 119 control mode DM area settings counting function 103 counter input type DM area settings counting function 103 drum function 69 preset function 88 counter preset values DM area settings preset function 89 range preset mode 35 counter reset mode 41 counting function 26 102 cumulative gate mode program example 109 DM area settings 102 gate mode program example 107 I O...

Page 158: ...unction 87 output pattern drum function 71 range enabled disabled drum function 70 reset mode drum function 69 preset function 88 drum function 26 68 circular mode program example 82 data transfer programs 75 DM area settings 68 I O signal timing chart 74 IR area settings 71 linear mode program example 80 E Encoder Conversion Adapter 22 ERR indicator 12 128 error codes 129 errors indicators 128 mo...

Page 159: ...tion 90 forced external outputs 0 to 7 drum function 72 preset function 90 internal control IN1 and IN2 counting function 104 operating counter preset value number preset function 89 91 operating range number drum function 73 output status drum function 74 preset function 91 present counter value counting function 104 preset counter value drum function 73 preset function 90 preset function 89 read...

Page 160: ...m example preset function 95 Programmable Controller See also PC programs data transfer drum function 75 preset function 93 pulse inputs 40 R range 29 configuration circular mode 32 linear mode 29 preset mode 34 sampling mode 38 lower limit circular mode 33 linear mode 30 maximum count value circular mode 32 output pattern circular mode 33 linear mode 31 upper limit circular mode 33 linear mode 30...

Page 161: ... preset function 91 present counter value counting function 104 preset counter value drum function 73 preset function 90 read error drum function 72 preset function 90 status data counting function 105 drum function 73 preset function 91 switches 13 rear setting 13 settings 13 data area 135 system configuration 3 T U timing chart I O signal counting function 105 cumulative gate mode 106 drum funct...

Page 162: ...00 Appendix D was added with this revision In addition the following changes were made Page xii Changes and additions made to precautionary information in several places Page 10 Numerical changes made in several places Page 13 Models added to note under first table Page 19 Minor changes made to second diagram Page 23 Voltage value changed in diagram Page 47 Word addresses changed in several places...

Reviews: