Codesys TON Extension, doesn't run

theColonel26

Lifetime Supporting Member
Join Date
Feb 2014
Location
West Michigan
Posts
784
Using Codesys 3.5 SP15



So I extended the standard TON function block as follows
http://www.plctalk.net/qanda/attachment.php?attachmentid=52942&stc=1&d=1577037174
The problem it doesn't run and I am really confused as to why



And then I create a wrapper around TON instead, like this
http://www.plctalk.net/qanda/attachment.php?attachmentid=52943&stc=1&d=1577037174
and the wrapper works fine


here is a video of them both "running" side by side

https://drive.google.com/open?id=1hHS4xCB1wGKL1ibBhoxLEW3mw3hFIJGd

2019-12-22 01-49-24 CL-BEN-LAPTOP.png 2019-12-22 01-48-51 CL-BEN-LAPTOP.png
 
You replaced the function block call without calling the original function block.

In ST, you would add this line to your extended function block:
SUPER^();

Maybe in ladder you either insert an execute block and call SUPER^(); or insert a block with EN/ENO for SUPER^?
 
You replaced the function block call without calling the original function block.

In ST, you would add this line to your extended function block:
SUPER^();

Maybe in ladder you either insert an execute block and call SUPER^(); or insert a block with EN/ENO for SUPER^?
:geek: Thank you I didn't know I needed to call the base FB.



I created a BOX call and set the type to SUPER^


More Codesys questions coming. I am loving it so far. RS 5000 is icky.


I used Codesys 2.3 Years ago and liked it. Haven't had an opportunity to use 3.5 until now.

2019-12-22 14-55-06 CL-BEN-LAPTOP.png
 

Similar Topics

Does anyone know of a library that already has a implemented RTO? I was going to write my own but I'd rather not take the time.
Replies
35
Views
11,188
Hi there, We have a German machine with an Eaton XC-202 plc. I purchased the X-soft CoDeSys software and XT-SUB-D/RJ45 cable for programming...
Replies
3
Views
4,052
Hi, I am learning CoDeSys and my first attempt is to program a simple or statement to turn on an output using ladder diagram. I have completed...
Replies
5
Views
13,311
Hello, I am using a Hitachi Micro EHV+ for a small project, and I wanted to have a Web visu, done with Codesys V3.5 SP13 Patch 2. I test the...
Replies
6
Views
267
Hello, I have a requirement to manage the text alignment dynamically. So, for example: 1. English Texts should be displayed from Left in...
Replies
0
Views
86
Back
Top Bottom