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

The text of a manual · part 6 of 9

User's Manual Visual KV Series 3 Programming, pages 41 to 50

Pages 41 to 50 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 41

1.3 Device Configuration Relay No. 2609 2610 2611 2612 2613

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 Clearing of input at expansion disconnect

2712

Disconnect error OFF: Normal ON: Disconnection in connected unit

2714

Use of high-speed input correction circuit ON: Used OFF: Not used

OFF: 10 ms ON: 10 µs OFF: 10 ms ON: 10 µs OFF: 10 ms ON: 10 µs OFF: 10 ms ON: 10 µs OFF: Cleared ON: Not cleared This area is stored even when the operation mode is changed from PROGRAM to RUN, or when the power is turned off (without being affected by the MEMSW instruction). This area is not cleared even if the utility relay All Clear function is activated. However, this area is cleared when an All Clear is executed without registering a program.

2715

ON while cam switch is in operation.

2800

Break signal send to communication port A (remains ON while sending). Receives text data from communication port A, and remains ON during only 1 scan while receiving text data. Communication port A text data acceptance error. Remains ON during only 1 scan ON when text data is received while either relay 2801 or relay 2803 is ON. Communication port A text data receive error Remains ON during only 1 scan when a text data receive error occurs. Communication port A text data send start (remains ON during sending.) Break signal send to communication port B (remains ON while sending). Receives communication port B text data, and remains ON during only 1 scan while receiving text data. Communication port B text data acceptance error. Remains ON during only 1 scan ON when text data is being received while relay 2806 or relay 2808 is ON. Communication port B text data receive error Remains ON during only 1 scan when a text data receive error occurs. Communication port B text data send start (remains ON during sending.) Turns ON when an abnormality occurs with backup battery.

2801 2802 2803 2804 2805 2806 2807 2808 2809 2812

2813

Sets input time constant to all inputs in basic module (except inputs used by HSP instruction). OFF: Sets input time constant to 10 ms. ON: Refers to value stored in DM1940, then determines input time constant.

2814 HKEY instruction: Multiple keys are prohibited. 2815 HKEY instruction: Scan is finished. 2900 to 2915 HKEY information storage area.

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

Chapter 1 Programming

3-17

11

Page 42

1.3 Device Configuration

1.3.9 Timers and Counters Timers and counters can be set in a program, and their outputs can be used as contacts elsewhere in the program. [There is no restriction on the contact type (N.O. or N.C.) and the order of use.] A same number can be assigned to only one timer or counter. For example, T005 and C005 cannot be used in the same program.

Timer/Counter list Name

Timer

Counter

Timer (0.1-s timer) High-speed timer (0.01-s timer) High-speed 1-ms timer (0.001-s timer) Counter Up/down counter

Contact

T000 to T249

Coil (instruction) TMR000 to 249 TMH000 to 249 TMS000 to 249

C000 to C249

Number

250 in total

C000 to 249 UDC000 to 249

Description

1

■ Timers • When 0.1-s timers (TMR) and high-speed 0.001-s timers (TMS) are used as contacts, the "Tnnn" No. is used for both types. However, the form for setting is different. "TMRnnn#ddddd" is used for 0.1-s timers, "TMHnnn#ddddd" is used for high-speed 0.01-s timers, and "TMSnnn#ddddd" is used for high-speed 1-ms timers (nnn = timer No, ddddd = timer set value). •

In a single program, different timer Nos. must be assigned to each of TMRnnn, TMHnnn, and TMSnnn.

•

When the PLC is stopped, all timers are reset and their current values become equivalent to set values.

■ Counters • When counters (C) and up/down counters (UDC) are used as contacts, the "Cnnn" No. is used for both types. However, the form for setting is different. "Cnnn#ddddd" is used for counters, while "UDCnnn#ddddd" is used for up/down counters. •

In one program, different numbers must be assigned to each of the counters and up/down counters.

•

Even when operation is stopped, each counter stores whatever value it has at that time.

➮

