-

Graphical Code Editor - Toolbar, Context Menu

Note
Depending on the graphic worksheet type you are editing (FBD/LD, NOLD, SNOLD or SFC), some buttons may be inactive because the corresponding object type or command is not available.

Note
Use the <Menu> key on your keyboard to open the context menu of the object selected in the code.

Toolbar buttonContext menu commandKeyboard ShortcutDescription
Insert Named Object

In NOLD and SNOLD, the command is not available as context menu item.
<F7>Opens the selection list / input field to insert a named object.

You can either enter a new name, for example, a variable name, constant value or select an element, for example, a function, an already declared variable, etc. from the drop-down list.
The drop-down list provides all elements that are allowed to be inserted.
Insert > Insert LD Network<F8>Inserts a basic LD network consisting of one contact, one coil and two power rails.

In NOLD and SNOLD, a new network is always inserted in a newly created code section.
Insert > Insert Comment-Inserts a comment at a free position.

Not available in NOLD and SNOLD as only comments in the network section bar are allowed.
Insert > Insert Attached Comment- Inserts a comment attached to an object.

Not available in NOLD and SNOLD as only comments in the network section bar are allowed.
Insert > Insert Return-Inserts a return.

In NOLD, a return object cannot be inserted into an existing network. Instead, it has to be inserted as first object of a new network. Therefore, the command is only available after clicking into an empty cell. The return object is always inserted in a new code section.

In SNOLD, returns are not supported.
Insert > Insert Connector-Inserts a connector.

Not available in NOLD and SNOLD as connectors are not allowed.
Insert > Insert Jump-Inserts a jump.

In NOLD, a jump object cannot be inserted into an existing network. Instead, it has to be inserted as first object of a new network. Therefore, the command is only available after clicking into an empty cell. The jump object is always inserted in a new code section.

In SNOLD, jumps are only supported in the FVL language profile.

Functional language range in SNOLD: LVL or FVL.
Insert > Insert Label-Inserts a label.

Not available in NOLD and SNOLD as only network labels of sections can be used as jump labels. New sections are inserted with a default label which can be modified.

In SNOLD, labels are only supported in the FVL language profile.

Functional language range in SNOLD: LVL or FVL.
-Insert > Insert Feedback Variable-Inserts a feedback variable in the currently selected feedback connection line (only possible for feedback lines).

Not available in NOLD and SNOLD as feedback variables are only allowed in FBD/LD.

The command is also not available in function POUs, methods, actions/transition/interlock worksheets.

Further Info
Refer to the topic "Feedback variables in FBD/LD" for details.

Insert > Insert PowerRail-Inserts a left power rail.

Not available in NOLD and SNOLD as only entire networks are inserted and power rails cannot be deleted.
Insert > Insert Right PowerRail-Inserts a right power rail.

Not available in NOLD and SNOLD as only entire networks are inserted and power rails cannot be deleted.
Insert > Insert Contact<Ctrl>+<F8>Inserts a serial contact to the right of the selected object.
Insert > Insert Object Parallel<Shift>+<F8>Inserts a parallel contact below the marked object.
Insert > Insert Coil<Alt>+<F8>Inserts a serial coil to the right of the selected object.
Iterate through Contact / Coil types<Alt>+<F7>Iterates through the available contact/coil types ‣ Contact Types (LD Code Objects)
×‣ Coil Types (LD Code Objects)
×
.
Move objects up-Moves the objects below the insertion mark one grid field up.

Not available in NOLD and SNOLD.
Move objects down-Moves the objects below the insertion mark one grid field down.

Not available in NOLD and SNOLD.
Move objects right- Moves the objects right of the insertion mark one grid field to the right.

Not available in NOLD and SNOLD.
Move objects left- Moves the objects right of the insertion mark one grid field to the left.

Not available in NOLD and SNOLD.
Toggle Execution Value Mode-The command is only available in debug mode and if the corresponding extended debug settings were made in the Cockpit before writing and starting the project.
The command is used to display execution values and the execution indication in the worksheet.
Refer to the topic "Extended Debugging: Execution Values/Indication vs. "Normal" Online Values" for details.
--Collapses all the expanded code sections in the NOLD/SNOLD worksheet (see the following command).

Not available in FBD/LD and SFC worksheets.
--Expands all code sections in the NOLD/SNOLD worksheet.

Not available in FBD/LD and SFC worksheets.
Switch display of execution order<Ctrl>+<Shift>+<O>Displays the execution order of the objects within the worksheet. The execution number is indicated by a number below the object.
Switch grid snapping on/off<Ctrl>+<G>Switches the snapping of objects to the grid on/off. If activated, the objects are automatically aligned with the grid.

Not available in NOLD and SNOLD as the network layout cannot be modified manually.
Switch grid visibility on/off<Ctrl>+<.>Shows or hides the grid in the code worksheet. The shown grid width depends on the selected zoom factor.

Not available in NOLD and SNOLD as the network layout cannot be modified manually.
Display connectors/connection lines-Toggles the display of connection lines and auto-connectors.
Toggle Overview Window Visible-Switches on/off the overview map. This map facilitates the orientation and navigation in the viewer. You can navigate in the worksheet by dragging this area in the map.
Show Variable Properties-Shows or hides the 'Variable Properties' subeditor at the bottom of the code editor. In this editor, you can edit the properties of variables (except their name) without leaving the code editor (you cannot create new variables in the table).
-<Ctrl>+<F>

