Overview

TS3300 | TwinCAT Scope2

Product Overview

Like the previous Version Scope2 is an analysis tool with graphical output to evaluate system states and variables on local and remote devices.

The Scope2 is divided into an Configure and Visualizing tool (ScopeView2) and a Data-Logging tool (ScopeServer). The server is running in the background on each connected system and provides storage and preprocessing, to save communication and process resources.

System requirements TwinCAT Scope2 View

  • At least TwinCAT 2.10 and Level I/O
  • .NET Framework 2.0 or higher
  • Windows XP or Windows XP Embedded

System requirements TwinCAT Scope2 Server

  • At least TwinCAT 2.10 and Level I/O
  • .NET Framework 2.0 or higher
  • Windows XP or Windows XP Embedded

Note: It is also possible to record signals from CE devices without a real CE Scope2 Server. Please, use the option Use Local Server.

Installation

Execute the TcScope2.exe and follow the installation notes. Do you have the option to install only the Scope2 Server on your system or to install Scope2 View and Server. If you bought a Scope 2 licence you can insert the product key during the installation and use the unlimited fullversion. Otherwise you have the possibility to insert "DEMO" as a product key. The demo version is available for 30 days with its full functional range.

Windows XP, XPe

You can find the programs for View and Server under ..\TwinCAT\Scope 2 or into the Windows/TwinCAT start menu.

Windows CE

For Windows CE a Scope2 Server is in the development at the moment.

Introduction/Tutorial

A detailed step by step introduction is availble under Tutorial.

ScopeViewControl

As the .Net-component 'ScopeViewControlLib' is base of ScopeView it can be used to build own applications. An introducing sample how to use the ScopeViewControl: ScopeControl Integration.


Notes on the documentation

This description is only intended for the use of trained specialists in control and automation engineering who are familiar with the applicable national standards.
It is essential that the following notes and explanations are followed when installing and commissioning these components.

The responsible staff must ensure that the application or use of the products described satisfy all the requirements for safety, including all the relevant laws, regulations, guidelines and standards.

Disclaimer

The documentation has been prepared with care. The products described are, however, constantly under development.
For that reason the documentation is not in every case checked for consistency with performance data, standards or other characteristics.
In the event that it contains technical or editorial errors, we retain the right to make alterations at any time and without warning.
No claims for the modification of products that have already been supplied may be made on the basis of the data, diagrams and descriptions in this documentation.

Trademarks

Beckhoff®, TwinCAT®, EtherCAT®, Safety over EtherCAT®, TwinSAFE® and XFC® are registered trademarks of and licensed by Beckhoff Automation GmbH.
Other designations used in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owners.

Patent Pending

The TwinCAT Technology is covered, including but not limited to the following patent applications and patents:
EP0851348, US6167425 with corresponding applications or registrations in various other countries.

Copyright

© Beckhoff Automation GmbH & Co. KG, Germany.
The reproduction, distribution and utilization of this document as well as the communication of its contents to others without express authorization are prohibited.
Offenders will be held liable for the payment of damages. All rights reserved in the event of the grant of a patent, utility model or design.


Architecture

TwinCAT ScopeServer

As the ScopeServer is the data logger of Scope2, it manages the recording on single systems and provides the communication interface to the view. The server is used too, if a stored data file is load in the view to provide preprocessing.

Each system needs only one server instance. The view tries to start the server if neccessary by opening a MessageBox. Once a server is stared a system tray icon appears next to the Windows clock. A mouse-click opens a small context menu.

Change Workfolder...

The workfolder is used to store the tempoary data of a record set. By default a folder in the system user data is mapped to the server but any other internal or external (USB-Device, Network-Folder,.) can be used..

Reset

This option resets the sever and terninates all existing connections. Running or unsaved records will be discarded.

Info

The about box contains the prouct and server version, witch are helpful on service requests.

Exit

Terminates the actual server instance.


Architecture

TwinCAT Scope2 Architecture

Use the following hierarchical elements to configure TwinCAT Scope2:

  • Scope: The Scope builds the highest configuration-level. All elements that are attached to the scope are subject of the same record settings. TwinCATScopeView2_Elements_Scope.htm
  • Chart: On a chart the drawing work is done. It contains the x-axis to define the common scope time. Each chart contains a toolbar to configure the actual view. In a second bar three times show the beginning (B) and end time (E) of the record as well as the actual position (P) of the charts origin relative to the begin time. Format: “hours:minutes:seconds.milliseconds”. Common properties, like color, can be changed in chart settings TwinCATScopeView2_Elements_Chart.htm
  • (Y-)Axis: Y-Axes provide the opportunity to group channels inside a chart. Each axis holds the range the attached channels are drawn in, by manual or automatic scaling. TwinCATScopeView2_Elements_Axis.htm
  • Channel: A channel displays the system variable that should be analysed. They are assigned to a fix addressing, the acquisition TwinCATScopeView2_Elements_Acquisition.htm. Common properties, like color and linewidth can be changed in the channel settings TwinCATScopeView2_Elements_Channel.htm.

Windows

A property window is dedicated to each element, mentioned above. All windows are reachable by a double-click on an element note in the object browser or by selecting the entry in the view menu.

The scope windows are arranged in free order and size in the middle of the main window. It is also possible to arrange them in tabs back-to-back. The layout of the scope window is the same than the chart window. All other windows can be docked in several ways at the main window borders or can be arranged as a separate window freely over the screen. It is also possible to arrange multiple tabs in on free window. The docked windows can be unpinned by the needle symbol on its header. Such a hidden window shows a tab on the border it is docked at and appears for a short time if the mouse hovers over it.

All property windows will be explained in one of the following menu entries.

Configuration

How to create or change a scope configuration is explained below.

To add elements:

  • File -> Add -> Element -> New: adds a new element to the next higher one. If no higher element exists, it will be created.
  • ToolBar -> New Element Button ->: adds a new element.
  • Context menu in object browser -> Element -> New: adds a new element.
  • to read how to create a channel with acquisition from the target browser: read menu entry: target browser.

To remove elements:

  • File -> Delete: removes the selected element and all sub-elements.
  • Toolbar -> Delete-Button: removes the selected element and all sub-elements
  • Context menu of object browser -> Delete: removes the selected element and all sub-elements.
  • Select an element in the object browser and press <Del> to remove it and all its sub-elements.

Move / Copy elements:

  • Use drag and drop in the object browser to move an element. If you want to move an element to another scope it is copied only. So the element still exists in the original scope.
  • It is also possible to move an element at runtime.
  • Click right mouse in object browser for context menu, then use the copy and paste options.

Save a Scope-Configuration:

  • File -> Save :to store the actual configuration.
  • File -> Save As: to store the actual configuration under a new name.
  • Context menu of object browser -> Save: to store the actual configuration.
  • Context menu of object browser -> Save As: to store the actual configuration under a new name.

