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 » Read values ​​between two resources(I need to send the value through one resource and read it from another resource)
Read values ​​between two resources [message #1863243] Fri, 19 January 2024 16:37 Go to next message
André Soçva is currently offline André SoçvaFriend
Messages: 88
Registered: November 2023
Member
Hello, I have an application in which I want to read the AD value of a microprocessor pin and send it to another resource that is connected to the same device. I used Publish and Subscribe, but I have encountered the INVALID_ID subscribe error. In the attached images, I show my system with FORTE_PC and 2 resources (EMB_RES and EMB_RES1), sending via Publish and receiving via Subscribe. I don't know why the value didn't appear in the other resource. Thank you very much in advance.
Re: Read values ​​between two resources [message #1863245 is a reply to message #1863243] Fri, 19 January 2024 16:53 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1589
Registered: January 2014
Senior Member

unconnected publish or subscribe blocks are not allowed. Do you get any log messages. Between two different resoruce you may also want to have a look at our local comunication layer. There should be something in our documentation on it.
Re: Read values ​​between two resources [message #1863247 is a reply to message #1863245] Fri, 19 January 2024 16:59 Go to previous messageGo to next message
André Soçva is currently offline André SoçvaFriend
Messages: 88
Registered: November 2023
Member
Ok Alois, i will search in documentation. Thanks for the help.
When i said unconnected publish or subscribe blocks, its about the system without ethernet?

[Updated on: Fri, 19 January 2024 17:00]

Report message to a moderator

Re: Read values ​​between two resources [message #1863250 is a reply to message #1863247] Fri, 19 January 2024 17:02 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1589
Registered: January 2014
Senior Member

No I meant that the output pin RD_1 was not connected. Therefore the publish block does not know anything about the type.
Re: Read values ​​between two resources [message #1863253 is a reply to message #1863250] Fri, 19 January 2024 17:20 Go to previous messageGo to next message
André Soçva is currently offline André SoçvaFriend
Messages: 88
Registered: November 2023
Member
I connect an output in RD_1 pin. But the INVALID_ID continue.
Re: Read values ​​between two resources [message #1863254 is a reply to message #1863253] Fri, 19 January 2024 18:24 Go to previous messageGo to next message
André Soçva is currently offline André SoçvaFriend
Messages: 88
Registered: November 2023
Member
Alois. i made a test running with forte.exe directly and i observe the value with the two resources work normally. In the case, to run embedded, there's something related to compilation that can cause the problem?
Re: Read values ​​between two resources [message #1863255 is a reply to message #1863254] Fri, 19 January 2024 18:41 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1589
Registered: January 2014
Senior Member

in order that this works you need UDP multicast support and for Subscribe espeically ICMP join messages. It could be that you don't have that. Then definitly the local layer is the better option.
Re: Read values ​​between two resources [message #1863280 is a reply to message #1863255] Mon, 22 January 2024 19:55 Go to previous messageGo to next message
André Soçva is currently offline André SoçvaFriend
Messages: 88
Registered: November 2023
Member
Hello Alois, do you talk about ICMP or IGMP?
Re: Read values ​​between two resources [message #1863293 is a reply to message #1863280] Wed, 24 January 2024 11:09 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1589
Registered: January 2014
Senior Member

Oh sorry I meant IGMP.
Re: Read values ​​between two resources [message #1863296 is a reply to message #1863293] Wed, 24 January 2024 14:24 Go to previous messageGo to next message
André Soçva is currently offline André SoçvaFriend
Messages: 88
Registered: November 2023
Member
Hello Alois, one more question. When I create PUB and SUB, I create a UDP connection between them. If I run it on the local FORTE, does it create a "virtual" UDP communication to send between the PUB and the SUB? I tested running the microprocessor project on a MAC OS to see if the SUB updated the RD_1 value, but still without success. Then I want to understand this part of UDP communication so I can check if my microprocessor is not executing this part correctly. When I did the debug, it creates the communication and also initializes IGMP. I just need to better understand this stage of communication.

In the image you can see the communication in my microprocessor and the UDP. The problem is the microprocessor don't receive the package.

Thanks.

[Updated on: Wed, 24 January 2024 14:41]

Report message to a moderator

Re: Read values ​​between two resources [message #1863297 is a reply to message #1863296] Wed, 24 January 2024 14:58 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1589
Registered: January 2014
Senior Member

If you are not specifying an specific communication layers (please see our communication documentation) it will always fall back to UDP multicast. If you want to receive communication locally normally you need to have a loop back device and loop back routes configured.

However we also offer other communication protocols as stated above. If you just want to communicate between two resources on the same device you can for example use the shared memory local communication layer for this you can specify
loc[id]
as parameter for your publish or subscribe block. id is a unique string that have to be the same for both your publish and subscriber pair.
Re: Read values ​​between two resources [message #1863301 is a reply to message #1863297] Wed, 24 January 2024 17:07 Go to previous message
André Soçva is currently offline André SoçvaFriend
Messages: 88
Registered: November 2023
Member
Thanks Alois, worked.
Previous Topic:Variable number of inputs/outputs by block name
Next Topic:HTTP request with parameters
Goto Forum:
  


Current Time: Thu May 09 05:03:23 GMT 2024

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

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

Back to the top