Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 5 of 9

User's Manual Visual KV Series 3 Programming, pages 31 to 40

Pages 31 to 40 of 79

The original document is the PDF (355 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

Filed in the catalog under the Keyence KV-16R

Page 31

1.3 Device Configuration

1.3.2 Relay No. The relay No. configuration is shown below. Channel No.

12515 Contact No. (00 to 15) Address No. (Input: 0 to 4, output: 5 to 9)

Address No. Address Nos. are assigned to basic units, input expansion units, output expansion units, and I/O expansion units. Zero to 4 are assigned to input units, while 5 to 9 are assigned to output units. Address Nos. assigned in a unit vary based on the number of I/O terminals and the connection position of the unit. Model

Basic units

Input expansion units

Output expansion units I/O expansion units

Address Nos. KV-10xx

0, 5

KV-16xx

0, 5

KV-24xx

0, 5

KV-40xx

0, 1, 5 kV-E4X

1 to 4*

KV-E8X

1 to 4*

KV-E16X

1 to 4*

KV-E4R/E4T(P)

6 to 9

KV-E8R/E8T(P)

6 to 9

KV-E16R/E16T(P)

6 to 9

KV-E4XR/E4XT(P)

1 to 4*, 6 to 9

11

* 2 to 4 in KV-40xx

■ Address No. assignment procedure • The address No. is represented as a number 0 to 9. • Address Nos. 0 to 4 are provided for inputs, while address Nos. 5 to 9 are provided for outputs.

Chapter 1 Programming

3-7

Page 32

1.3 Device Configuration

Contact No. •

Contact Nos. are input/output terminal Nos. of basic units, input expansion units, output expansion units, and I/O expansion units.

•

The contact No. is represented as a number 0 to 15.

Example In the KV-E4X, with 4 input terminals, the contact Nos. are 0 to 3. In the KVE16T(P), with 16 input terminals, the contact Nos. are 0 to 15. •

In a unit with 16 or more terminals, the contact No. of the 17th terminal returns to 0 and its address No. is increased by 1.

Example In the KV-40AR, with 40 terminals (24 input and 16 output terminals), address No. 0 is assigned to input terminal Nos. 1 to 16 and address No. 1 is assigned to input terminal Nos. 17 to 24

Channel No. The channel No. is the higher order digit in the contact No.

1 1.3.3 Assigning Relay Nos. When assigning relay Nos., the unit No. is based on the connection position of the unit, and the address No. is determined based on the unit type and I/O contacts. a) KV-16AR Basic unit Input: 10 points Output: 6 points b) KV-E4X Input expansion unit Input: 4 points c) KV-E8R Output expansion unit Output: 8 points

With the connections above, the relay Nos. for each unit are assigned as shown in the table below.

3-8

Unit

Assigned relay Nos.

a) KV-16AR

0000 to 0009 (input) and 0500 to 0505 (output)

b) KV-E4X

0100 to 0103 (input)

c) KV-E8R

01600 to 0607 (output)

Chapter 1 Programming

Page 33

1.3 Device Configuration

1.3.4 Input Relays Input relays receive ON/OFF signals sent from external input equipment. Note 1: Input relays function as contacts in programs. They cannot be used as relay coils (outputs). Note 2: There is no restriction of the contact type (N.O. or N.C.) used, the order the relay Nos. are used, or the number of relays used.

Basic unit ■ Input relay time constant Though the time constant is usually 10 ms ±20%, it can be changed using the following settings. •

When the HSP instruction is used: 10 µs ±20%

•

While special utility relay 2813 remains ON, the time constant can be changed in 7 steps by setting data memory DM1940 as follows. When DM1940 is set to 0: 10µs ±20% 1: 20 µs ±20% 2: 500 µs ±20% 3: 1 ms ±20% 4: 2.5 ms ±20% 5: 5 ms ±20% 6: 10 ms ±20% Never set a numeric value of 7 or larger.

➮

11

For more about changing the input time constant, refer to "1.4.1 Input Time Constant Change Function" (p.3-23).

