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 » Forte Runtime for a PLC(Process for creation of a new Forte RTE)
Forte Runtime for a PLC [message #1790178] Wed, 06 June 2018 14:05 Go to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member

Dear 4Diacs,

I have a PLC for which I am planning to create a Forte RTE on which
my designated Control App which is made in Eclipse 4Diac IDE would
run.
Please suggest how one can go about creating a Forte Runtime Environment
for a PLC which has its own Function Blocks. Can the generic Function
blocks provided by 4Diac be used to program a proprietary PLC and
can one setup a RTE for the same.
Any help on even the procedure would be highly appreciated.

Regards,
Ken
Re: Forte Runtime for a PLC [message #1790179 is a reply to message #1790178] Wed, 06 June 2018 14:12 Go to previous messageGo to next message
Martin Melik Merkumians is currently offline Martin Melik MerkumiansFriend
Messages: 117
Registered: March 2016
Senior Member
Hi Kenneth,

please provide more inforamtion. What type of PLC/platform? Is a C++ compiler available for the platform?
"Can the generic Function blocks provided by 4Diac be used to program a proprietary PLC and can one setup a RTE for the same." - Probably not, given on your information, as the function block model of classic PLCs differ from the IEC 61499 model. Again this question is strongly dependent on the PLC and PLC software you are using. If there is an available interface for the PLC to program it from remote and if you are willing to modify 4diac to also support IEC 61131 FBD it would be possible.

Best regards,
Martin
Re: Forte Runtime for a PLC [message #1790186 is a reply to message #1790179] Wed, 06 June 2018 15:59 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi,

maybe to add one thing to martins comment: In order to make a PLC programmable from 4diac-ide we need to port the 4diac run-time environment FORTE to the PLCs. This requires that a C++ compiler is available for the PLC (nowadays normally a dedicated gcc version) and that we can somehow upload and run this ported FORTE executable on the PLC. This is possible with many modern PLCs and we are happy to support you and if possible add it to our list of supported PLCs.

Cheers,
Alois
Re: Forte Runtime for a PLC [message #1790300 is a reply to message #1790186] Fri, 08 June 2018 07:23 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Thank you Martin, Alois for your detailed answers.

I am looking at the path suggested by Alois, ie. to create a Forte RTE
for the PLC and compile and upload the application to run in the
Forte RTE.

Martin: If there is an available interface for the PLC to program it from remote..

Please elaborate on these points. My understanding is so the PLC has to expose an interface that I can program which means I still use the
PLCs FBS...and so 4diac cannot help??

Martin: willing to modify 4diac to also support IEC 61131 FBD it would be possible.

I am very new to 4Diac and 61131 and 614199...so if I understand this correctly 614199 is not compatible with 61131 and so I put in an effort to
add 61131 FBs to 4Diac?.

Alois:..This requires that a C++ compiler is available for the PLC (nowadays normally a dedicated gcc version)

What is the need for a C++ compiler specifically made for a PLC.

Alois: This is possible with many modern PLCs and we are happy to support you and if possible add it to our list of supported PLCs.

Currently i am assigned a task to see how ..given a PLC one can create
an application using the function blocks of 4DIAC to program a PLC which has its own function blocks and then get it running on the PLC.

I noticed that sysfs is being used for raspberry pi and the GPIOs outputs
are being read via the memory addresses.

So how do i got about ascertaining which method to use to program
and read the IOs of PLC.

Thanks
Ken



Re: Forte Runtime for a PLC [message #1790317 is a reply to message #1790300] Fri, 08 June 2018 10:28 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi Kenneth,

wow this is quite a list of questions. I'll try my best to answer them.

First of all I think it is important to point out that 4diac is an IEC 61499 implementation. IEC 61499 builds on top of IEC 61131-3 (i.e., the standard defining classical PLC programming languages). Although IEC 61499 builds on IEC 61131-3 it is not fully compatible. A good overview on both standards can be found on wikipedia [1, 2].

With that you can currently not take 4diac-ide to configure a PLC coming with its on run-time environment and set of FBs. Extending 4diac-ide for that would be quite an effort. Especially 4diac would need to know how to generate and download PLC configurations for your specific PLC.

The way 4diac took was to develop an own IEC 61499 run-time environment providing all the execution elements needed for executing IEC 61499 FBs. This execution environment assumes that there is a kind of operating or real-time operating system available on top of which the 4diac run-time environment, which we called FORTE, runs. To bring FORTE to a PLC as said above you need to compile FORTE for with a compiler dedicated for your hardware. Typically this means which processor the PLC has (e.g., arm, i386, SH, ...) and what operating system if any is available. Therefore for a specific PLC that means that you need some information on the internal structure of the PLC.

For example the Bosch PLC uses an intel chip with vxWorks. Therefore you need a gcc for intel and vxworks to compile a FORTE version for this PLC. The resulting binary is then loaded onto the PLC and executed there.

On the Wago PLC PFC 200 we have a Linux operating system with arm processor. Therefore the compiler is a gcc for arm and linux. We use the classical sftp to copy the FORTE binary there and can then execute it.

The IO access is also something very specific for the respective PLC and has to be implemented given the avaialbe means (e.g., Wago provides a library for accessing IO modules).

I hope this gives you a better idea on how the process works. Maybe a good starting point could be to make some experiments with 4diac on your PC or with a raspberrypi. I think this gives you a better idea on the capabilities and limitations of our environment.

If you can give us more information on the PLC maybe can even better support you. However I understand that you may don't want to disclose this in public. You can also send this to me in a private message if you like.

Cheers,
Alois



[1] https://en.wikipedia.org/wiki/IEC_61131-3
[2] https://en.wikipedia.org/wiki/IEC_61499
Re: Forte Runtime for a PLC [message #1790449 is a reply to message #1790317] Mon, 11 June 2018 09:24 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi Alois,

Thank you for providing all the answers. It was valuable in understanding
the concepts and processes being used.
I have installed 4Diac on my laptop which is running Windows 10 64 bit.

Conceptually how does one create a graphical representation for a new
function block and how does one generate C/C++ code for the same.
Not looking for anything elaborate. Just the idea behind doing it

(I read somewhere in the documentation that it is not possible to add
the graphical represantation for a new function block( unsure pls conf ??) )

I have installed Mingw64 and using GUI of CMake to build the Forte exe
but it is not able to execute the make.exe. So this is a bottleneck for doing
research for me.

Thank you once again for all the assistance.

Regards,
Ken
Re: Forte Runtime for a PLC [message #1790485 is a reply to message #1790449] Mon, 11 June 2018 15:45 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi Kenneth,

please have a look at the 4diac tutorials. Their you should find a detailed description on how to develop your own FBs with 4diac.

Regarding your make problem. The Mingw installer normally allows you to select also a make tool to install. Sometimes you have to add the path to mingw (e..,g C:\mingw64\bin) to the PATH environment variable.
Re: Forte Runtime for a PLC [message #1790503 is a reply to message #1790485] Tue, 12 June 2018 02:45 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi Alois,

I have been able to install Minggw on my laptop and got Cmake 3.11.3 gui version to make it run.
But the executable that i get has the name a.exe and is 48 kb and didnt work when i ran it
under eclipse 4diac.
I followed the exact configuration settings provided in the tutorial clicked on configure
and then on generate for obtaining the exe file.
But the blinking test app did not run in deployment console with this exe.
Can you suggest if I missed out something.

Then I started looking for old versions of 4diac and unzipped 4diac 1.3.3 and used the
forte.exe packaged with it.
When i ran the blinking test tutorial under it...this is the response I got in the deployment console.

<!-- 127.0.0.1:61499 -->
<Request Action="CREATE" ID="24">
<FB Name="EMB_RES" Type="EMB_RES"/>
</Request>

<Response ID="24"/>


<!-- 127.0.0.1:61499: EMB_RES -->
<Request Action="CREATE" ID="25">
<FB Name="E_CYCLE" Type="E_CYCLE"/>
</Request>

<Response ID="25"/>


<!-- 127.0.0.1:61499: EMB_RES -->
<Request Action="WRITE" ID="26">
<Connection Destination="E_CYCLE.DT" Source="T#1s"/>
</Request>

<Response ID="26">

</Response>


<!-- 127.0.0.1:61499: EMB_RES -->
<Request Action="CREATE" ID="27">
<FB Name="E_SWITCH" Type="E_SWITCH"/>
</Request>

<Response ID="27"/>


<!-- 127.0.0.1:61499: EMB_RES -->
<Request Action="CREATE" ID="28">
<FB Name="E_SR" Type="E_SR"/>
</Request>

<Response ID="28"/>


<!-- 127.0.0.1:61499: EMB_RES -->
<Request Action="CREATE" ID="29">
<Connection Destination="E_SWITCH.EI" Source="E_CYCLE.EO"/>
</Request>

<Response ID="29"/>


<!-- 127.0.0.1:61499: EMB_RES -->
<Request Action="CREATE" ID="30">
<Connection Destination="E_SR.S" Source="E_SWITCH.EO0"/>
</Request>

<Response ID="30"/>


<!-- 127.0.0.1:61499: EMB_RES -->
<Request Action="CREATE" ID="31">
<Connection Destination="E_SR.R" Source="E_SWITCH.EO1"/>
</Request>

<Response ID="31"/>

What I am not understanding is why is the Response ID just incrementing all the time.
I was expecting E_SR to give me a toggle response with every signal.

Also how can I put screenshots with my email.

Regards,
Ken

Re: Forte Runtime for a PLC [message #1790513 is a reply to message #1790503] Tue, 12 June 2018 08:42 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Regarding building forte I think it would be great to see the output of the make command. Normally the forte.exe is in the not in the directory where you run make but in the src subdirectory of this location.

You can attache files to forum messages by not posting in the form that is per default below (i.e., with post quick reply) but by pressing the small reply button on the right. There you get a more elaborate form which allows attaching and embedding files.

If you do tests with precompiled fortes please use 1.8.4. the reason is that monitoring is enabled by default.

the output you are seeing is the how 4diac-ide is configuring the devices. In your example 31 commands are necessary to setup your blinking example in the device. Therefore also the numbers. however this output does not tell you anything about the running application. If you look at the last section of the tutorial's step 1 which is called Monitoring, you see an explanation of how you can watch your application executing in the application view.

I hope this helps.

cheers,
Alois
Re: Forte Runtime for a PLC [message #1790520 is a reply to message #1790513] Tue, 12 June 2018 09:57 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi Alois,

I guess that is my lack of knowledge about the tool. I will work on the monitoring part at home.

Alois: "Normally the forte.exe is in the not in the directory where you run make but in the src subdirectory of this location. "

In CMakeGui tool I am specifying the location where the build output should go. In this location if I search for exe files, I get two exe files with name "a.exe".
I will send screen shots in another mail, in an organized way to show the entire scenario.

A Change in Context to More Theory:

So in the official task I was given, I was asked to evaluate how one could go about using 4Diac tool to create an application and run it on a proprietary
PLC created by any firm.

Here are the steps that I came up with :

Step 1 - Integration of PLC based FB's into the 4DIAC IDE
Creating a new library based on the function blocks for the new device. Study the existing function block library provided for the PLC and create new function blocks within 4DIAC library. Provide a new palette for the same under a new device section.
With this palette the user can drag and drop the new PLC function block(s) into the screen to design a new application.

Step 2 - Code Generation of Designed Application
Provide a capability of generating (Export functionality) C/C++ code to obtain a codified representation of the graphical design
of the application you have created using the Tool for the new PLC.

http://www.openplcproject.com/oplccompiler
The OPLC compiler can generate a C++ file based on a Ladder file. The generated .cpp file can then be compiled.
+ comp

Step 3 - Incorporate the Generated Code into the Forte Runtime

The Forte runtime can be modified to extend its functionality to support new PLC devices.
The C++ file generated for the application can be integrated with the Forte RTE and the executable can be loaded into the PLC.
The main issue to be solved is to generate machine code using the C++ code for the PLC in question.
For this one would need a PLC related compiler to generate the RTE.

I know this is not very detailed and my knowledge in this domain ( read IOT and PLCS') being very limited,
I was hoping that maybe you could suggest how I could make this answer better and in case you
have any documentation or link that would add to my knowledge and make me draft a better answer.

Thank you for all the help and looks like I am getting more and more comfortable with 4Diac as the days go by.

Regards,
Ken

Note: By the way I am a Java guy and was wondering how much C/C++ I would need to know in case I want
to do some coding locally like customizing a function block for a PLC device etc.
Re: Forte Runtime for a PLC [message #1790546 is a reply to message #1790520] Tue, 12 June 2018 16:17 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi,

AFAIK (I haven't used mingw for quite some time) after the build in the build output directory should be a directory called src and there you find forte.exe. however you need to not only call CMake (config7generrate) as this will only generate make files you need to call make in your build output directory to perform the build.

Regarding your questions. I think the problem is that you fist need to understand the PLCs in question. Even if you are targeting any PLC. Typically PLCs are configured by there respective tools and it is not documented how the tools are generated suitable configurations and/or code for the PLC.
So depending on the PLC type you would need to define some generation mechanism that takes the application in 4diac and generates the code for the respective PLC.

4diac itself offers quite some flexible mechanisms and extensions points to hook such generators into it. also the model is quite well defined in EMF. So this would be pretty easy.

The hard part is to find out what to generate. Just C/C++ will normally not be the solution. Also different PLCs may behave a little bit differently. So you need a very deep understanding on the operations of the specific PLC. Therefore for the same application you may need to generate different code.

So I think for starting taking one concrete PLC and learn would be good. Then later on the results may be generalized.

The above points where also the reason we wrote FORTE. We wanted a clear defined execution environment which will ensure the same behavior on all of our supported devices and sofar we got the best results by bringing FORTE to the different devices.

The intention of 4diac is that you can fully develop FBs and applications in 4diac and you don't need to do anything in C/C++. We even have now the experimental support for utilizing Lua as FB execution language. both C++ and Lua are hidden from the user who just works in 4diac. Only for bringing FORTE to devices C++ knowledge is required.

Cheers,
Alois
Re: Forte Runtime for a PLC [message #1790571 is a reply to message #1790546] Wed, 13 June 2018 07:00 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi Alois,

Your answers are really valuable and helping a lot in putting things together.

I was just talking to some colleagues in another project who are using a Siemens PLC device. I found that they were
writing programs in SCL language and compiled it into Function Blocks which were loaded into the PLC and then
the PLC executed them. I guess this is similar to using LUA as a FB execution language ??. not sure??

In such a scenario would Forte be feasible and how could we go about running it in such an environment.??

Alois: "...also the model is quite well defined in EMF"
I am not sure what exactly is EMF. Please elaborate.

Alois: 4diac itself offers quite some flexible mechanisms and extensions points to hook such generators into it.
Kindly elaborate if there is some tutorial or document that brings out the procedure to do this generator part.

Alois: So I think for starting taking one concrete PLC and learn would be good. Then later on the results may be generalized.
I am planning to do exactly that, so I am trying to cover the knowledge and get the understanding to do that.

Currently I have a NodeMcu Esp8266 for which I installed the Arduino IDE and executed a basic LUA script that
output data to a Output pin to light up an LED.
Would this be a good device to experiment with.

Thank you once again for all the answers.

Regards,
Ken

Note:BTW I ran the monitoring system on the BlinkTest yesterday night and forced the output of SR to be false and put watches
on specific points and then triggered an event on the START WARM area.
But the watch console did not show me any values...it showed N/A everywhere. Any suggestions.?


Re: Forte Runtime for a PLC [message #1790605 is a reply to message #1790571] Wed, 13 June 2018 13:01 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi,

getting some hands on experience with PLCs and 4diac will definitely help you in the task. Generating code for Siemens would be very interesting, but I think is also very challenging. What Siemens is calling SCL is based on the language Structured Text defined in IEC 61131-3. This language can also be used within 4diac FBs to define the algorithms of basic FBs. However please not it is not only about the FBs but also how they are connected and when they are executing (i.e., how events are delivered triggering FB execution).

Please note that our Lua approach has been implemented such that FORTE has been extended with a Lua engine. So only the contents of the FB are executed with Lua the rest (ie.., execution sequencing, scheduling, ... ) is handled by the standard FORTE.

EMF stands for Eclipse Modeling Framework which is commonly used in the Eclipse world for specifying models and operate on them.

The Node Mcu is a very interesting device. But I think maybe not the best start device as you may need quite some embedded knowledge to get FORTE running on it. Maybe a Raspi or something similar is a little bit easier to start.

Cheers,
Alois

Ps.: Regarding your monitoring: I think it would make sense to have this in a separate forum thread. If you get N/A it normally means that you have not a connection to your device (FORTE). Have you enabled monitoring? Or have you downloaded your application before monitoring?
Re: Forte Runtime for a PLC [message #1790613 is a reply to message #1790605] Wed, 13 June 2018 14:55 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi Alois,

Thank you as always for all the information.

Alois : ...However please not it is not only about the FBs but also how they are connected and when they are executing (i.e., how events are delivered triggering FB execution).
If I understand right, I would need knowledge on how the FB's are connected in the Siemens model?.

I had never heard of EMF...pardon my ignorance. So was EMF used to build the pallette and provide graphical representation and conversion
from Graphical to C++ code...

Also one question missed out is a statement from your earlier email connected to this context I presume...

"4diac itself offers quite some flexible mechanisms and extensions points to hook such generators into it...". Kindly elaborate based on the same context.

The LUA engine approach sounds great...so scripting engines can be extensions to FORTE, wow makes the RTE very powerful.
So can there be a scripting engine for Structured Text or SCL and include that with FORTE and make proprietary FBs execute?

Please find attached with this email an RTF document showing screen shots
of my CMAKE and FORTE configurations. I am using mingw-64 the one which is suitable for both 32 and 64 bit systems. My system is windows 10 64 bit OS.

Although the configuration/generation steps go through successfully..when I try connecting this EXE file for running the BlinkTest tutorial app...the console just terminates without response but when I used the Forte RTE that came with 1.3.3 version ...that worked.

Kindly suggest any changes that i need to make to the configurations to get the right EXE file.

Regards,
Ken

P.S. Which forum should I post the monitoring question on...?
Quick question, I did not run Forte RTE while monitoring is it needed?
Re: Forte Runtime for a PLC [message #1790621 is a reply to message #1790613] Wed, 13 June 2018 16:01 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi,

this time I really try to address all your points. Hopefully ;-)

Kenneth Carvalho wrote on Wed, 13 June 2018 14:55
Hi Alois,

Thank you as always for all the information.

Alois : ...However please not it is not only about the FBs but also how they are connected and when they are executing (i.e., how events are delivered triggering FB execution).
If I understand right, I would need knowledge on how the FB's are connected in the Siemens model?.


Yes and how the execution model in the Siemens PLC is.

Kenneth Carvalho wrote on Wed, 13 June 2018 14:55

I had never heard of EMF...pardon my ignorance. So was EMF used to build the pallette and provide graphical representation and conversion
from Graphical to C++ code...

Yes EMF is the central element the 4diac-ide. The different XML files are parsed into EMF models the code generators, editors, views operate on the EMF models and the chagnes are then saved back to the XML files.

Kenneth Carvalho wrote on Wed, 13 June 2018 14:55

Also one question missed out is a statement from your earlier email connected to this context I presume...

"4diac itself offers quite some flexible mechanisms and extensions points to hook such generators into it...". Kindly elaborate based on the same context.

4diac utilize for that Eclipse extension points. I fear we don't have to much documentation on that. But for starting it is definitly good to have a look in the Eclipse platform documetnation on how to implement extension points and how to add menus. For example you can have a 3rd party plugin for 4diac which would add a pulldown menu item that is shown when you right click on a 4daic elemetn and you can have then code that is invoked independant from any 4daic code.

Kenneth Carvalho wrote on Wed, 13 June 2018 14:55

The LUA engine approach sounds great...so scripting engines can be extensions to FORTE, wow makes the RTE very powerful.
So can there be a scripting engine for Structured Text or SCL and include that with FORTE and make proprietary FBs execute?

Yes indeed it is. It is even more then that. If you have existing Structured text code you can add this to 4diac FBs and we automatically generate C++ or Lua code from that.

Kenneth Carvalho wrote on Wed, 13 June 2018 14:55

Please find attached with this email an RTF document showing screen shots
of my CMAKE and FORTE configurations. I am using mingw-64 the one which is suitable for both 32 and 64 bit systems. My system is windows 10 64 bit OS.

Although the configuration/generation steps go through successfully..when I try connecting this EXE file for running the BlinkTest tutorial app...the console just terminates without response but when I used the Forte RTE that came with 1.3.3 version ...that worked.

Kindly suggest any changes that i need to make to the configurations to get the right EXE file.

After you've run CMake you only get Makefiles as output. You still need to run make to generate FORTE exe. For this, as described in the docs, open a shell in your build output directory (in your case org.eclispe.fordiac.forte-1.9.1\new) and type make there. Then the compilation process should run and produce a forte.exe

Kenneth Carvalho wrote on Wed, 13 June 2018 14:55

P.S. Which forum should I post the monitoring question on...?

in this forum but in a seperate thread.
Kenneth Carvalho wrote on Wed, 13 June 2018 14:55

Quick question, I did not run Forte RTE while monitoring is it needed?

Monitroing is used to connect to a running application on a running FORTE (local or in a PLC). So in order to monitor something you need a running forte and you need to download your application to it first.

So I hope I've got everything now.
Cheers,
Alois



Re: Forte Runtime for a PLC [message #1790680 is a reply to message #1790621] Thu, 14 June 2018 10:57 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi Alois,

Once again thanks for all the answers.
I followed your point that I need to run make in the
output directory...opened a command prompt and ran make.
It started the generation and covered all the cpp files but failed in the
end. Since I am not familiar with C++ please assist.
The logs are attached with this email as a txt file.

Thanks,
Ken


Re: Forte Runtime for a PLC [message #1790681 is a reply to message #1790680] Thu, 14 June 2018 11:18 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
which version of mingw do you have? I installed this https://sourceforge.net/projects/mingw-w64/files/ and didn't have that problem. Can you do
gcc -v
in your terminal and see the version of your compiler? There's a difference between mingw and mingw-64
Re: Forte Runtime for a PLC [message #1790697 is a reply to message #1790681] Thu, 14 June 2018 15:44 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Thanks Jose...That is correct, actually I got this running at home with the mingw-64.
But in an official environment the mingw-64...was giving an error ..saying it cannot download repository.txt and the install could
not proceed..so I went for a different build..this was a solution given by someone over google...
Not sure what the issue of "cannot download ..." is.
Re: Forte Runtime for a PLC [message #1790698 is a reply to message #1790621] Thu, 14 June 2018 15:49 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi Alois,

Just a quick update...I got the make working and so got a forte.exe created and using that within 4Diac-IDE I am able to monitor the Blinking Test application.
I guess now I will get the tough task of trying to get forte running on a PLC ..the real POC on my head shortly.
Fingers crossed.

Regards,
Ken
Re: Forte Runtime for a PLC [message #1790703 is a reply to message #1790698] Thu, 14 June 2018 16:17 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi,

looking foward to hear more about your experiences and also keep my fingers crossed.

Cheers,
Alois
Re: Forte Runtime for a PLC [message #1790728 is a reply to message #1790703] Fri, 15 June 2018 06:54 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
Some notes on porting forte to a PLC:
1- Make sure you can compile(ot cross-compile) any helloWorld C++ example and make it run on your PLC.
2- If the PLC is linux based, probably you won't no need to code anything. If not, you can look at the src/arch/XX folders which implement the actual porting.
3- If you cannot cross-compile (normally hard at the beginning), in many cases, you can compile your code locally on the PCL if you have a compiler and are able to install cmake. It'll take longer to compile, but you could see if it works
Re: Forte Runtime for a PLC [message #1790775 is a reply to message #1790728] Sat, 16 June 2018 10:58 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Thank you for the tips....Jose..
Re: Forte Runtime for a PLC [message #1790777 is a reply to message #1790775] Sat, 16 June 2018 11:07 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi Alois,

Its me again with another question. So I need to do a code conversion task by designing an application
using Function blocks in 4Diac and then code converting to a PLC's language ie. an SCL file.
So given a function block of a PLC how would I design for that PLC in a 4diac world giving the user
a graphical interface of FBs and providing the option to convert that design into SCL code for that
PLC. Right now a generic approach answer would suffice if you can please suggest
the approach I should take.
Can EMF be used in this or some other tool in eclipse that can be incorporated into
4Diac.

Regards,
Ken
Re: Forte Runtime for a PLC [message #1790800 is a reply to message #1790777] Mon, 18 June 2018 07:49 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi Ken,

there are several Eclipse projects supporting you with such tasks. I don't know them by heart but if you google "Eclipse EMF Model to text transformation" then you should find some of them. I think we are using xtend/xpand for the lua generation. You can find this in the org.eclipse.fordiac.ide.export.forte_lua plugin of 4diac-ide.

Cheers,
Alois
Re: Forte Runtime for a PLC [message #1790828 is a reply to message #1790800] Mon, 18 June 2018 16:04 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi Alois,

I have followed the tutorial step by step for customizing a new
function block. Trying to figure out how to write an exporter for
Structured Text for this function block.

Kindly direct me on how I could go about writing this exporter which
would be seen as the third option of the exporter choices apart
from Forte and Lua.

I assume that this would be a plugin to be developed but how would
I connect the model of the new function block to the structured text
to be created.

Also how can I show this New Function Block as part of the Palette
so that it could be dragged into a new application.

Regards,
Ken

P.S. : Parallel task I am trying to get the Blink Test Application run on a Raspberry pi . Would any of the board models work or should I purchase
something specific.

[Updated on: Tue, 19 June 2018 11:32]

Report message to a moderator

Re: Forte Runtime for a PLC [message #1790891 is a reply to message #1790828] Tue, 19 June 2018 20:19 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi Ken,

I'm not sure if I understand what you would like today. In 4diac speak when we talk about an exporter we mean that we have an FB developed in 4diac (see the tutorials on FB development) and generate some code based on the FB.
In 4diac FBs are stored as XML files following the definitions of IEC 61499-2 Annex A. If you look into your project's folders you will see all these files. They have the file ending .fbt and you can open them with any text editor, or in 4diac with right-click open with -> text editor.

Regards,
Alois

P.S.: AFAIK any raspi should do it
Re: Forte Runtime for a PLC [message #1790906 is a reply to message #1790891] Wed, 20 June 2018 05:10 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi Alois,

Thank you for that understanding. I am a bit confused since I am trying to
tackle two tasks,

1 is to customize a function block for a plc and
show it in the 4diac UI for selection and then have an export option that
converts the FB graphical interface into structured code.

2 Run a tutorial app like BlinkTest on a raspberry pi successfully.

In this email I am focussing on task 2..

I have 2 screen shots attached one shows that I have completed the
UI design as per the tutorial for BlinkTest for Sysfs(Raspi) .
Second shows that when I try to export I dont see the FBs that were created in the App, instead I see all the FB on the right.
So what do I select before clicking export

Where do I copy this generated code in Forte (Folder?).
If you have a link for this please share..



Thanks,
Ken

P.S: In the hours after writing this email ...I downloaded the raspberry pi toolchain on my laptop which runs windows 10 and I tried to create a Forte.exe without
any application code in it.
Although the final message in the make.exe says ...Built Target Forte...there
is a warning throughout the build and there is no Forte.exe within the src directory only there is a file named "forte" with no extension.

The screen shots for this are in Raspi-Forte-Build-Shots.doc

[Updated on: Wed, 20 June 2018 10:18]

Report message to a moderator

Re: Forte Runtime for a PLC [message #1790965 is a reply to message #1790906] Wed, 20 June 2018 16:14 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi Alois,

Please look at previous email regarding doubts on Raspi setup.

This email regards Building the IDE from the source.

Most of the steps went well and there are no build errors in the workspace.

But both "Launch an Eclipse Application" link on the Overview page and
Eclipse Product Export Wizard gave errors.

The attached log file contains the build errors in "Launch an Eclipse...
and the Screen shots show the Export Wizard errors.

Thanks
Ken
Re: Forte Runtime for a PLC [message #1790972 is a reply to message #1790965] Wed, 20 June 2018 19:56 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi Ken,

No in AnnexA of IEC 6499-2 a format for storing IEC 61499 defintions in XML is defined. This is used by 4diac for storing your FBs. If you have IEC 61131-3 FBs they are typically already in Structured Text. Why would you like to generate structured text code for them?
We currently have no way of reading any IEC 61131-3 FB representation nor an EMF model. If you would like to do something like this in addition to the exporter you would also need to extend our EMF model towards IEC 61131-3 fbs (or better restrict), which should be possible and write a loader that loads IEC 61131-3 FB files into this model. This can be done but I'm not sure if it is worth the effort. Maybe 4diac is then not the project you are looking for. Did you have a look on the Beremiz project.

For RASPI we are not generating C++ code for applications. Applications are dynamically generated in the deployment process by sending configuration commands to the device. You can see the configuration commands we are using in the deployment console.
What you need to compile is a FORTE with the set of FB types you would like it to contain and load the resulting binary onto the raspi and run it. As said above you can then download different applications to this FORTE instance as long as you are only using FB types you compiled into your FORTE.
Cheers,
Alois

P.S.: Please have a look on this forum thread https://www.eclipse.org/forums/index.php/t/1093628/. Maybe there you find already answers.
Re: Forte Runtime for a PLC [message #1790987 is a reply to message #1790972] Thu, 21 June 2018 05:12 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi Alois,

Thank you for the answers.
Only looking at the Raspi issue, as I mentioned that I am trying
to get the blinking test app to run on the Raspi.
Exactly as on the tutorial, currently I have completed the
design on the UI.
Not sure how I am going to put this application into the FORTE.
You said C++ code need not be generated ..so how do I go about doing
this . Screen shots are in Raspi-App-Shots.

Also I tried to create a Forte exe file for Raspi just generally and
the or..those screen shots are in Raspi-Forte-Build-Shots.

Regards,
Ken

P.S.
Also would it be possible to skype sometime so that I can verbally
let you know my issues
Re: Forte Runtime for a PLC [message #1791034 is a reply to message #1790987] Thu, 21 June 2018 16:18 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

The process for Raspi is the same as for the local blinky tutorial. The differences are that instead of compiling FORTE for windows you need to crosscompile it. Instead of running on your pc the resulting forte.exe you need to put the forte executable on your raspi (e..g, sftp) and start it on your RASPI. Then in your system configuration you change the MGR_ID of your device to the IP address of your raspi and during download 4diac-ide will open a TCP connection to the running FORTE on your raspi and send the application configuration to it.
Re: Forte Runtime for a PLC [message #1791122 is a reply to message #1791034] Sun, 24 June 2018 07:53 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi Alois,

Thank you for your previous answer...made things very clear for me and I was able to make lot of progress.

Now I compile forte and created a forte.exe for Pi and copied the same into the Pi desktop. Forte exe is running without issues on the PI.
I was able to connect to the pi from the deployment console of 4DIAC and load the configuration.
But when I connect an LED to pin 24 which is GPIO8 ...the LED just constantly shines and when I connect the
GPIO2 which is pin 3 to the 5V or 3v pin I was expecting it to toggle since as per tutorial
GPIO2 is the pin that activates the event flow.
I have also attached screen shots, please provide some assistance on this.

Regards,
Ken
Re: Forte Runtime for a PLC [message #1791149 is a reply to message #1791122] Mon, 25 June 2018 07:47 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi Alois,

Kindly address the above email regarding the issue of Rasp PI , am still stuck on that.

In addition today I was trying to build the 4DIAC IDE source with maven via command line and I get this error,

Basically I went to the command line prompt in C:\org.eclipse.4diac.ide-1.9.1\plugins\org.eclipse.fordiac.ide.product....
and ran mvn clean install and I get the following error.


INFO] Resolving dependencies of MavenProject: org.eclipse.fordiac:org.eclipse.fordiac.ide.product:1.9.0-SNAPSHOT @ C:\org.eclipse.4diac.ide-1.9.1\plugins\org.eclipse.fordiac.ide.product\pom.xml
[INFO] {osgi.os=linux, osgi.ws=gtk, org.eclipse.update.install.features=true, osgi.arch=x86}
[ERROR] Cannot resolve project dependencies:
[ERROR] Software being installed: org.eclipse.fordiac.ide.product 1.9.1.qualifier
[ERROR] Missing requirement: org.eclipse.fordiac.ide.product 1.9.1.qualifier requires 'org.eclipse.fordiac.ide.comgeneration.feature.feature.group 0.0.0' but it could not be found


Regards,
Ken
Re: Forte Runtime for a PLC [message #1791159 is a reply to message #1791149] Mon, 25 June 2018 10:28 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi,

i must confess I never used RASPI IOs myself.

Regarding your build issue. As i posted in the other post I mentioned above you need to run mvn clean install in the directory "plugins/org.eclipse.fordiac.ide.master"
Re: Forte Runtime for a PLC [message #1791160 is a reply to message #1791149] Mon, 25 June 2018 10:43 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
Regarding the blinking application, make sure that when you compile your forte for the RPI, you enable the FORTE_MODULE_SysFs module in CMAKE. Do you get any red warnings on the left or right of the deployment console?

You can monitor your 4diac application to see what's actually happenning in it
Re: Forte Runtime for a PLC [message #1791161 is a reply to message #1791160] Mon, 25 June 2018 11:07 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi Alois/Jose...

Have been working on the Raspi issue all this time.

Well I was lucky to stumble upon another forum thread where someone
else was facing this issue but put forth a simpler application.
Followed most of the solutions provided there and now am able
to get the LED blinking with params value 3 on QX with GPIO3 ie. Pin 5
on Rasp model 3.

Thanks
Ken
Re: Forte Runtime for a PLC [message #1791225 is a reply to message #1791159] Tue, 26 June 2018 10:02 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi Alois,

Ok..got it. I was compiling the wrong package.

If I create a custom function block that is similar to that of a specific
PLC. I found that I can create a custom function block and also
saw that it can be exported into C++ code to give me a cpp and header
file.
Is it possible for me to create my own generator to give me a different
C++ code specific to my requirement.
Also can i create a generator to give me Structured text.

Thanks
Ken
Re: Forte Runtime for a PLC [message #1791226 is a reply to message #1791225] Tue, 26 June 2018 10:24 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi,

great that raspi is working for you. Any hint what was the cause of the problem.

Regarding the export problem. Please have a look at the different export plugins. These should give you an idea how how cpp code is generated for the FB and the Structured Text code inside of the FB.

Cheers,
Alois
Re: Forte Runtime for a PLC [message #1791261 is a reply to message #1791226] Wed, 27 June 2018 05:25 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member


Hi Alois,

The raspi was working fine but I had missed out a connection
in the design diagram within 4diac id connecting the
COLD WARM of the START FB to the INIT of the QX.

Thank you for directing me to the plugins, I will try to
learn from there.

I also managed to execute the build from the source successfully
for the 4diac ide.

I unzipped the org.eclipse.fordiac.ide.product-1.9.0-SNAPSHOT-win32.win32.x86_64 file
into a local directory and tried executing 4diac application file.

A popup window appears which says

"4DIAC IDE executable launcher was unable to find its companion library"

So did I miss out a step or something?
Please suggest.

Thanks
Ken
Re: Forte Runtime for a PLC [message #1791359 is a reply to message #1791261] Thu, 28 June 2018 11:28 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hello Alois,

The build for source is working fine but just wanted to check if there
is a way to reduce build time for the 4Diac IDE source.
Also unzipping the built product takes a lot of time almost 8-10 minutes.Could this be made faster by any modifications.

Thanks
Ken

[Updated on: Thu, 28 June 2018 11:53]

Report message to a moderator

Re: Forte Runtime for a PLC [message #1791373 is a reply to message #1791359] Thu, 28 June 2018 12:27 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi,

Very strange that the maven build is not working for you. We use that to generate the official 4diac releases.

Regarding your ide build times. You only need to run the maven build when you want to generate a full 4diac binary package. you can also directly run 4diac-ide from eclipse for testing. I do this all the time. I think it is described in the docs that you need to open the product file, press syncronize and launch. You only need to do this for the first time. This automatically creates a launch configuration and successive launches you can also perform from the run button (green play button) in the toolbar.

Cheers,
Alois
Re: Forte Runtime for a PLC [message #1791407 is a reply to message #1791373] Thu, 28 June 2018 19:29 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi Alois,

The build is working fine for me now.

Actually I have built a plugin like a export kind of thing. Havent written any export logic, the code compiles when I do
a mvn clean install within the product directory. I can see the plugin getting built in the command prompt screen log
but when the zip file is generated it does not contain the plugin.

I made an entry for the plugin in the parent pom file ...but is there anything more I need to do to get the plugin
into the generated zip file.

Now on the method that you mentioned in your latest mail , I did execute the "Launch an Eclipse App..." from the org.eclipe....product...
but even though it launches the eclipse application successfully ....I get a Tool Library not found in the console while it is launching
and when the IDE opens up the tool library is empty.

I followed the docs and copied the TypeLibrary and Templates into the directory containing the Eclipse exe but this does
not solve the problem.

Please suggest.

Regards,
Ken
Re: Forte Runtime for a PLC [message #1791436 is a reply to message #1791407] Fri, 29 June 2018 10:03 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi,

I'm not very sure about the plugin thing. I think your plugin has to be referenced by a feature that is part of your product.

Regarding the template and tool lib issue. The problem is that when using a target platform, eclipse is downloading a dedicated eclipse environment for the build. This has the great advantage that you get a clean build and test environment. This helped us a lot to fix dependency issues. however then the place where your eclipse.exe is is not the right place for putting the templates and tool lib any more. The right place is the directory which is mentioned in the console output. It should be something like:

"your workspace path"/.metadata/.plugins/org.eclipse.pde.core/.bundle_pool

We really need to update the the docs here.

Alois
Re: Forte Runtime for a PLC [message #1791493 is a reply to message #1791436] Sat, 30 June 2018 17:40 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi Alois,

Thank you for that response, it really helped.
I was able to resolve the template and tool library issue by manually copying the folders within the path you specified.
Also your solution for integrating the plugin with a feature has also
worked.

Could you please guide me on the use of Xtext and Xpand in this project
since I am totally unaware of both these tools.

I read that XText is a tool for creating a domain specific language
and XPand is a code generator used by XText. Can you elaborate
in the context of 4Diac?

Also how was the design of this tool done in terms of what was the model based upon and how does it go from there, as in for a novice if one has to navigate through the source code to understand it in the
visualization of the design, what would be the path?

Regards,
Ken

[Updated on: Sun, 01 July 2018 14:32]

Report message to a moderator

Re: Forte Runtime for a PLC [message #1791589 is a reply to message #1791493] Mon, 02 July 2018 16:24 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi,

I meant xtend not xtext. I'm sorry but I don't know xtend at all.

I also really don't know how to describe in a blog post the structure of ide's source code.

Re: Forte Runtime for a PLC [message #1791764 is a reply to message #1791589] Thu, 05 July 2018 06:21 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hello Alois,

Actually as you know there is a package org....xtext.fbt which is containing
xtext xtend and mwe2 file.

If you could even briefly describe how these are being used it would
be very helpful to put the pieces together or maybe direct me to someone
who knows these technologies and their usage in this context that would be
nice.

Also in case you would like to email any links for docs or more detailed
information that could not fit in the blog, my email address is
kencarvo@gmail.com.

Regards,
Ken

[Updated on: Thu, 05 July 2018 06:23]

Report message to a moderator

Re: Forte Runtime for a PLC [message #1791809 is a reply to message #1791764] Thu, 05 July 2018 13:59 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi Ken,

sorry my last post was written a bit in a hurry. The problem is that all docs we have are public. Many different people have been working on the IDE code. Also I myself hat to learn the structure and the code the hard way by starting fixing minor bugs and reading the Eclipse Platform docs. Especially the latter was very helpful for me. For the graphical editors we are currently using GEF Legacy. There is a very good open IBM Redbook for getting started and understanding the concepts [1] and for more advanced topics I can recommend Vainolo's blog [2]. But i really hope that manage to migrate to the lates version of GEF. For new editors I would recommend to directly start with GEF 5.

XTend is also used in different places. The plugin you are mentioning is a support plugin for linking the interface variables of a FB to the ST model. This is used for the XText-based ST editors in 4diac-ide. I think for you it would be better to have a look at the export plugins, espeically the lua export plugin as the lua export is fully written in XTend.

I hope this helps.
Alois



[1] http://www.redbooks.ibm.com/abstracts/sg246302.html?Open
[2] https://www.vainolo.com/tutorials/gef-tutorials/
Re: Forte Runtime for a PLC [message #1791844 is a reply to message #1791809] Fri, 06 July 2018 07:48 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi Alois,

Thank you for that awesome response. I was really wondering how do I go
about doing this. I was reading the basics of XText yesterday from that
site and this email of yours really helps. BTW where is this XText based
ST editor found in 4Diac??

If you have the IBM redbook link kindly share.
I will go through the LUA plugin in the meanwhile to understand
XTend.
I have no knowledge on GEF but would like to incorporate my own
FBD into 4Diac in IEC61131 mode.

Also in a different context, someone asked me on VXWorks in Rockwell
that is 4Diac setup to do that.

I read in a forum comment that Forte supports VXWorks but then I had
the question how do you build Forte source code to get the Forte.exe
for the Rockwell PLC. I know that it will be determined by the Platform
on which VXWorks runs whether its ARM or POWER or Intel but is
there a crosscompilers to build it on Windows 64 and what modules
are to be configured.

Thanks as always

Regards
Ken

[Updated on: Fri, 06 July 2018 07:50]

Report message to a moderator

Re: Forte Runtime for a PLC [message #1791876 is a reply to message #1791844] Fri, 06 July 2018 12:15 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi,

the Xtext editor is found when you are editing basic FB algorithms. It is explained in tutorial Step 4.

The IBM redbook can be downloaded via the link I provided.

In general FORTE has been ported to vxWorks. however to get this running on Rockwell PLC you need the toolchain and support from Rockwell.

Cheers,
Alois
Re: Forte Runtime for a PLC [message #1791886 is a reply to message #1791876] Fri, 06 July 2018 13:55 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi Alois,

Sorry, I overlooked the links that you provided.

I went through the tutorial, yes in fact when i
was mailing this question I remembered this algorithm window
point but thought there is more to it for ST entry.

I had a question a few days ago that I had forgotten in this
context. When I have made a Custom FB, is it possible to get
the FB code in ST form like BEGIN END...VARS and ALGORITHM code?

----------------------------------------------------------------

When you say that Forte has been ported to VxWorks, my question is
for Raspi, when I compiled Forte the SYSFS module had to be enabled.
Are there any settings that I need to do in order to port the
Forte to VxWorks.

But actually I am confused.

My Final goal is to run a 4Diac designed app on a Rockwell PLC via
Forte.

Currently I dont have information on which PLC exactly, I will come
to know shortly and would share the same with you.

So if the Rockwell PLC is running on VxWorks, I would need to know
the platform architecture right?? like ARM or INTEL and then get
a gcc compiler accordingly.

I am ignorant about the toolchain and support needed from Rockwell,
is this freely available and on what basis do I search on Google for this
if it is?.

Regards,
Ken
Re: Forte Runtime for a PLC [message #1791911 is a reply to message #1791886] Fri, 06 July 2018 18:57 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

hi,

I think I don't understand what you mean with that question:
Quote:
I had a question a few days ago that I had forgotten in this
context. When I have made a Custom FB, is it possible to get
the FB code in ST form like BEGIN END...VARS and ALGORITHM code?

Could you please expand a bit.

vxWorks toolchains are as far as I know not freely available but you have to get them from the Windriver.
Re: Forte Runtime for a PLC [message #1791925 is a reply to message #1791911] Sat, 07 July 2018 14:34 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi Alois,

I meant that currently when you export a function block you get C++ or
LUA code but could you get the structured text code for the FB.

Also could you elaborate on the porting of Forte exe to Vxworks.
A little confused does that mean one has ported Forte to run on Vxworks.
Which platform would that be?

Under what context does a toolchain come into the picture? There was
no toolchain for the PI?

Regards,
Ken
Re: Forte Runtime for a PLC [message #1791927 is a reply to message #1791925] Sat, 07 July 2018 16:05 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi Ken,

I really feal that we are running in circles here.

Yes you can get the ST code from the FBs. Maybe you just have a look on one of the FBT files and open them with a text editor. There you can see what is inside of a IEC 61499 FB. You will note that there is more then just the ST code.

vxWorks is used by several PLC vendors. FORTE has been tested on the PLCs using vxWorks from Bachmann Electronic and Bosch Rexroth. Both provide Toolchains for their devices that will allow you to compile and run C++ based programms on their PLCs.

Yes you had a toolchain. You need not only the C++ compiler but a full toolchain consisting also from linker, binary tools, debugger, system libraries.

Alois
Re: Forte Runtime for a PLC [message #1791962 is a reply to message #1791927] Mon, 09 July 2018 07:04 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi Alois,

When I open the FBT file within text editor I can see the XML schema of the FBT file, but I was looking for Structured Text code for the FBT such as
BEGIN ....END VAR....etc.
...................................................................................................

The toolchain concept is now clear for me. Thanks for the know how.
So we would need a toolchain say a gcc for vxworks environment with say for eg. C libraries that talk to the Rockwell PLC.
Are there any details you could provide on how I can go about getting the toolchain from Windriver or I would
have to contact Windriver for the same.?

Thanks
Ken
Re: Forte Runtime for a PLC [message #1791977 is a reply to message #1791962] Mon, 09 July 2018 09:41 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi,

as stated in some of my previous posts here. We are using ST only as language for algorithms. Therefore you can see ST only in the XML part dedicated to algorithms. For the rest of the IEC 61499 model you have to define and write your own translation to ST if you need this.

So var I've always got the toolchains from the PLC vendors. Eiter as part of their programming environment or as additional package.

Cheers,
Alois
Re: Forte Runtime for a PLC [message #1792090 is a reply to message #1791977] Wed, 11 July 2018 08:00 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi Alois,

Crystal clear on the ST part and realize code would have to be written to get a custom
interpretation.

I have noticed that most PLC vendors are giving IDE to program and
communicate with their PLC's.
So even if I get a toolchain would it be possible to load the compiled
Forte executable into the PLC without using the intended software.
Please throw some light in this area.

Regards,
Ken

[Updated on: Wed, 11 July 2018 08:01]

Report message to a moderator

Re: Forte Runtime for a PLC [message #1792131 is a reply to message #1792090] Thu, 12 July 2018 05:40 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Therfore we always used means provided by the PLC vendor. This range from sft/ssh access to a special tool for downloading and starting software on the PLC.
Re: Forte Runtime for a PLC [message #1792168 is a reply to message #1792131] Thu, 12 July 2018 09:47 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Accepted, but this whole running around was to know how the proprietary software usage could
be avoided and still get the forte to run on the PLC.
You had mentioned that Forte had been ported to VxWorks. Just wanted to check with you
on how I could go about doing this.
Also the point that this has been tested on Bosch and Bachmann. Is the forte running as
part of the VxWorks kernel??
The reason I ask is because a colleague mentioned that you generally cannot run
user applications on VxWorks in a PLC environment since there is not much security.
Re: Forte Runtime for a PLC [message #1792226 is a reply to message #1792168] Thu, 12 July 2018 19:57 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Yes you need to know what you are doing. Applications in VXWorks are definitly different from a classical Windows or Linux. But if you have access to VXWorks you can load and start modules there.
Re: Forte Runtime for a PLC [message #1792289 is a reply to message #1792226] Sat, 14 July 2018 12:18 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Is there a document for porting applications like Forte developed in C/C++ into VxWorks.
In terms of perspective can one say that porting to VxWorks can be considered as first step and
then one can think of running it on a device like a PLC?
Would there be changes to code based on a specific device like PLC or Microcontroller?
Re: Forte Runtime for a PLC [message #1792290 is a reply to message #1792289] Sat, 14 July 2018 14:58 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

For FORTE we providing you already with nearly everything you need. Building FORTE for vxWorks is similar to cross compiling for Raspi. The only difference is to choose a different toolchain and select vxworks instead of posix as architecture. The you get a vxWorks module. The only thing that you have to add for your specific HW is to implement the IO access.
Re: Forte Runtime for a PLC [message #1792711 is a reply to message #1792290] Mon, 23 July 2018 05:29 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Ok, now I am getting the gist of Forte. So if I understand your answer correctly, it is not enough to just compile the Forte code to run on the respective OS. In order for Forte to get the inputs of the PLC
and write to the outputs of the PLC additional code will have to be written to access these pins which would be specific to that PLC. Hope my understanding is correct.
So this code was already present for the Raspberry PI in sysfs right? And in case I need to get Forte running on something like rockwell logic5000 or similar counterparts I would have to write a separate
IO module as part of the kernel to access its pins. Please confirm if this is the route to undertake.

..Also I am curious about the Raspi since I got an application working with the GPIO pins...I assume the Forte code is able to access the GPIO registers to access the input/output of the pins..If this is correct does'nt it need knowledge of the register addresses in the code....I just looked into the BCM2835 datasheet and it shows register information for GPIO..but dont know how this is used by Forte to access the pins..Please enlighten..

[Updated on: Mon, 23 July 2018 06:25]

Report message to a moderator

Re: Forte Runtime for a PLC [message #1792727 is a reply to message #1792711] Mon, 23 July 2018 09:48 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Yes this is exactly how it works.

regarding Raspi. please refer to the documentation of what gpio addresses are needed for configuring the IX and QX blocks.
Re: Forte Runtime for a PLC [message #1792751 is a reply to message #1792727] Mon, 23 July 2018 14:07 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Just edited my post again...actually I did go through the code and found that sysfs filesystem is being used for setting and reading the gpio pins and hence there is no need for knowing the gpio addresses..thanks

[Updated on: Tue, 24 July 2018 12:00]

Report message to a moderator

Re: Forte Runtime for a PLC [message #1792880 is a reply to message #1792751] Wed, 25 July 2018 10:48 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
In a different context with respect to OPC UA..I understand that a OPC server could be enabled on some PLCs such as Siemens S7.
Could we therefore run a 4Diac based application from outside the PLC and control the PLC by communicating as a OPC client??
What would be the drawbacks of such an approach although we avoid the many roadblocks of trying to get Forte deployed on a
Prop. PLC.
Also I came across a protocol named ModBus though I dont have any knowledge about it, but found on google that people
have done work on Arduino to communicate with S7 1200 using this protocol.
Could you share how this is different from using a OPC UA server and is it a feasible approach towards creating
IEC 614199 distributed applications.
Re: Forte Runtime for a PLC [message #1792892 is a reply to message #1792880] Wed, 25 July 2018 12: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
Hi,

regarding the OPCUA part, from a 4DIAC application, you should be able to connect to the OPCUA server on the Siemens. When you say that you want to control the PLC, I'm not sure the extend of it. You would be able to control whatever the Siemens offers you on its OPCUA server. Right now, the 4diac application can change variables and call methods in a remote OPCUA server.

I don't know much about ModBus, but I'd say it's just another communication protocol. From the point of view of an IEC61499 I don't think there's a difference, since it is on a higher level.
Re: Forte Runtime for a PLC [message #1792926 is a reply to message #1792892] Thu, 26 July 2018 03:13 Go to previous messageGo to next message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Hi,

Thank you for your response. When I say control the PLC, I am just making a comparision between running a 4Diac application by deploying Forte on the PLC to running the application
outside the PLC and then trying to read the inputs of the PLC and execute the program and send back the outputs to the PLC. In short what would be the cons of running the 4Diac app
from outside than from withing the PLC or is it even feasible?
Re: Forte Runtime for a PLC [message #1792930 is a reply to message #1792926] Thu, 26 July 2018 06:11 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
I see two major problems. The first one is timing. You won't get quick reaction of the system and that could be bad depending of the system and the delay you have. The second one, is that if the communication is lost between the outside application and the PLC, you're system is out.

For test and maybe research this could be a valid option, but not for actual deployment.
Re: Forte Runtime for a PLC [message #1792931 is a reply to message #1792930] Thu, 26 July 2018 06:48 Go to previous message
Kenneth Carvalho is currently offline Kenneth CarvalhoFriend
Messages: 38
Registered: June 2018
Member
Ok, latency problems and server getting disconnected because of network or other issues. Totally agree.

Previous Topic:download boot file to the target which is running forte
Next Topic:4Diac CAN Connection between two FORTE-PC
Goto Forum:
  


Current Time: Thu Mar 28 11:17:15 GMT 2024

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

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

Back to the top