CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Mon May 22, 2017 10:31 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Tue Mar 21, 2017 3:48 pm 
Offline

Joined: Mon Mar 20, 2017 4:38 pm
Posts: 2
Hello,

i have a list of couple thousand global variables saved in excel and i want to transfer them into Codesys. I can copy/past them but that takes alot of time. Is there a way to transfer those variables faster and more effectively?

Adrian


Top
   
PostPosted: Tue Mar 21, 2017 4:55 pm 
Offline

Joined: Sat Jan 02, 2010 2:05 pm
Posts: 74
Hi Adrian,

Why selecting all of them in Excel and pasting them into the declaration area is not working for you?

Just in case you've not noticed that you can switch the declaration area to text mode.

_________________
http://www.robotecnik.com - robots, CNC and PLC programming.


Top
   
PostPosted: Thu Mar 23, 2017 8:48 am 
Offline

Joined: Mon Mar 20, 2017 4:38 pm
Posts: 2
Thank you for responding.

I can just copy them but the thing is that in the excel files there are alote of variables that need to be placed in different objects. And this transfer from excel to codesys is done frequently in the company in which i am currently working as a student. So basically this task can be done copy/paste style but my task is to make/find a script or a way to do this automatically.

Adrian


Top
   
PostPosted: Thu Mar 23, 2017 9:48 am 
Offline

Joined: Sat Jan 02, 2010 2:05 pm
Posts: 74
Two possible ways:

1. in Excel do a macro that generates xml files as the ones that get imported in Codesys. That should not be very difficult, then import them in Codesys.

2. Codesys 3 gives Phyton scripts... I've never used them, who knows if you can do it from there... it could be a good idea to investigate that.

Hope this helps...

_________________
http://www.robotecnik.com - robots, CNC and PLC programming.


Top
   
PostPosted: Thu Mar 23, 2017 11:21 am 
Offline

Joined: Wed Dec 28, 2016 11:00 pm
Posts: 18
Whenever you do something more then once in Excel, you should per definition automate it or use another tool ;-)
Have you ever thought of using Notepad++ ? Scripting for generating files and variables can be very well done in Notepad++
I use that standard in combo with Codesys 3.5. for exactly this reason.
Plus, Notepad++ can be used as a python editor also.

good luck!


Top
   
PostPosted: Mon Apr 17, 2017 2:48 pm 
Offline

Joined: Tue Feb 14, 2017 9:59 am
Posts: 14
Hello,

can you tell me how do you resolve this problem (Importing variable list into Codesys) please?

And thank you in advance


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

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 4 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