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 Sat Feb 16, 2019 10:17 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Fuzzy Logic C++ to ST
PostPosted: Mon Jan 21, 2019 7:12 pm 
Offline

Joined: Wed Dec 05, 2018 3:00 pm
Posts: 8
Hi All;
I have been translating the (open source) eFFL Fuzzy Logic library https://github.com/zerokol/eFLL from C++ to ST. I have attached a section of that translated work. Part of the reason for doing this is to reacquaint myself with the ST language.

The persistent problem is that, while the code compiles without errors or warnings, the simulator balks at a download with error: "C0367 Internal error 3 prohibiting online change! Clean application and download necessary". Cleaning the application makes no difference. I have been unable to track down the cause of the error and was hoping to find some help from someone who might have a better grasp of OOP principals as applied to CODESYS. There is a possibility of a call to an un-instantiated object, but i haven't found where.

An additional question i have is about the CODESYS "NULL" definition. The code compiles with NULLs, but the editor doesn't appear to recognize it as a defined symbol. I have tried replacing all the NULLs with a numeric '0' - this also compiles without errors, but made no difference to the download.

Any clues to getting this running would be appreciated.
Thanks,
Jeff

EDIT 1: Changed attached file to .project
EDIT 2: Corrected .project file attached


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


Last edited by truly_bent on Tue Jan 29, 2019 5:38 pm, edited 6 times in total.

Top
   
PostPosted: Tue Jan 22, 2019 11:14 pm 
Offline
Frequent User
Frequent User

Joined: Thu Jun 14, 2007 9:49 am
Posts: 986
a null is not equal to a zero, null is nothing mostly 00 hex and a null is a symbol

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


Top
   
PostPosted: Wed Jan 23, 2019 7:08 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3143
Hi,

you need to attach the .project file not the opt files…!
BR
Edwin


Top
   
PostPosted: Wed Jan 23, 2019 12:47 pm 
Offline

Joined: Wed Dec 05, 2018 3:00 pm
Posts: 8
Thanks Edwin.
Find attached .project file in the edited post above


Top
   
PostPosted: Tue Jan 29, 2019 5:44 pm 
Offline

Joined: Wed Dec 05, 2018 3:00 pm
Posts: 8
It took a bit of head scratching, but the solution presented itself eventually.
In a few cases, I was creating new objects like this:

IF ((aux := __NEW(fuzzySetArray)) = 0) THEN
// do something
END_IF

If the object creation is taken out of the IF statement, like this:

aux := __NEW(fuzzySetArray);
IF (aux = 0) THEN
// do something
END_IF


...then the download fault disappears and the simulator is ready to run.

Find the corrected (..._A.project) file attached to the first post above.
Jeff


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: Andreas Kehrer and 3 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