EcoStruxure Machine Expert version 1.1 does not support the M258, LMC058 and LMC078 controllers.

Force Values, Prepare Value Dialog Box

Overview

Default shortcut: F7

The Debug > Force values command is available in online mode. It affects that one or more variables of the currently active application are permanently set to user-defined values in the controller. The setting will be completed both at the beginning and at the end of a cycle.

Warning_Color.gifWARNING

UNINTENDED EQUIPMENT OPERATION

oYou must have a thorough understanding of how forcing will affect the outputs relative to the tasks being executed.

oDo not attempt to force I/O that is contained in tasks that you are not certain will be executed in a timely manner, unless your intent is for the forcing to take affect at the next execution of the task whenever that may be.

oIf you force an output and there is no apparent affect on the physical output, do not exit the online mode without removing the forcing.

oIf the online mode was interrupted while forcing was active, re-establish the connection with the controller and remove the forcing.

Failure to follow these instructions can result in death, serious injury, or equipment damage.

Sequence of Commands in a Cycle

Step

Action

1

Read inputs

2

Force values

3

Execute code

4

Force values

5

Write outputs

NOTE: The command Force values [all applications] which affects all applications of a project, is not by default inserted in any menu (if needed, see the Customize dialog box).

NOTE: Also refer to the Write values command for setting a defined value only once at the beginning of a cycle.

The forcing will remain active until it is explicitly suspended by the user for particular or for all variables, or until the application becomes logged-out.

To prepare variables for forcing, define the desired value in online mode in one of the following places which are used for monitoring:

oIn a Watch view defined in the project, containing a list of variables to be monitored.

oIn the online view of the object within the declaration part of the respective editor.

oIn the online view of the object within the implementation part of the FBD /LD/IL editor.

A forced value is indicated by the G-SE-0030755.1.gif-high.gif symbol.

The dialog box has the following functions:

opreparing a new value for a variable

oremoving a prepared value

oreleasing a forced variable

oreleasing the variable and additionally resetting its value to the one the variable was assigned to before forcing

The dialog box opens if you click the Prepared Value field of a currently forced value. Or by clicking the inline monitoring field of the variable in the implementation part of the FBD/LD/IL editor.

Mouse-click to open the dialog box:

G-SE-0030756.2.gif-high.gif

 

 

Concerned Variables

The following information on the currently concerned variable is displayed:

Expression

path of the variable

Example: PLC.Application.PLC_PRG.ivar

Type

data type

Example: DWORD

If the expression is an array, you can double-click the Type column to open the dialog box Monitoring Range. It allows you to reduce the shown array elements to be monitored by defining the Start index and the End index of the array.

Current value

Example: TRUE or 23 

Choose one of the following options concerning What do you want to do with the variable:

Prepare a new value for the next write or force operation

Depending on the data type of the variable, you can enter a new number or string you want to assign to the variable.

Remove preparation with a value

The prepared value for a variable will be removed.

Release the force, without modifying the value

The variable will be marked as <Unforce> and thus is prepared to get the current value read from the controller.

Release the force and restore the variable to the value it had before forcing it

The variable will be marked as <Unforce and restore> and thus is prepared to get the value it had before forcing.

According to the chosen option, after leaving the dialog by clicking OK, the Prepared value field of the monitoring view will show a new value or <Unforce> or <Unforce and restore>. At the next Force values or Write values (for the first option) command, the prepared values will be set.

If the option Secure online mode is activated in the Communication Settings of the respective controller, you have to confirm after calling this command.