AMS Logger

The AMS logger (TcAmsLog.exe) is responsible for recording AMS messages. The logger is configured with the help of an XML file, that can be loaded with Load Configuration. Among other things one can specify the maximal size of the file and if a ring buffer should be used. After starting the application an attempt is made to load a configuration file named TcAmsLogger.xml from the executable path.

AMS Logger 1:

As soon as Start is clicked, the logger starts to record the AMS messages. The capture process can be stopped with the Stop button. By default, the captured AMS commands are saved in the file ..\TwinCAT\Boot\Current.cap. The name of this file can be changed in the XML configuration file. But it is not possible to change the path. The AMS/ADSViewer can load and analyze the AMS commands stored in this file.

Following tags can be use in the XML configuration file:





Max size of the capture file.



If <AutoSave> is false, the AMS messages are stored in a temporary file. After the capture is stopped the file is deleted. This configuration only makes sense if the logger is controlled remotely by the viewer.

If <AutoSave> is true, the messages are stored in the TwinCAT Boot folder. The name of this file can be set with the Tag <AutoSaveName>



Name of the capture file.



Specifies the behavior when the maximal file size (set with <FileSize>) is reached. If this value is set to false, the capture process is stopped. Otherwise a ring buffer is used. Here the captured messages are stored in two or more files. If all files are full, the oldest file is overwritten. The number of files can be set with <RingBufferFiles>.

The size of one file is the maximum file size(<FileSize>) divided by the number of files (<RingBufferFiles>).



Number of files used for the ring buffer (see <RingBuffer>)



If <OverwriteExisting> is true, an existing capture file is overwritten. Otherwise, the new messages are appended to the existing file.


Controlling the logger remotely with the AMS/ADS Viewer

It is also possible to control the logger remotely with the AMS/ADS Viewer. As soon as the Logger application is executed, the logger waits for a connection attempt from the viewer. In this case the text Viewer Connected is displayed in the bottom area of the logger window. Now the viewer can start, stop, and configure the logger.