Load a Scope-Configuration:

  • File -> Add -> Scope-> Load: opens an existing configuration. Select a .sv2 file.
  • Context menu of object browser-> Add ->Scope-> Load: opens an existing configuration.
  • Drag a scope configuration file (.sv2) from a file browser to the object browser.
  • File -> Recent Files: lists the most recently used files.
  • Contex menu of object browser -> Recent Files: lists the most recently used files.

Save Data (contains configuration)

  • look at menu entry: scope settings

To load a scope containing data

  • like load a scope configuration, but selecting a .svd file.

Disable / Enable a channel

A channel can be disabled, so it will not be recorded. But a disabled channel will be stored to configuration, too.

  • Context menu of channels node in the object browser -> Disable / Enable: to set the desired.


Scope Settings

To configure the record settings open the scope settings window.

The record settings must be set before the involved Scope Servers are connected:

Record Mode

  • Record Time: Set the length of the record buffer.
  • File-Store: The file store option decides whether the server uses a local file to store the recorded data or operate only in the system memory. To decide best think of the amount of recorded data and system features, like flash discs with limited file operation livetime.

Start Record

  • Auto Start: The record is started immediately when the record button is hit.
  • Trigger Start: The record is started when the associated trigger event is raised.

StopRecord

The record mode decides how to react if the record time is reached.

  • Ring Buffer: The server overrides the buffer from the beginning. As a result the begin time of the recording (see top left corner of a chart) increases. To stop the recording the command must be given by the Scope View (press stop button for example).
  • Auto Stop: The record stops automatically if the record time is reached. A manually stop from the view is possible, too.

Common

  • Comment: Enter a free comment here.

Scope Toolbar

The Scope toolbar contains the commands to start and stop the record and saving data. In the explanations below the associated picture are sorted from left to right:

  • New-Buttons: Adds a new element to the active configuration.
  • Delete: Deletes the active element.
  • Start Record: The Scope View connects the involved Servers and transmits the record settings and channel properties. If previous recorded data are still available a dialog appears if the latest data should be saved. Once the record is started it is no longer possible to change scope settings or change the acquisition or number of channels.
  • Stop Record: The running record session is stopped and the received data is still available. Now it's again possible to change the configuration but if you don't safe the recorded data will be discarded.
  • Save Data: Once the recording is stopped, the received data can be saved to local .svd file. This file contains the recorded data and the configuration settings.

Run Menü

By choosing an option from the run menu the same actions as explained above are available. Furthermore key settings are defined in the run menu.

Additional two Export-Functions are placed in the Run-Menu:

  • Export to CSV: Text export to store recorded data in a common-usable file. The output file contains a table. The rows are separated by lines, the columns by tabulator. The first exported rows containing an overview of the scope-settings and recording, like: Name, Record start time and end time.
    Name | Scope01
    File
    StartRecord | 128783093223690000 | Donnerstag, 5. Februar 2009 | 13:08:42
    EndRecord | 128783093339880000 | Donnerstag, 5. Februar 2009 | 13:08:53

    The next rows containing a header for each channel containing the acquisition data:

    Name | DREIECK
    NetId | 172.16.8.205.1.1
    Port | 801
    SampleTime[ms] | 1
    SymbolBased | TRUE
    SymbolName | MAIN.DREIECK
    SymbolComment
    IndexGroup | 16448
    IndexOffset | 608
    Data-Type | ADST_REAL32
    VariableSize | 4

    At least a table with timestamp (as offset to the record start time) and the associated value follows:

    0 | -1,03799391
    1 | -1,03599393
    2 | -1,033994
    3 | -1,031994
    4 | -1,029994
    5 | -1,027994
    6 | -1,02599406
    7 | -1,02399409
    8 | -1,02199411
    9 | -1,01999414
    10 | -1,01799417
    11 | -1,01599419
    12 | -1,01399422
    13 | -1,01199424
    ... ...
  • Export to Binary: The binary export may be used for larger data amount. Its format is simillar to the .csv, but as binary and without any row or column marks.
    Variable | Size (Bytes) | DataType
    MAIN-HEADER
    HeaderSize | 8 | Int64
    NameSize | 4 | Int32
    Name | NameSize | Array of Char (1Byte)
    StartTime | 8 | Int64
    EndTime | 8 | Int64
    ChannelCount | 4 | Int32
    Variable | Size (Bytes) | DataType
    Channel - Header #1
    ChannelHeaderSize | 8 | Int64
    NameSize | 4 | Int32
    Name | NameSize | Array of Char (1Byte)
    NetIdSize | 4 | Int32
    NetId | NetIdSize | Array of Char (1Byte)
    Port | 4 | Int32
    Sample Time | 8 | Int64
    SymbolBased | 1 | bool (as byte)
    SymoblNameSize | 4 | Int32
    Symbolname: SymbolNameSize Array of Char (1Byte)
    CommentSize | 4 | Int32
    Comment | CommentSize | Array of Char (1Byte)
    IndexGroup | 8 | Int64
    IndexOffset | 8 | Int64
    DataTypeSize | 4 | Int32
    DataType | DataTypeSize | Array of Char (1Byte)
    DataTypeId | 4 | Int32
    VariableSize | 4 | Int32
    Samples in File | 8 | Int64
    Data in File | 8 | Int64
    File-StartPosition | 8 | Int64
    Channel - Header #2
    ...
    Channel-Header #MainHeader.ChannelCount
    Variable | Size (Bytes) | DataType
    Data Channel #1
    DataPoint #1
    Timestamp | 4 | UInt32
    Value | ChannelHeader1.VariableSize | ChannelHeader.DataType
    DataPoint #2
    ...
    DataPoint ChannelHeader #1.Samples In File
    Data Channel #2
    ...
    Data Channel #MainHeader.ChannelCount

Using the Commandline to convert Datafiles

Once a ScopeDatafile (.svd) is created it can be converted to a supported format using the command line. Call the ScopeView2.exe with a -c as parameter to select converting. Add the name of the source and the target file.

  • Example: C:\TwinCAT\Scope 2\View>TwinCatScopeView2.exe -c "C:\Scope2\DataFile.svd" "C:\Scope2\BiaryFile.svb"

To run the export without an additional userinput, be sure the ScopeServer is running and the source file exists.

Attention: An existing target file will be overwritten without request.


Chart Settings

To configure chart settings open the chart style window. The active chart is selectable in the drop-down field on the top.

Common

  • Comment: Enter a free comment string here.
  • Show Name: Show or hide the chart name in the drawing field.

Color

  • Chart Color: The color of the charts canvas.

  • Border Color: The color of the charts frame.

Behavior

  • Default Display Time: This time is the default time span a chart displayes if a record is started or rescale is pressed.
  • Auto Start: Decides if the live mode is started for this chart with a new record.
  • Time Bar: Shows or hides the time bar in the chart.
  • Tool Bar: Shows or hides the tool bar in the chart.

Y-Settings

  • Y-Zoom: Decides if the zoom takes effect only in x- direction or in y-direction, too.
  • Stacked Y-Axes: If more than one y-axis is added to a chart, you may use "Stacked Y-Axes" to change the arrangement of the associated display area. If the stacked option is not selected, the axes use the same area to display the channels values. Otherwise the areas are placed on the top of each other.
  • Scale on Zoom: If true the chart instructs all axes to execute a Auto-Scale after zoom.