"TMR instruction" (p.3-67), "TMH instruction" (p.3-68), "TMS instruction" (p.3-69), "C instruction" (p.372), "UDC instruction" (p.3-76).

■ High-speed counters and high-speed counter comparators The Visual KV Se ries is equipped with two high-speed counters (CTH0 and CTH1) and four high-speed counter comparators (CTC0, CTC1, CTC2, and CTC3) with a 30-kHz input response speed (frequency), two phases, and size of 16 or 24 bits. Note: When a high-speed counter or high-speed counter comparator will be used as a 24-bit device, a set value is required to be stored in a data memory using the MEMSW instruction. ➮

For details about high-speed counters and high-speed counter comparators, refer to "Chapter 4 Highspeed Counters" (p.3-203).

3-18 Chapter 1 Programming

Page 43

1.3 Device Configuration

1.3.10 Data Memories Data memories store various types of data. Data memories are not usually used in a program that consists of contacts, coils, timers, and counters. When arithmetic instructions are used, however, data memories can be used to store data for arithmetic operations as well as the results of arithmetic operations. DM No. DM0 to DM999

Description Not specified (can be used by user)

DM1000 to DM1099

Text receive port A

DM1100 to DM1199

Text send port A

DM1200 to DM1299

Text receive port B

DM1300 to DM1399

Text send port B

DM1400

DM1403

Cam switch function: The first output relay No. Cam switch function: Comparison value in multi-step comparator mode Cam switch function: Pulse count of one cycle of equipment input to CTH0 Not specified (can be used by user)

DM1404

Measurement cycle (ms)

DM1405

Result of frequency count (Hz) Cam switch function: Set value of angle at which output relay turns ON/OFF Cam switch function: Set value of angle at which output relay +1 turns ON/OFF : Cam switch function: Set value of angle at which output relay +31 turns ON/OFF Reserved by system (cannot be used by user)

DM1401 DM1402

DM1406/DM1407 DM1408/DM1409 : DM1468/DM1469 DM1470 DM1471 to DM1479 DM1480 DM1481 DM1482 DM1483 DM1484 DM1485 DM1486

Not specified (can be used by user) Ramp-up/down control function: Startup frequency (Hz) (200 to 50,000) Ramp-up/down control function: Operating frequency (Hz) (200 to 50,000) Ramp-up/down control function: Acceleration time (ms) (0 to 4,000) Not specified (can be used by user) Ramp-up/down control function: Output pulse count (lower digit) (0 to 65,535) Ramp-up/down control function: Output pulse count (upper digit) (0 to 65,535) Ramp-up/down control function: Error code (11 to 17)

DM1487 to DM1499

Not specified (can be used by user)

DM1565 to DM1569

Not specified (can be used by user)

DM1578 and DM1579 Not specified (can be used by user) DM1580 to DM1599

KV-D20 Operator interface panel: Display device No.

DM1664 to DM1699

Not specified (can be used by user)

DM1670 to DM1675

Reserved by system (cannot be used by user) KV-D20 Operator interface panel: Screen shift permission setting in operator mode

DM1676

Chapter 1 Programming

3-19

11

Page 44

1.3 Device Configuration DM No.

DM1680 to DM1699

Description Area for direct access mode for the KV-D20 operator interface panel KV-D20 Operator interface panel: Display device attributes

DM1764 to DM1799

Not specified (can be used by user)

DM1806 to DM1809

Not specified (can be used by user)

DM1826 to DM1899

Not specified (can be used by user)

DM1900/DM1901*

24-bit value read from CTH0 (lower digit/upper digit)

DM1902/DM1903*

24-bit value read from CTH1 (lower digit/upper digit)

DM1904/DM1905*

24-bit value read from CTC0 (lower digit/upper digit)

DM1906/DM1907*

24-bit value read from CTC1 (lower digit/upper digit)

DM1908/DM1909*

24-bit value read from CTC2 (lower digit/upper digit)

DM1910/DM1911*

24-bit value read from CTC3 (lower digit/upper digit)

DM1912/DM1913

24-bit current value written to CTH0 (lower digit/upper digit)

