Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » Issues while defining Internal Variable By "VAR "(Error showing while difining a REAL variable by "VAR ")
Issues while defining Internal Variable By "VAR " [message #1803043] Thu, 21 February 2019 12:26 Go to next message
Manas Das is currently offline Manas DasFriend
Messages: 13
Registered: January 2019
Junior Member
Dear Sir,
I am trying to create a PID FB in 4DIAC as explained here :https://www.eclipse.org/4diac/documentation/html/examples/pidMotor.html

But while defining variables for "REQ" algorithm as

VAR
proportionalPart: REAL;
END_VAR

is giving me error.(as cross red)
PFA for the screenshot.

Do i have to define the the variables as "REAL" as in RESET before using it in "VAR".
Please clarify.

Regards,
Manas
Re: Issues while defining Internal Variable By "VAR " [message #1803051 is a reply to message #1803043] Thu, 21 February 2019 13:43 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1582
Registered: January 2014
Senior Member

Dear Manas,

We also found this issue [1]. It has already been fixed in the code and will be made available in the next maintenance release (1.10.2).

In the meantime you can just ignore the error message. Everything should work correctly.

Sorry for the inconvenience,
Alois


[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=543888
Re: Issues while defining Internal Variable By "VAR " [message #1803343 is a reply to message #1803051] Wed, 27 February 2019 07:46 Go to previous messageGo to next message
Manas Das is currently offline Manas DasFriend
Messages: 13
Registered: January 2019
Junior Member
Dear Sir,
Thanks. It worked.

Now , I have a PID FB ready. But while testing the PID FB by "FBTester",
i got the error of "Connection Refused".

PFA for the screenshot.

Regards,
Manas
Re: Issues while defining Internal Variable By "VAR " [message #1803347 is a reply to message #1803343] Wed, 27 February 2019 08:44 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1582
Registered: January 2014
Senior Member

Hi,

connection refused typically happens when someone is already connected to your 4diac FORTE instance. Do you have monitoring connected to the same 4diac FORTE instance you use for testing your FB? Or maybe it could also be that a 4diac FORTE is not running.

Cheers,
Alois
Re: Issues while defining Internal Variable By "VAR " [message #1803517 is a reply to message #1803347] Sat, 02 March 2019 10:14 Go to previous messageGo to next message
Manas Das is currently offline Manas DasFriend
Messages: 13
Registered: January 2019
Junior Member
index.php/fa/34996/0/

Hello,

I checked with every possible methods but the "FBTester" doesn't work for PID FB.
Each time it has the same error of "Connection Refused".

But anyhow, tried implementing a model with PID FB but the again it's throwing some
error after the "Deploy" option.

PFA screenshots for the error messages and also the model having PID FB included.

I doubt if the PID FB itself has some issues ?

Regards,
Manas

[Updated on: Sat, 02 March 2019 10:15]

Report message to a moderator

Re: Issues while defining Internal Variable By "VAR " [message #1803520 is a reply to message #1803517] Sat, 02 March 2019 16:31 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1582
Registered: January 2014
Senior Member

This is strange. Would you mind sending me your PID so that I could test it in the FB Tester myself?

The other error is an OPC UA error it looks like you are publishing and subscribing to the same node. I don't think that is waht you inteded, isn't it?
Re: Issues while defining Internal Variable By "VAR " [message #1803530 is a reply to message #1803520] Sun, 03 March 2019 08:58 Go to previous messageGo to next message
Manas Das is currently offline Manas DasFriend
Messages: 13
Registered: January 2019
Junior Member
Sure, PFA PID_1.fbt for the PID FB.
Here is the procedure i followed for creating & adding a new FB in 4DIAC
1.Create & export it to a new folder e.g. folder named as control
2.copy the PID.c and PID.h to forte/src/modules/ext_modules and create a CMakeLists.txt
in the same folder.
3.Open Cmake and point this folder(/home/manas/4diac/forte/build/src) to build the binaries
4.Then go inside /home/manas/4diac/forte/build/src and execute make.

Is this the correct sequences to be followed?

About the OPC UA error, this is what i got

ERROR: T#7279: OPC UA: Got invalid port connection on FB PUBLISH_1 at port SD_1. It must be connected to another FB.
Is it that SD_1 it must be connected to another block other than PID?
Here what i am trying to achieve is
1.Values from OpenModelica will received at RD_1 of SUBSCRIBE_1
2.Output from PID will be available at SD_1 of PUBLISH_1 to be given to OpenModelica.

So, is the model correct on 4DIAC?

Regards,
Manas
  • Attachment: PID_1.fbt
    (Size: 5.23KB, Downloaded 158 times)
Re: Issues while defining Internal Variable By "VAR " [message #1803531 is a reply to message #1803530] Sun, 03 March 2019 10:49 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1582
Registered: January 2014
Senior Member

Thanks for the extend explanation. The problem is that your FB is not compiled into 4diac FORTE. Thereofre you get all these error messges. I assume that the error message in deployment is UNSUPORTED_TYPE. Please for the next time add also this error message to your report. This would have helped my a lot to find the problem.

So coming back to your problem. After you are adding a new module you need to add enable this module also in your CMake configuration. See the section on external modules in the build forte docs for details [1].

In this docs we also have a recommendation for your folder structure. That I would also strongly recommend for you: Please keep the official 4diac FORTE code separated from your own FBs and code. This makes it easier for you to update both independently and you can put your stuff more easily into a code repo. Therefore we currently recommend the following structure:

 your_forte_working_dir
    |- build               //here the different builds are placed
    |     |- target1 
    |     |- target2
    |- forte source code  //the unchanged forte source code either checked out from git or one of the releases
    |- ext_modules // here your modules are placed. one subdir per module
         |- control 
         |     |- CMakeList.txt
         |     |- PID.h
         |     |- PID.cpp
         |- other_module


I hope this helps,
Alois

[1] https://www.eclipse.org/4diac/en_help.php?helppage=html/installation/install.html#externalModules

[Updated on: Sun, 03 March 2019 10:50]

Report message to a moderator

Re: Issues while defining Internal Variable By "VAR " [message #1803778 is a reply to message #1803531] Sat, 09 March 2019 11:25 Go to previous messageGo to next message
Manas Das is currently offline Manas DasFriend
Messages: 13
Registered: January 2019
Junior Member
Hello Sir,

Thanks. Now the UNSUPORTED_TYPE IS RESOLVED and i could able to "DEPLOY" the model with PID FB.
PFA for the screenshot of the console after deployment.
index.php/fa/35031/0/

But after deployment, while monitoring, the values are properly showing
for other blocks but for PID block the values are showing as "N/A" though all the
values were defined for PID FB.

PFA screenshot for the console message with model.
index.php/fa/35032/0/
Re: Issues while defining Internal Variable By "VAR " [message #1803800 is a reply to message #1803778] Mon, 11 March 2019 06:38 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1582
Registered: January 2014
Senior Member

Intersting. What is the output in the deployment console
Re: Issues while defining Internal Variable By "VAR " [message #1803802 is a reply to message #1803800] Mon, 11 March 2019 07:10 Go to previous messageGo to next message
Manas Das is currently offline Manas DasFriend
Messages: 13
Registered: January 2019
Junior Member
This is the output on the deployment console.

index.php/fa/35039/0/
Re: Issues while defining Internal Variable By "VAR " [message #1803803 is a reply to message #1803802] Mon, 11 March 2019 07:28 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1582
Registered: January 2014
Senior Member

No i meant the output of the deployment xml messages in the deploymemt perspektive.

The Screenshots you attached is the console of 4diac FORTE, which is shown when you run 4diac FORTE inside of 4diac IDE.
Re: Issues while defining Internal Variable By "VAR " [message #1803804 is a reply to message #1803803] Mon, 11 March 2019 07:52 Go to previous messageGo to next message
Manas Das is currently offline Manas DasFriend
Messages: 13
Registered: January 2019
Junior Member
Here is some part of the messages of the deployment console.
i think error messages are there for PID FB.
PFA.
index.php/fa/35040/0/
Re: Issues while defining Internal Variable By "VAR " [message #1803813 is a reply to message #1803804] Mon, 11 March 2019 12:15 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1582
Registered: January 2014
Senior Member

Th important error is the "UNSUPPORTED_TYPE" error. This tells that you still have a 4diac FORTE running where your PID_Control FB is not compiled into 4diac FORTE. Maybe you have launched the wrong 4diac FORTE. This is something that happens to me a lot.
Re: Issues while defining Internal Variable By "VAR " [message #1804086 is a reply to message #1803813] Mon, 18 March 2019 05:47 Go to previous messageGo to next message
Manas Das is currently offline Manas DasFriend
Messages: 13
Registered: January 2019
Junior Member
Thanks, it works now.

How to define and give Step Input, Sine/Cos input to the IN1 of F_SUB FB? The F_SIN/F_COS block
has one IN port. What is the use of that IN Port.
PFA for the F_SUB FB i am using in the model.
index.php/fa/35082/0/
Re: Issues while defining Internal Variable By "VAR " [message #1804108 is a reply to message #1804086] Mon, 18 March 2019 14:32 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1582
Registered: January 2014
Senior Member

Could you be so kind and let us know how you solved the issue. Do we need to improve the documentation here?

If I understand your question correctly I think the only solution that comes to my mind is to implement own function blocks which will be triggered to update the setpoints for your control. The simplest implementation for a step function would be to use an F_ADD with the values 0 and your desired step value which is only triggered when the step should occur.

the F_SIN, ... FBs are the ported functions as defined in IEC 61131-3. They take as input an angle and provide as output the according sin, cos, etc value. I think for what you want an own FB which can be configured in frequency and amplitude is needed. This FB would internally use then the SIN or COS functions.

I hope this helps,
Alois
Re: Issues while defining Internal Variable By "VAR " [message #1804445 is a reply to message #1804108] Tue, 26 March 2019 08:33 Go to previous messageGo to next message
Manas Das is currently offline Manas DasFriend
Messages: 13
Registered: January 2019
Junior Member
Thanks.

Actually, i had two different versions of 4DIAC installed and using the wrong-one.
By using the correct one, the UNSUPPORTED_TYPE error was resolved.
For me, the documentation is good enough to be followed.

Regards,
Manas
Re: Issues while defining Internal Variable By "VAR " [message #1804489 is a reply to message #1804445] Tue, 26 March 2019 20:53 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1582
Registered: January 2014
Senior Member

Thanks for letting us know.
Previous Topic:build os image for wago pfc100 series PLC
Next Topic:Limitation for using PUBLISH_1
Goto Forum:
  


Current Time: Fri Apr 19 20:23:04 GMT 2024

Powered by FUDForum. Page generated in 0.05123 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top