X-Axis Style

  • Ticks: The maximum number of separations in the x-axis.
  • Line Width: The width of the axis in pixel.
  • Color: The axis color.

X-Axis Grid

  • Grid: Enables or disables the x-grid.

  • Line Width: Width of the gridlines in pixel.

  • SubGrid: Enables the subgrid.

  • Divisions: Set the amount of the subgrid divisions.

  • Color: The grid color.

Chart Toolbar

The chart toolbar contains the main commands to navigate through the connected data. In the explanations below the associated picture are sorted from left to right:

  • Play: Starts the live display mode, while the scope is in record-mode. So the actual frames are plotted on the charts.
  • Pause: Stops the live-plot, to navigate through the data.
  • Display-Width: Change the display width (x-axis) in the format: "hh:mm:ss,fff". You may also use the mouse to change the display width: Select a chart, press <Ctrl> and scroll the mouse-wheel. If you release the <Ctrl> button the display will be refreshed in the new display width.
  • Scroll Buttons: The outer scroll buttons move the display in its whole width. Use the inner buttons to scroll in smaller sections.
  • Position: The actual position of the chart is set to the value entered here in "hh:mm:ss,fff"-format.
  • Undo/ Redo Time/Position: Changes of position or display width are undone in order of occurrence. Use the right mouse to do as well. Once an action is undone it can be reloaded with the redo option.
  • Zoom-Mode: Is the zoom mode selected you may span a space with the mouse to zoom in the selected area. To activate the zoom in y-direction too, choose the option “Y-Zoom” in the Chart-Style-Window.
  • Panning Horizontal: Click and drag the mouse on the chart to move the actual range on the x-Axis.
  • Panning Free: Click and drag the mouse on the chart to move the actual range in x- and y-direction.
  • Zoom Horizontal: Use the mouse to span a range over the x-Axis to select the new displayed time-span.
  • Zoom Free: Use the mouse to span a range on the chart to zoom into the current view.
  • Rescale All: Instructs all y-axes to perform a Rescale. The x-Axis is set to the 'Default Display Width'.
  • Zoom Out Max: Sets the x-Axes range to a time-span greater or eaqual to the actual record-length.

Use the mouse-wheel to perform a zoom at the current cursor-position.

Chart Times Toolbar

The Chart Times Toolbar shows the actual record times:

  • Start-Time: The commen start time for all connected channels. The start time labels the zero point of the recording.
  • End-Time: The largest common time for all connected channels. The difference of end time and start time has its maximum in the record time (cf. scope settings).
  • Position: The position time is the zero point of the chart. So it is the time between start time and the beginning of view.
  • Time: The absolute time at the charts zero point.
  • Date: The date at the charts zero point.


Y-Axis Settings

To configure axis settings open the Axis Style window. The active axis is selectable in the drop-down field on the top.

Common

  • Show Name: Show or hide the axis name in the drawing field.

  • Comment A free editable comment string.

Axis Style

  • Visible: Show / Hide the axis in the chart.
  • Color: The axis color.
  • LineWidth: The width of the axis in pixel.
  • Ticks: The maximum number of seperations on the axis. If there is not enough space to display all ticks, they´ll be reduced in the chart.
    If logarithmic is activated the amount of visible ticks depends on the displayed value range and may be different from the set amount.

Grid

  • Grid: Enables or disables the x-grid.

  • Line Width: Width of the gridlines in pixel.

  • SubGrid: Enables the subgrid.

  • Divisions: Set the amount of the subgrid divisions.
    If logarithmic is activated, the subgrid will show the set amount of divisions only if the value range per tick is equals one decade. Else the subgrid will show the missing decades of the main grid.

  • Color: The grid-color.

Scale

  • Auto: Enables / Disables the Autoscaling. Using the auto scale mode, the axis minimum (and maximum) is set to a stored value smaller (or greater) then the smallest (greatest) off all associated channels.
  • Rescale: On a rescale the extremes are reset to the actual channels extremes.

  • Min / Max: If auto scale mode isn’t selected the axis minimum and maximum are editable in the text boxes.

  • Logarithmic: Switch between logarithmic and linearly scaling of the axis.


Channel Settings

To configure channel settings open the channel style window. The active channel is selectable in the drop-down field on the top.

Common

  • Visible: Show / hide the graph.

  • Name: The name field changes the label name of the channel. Using the right mouse to open a context menu providing the symbolname or parts of it to set as new name.

  • Comment: Enter a free comment string here. A comment in the connected ADS-symbol is inserted automatically.

Line

  • Antialias: The antialias property determines if the graph is drawn "nice" (antialias) or "fast".

  • Color: The graph color.

  • Width: The line width of the graph in pixel.

Marks

  • On: Enables the data point highlighting.
  • Auto: Enables the data point highlighting denpending on the current zoom.
  • On: Disables the data point highlighting.
  • Size: Size of the marks.
  • Color: The mark color.

Modify

  • Offset: An offset may be set to a channel to arrange more comfortable it in the chart.

  • Bit Mask: The bit mask is used to clip single bits out of the channel-value. The displayed value is the result of a binary AND operation between the channel value and the mask. Floating point values aren’t changed by any mask. This option may be useful to watch single bits of status bytes.

  • Scale: By setting a scale factor unequal to 1 the displayed values of the channel can be scaled. This may be useful for example to show angle values, recorded in RAD, in a more readable scale like DEG. With Scale = 360/(2*Pi) = 57.296.

  • Time Shift: The time shift option is an offset on the timeline. It may be useful to compare channels with a known bus deadtime.


Acquisition Window

Acquisiton Window

To configure channel address settings open the Acquisition window. The active channel is selectable in the drop-down field on the top.

Target

Select the target system from the list of connected routes.

Specify the port on the target in the second list.

Connection

The maximum sample time of the record must be smaller or equal to the task time the channel is connected to. Use the free sample option to edit a larger one.

The local server checkbox connects a target server with the local one.

The symbol based option should be used if a channel symbol name is known. Otherwise the symbol connection can be edit in the following fields.

Array Settings

This field is only visible if the connected symbol is of type array. The length shows the number of elements.

Use the 'Force Oversampling' option to show the elements as oversampled datapoints. E.g. an array of length 10, sampled with 10ms is displayed as a signal with 1ms sample-time.

Symbol Information

If the appropriate channel is symbol-based the full symbol name appears or can be added in the name field. In this case the following fields are edited automatically and the symbol based option is checked.

The data-type fields sets the type of the connected channel. The size field is filled in dependence.

If a comment exists for a symbol-based channel it is displayed in the Comment field.

Symbol Connect

The IndexGroup and IndexOffset define the position of the signal in the task. They are editable in hex or decimal format.

The Size field shows the size of the variable in Bytes. It depends on the data-type and can not be edited.

Change All

Some parameters are normally used for a group of channels. So it is possible to change those properties using the context-menu for a Scope, Chart or Axis. Depending on the selected value to be changed a dialog appears to set the change for all channels located under the selected element.


