CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Tue Oct 17, 2017 2:41 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu May 11, 2017 7:41 pm 
Offline

Joined: Mon Apr 10, 2017 11:34 am
Posts: 5
Hi all.

File reading/writing seems to be a really challenging thing on Codesys: libraries are not well documented, frequently they are not in sync with their last documentation, and examples are really rare to find.

In this forum I found @ viewtopic.php?t=5575 an example of async reading. For sake of semplicity I'll attach the project below.

I've some questions:
1) where in the code am I supposed to read data? Maybe in the STATE_CATCHEVENT section?
2) since data seem to be stored in the "event" ARRAY, I should be able to read the whole array at time, right?
if this is true, is there any sup limitations to its size?

The most important thing, however, is that I still have not managed to run correctly this program; simply it gets stuck at STATE_READ because "state" variable is always 0 and never changes. Why?
Maybe there are some problems in the Task configuration? It seems to use the task name for doing strange things; I've set the taskName variable according to the task's name but doesn't work. Have I to set event-based task or something like this?

Please, since I'm relatively new to Codesys I'd like to have a complete answer on this problem, especially if a real solution is found.

Best regards,
Luigi Ferrara.


You do not have the required permissions to view the files attached to this post.


Top
   
PostPosted: Fri May 12, 2017 3:43 pm 
Offline

Joined: Mon Apr 10, 2017 11:34 am
Posts: 5
For those interested,

synchronous reading/writing worked for me, take a look @ viewtopic.php?f=11&t=7847.

Luigi Ferrara


Top
   
PostPosted: Fri May 12, 2017 4:52 pm 
Offline

Joined: Fri Feb 10, 2017 6:12 am
Posts: 17
Try to update the CoDeSys and the libraries.


You do not have the required permissions to view the files attached to this post.


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

All times are UTC+01:00


Who is online

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