Forte Runtime for a PLC [message #1790178] |
Wed, 06 June 2018 10:05  |
Eclipse User |
|
|
|
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 #1790317 is a reply to message #1790300] |
Fri, 08 June 2018 06:28   |
Eclipse User |
|
|
|
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 #1790621 is a reply to message #1790613] |
Wed, 13 June 2018 12:01   |
Eclipse User |
|
|
|
Hi,
this time I really try to address all your points. Hopefully ;-)
Kenneth Carvalho wrote on Wed, 13 June 2018 14:55Hi 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 #1791886 is a reply to message #1791876] |
Fri, 06 July 2018 09:55   |
Eclipse User |
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|