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 » Control System app for Beckhoff Using OPC-UA
Control System app for Beckhoff Using OPC-UA [message #1791557] Mon, 02 July 2018 13:16 Go to next message
Ahsan Zia is currently offline Ahsan ZiaFriend
Messages: 26
Registered: July 2018
Junior Member
Dear 4Diac-cers,

I am new to IEC 61499 environment, I have implemented a few academic projects in FBDK IDE.

I have a Beckhoff PLC and a mini paper pulp processing plant, for which I am planning to create a forte RTE, on which my designated Control App which (will be) made in Eclipse 4Diac IDE run. I will be using OPC-UA as a communication protocol between them.

The first Stage of the project will be to implement, the Process simulation using 4DIAC RTE on OPC-UA and than, the PLC for Pulp paper process plant. The simulator has been already implemented in Node JS.

Just before getting started, I want to ask a few questions.
• Suggest me, how I 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 or I can download a certain library for my task?

I will keep on posting my progress and ambiguities during the course of the project duration.

Thank you in advance.

Br,
Ahsan
Re: Control System app for Beckhoff Using OPC-UA [message #1791559 is a reply to message #1791557] Mon, 02 July 2018 13:29 Go to previous messageGo to next message
Martin Melik-Merkumians is currently offline Martin Melik-MerkumiansFriend
Messages: 45
Registered: March 2016
Member
Hi,

although I am not 100% sure if I understood correct, what you want to do, I throw in my 2 cents.
For your first question, regarding how to create a FORTE with custom function blocks, please refer to the the online help of 4diac (https://www.eclipse.org/4diac/en_help.php)

To your second questions: Quick answer: No
Longer answer, Beckhoff PLCs are based on the IEC 61131 standard, which, besides it is a cycle-based execution environment without event, does NOT define a standardized way, how a programming tool shall interact with the run-time environment. In fact, Beckhoff's TwinCAT utilized the Visual Studio compiler suite to compile a specific executable, which implements the program designed in TwinCAT.

So there are three ways to proceed from here:
1. Use OPC UA to also communicate with TwinCAT - should work as OPC UA is a standard. I have never done this, so I cannot provide any hints here.
2. Use Beckhoff's ADS interface to communicate with TwinCAT - I have already done this, works ok, but you cannot do real-time control over ADS (same as OPC UA), but you can set reference values easily via ADS and have the control algorithm programmed in TwinCAT.
3. Implement/find a working EtherCAT master stack - Depending on your requirements the Simple Open EtherCAT Master could be sufficient for your task. With that, you can completely replace TwinCAT and communicate directly with the Beckhoff components controlling your plant.

Best regards,
Martin
Re: Control System app for Beckhoff Using OPC-UA [message #1791698 is a reply to message #1791559] Wed, 04 July 2018 10:16 Go to previous messageGo to next message
Ahsan Zia is currently offline Ahsan ZiaFriend
Messages: 26
Registered: July 2018
Junior Member
Thank you Martin for your detailed answer, I have already started investigating your approach. Will update if I get somewhere :-)
I will appreciate a few more suggestions/approaches form other members.
Thank you.

Best Regards,
Ahsan Zia

Re: Control System app for Beckhoff Using OPC-UA [message #1792869 is a reply to message #1791698] Wed, 25 July 2018 09:14 Go to previous messageGo to next message
Ahsan Zia is currently offline Ahsan ZiaFriend
Messages: 26
Registered: July 2018
Junior Member
Hi All,
I have developed my control application using 4Diac.
Control application consist of a composite block, which in turns encapsulate 6 different composite blocks.
Now, I have to connect my application to the process simulator, using OPC-UA.
Can someone guide me how to establish communication between them?

Thank you.

Best Regards,
Ahsan Zia
Re: Control System app for Beckhoff Using OPC-UA [message #1792886 is a reply to message #1792869] Wed, 25 July 2018 11:29 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 102
Registered: February 2016
Senior Member
Can you explaing the architecture a little bit more? Where's FORTE running? What do you want to connect? Is the 4DIAC application for the Simulation or for the actual PLC?
Re: Control System app for Beckhoff Using OPC-UA [message #1792888 is a reply to message #1792886] Wed, 25 July 2018 11:54 Go to previous messageGo to next message
Ahsan Zia is currently offline Ahsan ZiaFriend
Messages: 26
Registered: July 2018
Junior Member
Hi Jose,
Thank you for your reply.
The application is for the simulator at this time.. after that it will be modified for the actual PLC (later in August or Sept), for the timewe are want to establish a connection with the simulator.
The application takes 31 inputs, from which we have considered 20 primary inputs, 16 BOOL, 4 UNIT. to run the initial tests.
Different FB ""should"" give output on the bases of what combination of inputs have been energized. Inputs represent different valves and pumps.
for example: form the process AB , needs the combination of valves V1, V2, and V3 with Pump P1, which the liquid start flowing between A to B.
Please also check the first message of this thread.

Best Regards,
Ahsan Zia

  • Attachment: 101.JPG
    (Size: 94.91KB, Downloaded 16 times)
Re: Control System app for Beckhoff Using OPC-UA [message #1792890 is a reply to message #1792888] Wed, 25 July 2018 12:11 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 102
Registered: February 2016
Senior Member
Ok, I think I get it now, but I still don't know where exactly you need help now. Do you wan to offer the inputs as OPCUA vairables that the PLC can trigger and then offer the outputs also sa OPCUA variables?
Re: Control System app for Beckhoff Using OPC-UA [message #1792897 is a reply to message #1792890] Wed, 25 July 2018 12:57 Go to previous messageGo to next message
Ahsan Zia is currently offline Ahsan ZiaFriend
Messages: 26
Registered: July 2018
Junior Member
Please look at the logic diagram below.

I hope you get a better idea from that.
  • Attachment: Logic.JPG
    (Size: 33.31KB, Downloaded 16 times)
Re: Control System app for Beckhoff Using OPC-UA [message #1792899 is a reply to message #1792897] Wed, 25 July 2018 13:06 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 635
Registered: January 2014
Senior Member
did you have a look at our opc ua documentation yet? I think there it is quite clearly described how to connect to OPC UA servers for reading and writing data.

Furthermore I noticed that in your CFB you are duplicating events. That means for one input event you are sending two output events. Maybe that it is not what you want. also I would expect that a basic FB would be more efficient for the tasks you need.
Re: Control System app for Beckhoff Using OPC-UA [message #1792939 is a reply to message #1792899] Thu, 26 July 2018 08:12 Go to previous messageGo to next message
Ahsan Zia is currently offline Ahsan ZiaFriend
Messages: 26
Registered: July 2018
Junior Member
Dear Alois,
The snapshot I pasted in the above thread is, what we want my FB to work like. 5 different function blocks (almost) on the same concept are created.
Which (Should) perform operation and give the desired outputs.
We are planning that each of the CFB should perform individual for each individual process in the simulator. It might not be logically correct but its what we are intending to do.
I have been working with UA expert for a while now, recently we have implemented a JS code and used it to read and write data for UI.

BR,
Ahsan
Re: Control System app for Beckhoff Using OPC-UA [message #1792978 is a reply to message #1792939] Thu, 26 July 2018 19:42 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 635
Registered: January 2014
Senior Member
Dear Ahsan,

thanks for the clarification.

Regarding OPC UA. following our docs you can the easily connect to forte with UA expert.

Alois
Re: Control System app for Beckhoff Using OPC-UA [message #1793656 is a reply to message #1792978] Mon, 13 August 2018 11:18 Go to previous messageGo to next message
Ahsan Zia is currently offline Ahsan ZiaFriend
Messages: 26
Registered: July 2018
Junior Member
Dear All,
I have compiled, open62451 enabled Forte. Tested it with the examples in the documentation, and implemented the control logic for the application in 4Diac.
Currently, I looking for method(s) to connect the 4diac application to my JS Simulator using OPC-UA for reading and writing of the data?
The JS simulator already uses UA expert for reading and writing of data.


BR,
Ahsan
Re: Control System app for Beckhoff Using OPC-UA [message #1793673 is a reply to message #1793656] Mon, 13 August 2018 19:57 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 635
Registered: January 2014
Senior Member
Hi Ahsan,

if I understand your post above correctly then it means that your simulator is offering values for reading and writing as server and that you can use UA Expert as client to read and write to/from it. If this is the case please have a look in the 4diac's OPC UA documentation under the Client section. There I think it is described how you can read and write data on a remote server.

I hope this helps.

Cheers,
Alois
Re: Control System app for Beckhoff Using OPC-UA [message #1793706 is a reply to message #1793673] Tue, 14 August 2018 11:36 Go to previous messageGo to next message
Ahsan Zia is currently offline Ahsan ZiaFriend
Messages: 26
Registered: July 2018
Junior Member
Dear Alois,
Thank you for your reply.
Yes, you are right. I have already went through client /server documentation, but still looking for more explanation.
I am wondering is there some more documentation regarding the same topic?

BR,
Ahsan
Re: Control System app for Beckhoff Using OPC-UA [message #1793857 is a reply to message #1793706] Fri, 17 August 2018 11:28 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 635
Registered: January 2014
Senior Member
As far as I know there is not more available. I think you'll hae to experiment a bit.
Re: Control System app for Beckhoff Using OPC-UA [message #1793905 is a reply to message #1793857] Mon, 20 August 2018 08:05 Go to previous message
Ahsan Zia is currently offline Ahsan ZiaFriend
Messages: 26
Registered: July 2018
Junior Member
Dear All,
I have tested all the values coming from different nodes by the method you helped me do last Thursday.
My application takes 31 values in total, out of which, 27 BOOL values, 4 UNIT values.
Initially, I was thinking to make composite blocks for each of the nodes, to read and write the values, but I guess that is not possible.

index.php/fa/33848/0/

If I go by the procedure by implementing the same logic for each nodes, it will be quite messy, there will be dozens of tabs at the same time to operate the application.

I have a few question regarding the application.
*What procedure of implementation should I follow to keep the application as simple as possible? What are your recommendations?
*There should be one Client/Publish (node) per EMB-RES?


Best
Ahsan
  • Attachment: NwBlck.JPG
    (Size: 208.80KB, Downloaded 24 times)

[Updated on: Mon, 10 September 2018 09:10]

Report message to a moderator

Previous Topic:Hexa decimal PARAM input
Next Topic:Write and Read OPC_UA Variables in the same server
Goto Forum:
  


Current Time: Mon Sep 24 20:57:45 GMT 2018

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

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

Back to the top