Target Browser

The Target Browse is used to add channels by a known Symbol to the configuration. The Target Browser is separated in two parts. The left one shows a tree view with the root named ROUTES. Beneath all System Manager known targets are listed. The color of the nodes explain the system state: Red= not Connected (Stop-Mode), Blue= Config Mode, Green= Run Mode.

The second part contains a list view showing the details of the selected node in the tree view.

Add a Channel

If one or more symbols are selected in the list, they can be provided to the configuration as channels by double-clicking or Context-Menu->Add Symobl (Add Subsymbol).

If a Symbol or folder contains sub symbols, the option 'Add Subsymbols" adds one channel for each subsymbol. The 'Add Symbol'-Option adds only a channel for the selected symbol.

Choose a Task

Once a target is chosen in the tree view, the connected symbol servers appear in the list view. Each symbol server is connected to a task or device. The node color indicates the type: Green= PLC Task, Blue= NC Task, Red= others. Is a connected task not shown in the list, a dialog reachable from the context menu of the target node or in the toolbar in the tree view, hints a list of hidden ports.

All common ports are listed in this dialog independent of its usage as server. If a port is not listed here it can be edited in the textbox on the bottom. All ports that are servers will exist after you pressed the OK button. After that there will be an display refresh.

Browse Symbol List

Is a symbol-list available for a selected port, all comprised symbols are listed in a tree, separated by default characters (e.g. '.'). The sub nodes of an entry can be listed by double-clicking.

Settings

Use the detail level to change the number of additional terms for the created channel-name. On detail level zero only the last term of the symbol-name is used as channel-name. Rising the level add a term to the created name. E.g. from the symbol-name "Main.Signals.Sinus" on level 0 the created channel-name is "Sinus"; on level 1 the name is "Signals.Sinus"; on each higher level "Main.Signals.Sinus".


Cursor

The toolbar in the cursor module contains all commands to handle cursors in a chart. X-cursor and y-cursor can be added or removed in free order with the first four buttons.

The check button can be used to hide unused lines. The Delta button shows the column wise differences, if more than one cursor is attached in a direction.

The last four buttons are hiding the sections of the four different columns (see below) in the cursor module.

Properties (Tabs)

  • Color: The color of the cursor
  • LineWidth: The width of a cursor in pixel.
  • Comment: Enter a free comment string here.
  • Move: Moves the cursor in pixel steps. If a button is pressed for a couple seconds the moving intervall will be raised. The position of the last selected x-cursor and y-cursor can be changed by the arrow keys too.

Times

The related times to a connected X-cursor are displayed in three ways

  • Absolute Time: the real system time of the cursor-position.
  • Record Time: the relative time elapsed since the record start time
  • Chart Time: the time on the x-Axis

Channel

The channel field lists all channel values for each x-cursor.

Axis

The related values to y cursors are shown in the field on the bottom.


Scope Menu: Options

Graphic

The TwinCAT ScopeView2 can display charts using two different graphic libraries: DirectX and GDI+.

The appearance is always the same. The difference between these libraries is the performance. Microsoft™ DirectX™ is built to manage a huge amount of data on short refresh times. To provide these abilities it takes direct access to hardware. As a result of multiple variants of system configuration and the susceptibility of failure each hardware comes along with, a system should be well tested of DirectX compatibility. If the system needs real-time-capability it is generally not advisable to use DirectX.

To use the ScopeView in a remote desktop environment it must be generated with GDI+.

Show Message

Some common messages are appointed with a "Remember my Answer and don't ask again!" Flag to hide the Request the next time. Once a message is disabled it can be reactivated at options -> Show Message.

Default Settings

The default settings for all elements can be set in the scope configuration. For each element of a scope configuration a default value can be set. After selected from the Options Menu a Dialog with tab for each property window appears. The changed values takes effect at the next newly generated element. For properties that don't take affect on the acquisiton of recordsettings of a configuration, the default values can be applied directly to all open configurations. The reset button re-enables the default settings for all tabs.

Application Settings

It is possible to load one or more configuration at the startup into the ScopeView2. To add or remove a configuration to the list use the according button. The open-column in the list enables you to open the specified file at next ScopeView2-startup. If the record-column is checked too, the record will start automatically after the editable delay time. To use the automatic recording it is recommendable to load the Scope-Server via TwinCAT Startup, so it is in a ready-state if the record starts.

The Display-Box can be used to select the startup in Fullscreen-Mode and keep it. If more than one display is connected the startup display can be selected by editing the according display number.

To lock the Scope View2 against user changes a password can be set. A restricted mode lock prevents against changes to record settings or acquisition of a scope configuration. The common settings of all objects, like color, are still accessible. In view only mode no all changes to a configuration are denied.


Trigger

Use the trigger module to add diverse trigger functions to a scope configuration.

As to provide a simple way to configure multiple sets of single trigger conditions and and actions, these are combined to trigger groups. The upper toolbar in the trigger module can be used to add or remove trigger groups.

Trigger Groups

The trigger module holds different trigger groups in an own tab page. Each tab is separated in a condition area (on top) and an action area (bottom).

The condition area contains a toolbar to add or remove, and a table to configure single trigger sets.

Trigger-Set

Each row in the table contains a trigger set to define a single trigger condition. By selecting a combine option from the associated colum the sets are linked to a group relation. Please note that AND-relations are operated before OR-relations.

A name for the set can be selected as well as a channel to which the release condition should be connected. The celease condition contains the operation (in the Release column) and the assigned threshod. The release operation can be a rising or falling edge through the threshold (edit a number). If the condition happens the hit flag is marked in red color. All trigger sets will hold the released state until the whole group is raised.

Trigger-Action:

The action area in the trigger group defines what happens if a trigger group is raised:

  • StartRecord: To use this option the scope settings should be configured to trigger start. Otherwise the record will be started as usual. When this action is selected a question box appears to set the option for you. Once the record button is hit, the scope will be connected to the involved servers and starts checking the trigger conditions without starting the record. The start time will be the release time of the last raised trigger set.
  • StopRecord: To use this option the scope settings should be configured to ringbuffer mode. When this action is selected, a question box appears to set the option for you. Use the Pre- and/or Post-Trigger to define a timerange before and after the triggerevent.
  • StopDisplay: This action stops all connected charts in case they're in live mode. Use the trigger position to change the position of the trigger event in the chart as a percentage of the display width (example below: raising-edge through zero of the green graph at 10% of 2.5s = 0.25s). If the trigger condition is hit again the display will jump to this new event. To avoid the retrigger use the break button in the charts toolbar.
  • RestartDisplay: This trigger action restarts all charts paused by a "Stop-Display"-Trigger.
  • StartSubsave: Once this trigger event is raised a background record is started, using the active configuration. This subsave allways run in Ringbuffer-Mode (even if not set in the baseconfigruation). Up to five parallel subsaves may run at the same time (triggered by one or more trigger-events). The recordlength of the subsave can be edited in the 'Record-Time'-box. It is possible to choose a larger time than using in the baseconfiguration (in this case the baseconfiguration should use the 'Ringbuffer-Mode' too).
  • StopSubsave: This event stops the oldest subsave. The containing data will be send to the view and stored in a .svd-file. The storage path can be changed to each accessible location. The savefile-name is build from the name of the scope in the baseconfiguration and a date-time string in alphanumerical alignment.


