Skip to main content

ADS

With ads, we support most of the datatypes, also nested structs and arrays. The mapping we need to specify is the symbol name of the variable, struct, tcCOM object,... Ads is notification based and the max sample freq is 1000 Hz. Default, the cycle time of on change is 2 ms, if you want to have a faster or slower cycle time (slower cycle time results in a lower system load) you can specify the cycle time in the timer field of the variable. This will override the 2ms default cycle time. e.g.

TypeExample mappingOutput database fieldnames
Single varGlobal.HoofdVariabel1Variable name
Full arrayGlobal.ArrayTestVarname_ArrOrStruct[0], Varname_ArrOrStruct[x]
Single element in arrayGlobal.ArrayTest[1]Variable name
Full structGlobal.StructTestVarname_StructTest_ElementName1, Varname_StructTest_ElementNameX
Single element in structGlobal.StructTest.elementNameVariable name

Special data types

When editing a variable, there are two additional data types for ADS only, NonFlattedArray and NonFlattedStructArray. In tags, we have stated that when using tag value in the mapping for an array, Capture generates a new variable for each index. This is not a good idea when you want to log very large arrays. The solution is to use a NonFlattedArray type, this will generate a new row in the database for each index instead of a column. The two pictures below is an example array that uses NonFlattedArray and how the data is stored in the database. The following pictures is the situation where you would use the auto type. You can also use NonFlattedStructArray when you want to log an array of structs.

TwinCat ADS router

If Capture is installed on a non Beckhoff target, the Twincat XAR runtime should be installed on the target in order to be able to communicate with the Beckhoff target. After installation, following steps should be executed:

Add a route

In order to be able to communicate with the remote target, a route to the target is needed: 1. Expand the little arrow on the right of your windows taskbar and click the TwinCat icon. 2. Click Router and Edit Routes 3. Then you get a popup window, on the bottom left, click Add Route 4. Now enter the IP-Address of the plc and click Enter Host Name / IP 5. Click the added line and then Add Route 6. Here you can enter the credentials of the plc and proceed with the okay button When you now go back to the TwinCAT Static Routes page, you will see your route in the list. There you can read your AmsNetId that can be used as the address for the device configuration. .

Get the mappings for your variables

You can find the mapping of your variables in your TwinCat project. This example shows one of our projects but the general structure should be very similar. After opening your project, to the left follow the path your_project_name -> PLC -> Main -> Main Project -> GVLs Once you click on one of your variable list, you will see all the variables in the center of the window. The Mapping that will be used in device configurations is variabe_list_name.variable (e.g. Logging.FillingLevel) (Tip) If you want to see live data in TwinCat, click the green arrow in door icon at the top.

Limit ADS object exploring

Sometimes you don't want to collect the full ADS object. Limiting what data is collected improves performance and storage costs. There are several options to limit what is collected from an ADS object. These can be configured in the custom config of the ADS variable: Click the three dots next to a variable, and then the Custom settings button. In the pop-up enter the JSON to set the custom configuration for this setting.

  • MaxDepth: Defines the maximum exploration depth (counting members or array indexers).
  • StopExploringAtPaths: An array of full paths or regex patterns that specify where exploration should stop.

Examples:

Stop exploring at a depth of 2: {"MaxDepth":2}

Stop exploring at a specific mapping: {"StopExploringAtPaths":["Parent.Child.GrandChild"]}

Don't collect Parent.UnwantedChild, or any GrandChild: {"StopExploringAtPaths":["^.*\.GrandChild", "Parent.UnwantedChild"]}

This functionality is available since Capture Edge 2.1.8.