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 Sun Aug 18, 2019 6:02 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri Jun 28, 2019 11:32 am 
Offline

Joined: Tue Jun 04, 2019 4:53 pm
Posts: 2
Hi all,
I imported the ESI file of my device (it's an inverter) in my project.
Automatically an ETCSlave instance was generated by the system.

To manage this inverter I would like to create an FB that accept as inout the whole ETCSlave but, internally in my FB, I don't know how to handle the in/out of my ETCSlave.

I tried with the pointers to input/output data (".InputData" and ".OutputData") but it seems that I just have read access in this way (may be I'm wrong!)

There is any way to do this?
Thank you in advance for any kind of help!


Top
   
PostPosted: Fri Jul 05, 2019 7:36 pm 
Offline

Joined: Mon Oct 01, 2012 8:33 am
Posts: 53
Define an input parameter (eg Slave) of type ETCSlave. he inside the FB you an access the ETCSlave instance using Slave.Parameter, Slave.Method(...), etc.


Top
   
PostPosted: Wed Jul 10, 2019 11:30 am 
Offline

Joined: Tue Jun 04, 2019 4:53 pm
Posts: 2
Thank you for your answer...of course it's what I tried to do!
The point is that if the slave has (suppose) a given ethercat i/o mapping:

%QW0
%QW1
...
...
%IW0
%IW1

It seems there's no way to access the i/o data of the ETCSlave passed as in/out parameter at the FB from inside the FB itself.

It's not difficult to find a workaround for this...but I would like to create an FB that hide all the implementation details to the programmers that will use it in the future!
Thank you again!
Ciao!


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