Tutorial_Overview

Tutorial - TwinCAT Scope 2

The TwinCAT Scope 2 is a graphical analysis-tool where you can display states of variables from different Software-Tasks depending on the time. Step-by-step, this tutorial shall exemplify the benefits of the TwinCAT supplement product as well as the way it is configurated.

1. Installation und Version numbers

2. TwinCAT PLC Example project

3. Start Scope View 2

4. To insert channels

5. The first record

6. Possibilities to display the signals

7. Signal analysis for the runtime

8. To save and export data

9. Trigger-controlled records

10. Glossary


Tutorial_Installation

Tutorial - Installation and Version numbers

Installation:

Run the TcScope2.exe and follow the installation instructions. If you bought a Scope 2 licence you can insert the product key during the installation and use the unlimited fullversion. Otherwise you have the possibility to insert "DEMO" as a product key. The demoversion is available for 30 days with its full functional range.

Version numbers:

For a potential Support-case it is important to quote your used version number of Scope 2. The following screenshots help you to find it.

- Scope View 2

In the Scope View 2 you can find the menu item "Info". The sub item "About" opens the picture below where you can find two version numbers. On the one hand the version number of the View itself and on the other hand the product version number which needs to be named in a Support case.

- Scope Server

The Scope Server is visible in the info area of your Taskbar (Notification Area Taskbar). With a right click a menu opens were you have to choose the sub item Info (see picture below).


Tutorial_PlcProject

Tutorial - TwinCAT PLC Example project

The basis for this instruction, which is a help for the work with TwinCAT Scope 2, provides a PLC project. This project offers several signals, for example a Peak- or Sinus-function. These you can display and analyse in the course of Scope.

Open the PLC project with the following Link. After you opened the project you need to login your target device. At last you have to start the PLC before you make another step in the Scope View.


Tutorial_FirstTime

Tutorial - Scope View 2

After the installation you can start the Scope View 2 under Windows Start ð Programms ð TwinCAT System ð TwinCAT Scope 2. After you followed the path the default-screen opens which is shown in the picture below.

All configuration-menus are visible on the default-sreen shown in the red marked tabs. Every tab can be moved into another place in the Scope View as you can see in the picture below. It is also possible to shut several windows. Windows which were shut can be selected again over the View Menu.

The settings you have made will be loaded in every Scope 2 View Restart. This settings are called User-Default-Settings and are saved for each user that has access on a system. So you can create your very own Scope View. Furthermore there are other settings regarding the Standard-Record time or the signal-display which belongs to the User-Default-Settings. These settings can be set under Options ð Default Settings (see picture below). These settings will be saved individually for each user, too.


Tutorial_ObjectTarget

Tutorial - To insert channels

The Target Browser is an elementary part of the Scope View 2. In the Target Browser your registered routes of the TwinCAT System Manager are displayed. At the colouring you can already note the state of each device. Red means that the device is not connected or that TwinCAT is in the Stop mode. Blue shows that TwinCAT is in the configuration mode and green signalises a running system.

If a device is in the running mode you can browse up to the basic data typ in the data structure of each port or tasks. There you can choose your channels per multiselect as shown in the picture below and per right click you can execute the command "To Channel".

Now you will notice that a structure with Scope, Chart, Axis and the selected channels is applied automatically. A colour is assigned automatically to every channel which can be edited.

You also have the possibility to include these objects manually. This is possible with the buttons in the Toolbar and you can insert new objects into an existing Scope per right click on the object symbol. This is shown in the following screenshot.


Tutorial_FirstRecord

Tutorial - The first record

As you can see in the next picture the elements Chart and Axis which are belonging to the objects in the Object Browser were applied in the Scope View . If you double-click on these objects in the Object Browser the correspondent configuration-dialog opens and you can set the grid and the background colour for a chart.

But for a first record other parameters are more important. Therefore you have to open the tab "Channel Acquisition". Here you can set the Sample Time for each channel. Of course the Sample Time can not be faster than the original cyclic time. However is makes sense to extend the Sample Time for some uncritical signals to record and hold less data.

Another important option in the Channel Acquisition is "Use Local Server". This option should be chosen if you want to record data from a device which has not installed its own Scope 2 Server. After you have set each Sample Times you should call the Scope Settings before you start the record to set the record mode. Under "Record Time" you can set your required record time. The Ring Buffer Option overwrites the data until there is a manual Stop, but per Auto Stop the record will be stopped automatically after the time you have set. "Auto-" and "Trigger-Start" are options to work with triggers which will be explained later. If you choose File-Sore as seen in the picture below the Scope Server buffers the data in a data file. Otherwise the data will be hold completely in the main memory.

Now the basic settings are made, which means you can start your first record with TwinCAT Scope View 2. Therefore please activate the red record-button in the Toolbar. When the question "Try to start local Server?" occurs, please confirm it with "Yes", thereby the Scope Server starts and begins with the data record. Because of the additional Symbol in the Taskbar (Notification Area Taskbar) you can see that the Server is activ. At the same time the visualisation of the signal flow in the Scope View begins, as you can see in the picture below.


Tutorial_Charts

Tutorial - Illustration facilities of the Signals

Your first TwinCAT Scope View 2 record is running but you do not like the illustration of the signals because the amplitude of the signal Peak is too big for a sharing of the Y-Axis with the signals Puls1 and Sinus_Fast.

To put things right you can set a second Y-Axis in the same Chart which can be inserted during the runtime. Therefore you have to click on the Axis-Symbol in the Toolbar and then the Y-Axis will be inserted in the selected Scope respectively Chart.

As you see in the second picture a second Axis has been inserted and the signals Puls1 and Sinus_Fast were moved into the new Axis per mouse. Therewith the signals are scaled on different axes. If you want to separate the signals even more, you have the possibility to set the option Stacked Y-Axes in the Chart-Settings. This option has the advantage that for both Y-Axes shared X-Cursors can be used.

Another possibility would be to enter a new Chart during the runtime. Compared to the Stacked Y-Axes option the use of shared Cursors is not possible here but to analyse the runtime it it possible to stop the display of both charts independently from each other. To realise this possibility you can insert a new Chart over the Toolbar and pull a second axis per mouse in the chart.

.Now if you hold one of the two Chart-tabs with the mouse and move it into the inside of the window you have the possibility to dock in several places. You also can view two separate Charts at the same time.


Tutorial_Analysis

Tutorial - Signalanalysis for the runtime

TwinCAT Scope View 2 distinguishes between Start/Stop Record and Start/Stop Display. You can stop the View with Start/Stop Display while the record is running in the background. Therefore new Analysis-options arise while recording. For example it is possible to set a cursor or to zoom in the signal flow.