■ Hardware input (independent of scan time) • High-speed counter When the time constant is set to 10 µs using the HSP instruction or data memory DM1940 (only while special utility relay 2813 remains ON), the maximum input response of input relays 0004 and 0005 of CTH0 and CTH1 becomes 30 kHz. •

INT instruction: 0000 to 0003 This instruction can receive any signal without regard to the scan time as far as the signal ON time is longer than the input time constant.

➮

"HSP instruction" (p.3-86), "INT instruction" (p.3-192), "4.1 High-speed Counter Instructions" (p.3-204)

Note 1: While special utility relay 2813 remains ON, the input time constant can be specified for all input relays in a basic unit. Note 2: Never enter a number of 7 or larger to data memory DM1940. Note 3: The input time constant specified by data memory DM1940 becomes effective at the rising edge of special utility relay 2813. To change the input time constant, first change data memory DM1940, then set special utility relay 2813 to OFF and ON again. Or change the operation mode of a KV basic unit from PROGRAM to RUN. Note 4: If the HSP instruction and special utility relay 2813 are used at the same time, priority is given to the HSP instruction. Note 5: Only when a high-speed counter input or INT instruction is given, available input signals do not depend on the scan time.

Chapter 1 Programming

3-9

Page 34

1.3 Device Configuration

Expansion unit ■ Input relay time constant By setting special utility relays 2609 to 2612 to ON, the time constant in input expansion units can be set to 10 µs. Special utility relay No. 2609* 2610 2611 2612 *

Function Input time constant of input expansion unit with relay Nos. 0100 to 0115 Input time constant of input expansion unit with relay Nos. 0200 to 0215 Input time constant of input expansion unit with relay Nos. 0300 to 0315 Input time constant of input expansion unit with relay Nos. 0400 to 0415

OFF: 10 ms, ON: 10 µs OFF: 10 ms, ON: 10 µs OFF: 10 ms, ON: 10 µs OFF: 10 ms, ON: 10 µs

Not available with the KV-40xx

1.3.5 Output Relays Output relays output the program execution results to the outside. There are two types of outputs, relay and transistor.

1

Note 1: Output relays function as contacts and relay coils in programs. Note 2: There is no restriction of the contact type (N.O. or N.C.) used, the order the relay Nos. are used, or the number of relays used.

Output operation time •

Transistor output OFF ➞ ON: 50 µs or less (10 µs or less in 500 to 502) ON ➞ OFF: 250 µs or less (10 µs or less in 500 to 502, 100 µs or less for other outputs in the basic unit)

•

Relay output OFF ➞ ON: 10 ms or less ON ➞ OFF: 10 ms or less Transistor output type

KV-10AT(P)/DT(P)

KV-16AT(P)/DT(P)

Relay output type KV-10AR/DR

KV-16AR/DR

KV-24AT(P)/DT(P)

KV-40AT(P)/DT(P)

KV-24AR/DR

KV-40AR/DR

KV-E4T

KV-E8T(P)

KV-E4R

KV-E8R

KV-E16T(P)

KV-E4XT(P)

KV-E16R

KV-E4XR

Note 1: When programming direct clock pulses, output relays 0500 and 0501 are used to output pulses in a transistor-type output unit. Note 2: When the ramp-up/down control function is used, output relay 0502 outputs positioning pulses in a transistor-type output unit. ➮ "Chapter 5. Positioning Control" (p.3-253)

Note 3: When the specified frequency pulse output function is used, output relay 0501 outputs pulses in a transistor-type output unit. ➮ "4.5.1 Specified Frequency Pulse Output Function" (p.3-228)

3-10 Chapter 1 Programming

Page 35

1.3 Device Configuration

1.3.6 Internal Utility Relays In a relay circuit, when one relay contact is used twice or more inside the circuit, a multi-pole relay with the same number of poles as the number used may be needed. Internal utility relays function only in programs, and eliminate the complexity of relay circuits to facilitate circuit design. Note 1: Internal utility relays function as contacts and relay coils in programs. Note 2: There is no restriction of the contact type (N.O. or N.C.) used, the order the relay Nos. are used, or the number of relays used.

