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 » Problem in communication Publish/Subscribe(no event in Subscribe )
Problem in communication Publish/Subscribe [message #1741864] Tue, 30 August 2016 09:23 Go to next message
Michele Citro is currently offline Michele CitroFriend
Messages: 29
Registered: June 2016
Junior Member
Hi,

I want report an error in the communication Publish/Subscribe in my distribuited application (on 3 device).

I explain the problem better.
1. I have to publish the event CONTATTA_ZONAA on 225.0.0.1:61341 (in the attachement ZonaB).

2. This event, published, isn't received from PRONTA_ZONAB in 225.0.0.1:61341 (in the attachement ZonaA). But socket status is ok.

So, I tried to change ip and port also but nothing good result.

3. So, I tried to receive this event on another device (in the attachement ZonaC_trial) on 225.0.0.1:61341 always, and it's ok there.

Another trial:
4. I tried to receive this event on the same device of Publish (in the attachement ZonaB_trial) on 225.0.0.1:61341, and it's ok there.

Thus, in my opinion, the problem is on the device ZonaA.

What could be the problem?

Thank you.

Best regards,
Michele Citro
  • Attachment: ZoneA.png
    (Size: 82.10KB, Downloaded 94 times)
  • Attachment: ZoneB.png
    (Size: 61.06KB, Downloaded 83 times)
  • Attachment: ZoneB_trial.png
    (Size: 70.10KB, Downloaded 80 times)
  • Attachment: ZoneC_trial.png
    (Size: 62.79KB, Downloaded 84 times)
Re: Problem in communication Publish/Subscribe [message #1741865 is a reply to message #1741864] Tue, 30 August 2016 09:27 Go to previous messageGo to next message
Martin Melik-Merkumians is currently offline Martin Melik-MerkumiansFriend
Messages: 48
Registered: March 2016
Member
What does your network topology looks like? Is there a router in between Device A and the other devices, or are all connected on the same switch?
Re: Problem in communication Publish/Subscribe [message #1741869 is a reply to message #1741865] Tue, 30 August 2016 09:53 Go to previous messageGo to next message
Michele Citro is currently offline Michele CitroFriend
Messages: 29
Registered: June 2016
Junior Member
Hi Martin,

my network topology is composed by an only router, and every device connected on the same.

I precise that in my application I have other communications of this kind (i.e between 3 device) and I have no problem.
In the attachement I show my architecture 4DIAC-IDE.

BR,
Michele Citro
Re: Problem in communication Publish/Subscribe [message #1741872 is a reply to message #1741869] Tue, 30 August 2016 10:45 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 644
Registered: January 2014
Senior Member
Hi,

this is strange. My question for the other communication is are these mulitcast or point to point connections? Because I see that you are using addresses starting with 224 which is to my knowledge no multicast address. Or am I missing something. If this is the case what kind of devices are you using? RaspberryPIs? On these you often have to activate multicast routing so that multicast packets are sent over the network.

BR,
Alois
Re: Problem in communication Publish/Subscribe [message #1741874 is a reply to message #1741872] Tue, 30 August 2016 11:11 Go to previous messageGo to next message
Michele Citro is currently offline Michele CitroFriend
Messages: 29
Registered: June 2016
Junior Member
Hi,

I explain better.
The other communication are multicast on 224.0.0.0:port always, for this case I used to try ip address 225.0.0.1:port. But it doesn't work anyway.

But, such I read in http://www.eclipse.org/4diac/en_help.php section "Using Communication Protocols-->FBDK/IP-->Publish/Subscribe-UDP/IP" that :

" Multicast IP addresses can be picked from the range 224.0.0.0 - 239.255.255.255, while the port is arbitrary", so 224 should be multicast.

Anyway, I am using Hilscher' boards (i.e. CIFX 50-DP, installed on the devices) and communicated in Profibus with my automated warehouse.

BR,
Michele CItro
Re: Problem in communication Publish/Subscribe [message #1741881 is a reply to message #1741864] Tue, 30 August 2016 11:39 Go to previous messageGo to next message
Gerhard Ebenhofer is currently offline Gerhard EbenhoferFriend
Messages: 4
Registered: November 2015
Junior Member
Hi,

I'm a bit confused why you have between 2000 and 3000 Init Events on the Publish/Subscribe FBs - can you check that?

Was the second Subscribe FB initialized, before the Event was published?

Regards,

Gerhard
Re: Problem in communication Publish/Subscribe [message #1741900 is a reply to message #1741881] Tue, 30 August 2016 14:04 Go to previous messageGo to next message
Michele Citro is currently offline Michele CitroFriend
Messages: 29
Registered: June 2016
Junior Member
Hi,

you are right. It was a mistake, because I linked some Publish/subscribe's inizialization with a wrong event.

Now, after correction, Publish/SUbscribe FB are inizialized one time.

But the problem on this socket remains.

I'm sure that Subscribe FB's initialization isn't before the Event published,
because I link the first socket (on every device) with E_RESTART FB and this first socket initializes all other.
I show this in the attachement.

Best regard,
Michele Citro
Re: Problem in communication Publish/Subscribe [message #1741914 is a reply to message #1741900] Tue, 30 August 2016 14:40 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 644
Registered: January 2014
Senior Member
Have you tried to use another ip in the 224 range as this range seems to be working. E.g., 224.0.0.64?
Re: Problem in communication Publish/Subscribe [message #1741926 is a reply to message #1741914] Tue, 30 August 2016 15:36 Go to previous messageGo to next message
Michele Citro is currently offline Michele CitroFriend
Messages: 29
Registered: June 2016
Junior Member
Yes,
I tried with others ip and port, but nothing.

I'm starting to think that the problem isn't this. But what other could it be?

BR,
Michele Citro
Re: Problem in communication Publish/Subscribe [message #1741948 is a reply to message #1741864] Tue, 30 August 2016 17:54 Go to previous messageGo to next message
Gerhard Ebenhofer is currently offline Gerhard EbenhoferFriend
Messages: 4
Registered: November 2015
Junior Member
I'm not sure whether I correctly understand the following sentence:
"I'm sure that Subscribe FB's initialization isn't before the Event published,
because I link the first socket (on every device) with E_RESTART FB and this first socket initializes all other."

Does this mean that you are starting the device (and deploying the FB Network) with the Subscribe FB before you start (and deploy the FB Network) of the publishing device and publishing the event?

Have you tried to use the "Trigger Event" functionality to send the event a second time after all publish/subscribe FBs are initialized?

Gerhard

Re: Problem in communication Publish/Subscribe [message #1742788 is a reply to message #1741948] Wed, 07 September 2016 15:05 Go to previous message
yuvaraj velumani is currently offline yuvaraj velumaniFriend
Messages: 15
Registered: April 2016
Junior Member
If possible, try to look the run time log or trace. There may be possibility of dropping the events since Forte is only capable of storing 254 events in it queue.
Or else there may be a chance of Publish happening before the Subscribe function block getting initialized.
Other option that you could try out is complete all subscribe initialization after E_RESTART and then start you application by connection the last Subscribe function block INITO.

As suggested by Gerhard, you can try with "Trigger Event" also

[Updated on: Wed, 07 September 2016 15:06]

Report message to a moderator

Previous Topic:SET_POINT in FB_CTRL_PID Function Block
Next Topic:F_STRING_TO_BYTE
Goto Forum:
  


Current Time: Wed Oct 17 11:51:32 GMT 2018

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

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

Back to the top