In the following picture the lower chart is stopped while the record is running in the background.

Either if you stop the display or not it is possible to set the display-width in the first left box in the chart-window. This possibility is shown in the next picture for the Peak signal. For the two other signals whose display is stopped two cursors will be set, the signal will be zoomed in and it will be moved.

The display-width for the Peak signal is set on 5,5 seconds. The green arrow in the next picture shows the zoom-function. Directly next to it you have the possibility to move the signal. At the bottom of the picture you can find the open Cursor-Menu. In the Cursor-Tool-Bar different symbols are available to set, delete or read the cursor. The cursors always show the actual process value. For the cursor values the colour of the actual cursor is taken over. So it is easy to see which cursors and values belong together. The shown values are self-eplanatory but we would like to point out the column "C 04 - C 03" which can be switched on optionally. Here the differences between cursor and signal on the X- and Y-Axis are displayed.

Per double-klick on one of your channels in the Object Browser the Channel Settings for the correspondent channel open automatically. In the previous picture the Channel Settings for the signal Sinus_Fast were selected. If you are bothered by the second signal while you are analysing the signal of puls 1 and you do not want to analyse the coherence between the signals you can fade out one of it. The red arrow in the picture shows where you can make the channel invisible. Thereby the data won´t get lost and the record of the channel will continue in the background.

In the next picture the signal Sinus_Fast is faded out and we switch to the Channel Settings of Puls1. In the menu you have to set the option "marks" and so the signal will be zoomed in. Now every recording points are directly visible and so it is possible to arrange the cursors precisely on the marks.


Tutorial_SaveExport

Tutorial - To save and export data

If your record has been stopped because the recording time elapsed or because of a manual stop-command you have the possibility to evaluate and archive your data. Therefore you can find the necessary Scope View 2 menu under Run.

You can save your data as a svd file with Save Data. This is a data file were you can have a look at your record again in the TwinCAT Scope View 2.

If you open such a data file the options "Export to CSV" and "Export to Binary" are available, just as it is right after you have stopped the record. At both options a dialog appears were you can name a memory location. If you choose "Export to CSV" you can select between a .csv and a .txt file. You can find an example how to import a .csv file in the table-handling program in the next picture.


Tutorial_Trigger

Tutorial - Trigger-controlled record

This part of the tutorial deals with Scope records in connection with the Trigger functionality. Therefore you have to insert another channel, bTest, over the Target Browser in the first chart in a new axis. The Y-axis will be scaled manually in the Axis-Settings and will be renamed in "Trigger". Therefore the signal-width has been increased in the Channel-Settings. In the next step you have to open the tab Trigger to make the necessary settings.

The two buttons in the trigger-register are for adding and removing Trigger-Groups. In these groups different signals and their limits can be linked with AND and/or OR to activate a Trigger-action. Apply a Trigger-Group. The intention of this Trigger-Group is to react on a rising edge and to stop the already started record.

Select STOP_RECORD under Trigger-Action. With this option it is possible to stop a running record. As soon as you selected this option you will be advised that this option only is suggestive and usefull in the Ring Buffer Mode (see next picture).

Insert a new trigger event. Select the variable bTest und set the limit on 0,5 (so the edge from 0 to 1 will be identified. The comma numbers make sense for boolean variables because of possible signal-offsets). For example a Ring-Buffer record time of one minute can be set, but therefore you want to know what happened right 20 seconds before and right after (10 seconds) the event. So you have a Pre- and Post-Trigger-Time.

Now start the record with the Record Button in the Toolbar. From now on the Ring-Buffer always will be overwritten until the event occures that should be triggered, at the earliest after 20s of the Record time. When the event occures the signal-flag of the trigger in the first column changes from green to red. In this example the record stops after 30 seconds after the 10s Post-Trigger time.

The recorded data now is available for further editing.


Tutorial_Glossar

Tutorial - Glossary

Term | Description
Scope2 | The whole Product, containing the ScopeView2 and the ScopeServer
Scope Server | The Scope Server is the logging part of scope2. Each View trys to connect to one or more servers to record data or open storage-files. TwinCATScopeServer_Intro.htm
Scope View 2 | The Scope View 2 is the User-Interface of Scope2. All onfiguration- and visualisation-work is done here. TwinCATScopeView2_Architecture.htm
Scope | The top-most configuration-item in the ScopeView2 is the scope. Connection-settings, recording parameter, and -actions are defined here. TwinCATScopeView2_Elements_Scope.htm
Chart | A chart provides the canvas associated to a time-line. All connected Channels are scaled to this span. TwinCATScopeView2_Elements_Chart.htm
Axis | All channels connected to a (Y-) axis are scale to a common value-range. TwinCATScopeView2_Elements_Axis.htm
Channel | The channel connect a graph and its settings (TwinCATScopeView2_Elements_Channel.htm) to a system-variable with specific Acquisition (TwinCATScopeView2_Elements_Acquisition.htm).
Target Browser | Use the Target Browser to explore all connected systems and devices. TwinCATScopeView2_TargetBrowser.htm
Object Browser | The Object-Browser shows all active configuration of ScopeView2. TwinCATScopeView2_Architecture.htm
Cursor | Cursors are an easy way to read, compare or channel- or axis-values and their differences. TwinCATScopeView2_Elements_Cursor.htm
Trigger | Multiple trigger-configurations and -actions can be used to customize the ScopeView2. TwinCATScopeView2_Elements_Trigger.htm


ScopeViewControl Integration

Integrate ScopeViewControl into User Applications

To get a flexible and re-usable tool the Scope2 is built in a Component-based manner. E.g. the ScopeView and the ScopeServer are separate parts of Scope2. Furthermore, the ScopeView is based on the ScopeViewControl, which is accessible from the .NET-component 'ScopeViewControlLib' coming along with the Scope2 - installation. This library enables you to easily build own C#, VB.Net or WPF applications.

MS VisualStudio

Use the Designer of MS VisualStudio to easily add ScopeViewControls to your project:

  • Open a form or control to add a new ScopeViewControl.
  • Open the toolbox in the Designer and use the ContextMenue entry 'Choose Items..'
  • Use the 'Browse'-button and find the 'View'-folder in the Scope2 installation path.
  • Choose the 'TwinCAT.Scope2.View.ScopeViewControlLib.dll' .
  • A 'ScopeViewControl' labeled cog-icon appears in the toolbox.
  • Drag one or more ScopeViewControls to your design pane.

The linker may ask for some additional libraries ('TcAdsScope2Communications', 'SimpleHelper' ) if the application is compiled:

  • Open the Solution Explorer and choose the 'Add Reference..'option from the context menu of your project.
  • Browse to the installation path of Scope2 and then to the view-folder.
  • Add the libraries 'TwinCAT.Ads.dll', 'SimpleHelper.dll' and 'TwinCAT.Scope2.Communications.dll' to the project.

C# Sample-Project

The following steps will introduce you how to build a simple ScopeViewControl application.

