TwinCAT 2 procedure

The TwinCAT Scope2 supports the import and display of oversampling process data such as is used by oversampling-able terminals/boxes.

TwinCAT 2 procedure 1:

System requirements

A TwinCAT Scope2 must be installed on the system.
An oversampling-able terminal must be present in the configuration.

The data type of the variables is also conveyed to the TwinCAT Scope2 via the ADS data. Therefore the array variable must be created

The same settings are to be made in the Scope2 for both cases, see step 2

Recording of a PLC variable with the TwinCAT 2 – Scope2

Step 1a: TwinCAT 2 PLC

Since the channel data are to be used in the PLC, a linkable ARRAY variable must be created there, as shown in the following example:

TwinCAT 2 procedure 2:
PLC declaration

This then appears in the list in the System Manager; as a rule it can also be reached via ADS without further measures since PLC variables are always created as ADS symbols in the background.

TwinCAT 2 procedure 3:
PLC in the System Manager

Note: the Scope2 can only "see" such variables in the variable browser if TwinCAT and the PLC are in RUN mode.

Step 1b: TwinCAT 2 - free task

So that the linking works, an array variable with the channel data must be present in the system manager; i.e. each oversampling data package must be present in an array. This array variable must be defined and created manually in the System Manager.

TwinCAT 2 procedure 4:
Add Variable Type

An ARRAY variable of the type as known by the PLC must be created in the syntax as known from the PLC. In this example an array of 0..9 of type INT, i.e. with 10 fields.

TwinCAT 2 procedure 5:
Definition of the variable type

If this variable is known to the System Manager, an instance of it can be assigned to an additional task with a right-click. It appears in the overview, sorted according to bit size.

TwinCAT 2 procedure 6:
Overview of declared types

In this example the variable Var152 is created. It can now be linked with the PDO-Array of the respective channel of the terminal/box.

TwinCAT 2 procedure 7:
Linking

If MatchingSize is activated in the dialog, the individual channels are offered directly.

TwinCAT 2 procedure 8:
Array variables of an oversampling terminal

So that the variables can also be found via ADS in the Scope2, the ADS symbols must be activated as well as the Enable Auto-Start, otherwise the task will not run automatically. ADS symbol tables are then created for all variables that have this task in their process data images.

TwinCAT 2 procedure 9:
Settings in the additional task

Step 2: Configuration in the Scope2

So that the linking works, an array variable with the channel data of the respective terminal/box must be present in the system manager; i.e. each oversampling data package must be present in an array. This array variable must be defined and created manually; see above.

You can now browse to the variable concerned in the Scope2.

TwinCAT 2 procedure 10:
Variable browser up to the array VAR152

The array is then not to be opened; instead the array symbol is to be selected by right-clicking on AddSymbol.

TwinCAT 2 procedure 11:
AddSymbol on the array

ForceOversampling and DataType INT16 must be set in the channel which has now been created. If necessary SymbolBased must be temporarily deactivated in addition.

TwinCAT 2 procedure 12:
Channel settings

In order to check that individual oversampling values are really being logged, the Marks can be activated in the Scope2. Please observe the interrelationships between task cycle time, sampling time of the Scope2 channel and oversampling factor.

TwinCAT 2 procedure 13:
Activation of the marks

An additional example illustrates the following image by representation of an oversampling – variable from the EL3751 with 10 x oversampling:

TwinCAT 2 procedure 14:
Illustration of a 10 x oversampling variable of the EL3751 by the Scope2

Within the image was marked subsequently that the oversampling variable originated by the PLC was just added to the Y-axis (observe selection of the PLC-POU name “MAIN” within the “ROUTES” tree). Herewith “Force Oversampling“ was activated due to the oversampling variable is not provided by the terminal/box.

Proceeding with TwinCAT 2/ alternatively via ADS

In former TwinCAT 2 versions (or a lower revision as specified in the table above) the oversampling PDO of the respective oversampling able terminal/box can be made visible for the Scope2 by activation of the ADS server.

So the creation of a PLC variable can be disclaimed as well. Therefore the ADS server of the EtherCAT Device where the oversampling able terminal/box is connected with have to be activated.

TwinCAT 2 procedure 15:
Activation of the ADS server of the EtherCAT Device (TwinCAT 2)

The activation of the ADS server have to be carried out by selection of the “Device – Image” on the left sided configuration tree:
„I/O – Configuration → I/O Devices → Device .. (EtherCAT) → Device .. – Image“.

Next the register card “ADS” have to be selected to activate each checkbox „Enable ADS Server“ and „Create symbols“ then (the port entry is done automatically).

Thus with the Scope2 process data can be accessed via the target browser without an embedded POU and without a variable reference respectively.

TwinCAT 2 procedure 16:
Direct access of the Scope2 to the terminal's PDOs
TwinCAT 2 procedure 17:

Also see Beckhoff Information System

infosys.beckhoff.com → TwinCAT 2 → TwinCAT Supplement → Category Measurement TS3xxx → TS3300 | TwinCAT Scope 2 → Annex → Oversampling record:
TwinCAT 2 procedure 18:

Beckhoff TwinCAT supports the Scope2 with some oversampling devices in a special way by automatically calculating a special ADS array symbol in the background, which appears in the Scope2 in the variable browser. This can be then linked as a variable and automatically brings along the array information.

TwinCAT 2 procedure 19:
Automatically calculated array variable (red) in the Scope2

Summary: an array variable have to be provided which is reachable via ADS. This can be a PLC variable of a POU or a defined array variable by the system manager or alternatively the ADS server of the terminals/boxes device is just activated. This is then detected by Scope2.