Terminal
Overview
The terminal mode provides a quick and easy way to issue commands to the drive directly. Typically used by "power users" who are familiar with the command set, the terminal mode can help in setup, troubleshooting, and other diagnostic actions. When using the terminal mode, WorkBench shows the parameter and command set in a popup view and uses an autocomplete tool to help you select the proper parameter or command. Right-click in the command entry area to open a popup menu for editing commands and for clearing the screen. The terminal also provides a macro editor that allows a series of commands to be executed via a single command (called a macro). Macros are useful when you must frequently execute a sequence of commands.
Using the Terminal
Click Terminal in the navigation tree to issue parameters and commands in the terminal mode. You can enter parameters and commands at the prompt as shown in this example:
The terminal supports the following keyboard shortcuts:
Keyboard Shortcut | Description |
---|---|
F2 |
Executes the last command. |
Up Arrow |
Gets the previous command from the command history. |
Down Arrow |
Gets the next command from the command history. |
CTRL+J |
Shows the list of commands that the drive supports. |
ESC |
Hides the command list if command list is open. Clears the line if command list is not open. |
Enter (Return) |
Executes the current command. This command sends the text you have typed to the drive and then prints the text the drive returns on the next line. |
Macros
Macros are a short sequence of instructions that can be sent to the drive using a single button. You can create up to five macros within the terminal mode using the macro editor. Each of the macros can be given a name and will appear as a button below the Terminal screen area. When you select the button, the command set tied to that macro will appear in the Terminal area and the commands will be executed. If there are commands which are not entered correctly, the terminal screen area will indicate the errors.
You can access macros and the macro editor from the buttons are located at the bottom of the terminal screen. Click a macro button to execute the associated macro. The Edit Macros button opens the macro editor used to create and edit macros. You can also assign custom names to the macro buttons with this editor.
Creating a Macro from Terminal commands
You can create a macro from a sequence of terminal commands as follows:
1. Select Edit Macro, and choose a Macro to edit.
2. Enter a sequence of commands into the Commands window:
3. The Macro is auto-saved. Select Close to return to the terminal window.
Macro Editor
The macro editor allows you to create and modify up to five macros.WorkBench automatically saves the macros that you create. If you exit KAS IDE "Integrated development environment" An integrated development environment is a type of computer software that assists computer programmers in developing software. IDEs normally consist of a source code editor, a compiler and/or interpreter, build-automation tools, and a debugger and then start KAS IDE again, the macros you defined will still be available.
To create or edit a macro from the editor, open the Terminal screen and click on Edit Macros (located at the bottom of the screen). Select the macro you wish to edit from the tree on the left, then use the features described below to build the macro. You can add comments in the macro after the ";" symbol.
Button or Dialog Box | Description |
---|---|
Name |
Allows you to give each macro a unique name. This name will be shown on the button in the terminal view. |
Commands |
Displays the commands that are sent to the drive when you use this macro. The response from the drive is displayed in the terminal. |
Import |
Overwrites the selected macro with the contents of a macro file exported from another computer. |
Export |
Sends the selected macro to a text file to that you can import into KAS IDE running on another computer. |
Insert Delay |
Inserts a step into the macro that causes a delay for a specified number of milliseconds before continuing. A line that starts with #delay 5000 will pause the execution of the macro for 5000 milliseconds. |
Close |
Closes this window and returns to the terminal view. |