Importing a CSV file (configuration example)

This chapter illustrates the import of a CSV file. The individual sections build on each other and should be followed sequentially! In addition, please note that it is only a sample configuration. Real projects may differ.

What is a CSV file?

A CSV file is used in the TC Motion Designer to import a simple data structure (table in Microsoft Excel, characteristic values from a database) into an existing project. A prerequisite is that a project has already been created in the Solution Explorer, and a DC link has also been created.

Our example is an actual customer project of Beckhoff Automation GmbH & Co. KG, in which a label application process has been implemented.

The following must be observed:

Adding the CSV file in the TC Motion Designer project (under MS Visual Studio)

  • Right-click on "Resource files".
  • A new menu window opens.
  • Left-click on "Add existing file" (1).

The CSV file "Application_Example_TCMD" (2) was successfully added to the Solution Explorer.
It can be opened by double-clicking with the left mouse button.

Importing a CSV file (configuration example) 1:

Importing a CSV file (configuration example) 2:

 

Preparing the CSV file for import into the motion profile

Importing a CSV file (configuration example) 3:

Next, add a new movement section:

  • Click Add (1) in the motion profile.
  • A new menu window opens.
  • In the pull-down menu (2) select the tab "File import" (3).
  • Confirm your selection with OK (4).
Importing a CSV file (configuration example) 4:

Further information on creating a motion section!

For further information on creating and specifying a section please refer to chapter: 4.2: “Motion profile”.

Importing and specifying the CSV file in the section settings

Please choose between the following import options:

  • position, velocity/speed or acceleration (1).

The difference is in the requirements for the processing process for your application.

  • Enter a name for your section.

The next step is the file import:

  • Left-click on the button "File name" (2).
  • The CSV file is now available for import.
  • Confirm with OK. Importing a CSV file (configuration example) 5:

After successful import of the CSV file, edit the setting:

  • Number separator

Select semicolon instead of tab. The error message should disappear after the setting was changed.

Note:

This selection is required because the format Comma Separated Values uses semicolons to separate the data fields.

The multiplication factor can take into account different units:

  • e.g. speed in rpm

Importing a CSV file (configuration example) 6:

 

Overview of the imported CSV file as movement section

Importing a CSV file (configuration example) 7:

 

When all settings have been implemented, the imported CSV file and its characteristic values are displayed graphically.

You can customize the section settings according to the requirements of your application.