CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Wed Mar 20, 2019 12:04 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Wed Apr 27, 2016 10:08 am 
Offline

Joined: Tue Apr 26, 2016 11:28 am
Posts: 4
Hi,

I am using CODESYS V3.5 SP8 Patch 2
Is there a way to import / export Global variable list using CSV files?
So we can generate variable lists in Excel and then import them in CODESYS.

with kind regards


Top
   
PostPosted: Wed Apr 27, 2016 10:33 am 
Offline
Frequent User
Frequent User
User avatar

Joined: Tue Jun 06, 2006 9:03 am
Posts: 408
When you use tabs in the declaration of the variables in CODESYS (textual view), then you can just copy/paste the variables to/from Excel.
Excel will use the Tabs to place the text in individual columns.


Top
   
PostPosted: Tue Dec 18, 2018 2:48 pm 
Offline

Joined: Wed Jun 21, 2017 3:26 pm
Posts: 1
I have been working on this task for few day and I had solution for it. Following the steps:

1/ Create Format of CSV file from Excel
Need to have header: TextList ID Default (and optional different languages, for instances)
In the TextList column, insert textlist name for every rows.

2/ Create UTF-8 CSV to keep the Unicode font when importing to CODESYS.
This step is required if you want to import UTF-8 text such as Germany characters
- Create Excel content as step 1
- Save As → Save as Type: CSV (Comma DElimited)(*.csv) → Tools → Web Options → Encoding → Save this document as: Unicode (UTF-8) → Fonts → Characters Set: Multilingual/ Unicode/Other Script → OK

3/ Add CSV file into a new text list of CODESYS.
- Right Click Application in CODESYS --> Add Object --> Text List --> Any Name
- Double Click on new Text List just created --> In Textlist Tab from Menu Bar --> Import/Export Text List File --> Choose File to COmpare or to Export --> Browse to the CSV file you created from step 2.
- Choose Import.

--> New Text List with the name in CSV file will appear.

Note:
- it is not required the ID column have to be number. You can insert words as well.
- It is required to have an exact format for assigning text index. The text should be placed in ' ' mark. Example: 'Start'.
- Case sensitive.
- When importing more lists into 1 project, CODESYS automatically add all headers in every list together.


Top
   
PostPosted: Tue Dec 18, 2018 2:59 pm 
Offline
Frequent User
Frequent User

Joined: Fri Feb 23, 2018 3:41 pm
Posts: 115
Unicode/UTF-8 is not a font, it's a character encoding.

currently I'm using Notepad++ for mass import. (you can open a CSV from it, and play with nice replace functions like regex)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: Andreas Kehrer and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited