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 Sat Dec 07, 2019 6:31 pm

All times are UTC+01:00

Post new topic  Reply to topic  [ 7 posts ] 
Author Message
 Post subject: OPC/ DDE and Excel
PostPosted: Wed Jun 24, 2009 2:22 pm 

Joined: Mon Sep 10, 2007 7:27 pm
Posts: 4

I am trying to collect some data directly in Excel2003 from a Codesys based PLC always i am getting the error as "Cannot run CODESYS....."
The string (formula) i am using is the follow:


I used to run similar DDE connection without any problems.

Can anybody advise if i am doing something wrong? Thank you!

 Post subject:
PostPosted: Fri Jun 26, 2009 5:25 pm 
Frequent User
Frequent User

Joined: Mon Jul 25, 2005 8:06 pm
Posts: 295
In Excel 2008 I get the same error unless I start CoDeSys and the application running first before I run excel. Also it seems the full path to your variable looks strange? Shouldn't it at least be .pwd_enter or PLC_PRG.pwd_enter of something like that? It is working for me on Excel 2008 using the following formula

= CoDeSys|'C:\'!PLC_PRG.sMyData

Steve Pfeifenroth

 Post subject: Re: OPC/ DDE and Excel
PostPosted: Tue Mar 12, 2013 9:15 am 

Joined: Mon Mar 11, 2013 3:45 pm
Posts: 4
Hello everyone,

I'm sorry to wake this old subject again but I have been struggeling with the same thing now for a few days.
I'm completely new to OPC handeling, so please forgive my ignorance.

I have setup the OPC-server for Codesys 2.3 and got it running with several clients (Matrikon, Softing, SST). However I would like to do a better user interface and datacollecting in Excel.

Several hours of googleing and I'm still not closer to my goal, so I humbly come to you...

I have tried Matrikons Excel Reporter, which put an add-on into Excel. This worked so far as to I was able to write to the items/variables, but not to read.
And also, this is a licensed software and for my application that's not an option.

I tried what spfeif wrote here, but the formula was not accepted by Excel. The basic formula as I enterpret it is "=(*name of installed program?*) | 'pathway to my program'!(*item search path*)
in my case when i try to access a global variable it should look like =CoDeSys|'C:\test\'!PLC_PRG.Test_OPC
These are the errors i get;
"Remote data not availible, another program has to start to access the data" (or something like it, translated from my native language)
"do you want to start the program CODESYS.EXE?"
[Yes][NO] (yes)
"CODESYS.EXE cannot be run. The program or its components are damaged or missing"

I have tried to change the path to the Codesys.exe (c:\programs.... \codesys.exe) but to no avail.

I'm using Excel 2010 (if that matters) on a Win7 OS computer.

Please let there be someone who knows how to do this....

Thanks, br Christoffer

I got it working with a VB-script in Excel!


 Post subject: Re: OPC/ DDE and Excel
PostPosted: Mon Jul 01, 2013 2:22 pm 

Joined: Fri Jun 15, 2012 1:35 pm
Posts: 1
since i will start soon with this isue and really dont want to discover the weel again in excel.
would u be so kind to shre the vb snippet it would help a lot when i start

 Post subject: Re: OPC/ DDE and Excel
PostPosted: Wed Dec 07, 2016 6:01 pm 

Joined: Fri Oct 07, 2016 12:30 pm
Posts: 1
I'm running windows 7 with v2.3 and had the same problems. I still can't pull in variables from the DDE Server but I got it to work through Codesys. I took PLC_PRG off of my variable and it started working. =CoDeSys|'N:\Machine List, Standards & Controls\Paint Line\PLC\CoDeSys\Programs\Powder Line Test\Powder Line'!Variable. See if this works for you guys. I would like to get this working through the DDE Server but I haven't had any luck so far. Just make sure you are logged in to your program through CoDeSys.

 Post subject: Re: OPC/ DDE and Excel
PostPosted: Thu Dec 07, 2017 6:09 pm 

Joined: Wed Dec 06, 2017 5:03 am
Posts: 1
Dear All,

I need to make read /write in excel sheet from my plc which has codesys platform. I understood from posts that I need to write VB script in excel sheet for read and write ; and use formula in excel sheet .Can I anyone tell me : 1) what is use of codesys DDE SERVER here??Do we need to configure DDE server also?? If yes then how??

 Post subject: Re: OPC/ DDE and Excel
PostPosted: Fri Dec 08, 2017 11:48 am 
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3562
wich CODESYS Version and which plc are you using?
There is an OPCUA posibility if this is supported by your plc.


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

All times are UTC+01:00

Who is online

Users browsing this forum: No registered users and 1 guest

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