CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version Spanish version French version
It is currently Fri Apr 25, 2014 12:48 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Aug 06, 2013 2:56 pm 
Offline
User avatar

Joined: Wed Mar 20, 2013 3:35 pm
Posts: 6
Location: Mishawaka, IN
Our company has recently adopted the ABB PLC units (AC500 PLCs) which run exclusively on CoDeSys 2.3.9.

We've been consulting the manual within the software and have a copy of the CoDeSys manual on hand for programming. We've created a number of applications so far that have gone over really well. We do have some advanced questions that may require further documentation or consultation, hopefully someone here can help.

We'd like to be able to create our own function blocks and libraries. Unfortunately there is no documentation for this process within the manual (unless I've missed it).

Any help, samples or even direction would be great.

_________________
Craig Chamberlin
Applications Engineer
Information Technology Manager

Precision Electric, Inc.
1508 West Sixth Street, Mishawaka IN 46544
P: 574.256.1000
F: 574.255.7394
E: craig@precision-elec.com
S: http://www.precision-elec.com


Top
 Profile  
 
PostPosted: Tue Aug 06, 2013 4:50 pm 
Offline
Frequent User
Frequent User

Joined: Thu Jun 14, 2007 9:49 am
Posts: 642
Location: holland
creating a function block is easy.
go to POU on left lower tab
add object

example
give it a name (testblock)
and a type (Function block)
and a language (ST)

type in the first programline:
output1:=input1+input2;
now you have to declare the VARs with the declare assistant.
input1 is not a simple VAR but a input. all type is REAL
output1 is an output.

now you have made a simple adder as a FB.

examples of function blocks can be found at www.oscat.de in german and english. download the version2 in lib and in txt and as pdf
this will give you a lot of reading.

When you have a lot of FB made you can put them in a lib. but for now just use a standard program and clean the PLC_PRG so you will keep your FB.
i sometimes export them and then i can import them in a new program, just the ones i need.

and yes we will try to give all the help you need.
and yes the docs are not very good. i would love when they would have a talk with some users to upgrade the manual.

_________________
shooter@home.nl
computer shooter
paul deelen
jacob van wassenaerstraat 29
NL 5224 GG 's-Hertogenbosch
skype paul.deelen
phone +31736139136


Top
 Profile  
 
PostPosted: Tue Aug 06, 2013 7:23 pm 
Offline
User avatar

Joined: Wed Mar 20, 2013 3:35 pm
Posts: 6
Location: Mishawaka, IN
Thank you for taking the time to reply to my question.

Your instructions on building function blocks worked really well.

We will eventually look into making our own libraries but for now we will simply export the objects as you suggested.

The documentation doesn't really have much practical application to it. It would be nice if there were sample programs that could be viewed, compiled and executed so that we can learn from them. The in the IT programming world this practice is well established. Users are walked through a basic hello world (output application) and then walked through basic variable declaration, program execution and mathematical functions.

I'm surprised CoDeSys hasn't really hammered any of these out yet. If I had the expertise, I would do it myself, but I am just starting to learn. Getting ahold of decent documentation seems to be extremely difficult at this time.

_________________
Craig Chamberlin
Applications Engineer
Information Technology Manager

Precision Electric, Inc.
1508 West Sixth Street, Mishawaka IN 46544
P: 574.256.1000
F: 574.255.7394
E: craig@precision-elec.com
S: http://www.precision-elec.com


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

All times are UTC [ DST ]


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 Group