Retentive function of internal utility relays Except for internal utility relays, all relays turn OFF when the operation mode is changed or when operation is stopped via a power shutdown. When operation is restarted, all relays remain OFF except relays whose input condition is ON. However, internal utility relays can be set using the MEMSW (memory switch) whether or not they are to be retained. (Internal utility relays 2700 to 2715, however, are always retained.) When an internal utility relay is set to be retained, its ON/OFF status is stored even if the power is turned off. By using the retained relay all clear function (FUN65), all relays which are set to be retained can be set to OFF. ➮

For more about setting the memory switch, refer to "MEMSW instruction" (p.3-92).

Application example of a retentive function: Lift vertical movement control Internal utility relays 1000 and 1001 are set to be retained. When the upper/lower limit switch turns ON, the direction of lift movement is inverted. Even if the power is turned off while the lift is moving up (or down), the lift continues to move up (or down) when the power is turned on again. MEMSW $0004 0000

Upper limit switch (0000)

0001

1000 0001

#00010 T000 0000

1001

Lower limit switch (0001)

Move-down (0500)

1000

1001 #00010 T001

T000

0501

0500

T001

0500

0501 END

Move-up (0501)

ENDH

Note: The retentive function is effective only when internal utility relays retained by the self-retentive circuit or the SET/SFT/KEEP instruction are also retained by the memory switch. Internal utility relays are not retained in the program shown below. 0000

1001

Chapter 1 Programming

3-11

11

Page 36

1.3 Device Configuration

1.3.7 Special Utility Relays Each special utility relay has a unique function. By using special utility relays effectively, programs can be simplified and program control improved. Note 1: A special utility relay can be used as many times as desired in one program. Note 2: Special utility relays dedicated for reading can be used as contacts, but cannot be used as outputs. ➮ For more about relays dedicated for reading, refer to "1.3.8 Special Utility Relay List" (p.3-14).

Description Relay 2002: Always ON By setting an output relay to ON using relay 2002, the output relay can be used as a "running indicator output". 2002

HSP 0100

2002

00000 LDA DM0000 STA

Set the input time constant of relay 0100 to 10 µs. Transfer the ON/OFF status data of channel 0000 to DM0000.

1

Relay 2003: Always OFF. Opposite that of relay 2002, use relay 2003 where it is not required to be turned on. For example, when using only the up function of an up/down counter, use relay 2003 in the DW (down) input. Relays 2004, 2005 and 2006: Clock pulse For each relay, the time ratio is "ON:OFF = 1:1". (Accordingly, the ON time of relay 2005 is 0.05 sec/pulse.) However, because these relays depend on the scan time, error as much as the scan time is generated. • •

By combining an output relay, an "intermittent output" can be made. By using relay 2006 as input for a counter, the counter can be used as a longterm timer. 1000

#03600 C000 2006 1000

C000

1000 turns ON at every hour.

Relay 2007: Remains OFF during only one scan when operation is started. This relay can be used when a signal needs to be sent after a specific period (equivalent to one scan) after operation is started. This relay can also be used for an initial reset at the start of operation. After one scan, this relay remains ON. 1000

2007

#00100 C005 0000

When operation is started, this relay returns the current value of C005 to 0.

3-12 Chapter 1 Programming

Page 37

1.3 Device Configuration Relay 2008: Remains ON during only one scan when operation is started. This relay can be used for an initial reset at the start of operation. After one scan, this relay remains OFF. 0000 1000

SFT D 1100 CLK 1100

2008 RES

When operation is started, this relay sets all internal utility relays used by the SFT instruction to OFF.

2008

#00000 LDA DM0000 STA

When operation is started, this relay returns the current value of DM0000 to 0.

Relay 2813: Sets the input time constant of the CPU. While relay 2813 remains ON, the input time constant of a basic unit can be set using the value of DM1940.

Chapter 1 Programming

3-13

11

Page 38

1.3 Device Configuration

1.3.8 Special Utility Relay List Special relays and arithmetic operation flags ➮

"1.3.7 Special Utility Relays" (p.3-12)

