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 » Terminated for publisher and subscriber
Terminated for publisher and subscriber [message #1809722] Mon, 22 July 2019 07:16 Go to next message
joy woo is currently offline joy wooFriend
Messages: 59
Registered: May 2019
Member
Through monitoring, I found the status of Subscriber_1 is terminated, i check the source code in forte:
EComResponse CRawDataComLayer::openConnection(char *){
switch (m_poFb->getComServiceType()){
case e_Client:
case e_Publisher:
if(m_poFb->getNumSD() != 1 || (m_poFb->getNumSD() > 0 && CIEC_ANY::e_STRING != m_poFb->getSDs()[0].getDataTypeID())){
return e_InitTerminated;
}
break;
case e_Server:
case e_Subscriber:
if(m_poFb->getNumRD() != 1 || (m_poFb->getNumRD() > 0 && CIEC_ANY::e_STRING != m_poFb->getRDs()[0].getDataTypeID())){
return e_InitTerminated;
}
break;
}
return e_InitOk;
}
}

that means when it is Subscriber_1 the output data ports shoud be 1, and the output data port should be linked to STRING TYPE, so i add a F_STRING_TO WSTRING to output data, deploy again, the the status is correct and not 'TERMINATED' any more, i am confused, if to use subscriber and publisher should be so restrict, too many rules make it difficult to the users, so if any special purpose here to set status to TERMINATED?
Re: Terminated for publisher and subscriber [message #1809730 is a reply to message #1809722] Mon, 22 July 2019 07:54 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 907
Registered: January 2014
Senior Member
Hi,

this is a special rule of the raw data layer. Which allows only one input or one output and that has to be of type STRING. Normally most layers give additional information on the STATUS output. It looks like that this has not been implemented yet. However the the RAW layer is something that you have to explicitly use. Are you really explicitly using the raw layer?

In general the Communciation FBs have generic in and ouputs of type ANY. Without connecting them to a specific type the FB does not know what data you like to receive.
Re: Terminated for publisher and subscriber [message #1809735 is a reply to message #1809730] Mon, 22 July 2019 08:34 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 59
Registered: May 2019
Member
thanks a lot, Mr. Zoitl,
Are there any documents of the 4diac FBs, only from holobloc? i noticed some fbs are slightly different.
it seems that the samples of traffic lights, Boiler etc are out of date, only the ArrowHeadTest is new, have the new samples been provided so far?
Re: Terminated for publisher and subscriber [message #1809737 is a reply to message #1809735] Mon, 22 July 2019 08:43 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 907
Registered: January 2014
Senior Member
Unfortunately we don't have much documentation for our FBs. In general the same FBs should behave the same in both FBDK and Eclipse 4diac. We have a bit more advanced communciation blocks. But if you use them the same way as FBDK they behave the same. Please have a look at the communication protocols in our docs on the advanced behavior.

Yes we currently don't have current samples. This is something we haven't found time for that. Please not that our work on 4diac is mostly based on different research and industry projects. The goals there define what we can do. However we are happy for your support and contributions.
Re: Terminated for publisher and subscriber [message #1809786 is a reply to message #1809737] Tue, 23 July 2019 12:05 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 59
Registered: May 2019
Member
now i use publisher with raw, the status is NO_SOCKET, i can't find the reason, so please give more detail hint to tell the user how to correct,
and i suggest, the whole app/system should be checked by manual(click button) or automatically checked(hint) when it is during designing phase,
that would be much better, using monitor to debug designing error that would lead to waste of time
Re: Terminated for publisher and subscriber [message #1809791 is a reply to message #1809786] Tue, 23 July 2019 13:12 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 907
Registered: January 2014
Senior Member
I think you missunderstood me. I definitly didn't recommend you to use the raw layer. As said the raw layer is a very special one, which I would recommend only if you are reallly knowing what you are doing. Did you had a look on our communication documetnation?
Re: Terminated for publisher and subscriber [message #1810480 is a reply to message #1809791] Mon, 12 August 2019 15:16 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 59
Registered: May 2019
Member
another question, for example, there are three output data values in cutsom fb of traffic light, red, yellow and green, if connect to the publish_1 which allows only one parameter, i want to transfer them to HMI, i tried concat strings(yellow,green,red) in ST,
but it seems to not support.
Re: Terminated for publisher and subscriber [message #1810483 is a reply to message #1810480] Mon, 12 August 2019 15:23 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 907
Registered: January 2014
Senior Member
we should have the CONCAT IEC 61131-3 function which should do such a job. But depending on the network protokol you can also do a publish_3, or a struct. Therefore it would be great to know more about what you try to achieve.
Re: Terminated for publisher and subscriber [message #1810489 is a reply to message #1810483] Mon, 12 August 2019 16:44 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 59
Registered: May 2019
Member
thanks a lot, puhlish_3 is not allowed with MQTT(rawdata), i want the node red to get the traffic status to be displayed
Re: Terminated for publisher and subscriber [message #1810491 is a reply to message #1810489] Mon, 12 August 2019 16:51 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 907
Registered: January 2014
Senior Member
ah yes this is the problem of the rawdata sample layer and the crappy MQTT. I'm not so deep into MQTT design. But you always need to weigh of between topic vs. content. the advantage of 3 different publishers would be that in the MQTT model you have three topics. combining everything into one topic has the draw back that you loose that. you now have several options. One is that you write your own layer which handles more then one input. You could take the raw as starting point. i know that someone put even a json layer into the forum. Maybe that is what you need. Or you write your own basic/simple FB which is utilizing the IEC 61131-3 string functions to generate an apropriate string for the raw layer.
Previous Topic:boot file throw error
Next Topic:OPC UA connection issue
Goto Forum:
  


Current Time: Mon Nov 18 06:03:36 GMT 2019

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

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

Back to the top