DM1914/DM1915

24-bit current value written to CTH1 (lower digit/upper digit)

DM1916/DM1917

24-bit current value written to CTC0 (lower digit/upper digit)

DM1918/DM1919

24-bit current value written to CTC1 (lower digit/upper digit)

DM1920/DM1921

24-bit current value written to CTC2 (lower digit/upper digit)

DM1922/DM1923

24-bit current value written to CTC3 (lower digit/upper digit)

DM1924/DM1925

CTH0 preset input (lower digit/upper digit)

DM1677 to DM1679

1

DM1926/DM1927

CTH1 preset input (lower digit/upper digit)

DM1928/DM1929*

Input capture when INT0 is generated (lower digit/upper digit)

DM1930/DM1931*

Input capture when INT1 is generated (lower digit/upper digit)

DM1932/DM1933*

Input capture when INT2 is generated (lower digit/upper digit)

DM1934/DM1935*

Input capture when INT3 is generated (lower digit/upper digit)

DM1936

Specified frequency pulse output function: Set frequency (Hz)

DM1937

I/O expansion unit connection information

DM1938

Digital trimmer No. 0: Upper limit value

DM1939

Digital trimmer No. 1: Upper limit value Input time constant setting 0: 10 µs 1: 20 µs 2: 500 µs 3: 1 m s 4: 2.5 ms 5: 5 ms 6: 10 ms Any other value cannot be set. Reserved by system (cannot be used by user) Number of instructions converted into 1 scan when division conversion is performed Not specified (can be used by user)

DM1940 DM1941 to DM1943 DM1944 DM1945 to DM1949 DM1950 DM1951 to DM1999

*

Access window error display (0 to 255) Not specified (can be used by user)

Read-only relay.

Note 1: 16-bit binary data is stored in each of the data memories as for internal registers. Note 2: The data stored in data memories is held even when the power is turned off or when the All Clear function is executed. The backup time is 20 days or more in the KV-10xx, and 2 months or more in other models. Note 3: DM1000 to DM1999 are assigned as special data memories.

3-20 Chapter 1 Programming

Page 45

1.3 Device Configuration

1.3.11 Temporary Data Memory These data memories are used for temporary storage. When arithmetic instructions are used, temporary data memories can be used to temporarily store the data for arithmetic operations as well as the results of arithmetic operations. TM No.

Attribute

TM00

Used for arithmetic operations (DIV/MUL)

R/W

TM01

Used for arithmetic operations (DIV)

R/W

TM02 to TM27 Not specified (can be used by user) Stores scan time (module: 1 ms) beyond set value while TM28 constant scan time operation is performed. Stores set value (module: 1 ms) of constant scan time TM29 operation TM30 Stores CTC0 value when INT3 interruption is given. Stores measured scan time (mean value of every 10 TM31 scans) (module: 0.1 ms).

R/W

Attribute *

Usage

R: Read

R* R/W R* R

W: Write

Both R and W are enabled when special functions are not used.

Note 1: Temporary data memories are initialized when the power is turned on. Note 2: TM20, TM30, and TM31 are read-only, so cannot be used for writing. However, TM28 can be used for both reading and writing if special functions are not used. Note 3: TM00 and TM01 are used by the MUL and DIV instructions. Never use them for any other purpose.

Chapter 1 Programming

3-21

11

Page 46

1.3 Device Configuration

1.3.12 Relay Nos. and Functions Assignment of Relay Nos. The components of a relay no. are shown below.

0 7 5 1 5 Channel No.

Relay No. (00 to 15)

Module No. (07 to 17)

Address No. Input (0 to 4) Output (5 to 9)

■ Unit Nos. Unit nos. are assigned to units within the KV-300 system, with the unit connected to the right of the KV-300 CPU (see the figure below) assigned as no. 7. The CPU is assigned as unit no. 0.

1

Power supply unit

CPU 0

7

8

9

16

17

■ Address Nos. Address nos. are assigned to the input units, output units, and I/O terminal units. The following table shows the assignment of address nos. to units. Unit

