Loading and analyzing capture files (offline mode)
If the viewer is not connected to the logger, one can load the AMS commands captured by the AMS logger. The display is divided into three windows. The upper window is a list view containing all recorded commands. The parser view in the middle provides additional information about the command selected in the tree view. The bottom view displays a hex dump of the selected command.

Save a capture file
To save a capture file, one must right click the entry AmsViewer in the tree view. Then select Save Capture As... in the opened context menu. This opens the Save As Dialog:

The textboxes Range From and Range To are used to specify the range that should be saved. If the Filtered check box is checked, only the filtered AMS commands are saved. This is extremely useful for minimizing the size of large capture files.
Filter a capture file
In offline mode one can filter the capture AMS/ADS commands. There are more much filter possibilities available than there are for capturing the AMS/ADS commands. To enter a new filter, one has to right click on the entry AmsViewer in the tree view. In the opened context menu select Set Display Filter... . This opens following dialog:

In the text box Filter the filter string can be entered. Expressions can be combined with Boolean operators (AND, OR, NOT) here. An expression is a combination of a property (e.g. TargetNetId) a relation (!=,==,<,>,>=,<) and a value (number, NetId etc.) or a property on its own. If a property is used as expression, the program checks if the property exists AMS command.
Ads_IndexGroup
If this filter string is entered, all commands are displayed, that contain this property. In this case all ADS Write, Read, ReadWrite and AddDeviceNotification requests would be displayed.
Ads_IndexGroup == 0x4020
If you enter this string, all ADS Write, Read, ReadWrite and AddDeviceNotification requests with an IndexGroup of 0x4020 would be displayed. There are also properties, that cannot be combined with a relation.
AdsCmd
For instance this filter string displays all ADS commands. The properties starting with Ads_ are ADS specific properties.
Following table list the supported properties:
Property | Description | Example |
---|---|---|
SenderPort | Port of the sending ADS device. | SenderPort > 800 |
SenderNetId | AMS-NetId of the sending ADS device. | SenderNetId == 172.16.17.5.1.1 |
TargetPort | Port of the target ADS device. | TargetPort == 123 |
TargetNetId | AMS-NetId of the target ADS device. | TargetNetId != 127.12.2.3.1.1 |
ErrorCode | AMS error code. 0, if no error occurred. | ErrorCode > 0 |
CmdId | Id of the AMS command. |
|
hUser | User handle | hUser == 0x12345678 |
cbData | Length of the data in byte. | cbData > 40 |
StateFlags | AMS state flags. |
|
Response | Is true, if the command is a response. | Response |
Data | Data of the AMS command | Data == 'MAIN.Variables[10]'
|
AdsCmd | Is true, if the command is a ADS request or response. | AdsCmd |
Ads_Read | Is true, if the command is a ADS read request or response. | Ads_Read |
Ads_Write | Is true, if the command is a ADS write request or response. | Ads_Write |
Ads_ReadWrite | Is true, if the command is a ADS ReadWrite request or response. | Ads_ReadWrite |
Ads_ReadDeviceInfo | Is true, if the command is a ADS ReadDeviceInfo request or response. | Ads_ReadDeviceInfo |
Ads_ReadState | Is true, if the command is a ADS ReadState request or response. | Ads_ReadState |
Ads_WriteCtrl | Is true, if the command is a ADS WriteCtrl request or response. | Ads_WriteCtrl |
Ads_AddDeviceNote | Is true, if the command is a ADS AddDeviceNote request or response. | Ads_AddDeviceNote |
Ads_DelDeviceNote | Is true, if the command is a ADS DelDeviceNote request or response. | Ads_DelDeviceNote |
Ads_DeviceNote | Is true, if the command is a ADS DeviceNote request or response. | Ads_DeviceNote |
Ads_IndexOffset | Index-Offset of the ADS command | Ads_IndexOffset |
Ads_IndexGroup | Index-Group of the ADS command. | Ads_IndexGroup |
Ads_Result | Result of the command. A value not equal to 0, indicates an error. | Ads_Result |
Ads_data | Data of the ADS command | Ads_data |
To make the entry of expressions easier the Filter Expression Dialog can be opened with Add Expression .... In the left list box, all supported properties are listed. If a property is selected, the Relation list box displays all possible relations. The value of the property can be entered in the textbox Value.

If the dialog is confirmed with OK, the expression is added to the Filter text box.
Example 1:
Display all AMS commands sent or received from an ADS device with the AMS-NetId 172.16.7.70.1.1:
sendernetid == 172.16.7.70.1.1 OR targetnetid == 172.16.7.70.1.1
Next we want reduce this set to all ADS write commands:
(sendernetid == 172.16.7.70.1.1 OR targetnetid == 172.16.7.70.1.1) AND ads_write
Example 2:
Find the string 'MAIN.Values' in the ADS data:
ads_data contains 'MAIN.Values'
Example 3:
Find the byte pattern '01 25 a0':
ads_data contains '01 25 a0'