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 » File IO on Lego Mindstorm(File IO Lego)
File IO on Lego Mindstorm [message #1831594] Mon, 24 August 2020 14:05 Go to next message
Mario Krizic is currently offline Mario KrizicFriend
Messages: 38
Registered: April 2019
Member
Hello, I am trying to persist some information in a json file during runtime and then read it next time I boot. I read the documentation and found this:
https://www.eclipse.org/4diac/en_help.php?helppage=html/parameters/parameters.html#ev3_custom_parameters

Is there any information on how to implement these or can somebody point me to a Lego Mindstorms implementation?

Thank you in advance!

Re: File IO on Lego Mindstorm [message #1831698 is a reply to message #1831594] Wed, 26 August 2020 19:40 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Hi Mario,

as pointed out by this bug report [1] these FBs are already implemented in 4diac FORTE. The only thing that is missing are the according SIFB types in 4diac IDE. By looking at the Cpp code you should be able to reconstruct the interface for these FBs rather easily. I hope this helps.

Cheers,
Alois

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=547248
Re: File IO on Lego Mindstorm [message #1831717 is a reply to message #1831698] Thu, 27 August 2020 11:30 Go to previous messageGo to next message
Mario Krizic is currently offline Mario KrizicFriend
Messages: 38
Registered: April 2019
Member
Hello Alois,

Thank you. I have found the library containing all functionality I need in module lmsEV3, but I struggle to compile it for windows to get it as a FB type in the IDE.

The issue I have is processinterface.cpp wants to include linux/input.h, which does not work as I am using a Windows machine. What is the recommended way of compiling this module into a Win32 Forte build?

I can compile it without problems on the EV3, but I cannot use it unless I have it in my IDE. Is there maybe another way to accomplish this?

Thank you in advance!
Re: File IO on Lego Mindstorm [message #1831719 is a reply to message #1831717] Thu, 27 August 2020 12:51 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

you don'T need to compile it under windows. You need to create your own fbt files -> new -> FB TYpe -> SIFB type and store it somewhere in your project.
Re: File IO on Lego Mindstorm [message #1831723 is a reply to message #1831719] Thu, 27 August 2020 13:49 Go to previous messageGo to next message
Mario Krizic is currently offline Mario KrizicFriend
Messages: 38
Registered: April 2019
Member
Thank you very much it works!

I took the information for the block from the lms_ev3 module and added INIT/INITO events and then pulled it into the editor.

Would it make sense to have a general interface which modules then implement depending on the device they're running on?

EDIT: In order to use data values from other blocks or to send them it is necessary to connect the events and data using a with construct

[Updated on: Thu, 27 August 2020 13:51]

Report message to a moderator

Re: File IO on Lego Mindstorm [message #1831839 is a reply to message #1831723] Mon, 31 August 2020 16:11 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

First of all great that it worked out for you!

Mario Krizic wrote on Thu, 27 August 2020 13:49
Thank you very much it works!
Would it make sense to have a general interface which modules then implement depending on the device they're running on?

I'm not sure we don't have a files system on all devices. But I would expect most future devices to get some kind of file system so having some basis infrastructure could be nice.
Previous Topic:FORTE and uC-OS (open-source now)?
Next Topic:opc ua forte on Raspberry pi
Goto Forum:
  


Current Time: Thu Apr 25 02:00:14 GMT 2024

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

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

Back to the top