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

The text of a manual · part 11 of 12

Visual KV Series User's Manual 2: Support Software, pages 91 to 100

Pages 91 to 100 of 105

The original document is the PDF (910 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 91

Chapter 2 Editor

Terminating a mnemonic list ■ Inserting the mnemonic list edited into the cursor position, and terminating edits When edits are complete, click the [Insert] button. The list edit window is closed, and the edit contents are inserted at the cursor position in the ladder diagram. ■ Replacing the block in the cursor position with the mnemonic list edited, and terminating edits When edits are complete, click the [Replace Blocks] button.

2

The list edit window is closed, and the block at the cursor position in the ladder diagram is overwritten with the edit contents.

Format of a mnemonic list The following format is used in a mnemonic list. Keep in mind that compilation is disabled if the format is different.

Step No.

Mnemonic Operand

2 spaces

2 spaces

;

Comment

2 spaces Semicolon

Note 1: Comments cannot be edited in a mnemonic list. Note 2: Step numbers and comments do not have to be entered while editing a mnemonic list.

2-68

Page 92

Chapter 2 Editor

2.8.2

Copy, move, and delete Copy, move and delete in a mnemonic list can be performed using the "cut & paste" operation in the same way as in a ladder diagram. 1. Place the cursor in the start position of the copy/move/delete range. 2. While pressing and holding the [Shift] key, move the cursor to the end position of the range using the UP and DOWN keys. The selected range is displayed in blue.

12

3. Release the key when in the end position. When canceling the selection, press the UP or DOWN key without pressing and holding the [Shift] key. 4. Perform the cut, copy or paste operation using the shortcut keys. ➮ Copy/move/delete operation (p. 2-54)

Cut [Ctrl] + [X] : Cuts the selected range. Copy [Ctrl] + [C ] : Copies the selected range. Paste [Ctrl] + [V] : Pastes the cut or copied range. Note: In Windows 95, the mouse (right-click) can be used instead of the keys.

2-69

Page 93

Chapter 2 Editor

2.9

Displaying the Use Status This section describes how to display the list of relays, timers, counters, comparators, data memory and temporary memory used in the program while editing a ladder diagram.

2.9.1

Displaying a use status list

Displaying the use status

2

Edit ➔ Usage Information

To display lists of relays, timers, counters, comparators, data memory and temporary memory used in the program while editing a ladder diagram, perform the following procedure. 1. Select "Usage Information" from the "Edit" menu, or click the button.

The "Usage Information" dialog box is displayed. 2. Select the item to be checked from "Type". The use status list is then displayed.

3. You can edit ladder diagrams while checking the use status list on the display. To reflect the latest use status for the ladder diagram being created, click the [Update(U)] button. 4. To close the use status list, click the [Close(C)] button.

2-70

Page 94

Chapter 2 Editor

2.10

Setting the System This section describes how to set the directory used for the auto save function, and how to select the decompilation error check.

2.10.1 Setting the system Edit ➔ System Settings

To set the directory used for the auto save function and to select the decompilation error check, perform the following procedure.

12

1. Select "System Settings" from the "Edit" menu. The "System Settings" dialog box is displayed. ■ When setting the work directory used for the automatic save function Specify the directory (folder) used for the automatic save function as "Work Directory" using a full path.

■ When selecting the decompilation error check Click the "Code Check" check box to add a check mark. Decompilation errors will then be automatically checked when a ladder program is compiled. If an error is detected, the message "Reverse Compile Error" is displayed when compilation is complete. ➮ H.3 Programs which cannot be decomplied (Appendices p. 2-203)

The code check is specified by default. When the deconversion error check is not required, delete the check mark. Note: When the code check is specified, the compilation time is longer because a program in which errors will be detected during decompilation and whose transfer will be aborted is checked while the program is transferred from the KV main body to the personal computer.

2-71

Page 95

Chapter 2 Editor

2.11

Entering and Developing Macros The Ladder Builder for KV is equipped with a macro function. By using macros, programs in which the same process is repeated many times and for which there are extended instructions can be entered efficiently. The Ladder Builder for KV is equipped as standard with the macro file to enter frequently used circuits.

2.11.1 Creating a macro file To use a macro, first create a macro file saving the contents to be processed in the macro. To create a macro, perform the following procedure.

2

1. Select "New" from the "File" menu, and open a new ladder program window in accordance with the model. 2. Place the cursor in the first line. Select "Edit Line Comment" from the "Comment" menu. The "Enter Line Comment" dialog box is displayed. 3. In the first line, enter the macro name, the number of arguments and the comment in the following format as the macro start declaration line. @ Macro name, Number of arguments, Comment

→ Include "@" at the beginning.

Macro name

Enter up to 8 characters. Do not enter spaces.

Number of arguments

Enter the number of devices to be variable. Temporary devices (shown below) contained in a ladder diagram can be replaced with arbitrary devices (up to 10 devices).

Comment

Enter a comment on an argument, etc.

@TEST.4.test macro

Number of arguments

2-72

Separate each item with a comma (,).

Comment

Page 96

Chapter 2 Editor 4. Under the macro start declaration line, enter the symbol to be processed by the macro. At this time, describe the devices to be treated as arguments as temporary devices.

What are temporary devices? Temporary devices indicate devices described temporarily when actual devices are not yet determined. Up to 1,000 temporary devices from "@0" to "@999" can be described. Each temporary device will be automatically replaced while a macro is developed. Note: Up to 10 devices from "@0" to "@9" can be used in each macro. When using them, make sure to assign temporary devices sequentially starting from "@0". 5. In the last line, enter two "@" symbols from "Edit Line Comment" as the macro end declaration line.

Example Macro which writes data (constant) to the DM0000 when three relays are turned on (Four arguments are used.) Macro start declaration line Macro Macro end declaration line

6. Two or more macros can be described in one macro file. When describing another macro, repeat steps 3 to 5 above. Note: Make sure to describe each macro in the portion between the macro start declaration line and the macro end declaration line. 7. Select "Save As" from the "File" menu, and save the file with the desired macro file name. The extension of the file name is "ldr" which is the same as the extension for a ladder program. Creation of the macro file is now completed. The Ladder Builder for KV is equipped with the macro file "IMACRO.LDR" to enter frequently used circuits. Use this file when entering circuits. Note 1: The macro start declaration line is entered as a line comment. Enter up to 70 characters. Note 2: Timer/counter instructions cannot use temporary devices.

2-73

12

Page 97

Chapter 2 Editor

2.11.2 Entering and developing macros Edit ➔ Macro Input ➔ Develop (Shift + F1)

To use a macro, macro instructions must be entered. 1. Open the macro file in which the macro to be entered is saved. Specify frequently used macros for the auto file read function. 2. Set the ladder program window to which the macro is entered as the current window.

2

3. Select "Macro Input → Develop" from the "Edit" menu. The "Macro Input" dialog box is displayed. 4. Select the name of the macro to be entered in the "Macro Name" text box. The macro name described in the macro start declaration line is displayed here.

5. Enter macro operands to "@0", "@1" . . . You can enter as many macro operands as the number specified as the arguments in the macro file. The comment described in the macro start declaration line is displayed in the "Comment" column. 6. When input is complete, click the [OK] button. To cancel input, click the [Cancel] button. The macro is entered.

Note: Macros that have been changed cannot be returned to their original state.

2-74

Page 98

Chapter 2 Editor

2.12

Compilation This section describes how to compile ladder programs created using the editor.

2.12.1 Executing compilation Compile ➔ Compile (Ctrl + F9)

Ladder programs created using the editor cannot be transferred to a PLC. They must be compiled into machine code.

12

To compile a ladder program, perform the following procedure. 1. Set the ladder diagram of the program to be compiled as the current window.

2. Select "Compile" from the "Compile" menu, or click the The compilation process is performed.

button.

3. When the program is correctly compiled, the message "Compilation successful." is displayed. Click the [OK] button.

2-75

Page 99

Chapter 2 Editor

2.12.2 Error display Compile ➔ Show Error (Ctrl + F10)

When an error occurs during compilation, a message is displayed and you can confirm the contents of the error. 1. When an error occurs, the message "Compilation Error" is displayed.

2

2. Click the [OK] button. The error list window is displayed.

Error code

Contents

3. To jump to the location in the program in which an error has occurred, specify the desired error and click the [Jump] button. The error location is displayed. 4. To display the error list again, select "Show Error" from the "Compile" menu, or click the button.

2.12.3 Double coil check Double coil check Compile ➔ Check Double Coil

Double coil locations in a ladder program can be checked. (Double coil locations are not detected as errors during compilation.) Select "Check Double Coil" from the menu. Double coils are then detected. Note: The double-coil check uses three instruction words: OUT, DIFU, and DIFD. Even if double coil locations are not detected by the double coil check, they may function as double coils depending on the assembly of ladder circuits.

2-76

Page 100

Chapter 2 Editor

2.13

Printing Functions This section describes how to print out ladder diagrams, mnemonic lists, labels/ comments/references, device use status, and parameters.

2.13.1 Printing File ➔ Print (Ctrl + P)

Connect the personal computer to a printer before starting the printout.

12

The contents to be printed out must be set before starting the printout. 1. Select "Print" from the "File" menu, or click the The "Print Setup" dialog box is displayed.

button.

2. You can select whether or not each item is printed. Click "Yes" to print the item, and click "No" not to print the item. "Yes" is selected only for ladder diagrams by default.

The following four items can be printed out. • Ladder diagrams • Mnemonic lists • Labels/comments/references • Device use status 3. The printout range can be set for each item. Set the range in the dialog box displayed when the [Detail] button is clicked. ➮ For the setup procedure for each item, refer to page 2-78.

4. Click the [OK] button to start printing. Click the [Cancel] button to cancel printing. Note 1: If the settings are changed, the changes are not saved if the [Cancel] button is clicked. Note 2: When "Show in XYM" and "Show Decimal Constant with Sign" are selected in the display mode, printout is performed according to the setting. ➮ Display mode (p. 2-19)

2-77