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 » [SOLVED] SUBSCRIBE_2 and PUBLISH_2 issue
[SOLVED] SUBSCRIBE_2 and PUBLISH_2 issue [message #1791347] Thu, 28 June 2018 09:37 Go to next message
Agostino Mascitti is currently offline Agostino MascittiFriend
Messages: 15
Registered: May 2018
Junior Member
Hello,

Sorry for writing again. The issue is quite strange because I saw at https://www.eclipse.org/4diac/en_help.php that with events it is supposed to work. Instead, using constant values, it stops working. I made the same to show the issue. Maybe I am wrong, or maybe it is buggy? I am using FORTE 1.9

Thank you in advance!

index.php/fa/33243/0/
  • Attachment: Capture.PNG
    (Size: 36.61KB, Downloaded 89 times)

[Updated on: Thu, 28 June 2018 14:10]

Report message to a moderator

Re: SUBSCRIBE_2 and PUBLISH_2 issue [message #1791349 is a reply to message #1791347] Thu, 28 June 2018 09:40 Go to previous messageGo to next message
Martin Melik-Merkumians is currently offline Martin Melik-MerkumiansFriend
Messages: 45
Registered: March 2016
Member
Hi!

The problem is that RD_1 is unconnected. As RDs are of type ANY, you need to typify the output by connecting it to a typed input. The easiest solution would be to connect an INT2INT FB to you RD_1, in order to correctly typify it.

Best regards
Martin
Re: SUBSCRIBE_2 and PUBLISH_2 issue [message #1791350 is a reply to message #1791349] Thu, 28 June 2018 10:02 Go to previous messageGo to next message
Agostino Mascitti is currently offline Agostino MascittiFriend
Messages: 15
Registered: May 2018
Junior Member
Hello,

Thank you for your support! It works if you have PUBLISH_2 and SUBSCRIBE_2 in FORTE, as shown in the first image below. But if you have PUBLISH_2 in GUI (Figure 2) and SUBSCRIBE_2 in FORTE (Figure 3) it seems not to respond.

Best regards,
Agostino

index.php/fa/33244/0/

index.php/fa/33245/0/

index.php/fa/33246/0/
  • Attachment: Capture.PNG
    (Size: 37.46KB, Downloaded 72 times)
  • Attachment: 2.PNG
    (Size: 21.12KB, Downloaded 74 times)
  • Attachment: 3.PNG
    (Size: 40.65KB, Downloaded 66 times)
Re: SUBSCRIBE_2 and PUBLISH_2 issue [message #1791365 is a reply to message #1791350] Thu, 28 June 2018 12:04 Go to previous messageGo to next message
Martin Melik-Merkumians is currently offline Martin Melik-MerkumiansFriend
Messages: 45
Registered: March 2016
Member
Hi!

As you trigger both applications via E_RESTART FBs, have you made sure, that the subscriber is ready, before you send via the publisher? From your screenshots I can see, that FORTE did not receive a message.

Best regards,
Martin
Re: SUBSCRIBE_2 and PUBLISH_2 issue [message #1791376 is a reply to message #1791365] Thu, 28 June 2018 12:47 Go to previous messageGo to next message
Agostino Mascitti is currently offline Agostino MascittiFriend
Messages: 15
Registered: May 2018
Junior Member
From the screenshot below I see that the receiving connection is open and that then something is received. Structure is the same as before.

Thank you for your time!

index.php/fa/33248/0/

EDIT: I have tried with a minimal GUI and PUBLISH_1 and SUBSCRIBE_1. When I click a checkbox, the value is sent. Also in that case, if PUBLISH_1 is given a constant value (like BOOL#1), it is not sent. If, instead, you connect IN_BOOL and PUBLISH_1, everything works. But I need a constant value...
  • Attachment: 2.PNG
    (Size: 96.60KB, Downloaded 50 times)

[Updated on: Thu, 28 June 2018 12:58]

Report message to a moderator

Re: SUBSCRIBE_2 and PUBLISH_2 issue [message #1791379 is a reply to message #1791376] Thu, 28 June 2018 13:42 Go to previous messageGo to next message
Martin Melik-Merkumians is currently offline Martin Melik-MerkumiansFriend
Messages: 45
Registered: March 2016
Member
Based on your EDIT, it seems to me, that the problem lies with the FBDK. I am not an FBDK expert, but I would assume, that it does not support typification via constants. Is there a BOOL2BOOL FB available in FBDK? If yes, try to connect it on the SD, the same holds for SD_2 but with an INT2INT respectively.

Best regards,
Martin
Re: SUBSCRIBE_2 and PUBLISH_2 issue [message #1791385 is a reply to message #1791379] Thu, 28 June 2018 13:56 Go to previous messageGo to next message
Agostino Mascitti is currently offline Agostino MascittiFriend
Messages: 15
Registered: May 2018
Junior Member
Thank you for your good idea!

Solution:

index.php/fa/33252/0/

index.php/fa/33253/0/
  • Attachment: 2.PNG
    (Size: 35.54KB, Downloaded 44 times)
  • Attachment: 3.PNG
    (Size: 35.75KB, Downloaded 38 times)
Re: SUBSCRIBE_2 and PUBLISH_2 issue [message #1791578 is a reply to message #1791385] Mon, 02 July 2018 15:21 Go to previous message
Martin Melik-Merkumians is currently offline Martin Melik-MerkumiansFriend
Messages: 45
Registered: March 2016
Member
Hi,

nice to hear that it works now!
Previous Topic:Monitoring Documentation
Next Topic:How to integrate struct data type to 4DIAC IDE?
Goto Forum:
  


Current Time: Fri Sep 21 00:14:08 GMT 2018

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

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

Back to the top