Address No.

KV-300 CPU

CPU

0, 5

KV-C16X

16-input unit

0

KV-C32X

32-input unit

0. 1

KV-B16R

16-output unit

5

KV-B16S

16-output unit

5

KV-C32T

32-output unit

5, 6

KV-R8X

8-input terminal unit

0 to 4 *

KV-R16X

16-input terminal unit

KV-R8R

8-output terminal unit

KV-R16R

16-output terminal unit

KV-R8T

8-output terminal unit

KV-R16T

16-output terminal unit

*

5 to 9 *

The KV-R1A I/O Distribution Unit accommodates 5 input units and 5 output units. Addresses are set with address switches.

3-22 Chapter 1 Programming

Page 47

1.4 Special Functions

1.4 Special Functions This section describes special functions to set and confirm operations on the Visual KV Series, and useful functions for program debugging and adjustment of external equipment.

1.4.1 Input Time Constant Change Function The input time constant can be changed when a signal is read from an input contact. When connecting external equipment which has no contact in which chattering such as transistor outputs does not occur, and inputting pulses of short width, the input time constant change function can be used to decrease the input time constant.

Setting the input time constant for basic units using special utility relays The input time constant for a basic unit can be changed using data memory DM1940 and special utility relay 2813. Though the input time constant is usually 10 ms, it can be changed to a value that corresponds to the number stored in DM1940 by setting special utility relay 2813 to ON. If the HSP instruction and special utility relay 2813 are used at the same time, priority is given to the HSP instruction and the number stored in DM1940 is ignored. ■ Special utility relay 2813 OFF: Sets the input time constant to 10 ms. ON: Refers to the number stored in DM1940, then determines the input time constant. Number stored in DM1940 0 1 2 3 4 5 6 7 or more

Input time constant 10 µs 20 µs 500 µs 1 ms 2.5 ms 5 ms 10 ms Not allowed

Note 1: Be sure to set the input time constant to 10 µs when using the 30-kHz high-speed counter input. Note 2: Never enter a number that is 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 to OFF and ON again. Or change the operation mode of the KV basic unit from PROGRAM to RUN. Note 4: The input time constant for input relays set by the HSP instruction is 10 µs.

➮ For more about the HSP instruction, refer to "HSP instruction" (p.3-86). ➮ For more about setting the input time constant for expansion units, refer to "Input time constant for expansion units" (p.1-76). Note 5: Set the special utility relay using the SET/RES instructions. Note 6: When the input time constant is set to 1 ms or less, connect the output equipment without contacts. If connecting output equipment with contacts, contact bounds may enter. Note 7: Except for interrupts and high-speed counters, signals whose ON time is shorter than the scan time may not be received even if the input time constant is set to a small value.

Chapter 1 Programming

3-23

11

Page 48

1.4 Special Functions

1.4.2 Modifying the Input Relay Time Constant

KV-300 PLC Only

■ Modifying with External Switches KV-C32X/C16X KV-R16X/R8X Input time constant selection switch 3

24V

4

1 ms 0 ms 10 ms

2

5V 0 ms 10 ms 1 ms

1

0

As shown in above figures, an external switch can be used to select the input time constant only on the KV-C32X/C16X Connector Input Units and KV-R16X/R8X I/O Terminal Units.

1

In the following table, white represents the switch position. Input time constant

KV-C32X/C16X

KV-R16X/R8X 0ms 1ms 10ms

25 µs ±20%

0ms 1ms 10ms 0ms 1ms 10ms

1 ms ±20%

0ms 1ms 10ms

10 ms ±20%

0ms 1ms 10ms

0ms 1ms 10ms

Note: Connect a solid-state contact output device when the input time constant is set to 1 ms for 25 µs. Connection of a contact output device may result in contact bounce.

Modification within the CPU The input time constant for KV-300 CPU input relay nos. 0000 to 0009 can be modified in the program. Input time constant

Setting

10 µs ±20%

Turn ON special utility relay 2813 (0000 to 0009).

25 µs ±20%

Use the HSP instruction.

