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 » IP_ADD_MEMBERSHIP(Help with Message)
IP_ADD_MEMBERSHIP [message #1837543] Tue, 02 February 2021 05:59 Go to next message
Asterios Badios is currently offline Asterios BadiosFriend
Messages: 15
Registered: January 2021
Junior Member
Hi

Trying to recive a UDP message and have a IP_ADD_MEMBERSHIP message
What does it mean ?
See Picture
written simply python program to send test data
Running 13.1 on linux with FORTE as sudo

Can anyone point me on in the right direction ?

Regards
Asterios
Re: IP_ADD_MEMBERSHIP [message #1837548 is a reply to message #1837543] Tue, 02 February 2021 07:27 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1583
Registered: January 2014
Senior Member

As already pointed out in another message the default SUBSCRIBE FB expects as configuration parameter a UDP Multicast address and a port. However you gave a UDP Uni-Cast address. In oder that 4diac FORTE can receive UDP multicast data in a real network it needs to send out this IGMP Membership message. However you are lucky and 4diac FORTE should still receive the data. The reason that you are not receiving any data is most probably your Ubuntu setup. You need to check if your loop back device is configured correctly and that you are routing UDP messages via loop back device. I noticed with some of my students using Ubuntu that there is a problem.

Furthermore I saw that you are using an E_CYCLE connected to the INIT of your SUBSCRIBE FB. This is not needed. IEC 61499 is fully event driven. That means you don't need to continuously trigger SIFBs. Especially resource initiated SIFBs like the SUBSCRIBE FB (you can identifie these with the IND output). These FBs will register themselves to the 4diac FORTE with the INIT event and will produce IND events as soon as they have some data ready for the application.

Cheers,
Alois
Re: IP_ADD_MEMBERSHIP [message #1837549 is a reply to message #1837548] Tue, 02 February 2021 07:31 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1583
Registered: January 2014
Senior Member

PS: is your Python program allowed to send on port 257. Why are you not using anything in a higher range?
Re: IP_ADD_MEMBERSHIP [message #1837620 is a reply to message #1837549] Wed, 03 February 2021 10:13 Go to previous messageGo to next message
Asterios Badios is currently offline Asterios BadiosFriend
Messages: 15
Registered: January 2021
Junior Member
Hi Alois

Again, thank you for your support

I changed my port, and ID parameters, and finally have recived something

See Picture, I get a Datatype error, I assume that I have to move the data to a word array ?.
I did play around and created one.
My question is that is the only way to use this is make my own FB ?
If so then to use my own FB I must compile my new FB into FORTE ?

Re port 257, as I get better with 4diac, would like to use this port as the scada system prefers to send data on this port.

Regards
Asterios
Re: IP_ADD_MEMBERSHIP [message #1837659 is a reply to message #1837620] Wed, 03 February 2021 19:04 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1583
Registered: January 2014
Senior Member

In the default version of a SUBSCRIBE FB expects data packet in the format as given in the "IEC 61499 compliance profile for feasibilty demonstrations" [1]. If you need a different data format it may be a better idea to have your own communication layer on top of the UDP layer. There you can implement an according decoding method. You can find more information on how to do that in our development documentation [2].

I'm not sure what the problem with 257 port is. If it is not used by any other application on your computer it should in general work. But as said in my post above I would expect that it is a linux config issue.

I hope this helps,
Alois


[1] https://www.holobloc.com/doc/ita/s3.htm
[2] https://www.eclipse.org/4diac/en_help.php?helppage=html/development/forte_communicationArchitecture.html
Re: IP_ADD_MEMBERSHIP [message #1837673 is a reply to message #1837659] Thu, 04 February 2021 05:20 Go to previous messageGo to next message
Asterios Badios is currently offline Asterios BadiosFriend
Messages: 15
Registered: January 2021
Junior Member
Hi Alois

Thank you for sending the links, I have had a look and now more confused which way to go. Sorry mate.

I am approaching it from a plc background so apologise if I missed some basic stuff.
Attached is 3 examples of where I have done before in other plcs, so thats whats the end result I am aiming for.

So can I confirm that the holobloc is the only way to do this ? and I have to write it in Java ? (never used it)
Then I have to compile my new holobloc FB into FORTE ?

Regards
Asterios
Re: IP_ADD_MEMBERSHIP [message #1837703 is a reply to message #1837673] Thu, 04 February 2021 11:30 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1583
Registered: January 2014
Senior Member

Hi Asterios,

sorry for confusing you. I think I have to clarify a few things. The description there mentions java classes but this is IMHO just a bad description because it also describes the underlying protocol which is a UDP multicast message for PUBLISH or SUBSCRIBE and TCP for CLIENT SERVER.
The reason I pointed you to that is that this document describes what a default 4diac FORTE subscribe FB expects. So you don't need to implement anything on 4diac FORTE side but you need to send the right message format from your phyton code and that is described there.

My other comment was that if you are not able to change the message format on your sender side (you mentioned some SCADA system) than you need to change the way 4diac FORTE works.

Cheers,
Alois
Re: IP_ADD_MEMBERSHIP [message #1837706 is a reply to message #1837703] Thu, 04 February 2021 12:15 Go to previous messageGo to next message
Asterios Badios is currently offline Asterios BadiosFriend
Messages: 15
Registered: January 2021
Junior Member
Hi Alois,

All good mate, no stress. The python test code sends the test message to the other 3 types of plcs perfectly (the pdf I send you on last message). so I don't want to change it.
Just need to understand how I do this in 4diac.
Happy to pay for someones time or make a donation to a good cause to help me work it out to start with an example how I would do this ?

again apprechiate your support

Regards
Asterios
Re: IP_ADD_MEMBERSHIP [message #1837730 is a reply to message #1837706] Thu, 04 February 2021 20:08 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1583
Registered: January 2014
Senior Member

Hi,

Asterios Badios wrote on Thu, 04 February 2021 12:15

All good mate, no stress. The python test code sends the test message to the other 3 types of plcs perfectly (the pdf I send you on last message). so I don't want to change it.

I expected that. for that it would be good to have a description of the format and protocol.

Asterios Badios wrote on Thu, 04 February 2021 12:15

Just need to understand how I do this in 4diac.

Happy to pay for someones time or make a donation to a good cause to help me work it out to start with an example how I would do this ?


Thanks for the offer. this is kind. We would also do paid development. But given your description it should be rather low effort. As written above the first point is a description of the kind of data and I guess the interface you would like to use in 4diac. Should it be an array, should it be separate outputs. A simple starting point could be that you write your own com layer sitting above the ip layer. Hereby you can use as staring point the port and IP that is already working. In that layer you get data from the ip layer and you process it and apply it to the output. i think a good starting point would be the raw layer. Although this one excepts only ports of type string it nicely shows how such a layer would work.

I hope this gets you started.

Cheers,
Alois
Re: IP_ADD_MEMBERSHIP [message #1837737 is a reply to message #1837730] Fri, 05 February 2021 06:14 Go to previous messageGo to next message
Asterios Badios is currently offline Asterios BadiosFriend
Messages: 15
Registered: January 2021
Junior Member
Hi Alois

That makes sence,
All I need now is how to start,

I understand making your own FB, is there where I start ?
Then I assume instead of Structed text , I use C to code, can get my mates to help out here.

Is there a book I can buy that can fill in the gaps ?

Or if it save eveyone alot of time, happy to pay for development as I understand that I do not want to waste alot of your time with alot basic stuff.

Regards
Asterios
Re: IP_ADD_MEMBERSHIP [message #1837766 is a reply to message #1837737] Fri, 05 February 2021 17:46 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1583
Registered: January 2014
Senior Member

Hi,

As pointed out above a starting point could be the Class CRawDataComLayer. you will not need to implement a full FB but just such a communication layer. Please have a look at the communication architecture documentation I already posted above. with such a layer you can use all of our standard communication function blocks.

If you provide us with some explanation of your packet format we can even draft you with a layer that you refine and debugg.

Alois
Re: IP_ADD_MEMBERSHIP [message #1837776 is a reply to message #1837766] Sat, 06 February 2021 02:55 Go to previous messageGo to next message
Asterios Badios is currently offline Asterios BadiosFriend
Messages: 15
Registered: January 2021
Junior Member
Hi Alois

Re my packet format is I would like to keep it very generic. Exactly the same as the 3 examples I send you on the other PLCS. When data comes in in just get placed in a Fixed WORD array, 1000 Words is fine. Then using a BOOL flag to say DONE, eg data is there on the Rising trigger.

I have read the documentation, still unsure what you are saying,
is the CcommFB a FB, where is it ?
Is openConnection() a C function ? If so is it implemented where we "Step4 Create your own Function Block"
Can only imagine what your thinking, again sorry for the basic questions, 25 years playing with PLCs but little embedded / C coding, enough to get my into trouble.

Regards
Asterios
Re: IP_ADD_MEMBERSHIP [message #1838115 is a reply to message #1837776] Tue, 16 February 2021 12:34 Go to previous messageGo to next message
Asterios Badios is currently offline Asterios BadiosFriend
Messages: 15
Registered: January 2021
Junior Member
Hi Alois

Hope all is well,

Still getting no where, can I get a quote to get the FB written, simlar to what is avaliable in other PLCs. ?

Thank you

Regards
Asterios
Re: IP_ADD_MEMBERSHIP [message #1838774 is a reply to message #1838115] Thu, 04 March 2021 20:12 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1583
Registered: January 2014
Senior Member

Hi,

sorry for the late reply. I've been pretty busy with the semester ending here in Austria. As pointed out above we would need a specification of your packet format and what should happen. With the current information I have a hard time to understand what you need.

Alois
Re: IP_ADD_MEMBERSHIP [message #1839121 is a reply to message #1838774] Mon, 15 March 2021 06:09 Go to previous message
Asterios Badios is currently offline Asterios BadiosFriend
Messages: 15
Registered: January 2021
Junior Member
Hi Alois,

No stress mate.
With regards to any specification, I would like the raw data available so that I can access in Structured text so that I can process that data in existing structured text code.

By raw data I mean an array of bytes or words

I have a friend who understands C++ , would appreciate it if you can send me a example of a FB that receives a UDP packet and outputs the payload to an array ?
An event to stay its competed with number of bytes received would a bonus.

Regards
Asterios
Previous Topic:Eventqueue runs full
Next Topic:Problems to compile FORTE+Modbus
Goto Forum:
  


Current Time: Sat Apr 20 02:12:30 GMT 2024

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

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

Back to the top