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 » Help regarding QX Function Block(QX Function Block is not receiving data)
Help regarding QX Function Block [message #1735500] Mon, 20 June 2016 12:34 Go to next message
Santosh Kumar Panda is currently offline Santosh Kumar PandaFriend
Messages: 9
Registered: June 2016
Junior Member
Hi,

I am new to 4DIAC. I want to develop a system which will communicate with Raspberry Pi. For this I have used the PUB/SUB model and used QX function block. Everything is working fine but the QX function block is not able to receive the data.

PFA the screenshot.

Regards,
Santosh
Re: Help regarding QX Function Block [message #1735507 is a reply to message #1735500] Mon, 20 June 2016 13:46 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 76
Registered: February 2016
Member
Hi Santosh,

My first guess would be the IP address you're using in the PUB/SUB blocks are wrong.

192.168.0.8:61499 is the TCP address of your Raspberry Pi that is used to connect to, send blocks and all other mangaing connections, but the the PUB/SUB should use UDP multicast addresses according to http://www.holobloc.com/doc/ita/index.htm

So, try changing the ID parameter of both Publish and Subscriber to, for example, 225.0.0.0:61499 (must be the same for both)

Jose
Re: Help regarding QX Function Block [message #1735522 is a reply to message #1735507] Mon, 20 June 2016 14:42 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 523
Registered: January 2014
Senior Member
Hi Santosh,

In addition to Jose's comment I also see that there is an issue with the initialization of the QX block. As long as the block is not initialized it will not write to any output.
What happens when you manually trigger the INIT event of the QX block?

Alois
Re: Help regarding QX Function Block [message #1735526 is a reply to message #1735522] Mon, 20 June 2016 16:12 Go to previous messageGo to next message
Santosh Kumar Panda is currently offline Santosh Kumar PandaFriend
Messages: 9
Registered: June 2016
Junior Member
Hi,
Thanks for the quick reply.
I changed the IP of PUB and SUB also I manually checked the QX FB and initialised it. But now I am getting the status 'TERMINATED' in the Subscriber FB.
PFA the screenshot.
Regards,
Santosh
  • Attachment: Error.png
    (Size: 45.75KB, Downloaded 97 times)
Re: Help regarding QX Function Block [message #1735642 is a reply to message #1735526] Tue, 21 June 2016 14:40 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 523
Registered: January 2014
Senior Member
This is very strange especially for the subscribe it is rather incomon to get a terminated. I also looked into the code where this is generated and could not get a real good idea on the problem. One reason could be that the RaspberryPI needs a speicall setup for UDP multicast messages as described in this thread: sourceforge.net/p/fordiac/discussion/708249/thread/918eb215/

Maybe this helps.
Re: Help regarding QX Function Block [message #1735681 is a reply to message #1735642] Tue, 21 June 2016 23:05 Go to previous messageGo to next message
Santosh Kumar Panda is currently offline Santosh Kumar PandaFriend
Messages: 9
Registered: June 2016
Junior Member
Now the status of the SUBSCRIBE FB is OK. I have checked all the above mentioned setup except for the Route command because I do not have the root privilege. Could you look in to the attached screenshot and suggest any alternate method.

Thanks,
Santosh

[Updated on: Tue, 21 June 2016 23:06]

Report message to a moderator

Re: Help regarding QX Function Block [message #1735705 is a reply to message #1735681] Wed, 22 June 2016 07:21 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 523
Registered: January 2014
Senior Member
You could test at least manually by setting the the input of the QX block of the output is really set (i.e., set the Out value to true and trigger REQ event of QX).

As it shows ok the subscriber should be initialize correctly. You could as next step look with a networksniffer (e.g., Wireshark) if your packet is sent/received on the Pi. If this is the case the only option you have is to set the routing information. I don't know why this is not set per default. All other linux machines I have this is correctly setup.

As a workaround you could go back and try the UDP direct message you had in the beginning. Although the compliance profile demands a UDP multicast address FORTE's implementation should gracefully also handle direct addresses. But I haven't carefully tested this option.
Re: Help regarding QX Function Block [message #1735932 is a reply to message #1735705] Thu, 23 June 2016 17:23 Go to previous messageGo to next message
Santosh Kumar Panda is currently offline Santosh Kumar PandaFriend
Messages: 9
Registered: June 2016
Junior Member
I have tested the QX block manually and it is working fine but the RSP event of the SUBSCRIBE FB is not getting any event. It shows 0. Also I tried the UDP direct message but unfortunately it is still showing the same result.
Re: Help regarding QX Function Block [message #1735980 is a reply to message #1735932] Fri, 24 June 2016 08:11 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 523
Registered: January 2014
Senior Member
hi this is strange because in your first screenshot the direct UDP mesage was working. Did you change anything here? RSP should be 0 for seubscribers. Or batter can be 0. The important event is the IND. Because this one notifies the application on received messages.
Re: Help regarding QX Function Block [message #1735987 is a reply to message #1735980] Fri, 24 June 2016 08:26 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 76
Registered: February 2016
Member
Really strange that the example doesn't work. One thing to notice is that the RSP event of the SUBSCRIBE is an input event that can be activated only if there's a connection on it (so, it will remain 0 unless you connect as input of another output event and then trigger it, and actually isn't normally used). When a packet arrives, the IND output event is the one counting up and triggering the QX.
Re: Help regarding QX Function Block [message #1735988 is a reply to message #1735987] Fri, 24 June 2016 08:27 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 76
Registered: February 2016
Member
Sorry for the duplicate information, the page was open but no refreshed
Re: Help regarding QX Function Block [message #1736288 is a reply to message #1735988] Tue, 28 June 2016 09:27 Go to previous messageGo to next message
Santosh Kumar Panda is currently offline Santosh Kumar PandaFriend
Messages: 9
Registered: June 2016
Junior Member
Hi,
I tried again by installing 4DIAC in a UNIX machine and I have only considered the Raspberry Pi resource. Now it is working.
Thanks a lot for your help.

Regards,
Santosh
Re: Help regarding QX Function Block [message #1736299 is a reply to message #1736288] Tue, 28 June 2016 10:22 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 523
Registered: January 2014
Senior Member
Thanks for the update. It could then be that the firewall on your Windows machine was the cause.
Previous Topic:How calculate time scan softPLC
Next Topic:Connecting to elements of arrays
Goto Forum:
  


Current Time: Mon May 21 15:19:40 GMT 2018

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

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

Back to the top