Relay No. Always ON.

2003*

Always OFF.

2004*

0.01-s clock pulse (duty cycle: 50%)

2005*

0.1-s clock pulse (duty cycle: 50%)

2006*

1.0-s clock pulse (duty cycle: 50%)

2007*

Remains OFF during first scan after startup.

2008*

2010*

Remains ON during first scan after startup. Turns ON when result of arithmetic operation is negative or when an overflow is generated. Turns ON when result of arithmetic operation is 0.

2011*

Turns ON when result of arithmetic operation is positive.

2012*

Turns ON when an arithmetic operation generates an error.

2009*

*

1

Function

2002*

Read-only relay.

Special utility relays for high-speed counter(0) ➮

"Chapter 4. High-Speed Counters" (p.3-203)

Relay No.

Function

2100*

Internal clock used only for CTH0 (1 µs)

2101*

Internal clock used only for CTH0 (10 µs)

Internal clock used only for CTH0 (100 µs) Automatic clear of CTH0 when comparator CTC0 2103 turns ON. Prohibits/permits direct output to 0500 when 2104 comparator CTC0 turns ON. Direct output to 0500 is set to OFF when comparator 2105 CTC0 turns ON. Direct output to 0500 is set to ON when comparator 2106 CTC0 turns ON. ON/OFF status of output to 0500 is reversed each 2107 time comparator CTC0 turns ON. Prohibits/permits direct output to 0500 when 2108 comparator CTC1 turns ON. Direct output to 0500 is set to OFF when comparator 2109 CTC1 turns ON. Direct output to 0500 is set to ON when comparator 2110 CTC1 turns ON. ON/OFF status of output to 0500 is reversed each 2111 time comparator CTC1 turns ON. A utomatic clear of CTH0 when comparator CTC1 2112 turns ON. Selects multiplication mode for comparator CTH0. 2113 OFF ON OFF ON 2114 OFF: 1 pulse OFF: x2 ON: x4 ON: 2 pulses Read-only relay. 2102*

*

Multiplication mode 2113 2114

ON: Cleared OFF: Not cleared ON: Prohibited OFF: Permitted ON: Set to OFF OFF: Not set to OFF ON: Set to ON OFF: Not set to ON ON: Reversed OFF: Not reversed ON: Prohibited OFF: Permitted ON: Set to OFF OFF: Not set to OFF ON: Set to ON FF: Not set to ON ON: Reversed OFF: Not reversed ON: Cleared OFF: Not cleared

1 pulse x2 x4

2 pulses

OFF

ON

OFF

ON

OFF

OFF

ON

ON

Note: Never use special utility relays that are not shown above.

3-14 Chapter 1 Programming

Page 39

1.3 Device Configuration

Special utility relays for high-speed counter(1) ➮

"Chapter 4. High-Speed Counters" (p.3-203)

Relay No. 2200*

Internal clock used only for CTH1 (1 µs)

2201*

Internal clock used only for CTH1 (10 µs)

2202*

Internal clock used only for CTH1 (100 µs) Automatic clear of CTH1 when comparator CTC2 turns ON. Prohibits/permits direct output to 0501 when comparator CTC2 turns ON. Direct output to 0501 is set to OFF when comparator CTC2 turns ON. Direct output to 0501 is set to ON when comparator CTC2 turns ON. ON/OFF status of output to 0501 is reversed each time comparator CTC2 turns ON. Prohibits/permits direct output to 0501 when comparator CTC3 turns ON. Direct output to 0501 is set to OFF when comparator CTC3 turns ON. Direct output to 0501 is set to ON when comparator CTC3 turns ON. ON/OFF status of output to 0501 is reversed each time comparator CTC3 turns ON. Automatic clear of CTH1 when comparator CTC3 turns ON. Selects multiplication mode for comparator CTH1. OFF ON OFF ON OFF: 1 pulse OFF: x2 ON: x4 ON: 2 pulses

2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 *

Function

