Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
21
Добавлен:
11.10.2020
Размер:
3.39 Mб
Скачать

The Editors 171

The Text Editors

When a variable is open, all of its components are listed after it. A minus sign appears in front of the variable. If you doubleclick again or press <Enter>, the variable will be closed, and the plus sign will reappear.

Pressing <Enter> or doubleclicking on a single-element variable will open the dialog box to write a variable. Here it is possible to change the present value of the variable. In the case of Boolean variables, no dialog box appears; these variables are toggled.

The new value is displayed after the variable, in pointed brackets and in turquoise color, and remains unchanged. If the 'Online' 'Write values' command is given, then all variables are placed in the selected list and are once again displayed in black.

If the 'Online' 'Force values' command is given, then all variables will be set to the selected values, until the 'Release force' command is given. In this event, the color of the force value changes to red

5.3 The Text Editors

The text editors used for the implementation portion (the Instruction List editor and the Structured Text editor) of WAGO-I/O-PRO 32 provide the usual Windows text editor functions.

The implementation in the text editors is supported by syntax coloring.

In Overwrite mode the status bar shows a black OV. You can switch between Overwrite mode and Insert mode by key <Ins>

WAGO-I/O-SYSTEM 759 WAGO-I/O-PRO 32

172 The Editors

The Text Editors

The most important commands are found in the context menu (right mouse button or <Ctrl>+<F10>).

The text editors use the following menu commands in special ways:

5.3.1.1 'Insert''Operators'in text editors

With this command all of the operators available in the current language are displayed in a dialog box.

If one of the operators is selected and the list is closed with OK, then the highlighted operator will be inserted at the present cursor position. (This is managed here just as it is in the Input Assistant).

5.3.1.2 'Insert''Operand'in text editors

With this command all variables in a dialog box are displayed. You can select whether you would like to display a list of the global, the local, or the system variables.

If one of the operands is chosen, and the dialog box is closed with OK, then the highlighted operand will be inserted at the present cursor position. (This is managed here just as it is in the Input Assistant).

WAGO-I/O-SYSTEM 759 WAGO-I/O-PRO 32

The Editors 173

The Text Editors

5.3.1.3 'Insert''Function' in text editors

With this command all functions will be displayed in a dialog box. You can choose whether to have a list displaying user-defined or standard functions.

If one of the functions is selected and the dialog box is closed with OK, then the highlighted function will be inserted at the current cursor position. (The management will proceed, as in the input selection.)

If the With arguments option was selected in the dialog box, then the necessary input and output variables will also be inserted.

5.3.1.4 'Insert''Function Block' in text editors

With this command all function blocks are displayed in a dialog box. You can choose whether to have a list displaying user-defined or standard function blocks.

If one of the function blocks is selected and the dialog box is closed with OK, then the highlighted function block will be inserted at the current cursor position. (This is managed here just as it is in the Input Assistant).

If the With arguments option was selected in the dialog box, then the necessary input variables of the function block will also be inserted.

5.3.1.5 Calling POUs with output parameters in text editors

The output parameters of a called POU can be directly assigned upon being called in the text languages IL and ST. Example: Output parameter out1 of afbinst is assigned variable a.

IL:

CAL afbinst(in1:=1, out1=>a)

ST:

afbinst(in1:=1, out1=>a);

5.3.1.6 The text editors in Online mode

The online functions in the editors are set breakpoint and single step processing (steps). Together with the monitoring, the user thus has the debugging capability of a modern Windows standard language debugger.

In Online mode, the text editor window is vertically divided in halves. On the left side of the window you will then find the normal program text; on the right side you will see a display of the variables whose values were changed in the respective lines.

WAGO-I/O-SYSTEM 759 WAGO-I/O-PRO 32

174 The Editors

The Text Editors

The display is the same as in the declaration part. That means that when the PLC is running, the present values of the respective variables will be displayed.

The following should be noted when monitoring expressions or Bit-addressed variables: in the case of expressions, the value of the entire expression is always displayed. Example: a AND b is displayed in blue or with ":=TRUE" if both a and b are TRUE. For Bit-addressed variables, the bit value that is addressed is always monitored (e.g. a.3 is displayed in blue or with ":=TRUE, if a has the value 4).

If you place the mouse pointer briefly above a variable, then the type, the address and the comment about the variable will be displayed in a Tooltip.

5.3.1.7 'Extras' 'Monitoring Options'

With this command you can configure your monitoring window. In the text editors, the window is divided into two halves during monitoring. The program is located in the left half. In the right half, all variables that are located in the corresponding program line are monitored.

You can specify the Monitor Window Width and which Distance two variables should have in a line. An distance declaration of 1 corresponds, in this case, to a line height in the selected font.

x Monitoring Options Dialog Box

5.3.1.8 Breakpoint Positions in Text Editor

Since in WAGO-I/O-PRO 32 several IL lines are internally combined into a single C-code line, breakpoints can not be set in every line. Breakpoint positions include all positions in a program at which values of variables can change or where the program flow branches off. (Exception: function calls. If necessary, a breakpoint in the function must be set here.) At the positions lying inbetween, a breakpoint would not even make sense, since nothing has been able to change in the data since the preceding breakpoint position.

This results in the following breakpoint positions in the IL:

At the start of the POU

At every LD, LDN (or, in case a LD is located at a label, then at the label)

At every JMP, JMPC, JMPCN

At every label

At every CAL, CALC, CALCN

WAGO-I/O-SYSTEM 759 WAGO-I/O-PRO 32

Соседние файлы в папке 759-332