<Ctrl>+<H>
Opens the search/replace bar which allows you to search and replace text in the active worksheet.

Pressing <Ctrl>+<F> opens the bar with the 'Find what' field focused and <Ctrl>+<H> opens the bar with the 'Replace' field focused.
--This command is only available in safety-related SNOLD code worksheets. In addition, a communication connection must exist between PLCnext Engineer and the Safety PLC. Monitoring mode may be active or not.

Activates the debug mode of the Safety PLC by attaching PLCnext Engineer to the running safety-related application process on the safety-related controller.

Note
Debug mode allows write access to the Safety PLC (in contrast to monitoring mode). Therefore, debug mode is considered as non-safety-related mode as the execution of the application can be influenced by debug commands.
Observe the hazard message below this table.

The command is also available in the Cockpit of the Safety PLC. Refer to the topic "Controlling the Safety Application from the Safety Cockpit" for details on the function of this toolbar icon.
--This command is only available in safety-related SNOLD code worksheets. In addition, the debug mode must be active and the Safely PLC must be in one of the states Debug Run or Debug Stop (see previous table row).

Activates the halt mode of the Safety PLC.

Note
In the Debug Halt state and during single cycle operation, PLCnext Engineer displays a simulation in its online worksheets. No outputs are set on the Safety PLC or connected safety-related I/O devices. This means that the safety-related application does not function during single cycle operation.
Observe the hazard message below this table.

The program execution is halted and the single cycle operation of the Safety PLC is possible (see next table row).

To exit the Debug Halt state, click the Halt mode button again. The Safety PLC switches into the state from which Debug Halt was entered before.
--This command is only available in safety-related SNOLD code worksheets. In addition, the debug mode must be active and the Safety PLC must be in Debug Halt state (see previous table row).

Instructs the Safety PLC to execute exactly one single program cycle and then wait for the next command (which is either a further single cycle or exiting the Debug Halt state).

Note
In single cycle operation, PLCnext Engineer displays a simulation in its online worksheets. No outputs are set on the Safety PLC or connected safety-related I/O devices. This means that the safety-related application does not function during single cycle operation.
Observe the hazard message below this table.

- Go To Instance Editor-The command is only available in debug mode. It is used to select the instance for which online values shall be displayed.

The submenu lists all instances of the worksheet executed on the controller in the format 'PLC.ProgramInstance' for program instances and 'PLC.ProgramInstance.FBInstance' for FB instances.

After selecting an instance, the worksheet appears in debug mode showing the instance-related values read from the controller.

Note
Alternatively, you can open an online worksheet by double-clicking the corresponding instance icon in the PLANT in debug mode.

Refer to topic "Monitoring the application ‣ Debug mode: Monitoring the Application Execution
×‣ Monitoring/Debugging the Safety PLC
×‣ Monitoring Mode: Displaying Online Values
×
" for further information.
- Go To Definition-Jumps to the declaration of this variable/FB instance in the 'Variables' table.
-Cross References-The context menu command is only available for variables and active if the cross references are collected and up-to-date (  is shown in the CROSS REFERENCES window).

Displays the cross references of the current variable. The 'References' submenu shows all references of the current object except the currently selected occurrence. Selecting a submenu entry directly jumps into the corresponding editor or data list ("jump-to functionality" like in the CROSS REFERENCES window).
-Locate in Cross References <Ctrl>+<,>The context menu command is only available for variables and active if the cross references are collected and up-to-date (  is shown in the CROSS REFERENCES window).

Opens the CROSS REFERENCES window and marks the respective entry for this variable.
-Show all References-The context menu command is only available for variables and active if the cross references are collected and up-to-date (  is shown in the CROSS REFERENCES window).

Like 'Locate in Cross References' (prev. table row), this command opens the CROSS REFERENCES window and marks the respective entry for this variable. In addition, the cross reference list is automatically filtered for occurrences with the same 'Name', 'Type' and 'Kind'. For local variables, the POU name is used as filter criterion too.
For more details, refer to section "Showing cross references out of the code ..." in the "CROSS REFERENCES Window" topic.
- Refactoring-Opens the REFACTORING window in the Cross Function Area. The window shows all references of the object (variable, FB instance, etc.) for which the command was executed. Using the window, you can perform an automatic solution-wide replacement of object properties.

For more details, refer to the topic "Refactoring Variables".

The following hazard message must be observed before activating the debug mode of the Safety PLC or switching the Safety PLC to halt mode and executing single cycle operations.

WARNING
Unintended machine operation
  • Prior to forcing/overwriting variables during runtime, make certain that suitable organizational measures (according to applicable sector standards) have been taken to avoid hazardous situations if the application logic functions in an unintended or incorrect way.
  • Verify the impact of forcing or overwriting variables.
  • Prior to executing single cycle operations in Debug Halt state, make certain that suitable organizational measures (according to applicable sector standards) have been taken to avoid hazardous situations as the safety-related application does not function.
  • Do not enter the zone of operation while executing single cycle operations in Debug Halt state.
  • Ensure that no other persons can access the zone of operation while executing single cycle operations in Debug Halt state.
  • Observe the regulations given by relevant sector standards while the machine is running in any other operating mode than "operational".
  • Use appropriate safety interlocks where personnel and/or equipment hazards exist.