Open a new Windows forms application and add a ScopeViewControl and a toolbar containing the pictured buttons to the form. A double-click inserts an event-handler to each button. Set the Dock property of the ScopeViewControl to Fill.

Load Configuration

It is possible to use method calls or an existing configuration file (.sv2) to configure the empty ScopeViewControl.

The C# - sample illustrates how to load a configuration in a click-event-handler.

private string filename = @"ScopeTest.sv2";

private void button_Load_Click(object sender, EventArgs e)
{
    FileInfo finfo = new FileInfo(filename);
    if (!finfo.Exists)
    {
        MessageBox.Show(this, "File not found! Please use the 'New' buttons to create a config.\r\n
                Once a config is created and saved it can be load using the 'Load' -Button!", "File not found!",
                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
    }
    else
    {
        // delete old configuration
        while (scopeViewControl1.Charts.Count > 0)
        {
            scopeViewControl1.DeleteChart(scopeViewControl1.Charts[0]);
        }
        // load configuration
        scopeViewControl1.LoadScopeConfig(filename);

        foreach (ScopeViewControlChannel channel in scopeViewControl1.ConnectedChannels)
        {
            channel.Acquisition.AmsNetId = AmsNetId.Local;
        }
    }
}

Build Configuration programmatically

The ScopeViewControl provides Methods for all featuers used in the ScopeView2, too. Use the separate Api documentation for details: ScopeViewControlLib

Add elements

All ScopeView2 elements can be added by a call from the next higher element.

  • Charts:
    private void buttonChart_Click(object sender, EventArgs e)
{
    ScopeViewControlChart chart = scopeViewControl1.NewChart();
}
  • (Y-)Axes:
    private void buttonAxis_Click(object sender, EventArgs e)
{
    if (scopeViewControl1.Charts.Count == 0)
    {
        MessageBox.Show(this, "Please create a chart first!", "No chart connected!",
                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
    }
    else
    {
        ScopeViewControlYAxis axis = scopeViewControl1.Charts[0].NewAxis();
    }
}
  • Channels:
    private void buttonChannel_Click(object sender, EventArgs e)
{
    if (scopeViewControl1.Charts.Count == 0)
    {
        MessageBox.Show(this, "Please create a chart first!", "No chart connected!",
                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
    }
    else if (scopeViewControl1.Charts[0].Axes.Count == 0)
    {
        MessageBox.Show(this, "Please create an YAxis first!", "No axis connected!",
                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
    }
    else if (scopeViewControl1.Charts[0].Axes[0].Channels.Count > 0)
    {
        MessageBox.Show(this, "This sample contains only one channel!", "Channel still connected!",
                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
    }
    else
    {
        ScopeViewControlChannel channel = scopeViewControl1.Charts[0].Axes[0].NewChannel();
        ChangeChannelSettings(channel);
        SetAcquisition(channel);
    }
}

Settings (Appearance)

Each element contains a 'Style' property to grant access to appearance settings like color or line width. Use the 'Settings' windows in ScopeView2 as a reference.

private void ChangeChannelSettings(ScopeViewControlChannel channel)
{
    if (scopeViewControl1.Charts.Count == 0)
    {
        MessageBox.Show(this, "Please create a chart first!", "No chart connected!",
                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
    }
    else if (scopeViewControl1.Charts[0].Axes.Count == 0)
    {
        MessageBox.Show(this, "Please create an YAxis first!", "No axis connected!",
                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
    }
    else if (scopeViewControl1.Charts[0].Axes[0].Channels.Count == 0)
    {
        MessageBox.Show(this, "Please create a Channel first!", "No channel connected!",
                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
    }
    else
    {
        channel.Style.LineColor = Color.Red;
        channel.Style.MarkColor = Color.DarkRed;
        channel.Style.LineWidth = 2;
    }
}

Acquisition

A channel furthermore contains an 'Acquisiton' property to connect a channel to a system variable.

private void SetAcquisition(ScopeViewControlChannel channel)
{
    if (scopeViewControl1.Charts.Count == 0)
    {
        MessageBox.Show(this, "Please create a chart first!", "No chart connected!",
                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
    }
    else if (scopeViewControl1.Charts[0].Axes.Count == 0)
    {
        MessageBox.Show(this, "Please create an YAxis first!", "No axis connected!",
                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
    }
    else if (scopeViewControl1.Charts[0].Axes[0].Channels.Count == 0)
    {
        MessageBox.Show(this, "Please create a Channel first!", "No channel connected!",
                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
    }
    else
    {
        // AmsNetId and AmsPort are part of the TwinCAT.Ads.dll located in the ScopeView insallation folder.
        channel.Acquisition.AmsNetId = AmsNetId.Local;
        channel.Acquisition.TargetPort = (int)AmsPort.PlcRuntime1;
        channel.Acquisition.IsSymbolBased = true;
        channel.Acquisition.SymbolName = "SIGNALS.TREPPE";
        channel.Acquisition.DataType = DataTypeConverter.AdsToScope2Datatype(AdsDatatypeId.ADST_INT16);
        channel.Acquisition.SampleTime = (uint)(10 * TimeSpan.TicksPerMillisecond);
    }
}

Operate a Recording

The ScopeviewControl property 'Operating' holds all methods and properties to operate a recording. It is possible to select the record mode and length as well as start and stop options. Start and stop or save methods provide full access to handle the recorded data.

private void button_StartRecord_Click(object sender, EventArgs e)
{
    try
    {
        // discard old record
        if (scopeViewControl1.State == ScopeViewControlStates.REPLY)
            scopeViewControl1.Operating.DisConnect(false);

        // start new record
        if (scopeViewControl1.State == ScopeViewControlStates.CONFIG)
            scopeViewControl1.Operating.StartRecord();

        // start charts in runmode
        if (scopeViewControl1.State == ScopeViewControlStates.CONNECTED)
            scopeViewControl1.Operating.StartAllDisplays();
    }
    catch (Exception err)
    {
        MessageBox.Show(this, err.Message, "Error on start record!",
                MessageBoxButtons.OK, MessageBoxIcon.Error);
    }

}

private void button_StopRecord_Click(object sender, EventArgs e)
{
    try
    {
        if (scopeViewControl1.State == ScopeViewControlStates.RECORD)
            scopeViewControl1.Operating.StopRecord();
     }
    catch (Exception err)
    {
        MessageBox.Show(this, err.Message, "Error on stop record!",
                MessageBoxButtons.OK, MessageBoxIcon.Error);
    }
}

private void button_Save_Click(object sender, EventArgs e)
{
    try
    {
        // save data if a record was finished
        if (scopeViewControl1.State == ScopeViewControlStates.REPLY)
        {
            File.Create("ExportData.svd").Close();
            scopeViewControl1.Operating.SaveData("ExportData.svd");
        }
        // or save only the configuration
        else
        {
            File.Create(filename).Close();
            scopeViewControl1.SaveScopeConfig(filename);
        }
    }
    catch (Exception err)
    {
        MessageBox.Show(this, err.Message, "Error on save!",
                MessageBoxButtons.OK, MessageBoxIcon.Error);
    }
}

Operate Charts

Each connected chart contains a toolbox to provide control to the user. However it is possible to use the 'ChartOperating' property and its members, too. In addition each a property to hide the time and the toolbar is located in there.

private void button_Run_Click(object sender, EventArgs e)
{
    if (scopeViewControl1.State != ScopeViewControlStates.RECORD)
    {
        MessageBox.Show(this, "Only possible if a record is running!", "Run not possible!",
                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
    }
    if (scopeViewControl1.State == ScopeViewControlStates.RECORD)
        scopeViewControl1.Charts[0].ChartOperating.StartDisplay();
}

private void button_Pause_Click(object sender, EventArgs e)
{
    if (scopeViewControl1.State != ScopeViewControlStates.RECORD)
    {
        MessageBox.Show(this, "Only possible if a record is running!", "Pause not possible!",
                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
    }
    if (scopeViewControl1.State == ScopeViewControlStates.RECORD)
        scopeViewControl1.Charts[0].ChartOperating.StopDisplay();
}

private void toolStripButtonDelChart_Click(object sender, EventArgs e)
{
    if (scopeViewControl1.Charts.Count == 0)
    {
        MessageBox.Show(this, "No chart is connected!", "Nothing to delete!",
                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
    }
    else if (scopeViewControl1.State == ScopeViewControlStates.RECORD)
    {
        scopeViewControl1.Operating.StopRecord();
        scopeViewControl1.Operating.DisConnect(false);
    }
    else if (scopeViewControl1.State == ScopeViewControlStates.REPLY)
    {
        scopeViewControl1.Operating.DisConnect(false);
    }
    else
    {
        scopeViewControl1.DeleteChart(scopeViewControl1.Charts[scopeViewControl1.Charts.Count - 1]);
    }
}

The full sample code in a VS2008 project: ScopeViewControlIntegration.zip

This sample uses variables from the PLC project: Scope2Signals.pro


Scope Oversampling

Oversampling-records with Scope 2

With TwinCAT Scope 2 it is possible to display Oversamping-values in only one variable. Oversampling records n values (n = Oversampling-Factor) for every cycle, thats why the TwinCAT System Manager generates an ADS-Symbol which contains an own timestamp for every single value. If you connect on this ADS-Symbol with Scope 2, the Scope will make all further settings to display the n values in a chronologically correct order.

To generate the ADS-Symbol and to scope directly from an EtherCAT-terminal (e.g. EL3702 or EL3632), some settings need to be done in the TwinCAT System Manager configuration:

1. In the tab ADS in the EtherCAT process image the ADS-Server needs to be activated. Furthermore the option "Create symbols" needs to be activated. The assigned ADS-Port needs to named later on in the Scope 2 to find the ADS-Symbols..

2. According to the Oversampling terminal the desired Oversampling-Factor should be set in the TwinCAT System Manager, before the configuration can be activated.

3. When the configuration has loaded sucessfully and TwinCAT is in the Run-Mode, you can switch into TwinCAT Scope 2. In the Target Browser of the Scope you need to select the Server Settings Dialog. In this Dialog you need to enter the ADS-Portnumber from the TwinCAT System Manager and add the number with the Add-Button, provided that the Port has not been entered before.

4. Now AdsPort of Image 1 (27905) should appear in the TwinCAT Scope 2 Target Browser. With this new entry you can browse into the EtherCAT terminals and also into the Oversampling- terminal. In the Oversampling-terminal the red marked variable with the addition [T20] (in this case 20 stands for 20-times Oversampling, this number can vary according to the Oversampling-Factor) for the Scope-record should be selected.

The INT16 variable can now directly be recorded in TwinCAT Scope 2. In the following screenshot 20-times Oversampling at 1ms cycle time.


FAQ_Scope2

FAQ - Frequently asked questions and their answers

In this area we answer frequently asked questions to help you to work with TwinCAT Scope2.
If you have any further questions please contact our support-team (05246/963-157).

1. Is it possible to record data from a CE device?

2. Can I include Scope Control into .NET?

3. Is there a step-by-step instruction for Scope2?

4. Why is my trigger-event not identified?

5. Can I export my data to a txt file?

6. Do I have to deinstall my old Scope version if there is a Scope update?

7. Is it possible to record oversampling values directly from the I/O´s?

8. Is it possible to print the current chart?

9. Can I fix the cursor at a special position?

10. Is it possible to display an array of curves?

11. Is it possible to control Scope2 out of the PLC?

12. Can I operate Scope2 with TC2.10 and 2.11?

13. It is possible to make a record in one Scope from various devices?

14. It is possible to make a record from an additional external triggered task?

1.
? Is it possible to record data from a CE device?
 ! Yes, activate the option "Use Local Server" under Channel Acquisition.

2.
? Can I include Scope Control into .NET?
 ! Yes, you can include the Scope Control incl. Scope Client and Chart Control into .NET.

3.
? Is there a step-by-step instruction for Scope2?
 ! Yes, in the online Information System under tutorial.

4.
? Why is my trigger-event not identified?
 ! Maybe the recording- time of a possible "Event-prehistory" has not elapsed yet.

5.
? Can I export my data to a txt file?
 ! Yes. If you select "Export to CSV" under the menu "Run" and then select txt as a data type.

6.
? Do I have to deinstall my old Scope version if there is a Scope update?
 ! No. It should be enough to carry out the update without deinstallation. But if you still have a Scope2 version from the BETA-phase it should be better to deinstall the old version.

7.
? Is it possible to record oversampling values directly from the I/O´s?
 ! Yes, as soon as the ADS-Server in the process image is activated and the corresponding ADS-Port is known. Please, see our "How to do?" description here.

8.
? Is it possible to print the current chart?
 ! It is NOT possible to print the chart directly out of the Scope View. But this functionality is in development.

9.
? Can I fix the cursor at a special position?
 ! No, this is not possible yet. This feature is also in development.

10.
? Is it possible to display an array of curves?
 ! No, this is not possible yet.

11.
? Is it possible to control Scope2 out of the PLC?
 ! Of course both TwinCAT versions will be supported. The Scope2 Server can be controlled out of the PLC with the function block FB_ScopeServerControl.

12.
? Can I operate Scope2 with TC2.10 and 2.11?
 ! Of course both TwinCAT versions will be supported. Requirement: TwinCAT I/O.

13.
? It is possible to make a record in one Scope from various devices?

! Yes, this is possible. However the devices need to be synchronized to time. Currently the Scope2 compares the TwinCAT times with each other. At a TwinCAT start the TwinCAT clocks take over the windows time. The synchronization of the windows clocks and a TwinCAT restart is necessary. The maximum allowed difference is 5 seconds.

14.
? It is possible to make a record from an additional external triggered task?

! Yes, this is possible. But it is necessary to choose an adequate update-rate. The update-rate must not be too slow because otherwise the values maybe can be interpreted wrong. Furthermore you need to make sure that the external application runs before you start the record. In generally it is recommended to conduct an additional task with the AutoStart option so the handling and the record can proceed as usual.