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 » compiling error with ev3dev parameters code(compiling error with ev3dev parameters code)
compiling error with ev3dev parameters code [message #1803754] Fri, 08 March 2019 11:35 Go to next message
abc xyz is currently offline abc xyzFriend
Messages: 14
Registered: December 2018
Junior Member
Hi All,

I am facing a problem during compiling the code of a SIFB with a cross compiler. How can I include the parameter features in a right way for ev3dev into SIFB because the cross compiler don't know about outB,motor,enable,QX etc. (https://www.eclipse.org/4diac/en_help.php?helppage=html/parameters/parameters.html#ev3). Should I add some wiring features or what should I add? The SIFB code and compiling error is shown in the attached pictures.

I would be nice if someone can upload an example project for ev3dev with 4diac FBs. Thanks.

Regard
Adeel
  • Attachment: 1.png
    (Size: 64.91KB, Downloaded 199 times)
  • Attachment: 2.png
    (Size: 85.20KB, Downloaded 193 times)
Re: compiling error with ev3dev parameters code [message #1803755 is a reply to message #1803754] Fri, 08 March 2019 11:42 Go to previous messageGo to next message
Martin Melik Merkumians is currently offline Martin Melik MerkumiansFriend
Messages: 117
Registered: March 2016
Senior Member
Hi Adeel,

based on what I see from your screenshots you have two errors,

The first is, that INs and OUTs are not direct variables, but hidden behind function calls. So instead of
outB.motor.enable(QX);
you have to write
outB().motor.enable(QX());
, assuming outB is also a IN or OUT of your FB.

The other thing is, that you FB definition seems to be wrong. Could it be that your INs and OUTs of your FB are missing from the C++ file? If yes first check our FB definition in 4diac-IDE and then reexport it.

Best regards,
Martin
Re: compiling error with ev3dev parameters code [message #1803764 is a reply to message #1803755] Fri, 08 March 2019 16:34 Go to previous messageGo to next message
abc xyz is currently offline abc xyzFriend
Messages: 14
Registered: December 2018
Junior Member
Thanks dear Martin for your quick response. Do you have some idea why the fuction blocks (BUTTON, MOTOR) are not initiating/starting? as you can see in attached screenshot 3. ev3 device is connected and forte is running on it.
  • Attachment: 3.png
    (Size: 74.81KB, Downloaded 183 times)
  • Attachment: 4.png
    (Size: 20.03KB, Downloaded 178 times)
Re: compiling error with ev3dev parameters code [message #1803767 is a reply to message #1803764] Fri, 08 March 2019 17:50 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1584
Registered: January 2014
Senior Member

hi,

I would recommend to not automatically start the E_CYCLE directly from the E_RESTART. The many E_CYCLE events are shadowing any other error message from init. Better for testing do not connect the START event of E_CYCLE and invkoe the START later from 4diac IDE with the trigger event feature. Regarding the initlisation problem: is the sensor or the actuature connected to your EV3?
Re: compiling error with ev3dev parameters code [message #1804019 is a reply to message #1803767] Fri, 15 March 2019 21:40 Go to previous messageGo to next message
abc xyz is currently offline abc xyzFriend
Messages: 14
Registered: December 2018
Junior Member
Thnaks dear Alois for your response,
I have found the reason that why the function block was not initialing.
Now, the FB is working and forte is also running on it. Thanks for your comments.

[Updated on: Sat, 16 March 2019 11:01]

Report message to a moderator

Re: compiling error with ev3dev parameters code [message #1804079 is a reply to message #1804019] Sun, 17 March 2019 18:35 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1584
Registered: January 2014
Senior Member

You are welcome. I'm sorry I've worked with EV3 yet, therefore I have no idea.
Re: compiling error with ev3dev parameters code [message #1804095 is a reply to message #1804079] Mon, 18 March 2019 10:23 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 199
Registered: February 2016
Senior Member
Can you explain what the problem was in case someone else has the same problem? An example with ev3dev can be found here:

https://www.eclipse.org/4diac/en_help.php?helppage=html/examples/pidMotor.html
Re: compiling error with ev3dev parameters code [message #1804106 is a reply to message #1804095] Mon, 18 March 2019 14:04 Go to previous messageGo to next message
abc xyz is currently offline abc xyzFriend
Messages: 14
Registered: December 2018
Junior Member
Hi,
There was actually two problems:
1.It is required to configure, generate and build the ev3 environment into the forte executable. if you are working with cmake then you will find a tick mark of FORTE_MODULE_LMS_EV3.
2.There is needed to correct the implementation code of processinterface.cpp file in /forte/src/modules/lms_ev3. The function name "pushBack" is needed to replace with standard call "push_back" from the c++ "vector" library.
if you do this then hopefully the function blocks will initialize.

Regard
Adeel
Re: compiling error with ev3dev parameters code [message #1804277 is a reply to message #1804106] Thu, 21 March 2019 17:11 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1584
Registered: January 2014
Senior Member

Hi,

thanks for the feedback. Yes we also noticed your 2nd problem. I'll try to get a fix into the 1.10.2 maintainence release.

BR,
Alois
Re: compiling error with ev3dev parameters code [message #1804766 is a reply to message #1804277] Sun, 31 March 2019 21:42 Go to previous messageGo to next message
abc xyz is currently offline abc xyzFriend
Messages: 14
Registered: December 2018
Junior Member
Hi dear Alois,

There is one more thing if you like to modify in the next release.
The output function block "QW" from "io" of general typelibrary of 4diac IDE has an input variable "OUT" of WORD type which accepts only positive values and not the negative. For example in case of ev3 Lego Mindstorm, if you want to use PWM (OUT= -100 to 100) for output signal then QW does not accept negative values by showing zero by default and the motor doesn't move in the reverse direction.
I have covered up this issue by changing the variable type from WORD to SINT in 4diac IDE and in forte corresponding replacing WORD by SINT in the QW.cpp and QW.h at forte/src/stdfblib/io.

Regard
Muhammad Adeel
Re: compiling error with ev3dev parameters code [message #1804841 is a reply to message #1804766] Tue, 02 April 2019 07:55 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1584
Registered: January 2014
Senior Member

Hi,

thanks for pointing that out. This is important to know. However the W in QW stands for WORD and is based on semantics defined in IEC 61131-3. Maybe we need to introduce more Q and I blocks for better handling such use cases.

Cheers,
Alois
Re: compiling error with ev3dev parameters code [message #1804975 is a reply to message #1804841] Thu, 04 April 2019 07:23 Go to previous message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 199
Registered: February 2016
Senior Member
Try using a F_INT_TO_WORD before the QW FB. This should do the conversion and later QW should do the backwards conversion.
Previous Topic:Access 4diac-IDE on browser
Next Topic:c++ SIFB code monitoring
Goto Forum:
  


Current Time: Wed Apr 24 18:30:51 GMT 2024

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

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

Back to the top