Data Watch

See alsoDebugging Functions in Advanced Ladder

See alsoDebugging Functions in IEC

 

Topic Menu

 

Data Watch Overview

Data watch in Cscape provides the capability to monitor, in real-time, the status of registers/variables in a controller. This is valuable for troubleshooting, as the live, real-time values of the registers/variables can be viewed and changed at run time. Data watch can be accessed from Debug > Data Watch

Debug Advanced Ladder

Debug IEC

Shortcuts - Data Watch

  1. Select any ladder block in the main window (.CSP file) and right-click. Select Add To Watch. In this method, the Data Watch window will be displayed and simultaneously values get added to the Data Watch window automatically.

  2. Select Home > Hardware Configuration > Local I/O tab. If there is any IO card connected, then right-clicking on IO card provides the option “Add I/O to watch”. Selecting this option opens the Data Watch window and data gets added to the Data Watch window simultaneously.

Return to the Top: Data Watch

Add New Element - Data Watch

In the Data Watch window, click on the Add button. Select an Element dialog will be displayed which is used to add a new element to the watch window.

Multiple consecutive elements can be added to the data watch by specifying a range of Register/variable addresses up to 128 at once.

For example, to add %R1 to %R20, enter R1-20 in the address field.

  • Address – Register/Variable address that needs to be added to the watch window.
  • Name – User defined name of the Register/Variable address
  • Type – Data type or format of the Register/Variable address. See Format section below.
  • Note : Maximum number of elements that data watch window can occupy is 128.

Return to the Top: Data Watch

Format for Data Watch

To set the display format, right-click on the element, and then select Format and desired format type, or highlight an item in the list and use a shortcut.

The following formats are available:

Return to the Top: Data Watch

Modifying an Element in Data Watch

Modify Value

For debugging purposes, an element's value can be changed in real-time, as long as the program is not controlling/overwriting that variable. From the Data Watch window, right-click on an element, and from the pop-up menu, select MODIFY or double click on an element and the following window will be displayed. Enter the desired value in the New Value box.

Note:  

  1. BOOL entries can be changed to ON/OFF or 1/0 for the same effect.

  2. In order to select multiple entries, a user can drag a selection over multiple entries or can click on one item in the list then select shift from keyboard and click on another item in the list, all the entries between those entries will be selected.

Delete an Element from Data Watch

To delete an element from the list, right-click on an element, and then select Delete or select an element and choose delete key from keyboard.

Return to the Top: Data Watch

Saving and Opening Watch List

Selecting File > Save menu from the watch window, the list of registers/variables added in the data watch window can be saved. The file will be saved with a .csw extension.

Selecting File > Open menu on the watch window allows opening of a previously saved .csw file.

Note: Save/Open option is not available in IEC program language.

Data watch in IEC programming Language: Data watch in IEC programming language will get enabled only when Debug/Monitor mode is enabled. See also: Debug and Monitor

Variables can be added to the Data watch window by any one of the ways.

  1. Select any variable in the main window (.CSP file) and right-click, select Add To Watch. In this method, Data Watch window will be displayed and simultaneously values get added to the Data Watch window automatically.

  2. Right-click in the Data watch window and select “Insert Variable” to add variables.

Data Watch

Return to the Top: Data Watch

Controls - Data Watch

The dialog and columns can be resized using standard Windows techniques. To do so, move the cursor to any edge or corner of the window until a double-headed arrow appears. When this arrow appears, click-and-drag it to make the window larger or smaller. Resizing may be necessary to allow a complete display of all information, especially that in Binary format.

The column headers can be moved by dragging and dropping. This allows the user to change the order of the columns. For example, the columns can be reordered to:

Address | Value | Name | Type from the default display Address | Value | Type | Name

  • Add - This button is used to add a new element to the Data Watch window.

  • Running - This option indicates that the Data Watch is communicating with the controller and gathering the selected register/variable values. Clicking this button changes the label to Halted, and the Data Watch communications are stopped.

    Note: The window background turns yellow when stopped.

  • Print – This button is used for printing the contents available in data watch window.

  • Address, Value, Type, Name – Clicking on these column headers sort the list of items according to the header selected.

Return to the Top: Data Watch