ON: Cleared OFF: Not cleared ON: Prohibited OFF: Permitted ON: Set to OFF OFF: Not set to OFF ON: Set to ON OFF: Not set to ON ON: Reversed OFF: Not reversed ON: Prohibited OFF: Permitted ON: Set to OFF OFF: Not set to OFF ON: Set to ON OFF: Not set to ON ON: Reversed OFF: Not reversed ON: Cleared OFF: Not cleared

Read-only relay. Multiplication mode 2213 2214

1 pulse x2 x4

2 pulses

OFF

ON

OFF

ON

OFF

OFF

ON

ON

Note: Never use special utility relays that are not shown above.

Other special utility relays Relay No.

2305

Function External outputs disabled (outputs 0500 to 0915) External refresh inputs disabled (inputs 0000 to 0415) Constant scan time mode (write preset value in TM29) Remains ON for one scan when scan time exceeds preset constant scan time. Start flag for frequency counter operation.

2306

Specified frequency pulse output

2307 2308

Error flag for specified frequency pulse output Stops motor driver when turned ON. Turns ON when motor driver is in operation. Stops motor driver in emergencies when turned OFF by interrupt instruction. Starts motor driver when turned ON (detection at rising edge). Start flag for cam switch operation. Turns ON when an error occurs in cam switch operation.

2300 2301 2303 2304

2309 2310 2314 2315

ON: Disabled OFF: Not disabled ON: Disabled OFF: Not disabled ON: Enabled OFF: Disabled

ON: Enabled OFF: Disabled

* Read-only relay.

Chapter 1 Programming

3-15

11

Page 40

1.3 Device Configuration Relay No. 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412

1

2413 2414 2415

2500 2501 2502 2503 2504 2505 2506 2507 2508

2509 2510 2511 2512 2513 2515

Function Timing of CTH0 external signal OFF

External preset

OFF

OFF not used

ON

At falling edge

ON OFF

At rising edge

ON ON

Level

Interrupt polarity of INT OFF OFF

At rising edge

OFF ON

At falling edge

ON OFF

At rising edge

ON ON

At both edges

Interrupt polarity of INT1 OFF OFF

At rising edge

OFF ON

At falling edge

ON OFF

At rising edge

ON ON

At both edges

CTH0 set as ring counter ON: Set OFF: Not set Ignore phase B input when CTH0 is set to no multiplication mode. ON: Ignore phase B input and always count up. OFF: Use phase B input as usual. Timing of CTH1 external preset OFF

External preset

OFF

OFF not used

ON

At falling edge

ON OFF

At rising edge

ON ON

Level

Interrupt polarity of INT2 OFF OFF

At rising edge

OFF ON

At falling edge

ON OFF

At rising edge

ON ON

At both edges

Interrupt polarity of INT3 OFF OFF

At rising edge

OFF ON

At falling edge

ON OFF

At rising edge

ON ON

At both edges

CTH1 set as ring counter ON: Set OFF: Not set Ignore phase B input when CTH1 is set to no multiplication mode. ON: Ignore phase B input and always count up. OFF: Use phase B as usual. Customized switch [F1] on KV-D20 operator interface panel is assigned. Customized switch [F2] on KV-D20 operator interface panel is assigned. Customized switch [F3] on KV-D20 operator interface panel is assigned. Customized switch [F4] on KV-D20 operator interface panel is assigned. Customized indicator lamp 1 on KV-D20 operator interface panel is assigned. Customized indicator lamp 2 on KV-D20 operator interface panel is assigned. Customized indicator lamp 3 on KV-D20 operator interface panel is assigned. Customized indicator lamp 4 on KV-D20 operator interface panel is assigned. Permits change between operator OFF: Not mode and device mode of KV-D20 ON: Permitted permitted operator interface panel . Permits the KV-D20 operator interface OFF: Not panel to be shifted between operator ON: Permitted permitted mode and system mode. Specifies the display language for the ON: Japanese OFF: English KV-D20 operator interface panel Sets the beep for the KV-D20 operator ON: Use beep OFF: No beep interface panel Reserved for system Reserved for system Displays a user message (contents of ON: Display OFF: Do not DM1950) in the Access Window message display message

3-16 Chapter 1 Programming