CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Wed Oct 18, 2017 11:06 pm

All times are UTC+01:00




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

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

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:

=CoDeSys|'C:\DCP.pro'!pwd_enter

I used to run similar DDE connection without any problems.

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


Top
   
 Post subject:
PostPosted: Fri Jun 26, 2009 5:25 pm 
Offline
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:\test.pro'!PLC_PRG.sMyData

_________________
Thanks,
Steve Pfeifenroth


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

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\BL20_OPC.pro'!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


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

*********************


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

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


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

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 TestV2.pro'!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.


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

All times are UTC+01:00


Who is online

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