cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Getting data from an auto-update CSV file

AT_10876945
5-Regular Member

Getting data from an auto-update CSV file

Hi, Can I get collect data (the last row) of an auto-update CSV file with KepServerEx?
The auto-update CSV file will add another row of information after a cycle time that machines runs.

For simulation, I have tried Advanced Simulator where I read from another article. However, the result is not what I expected.

It can read CSV file but while I open OPC Client, I cant config my CSV to add a row which makes it look likes an auto-update CSV file (it says the file is using for another process).

Do you have any solutions about it or I have to convert the data in my CSV file to a database then use ODBC Client to read it?

1 ACCEPTED SOLUTION

Accepted Solutions
ntripathi
13-Aquamarine
(To:AT_10876945)

Greetings @AT_10876945 , 

 

To collect data from an auto-updating CSV file using KEPServerEX, you can follow these steps:

 

Create an Advanced Tag Group that corresponds to the data structure in your CSV file. Define Advanced Tags for each type of data you want to collect.

Export the tag group as a CSV file. This will serve as a template for your data. You can use Microsoft Excel or any other spreadsheet application that supports CSV files.

Modify the Template CSV File: Open the exported CSV file in your spreadsheet application, Add the initial data rows based on your requirements, and save the modified CSV file.

 

Auto-Update the CSV File: Configure your system or script to periodically add new rows to the CSV file. This can be done based on a cycle time or any other trigger (e.g., machine runs). The new rows should follow the same structure as defined in the template CSV file.

 

Import the Updated CSV File: In KEPServerEX, go to the Advanced Tag Group and select “File” > “Import CSV.” Choose the updated CSV file with the new rows. The imported data will be available as tags in your KEPServerEX project.

 

Monitor and Collect Data: Once the CSV file is imported, KEPServerEX will automatically update the tags with the new data rows. You can now read the data using OPC Client or any other compatible client.

 

Regarding using ODBC and a database:

  • If your data volume grows significantly or if you need more advanced querying capabilities, consider migrating the data to a database using ODBC.
  • However, if the CSV file meets your requirements, you can continue using it directly with KEPServerEX.

Note: CSV functions are only available when an Advanced Tag Group is selected.

 

Please take a look at the following article

Article - CS341300 - How to use csv file to import/export tags in PTC Kepware Products

If you are prompted to log in to view the complete article, you can use your MyKepware login credentials.

View solution in original post

2 REPLIES 2
ntripathi
13-Aquamarine
(To:AT_10876945)

Greetings @AT_10876945 , 

 

To collect data from an auto-updating CSV file using KEPServerEX, you can follow these steps:

 

Create an Advanced Tag Group that corresponds to the data structure in your CSV file. Define Advanced Tags for each type of data you want to collect.

Export the tag group as a CSV file. This will serve as a template for your data. You can use Microsoft Excel or any other spreadsheet application that supports CSV files.

Modify the Template CSV File: Open the exported CSV file in your spreadsheet application, Add the initial data rows based on your requirements, and save the modified CSV file.

 

Auto-Update the CSV File: Configure your system or script to periodically add new rows to the CSV file. This can be done based on a cycle time or any other trigger (e.g., machine runs). The new rows should follow the same structure as defined in the template CSV file.

 

Import the Updated CSV File: In KEPServerEX, go to the Advanced Tag Group and select “File” > “Import CSV.” Choose the updated CSV file with the new rows. The imported data will be available as tags in your KEPServerEX project.

 

Monitor and Collect Data: Once the CSV file is imported, KEPServerEX will automatically update the tags with the new data rows. You can now read the data using OPC Client or any other compatible client.

 

Regarding using ODBC and a database:

  • If your data volume grows significantly or if you need more advanced querying capabilities, consider migrating the data to a database using ODBC.
  • However, if the CSV file meets your requirements, you can continue using it directly with KEPServerEX.

Note: CSV functions are only available when an Advanced Tag Group is selected.

 

Please take a look at the following article

Article - CS341300 - How to use csv file to import/export tags in PTC Kepware Products

If you are prompted to log in to view the complete article, you can use your MyKepware login credentials.

Hi @AT_10876945 ,


I wanted to see if you got the help you needed.


If so, please mark the appropriate reply as the Accepted Solution. It will help other members who may have the same question.
Please note that industry experts also review the replies and may eventually accept one of them as solution on your behalf.
Of course, if you have more to share on your issue, please pursue the conversation.

Thanks,

Catalina

Community Moderator

Catalina
Top Tags