Samples | Measurement 6.9 Measurement | Measurement 6.9.1 Creating and handling TwinCAT Measurement projects | Creating and handling TwinCAT Measurement projects The TwinCAT Automation Interface provides methods and properties to create and access TwinCAT Measurement projects. The following chapter describes how some basic tasks can be solved with such a TwinCAT project and includes information on the following topics:
Requirements Creating a TwinCAT Measurement project Creating a TwinCAT Scope configuration Creating, accessing and handling diagrams Creating, accessing and handling axes Creating, accessing and handling channels Starting and stopping recordings Further information on TwinCAT Measurement can be found on the corresponding webpage in our information system. Requirements The integration of TwinCAT Measurement projects via the Automation Interface is possible from TwinCAT 3.1 Build 4013.
The interface definitions required for handling TwinCAT Measurement projects are located in the TwinCAT.Measurement.AutomationInterface.dll (this is located in the installation directory of the TE130x scope view) IMeasurementScope: TE1000 286 Version: 1.7.0 int StartRecord(); Starts the recording. The command is independent of the selected node, as the underlying scope project is always used. int StopRecord(); Stops the recording. The command is independent of the selected node, as the underlying scope project is always used. int Disconnect(); Disconnects the connection to the ScopeServer. The recording is discarded.
int SaveSVD(string filePath); Saves the recording to the specified file path. int ExportCSV(string filePath); Exports the recorded data in CSV format under the specified file path. int ExportBinary(string filePath); Exports the recorded data in binary format under the specified file path. int ExportTDMS(string filePath); Exports the recorded data to the TDMS format under the specified file path. int ExportDAT(string filePath); Exports the recorded data in DAT format under the specified file path. int CreateChild(out object item, string name = "", int elementType = 0); Creates a new element under the currently selected one.
The element type specifies which type of element is to be created (if several options exist). The element types are listed in the table below. int ChangeName(string name); Changes the name of the element. int ShowControl(); Opens the editor of the project