10 ms ±20%

Default

Note 1: When using the 30 kHz high-speed counter input, turn ON special utility relay 2813. Note 2: When special utility relay 2813 is ON, the input time constant of input relays 0000 to 0009 is set to 10 µs ±20%. Note 3: The input time constant remains 10 ms ±20% if the HSP instruction is used when special utility relay 2813 is ON. Note 4: When the input time constant is set to 10 µs or 25 µs, a solid-state output device must be connected. Connection of a contact output device may result in contact bounce.

3-24 Chapter 1 Programming

Page 49

1.4 Special Functions

1.4.3 Constant Scan Time Mode This function executes a program while keeping the scan time at a constant value which usually changes based on the processing contents. This section describes how to set this function. Though the scan time changes usually depending on the processing contents, it can be kept at a constant value by using this function. This function can be used to acquire data from external equipment at a constant time interval. The set value should be longer than the maximum scan time because the scan time is kept at a constant value until the end of processing. ■ Setting procedure Set the desired scan time to temporary data memory TM29. Set special utility relay 2303 to ON. The scan time is written to TM31. The scan time can be set in 1-ms increments. Enter the desired scan time (ms) to the temporary data memory. ■ Setting example In this example, the scan time is kept at 20 ms.

2008

#00020 LDA

TM29 STA

11

2303 SET

Note 1: Be sure to set the constant scan time value so it is larger than the actual scan time. Note 2: If the actual scan time exceeds the set scan time, special utility relay 2304 turns ON (during the next 1 scan) while the actual scan time is written to TM28 (unit: 1 ms). Note 3: The scan time can be set up to 200 ms in temporary data memory TM29. If a value larger than 200 ms is input, it will be treated as 200 ms.

Chapter 1 Programming

3-25

Page 50

1.4 Special Functions

1.4.4 Output Disabled Function This function disables outputs from each unit in RUN mode without regard to the program used. By disabling external outputs, the program can be debugged while external equipment is connected, even when output of signals to the external equipment is not desired. ■ Setting procedure When special utility relay 2300 turns ON, all outputs from all output relays (0500 to 0915) to the outside are cleared after 1 scan is finished. However, the display in the Access Window and the output indicator lamps are not cleared. ■ Setting example By setting/resetting special utility relay 2300 using the Access Window, the "KV IncrediWare (DOS)" or "LADDER BUILDER for KV" programming support software, or the KV-P3E(01) handheld programmer, the external output prohibition function can be used. External outputs are prohibited while input 0000 is ON. External outputs are permitted, though, while input 0000 is OFF. 0000

2300

1 ➮

For more about operating procedures, refer to the "Chapter 6. Handheld Programmer" (p.1-195).

1.4.5 Input Refresh Disabled Function This function disables the update of inputs from each unit triggered by input signals from external equipment. By disabling external input refresh, inputs from each unit can be set to ON/OFF in monitor status without mechanical operations to enable a program check. ■ Setting procedure When special utility relay 2301 turns ON, input refresh (read of input relays) for all input relays (0000 to 0415 used by the QL Series) is skipped. In this status, inputs can be set to ON/OFF from the Access Window, the "KV IncrediWare (DOS)" or "LADDER BUILDER for KV" programming support software, or the KV-P3E(01) handheld programmer. ■ Setting example By setting/resetting special utility relay 2301 using the Access Window, the "KV IncrediWare (DOS)" or "LADDER BUILDER for KV" programming support software, or the KV-P3E(01) handheld programmer, the external input refresh prohibition function can be used. External input refresh is prohibited while input 0000 is ON. External input refresh is permitted, though, while input 0000 is OFF. 0000

➮

2301

For more about operating procedures, refer to the "Chapter 6. Handheld Programmer" (p.1-195).

Note: Once external input refresh is prohibited, it can be permitted only by setting special utility relay 2301 to OFF from the Access Window, the "KV IncrediWare (DOS)" or "LADDER BUILDER for KV" programming support software, or the KVP3E(01) handheld programmer.

3-26 Chapter 1 Programming