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 » ECC status change Hook executeEvent
ECC status change Hook executeEvent [message #1821868] Fri, 21 February 2020 12:07 Go to next message
joy woo is currently offline joy wooFriend
Messages: 150
Registered: May 2019
Senior Member
sometimes we have the problem that there are many statuses
in the custom FB, and we want to all the current status where meet the
condition then will route to one status(for example:Stopped),
we need do something at the beginning of the executeEvent, or the end of the excuteEvent. Which is very useful, otherwise the lines will be too many.
Re: ECC status change Hook executeEvent [message #1821869 is a reply to message #1821868] Fri, 21 February 2020 12:16 Go to previous messageGo to next message
Martin Melik-Merkumians is currently offline Martin Melik-MerkumiansFriend
Messages: 97
Registered: March 2016
Member
Hi,
that's currently outside the modelling methods of IEC 61499
Re: ECC status change Hook executeEvent [message #1821879 is a reply to message #1821869] Fri, 21 February 2020 14:45 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1071
Registered: January 2014
Senior Member
What I found very helpfull is to have several algorithms to be used in one action. I think this is not what you wanted but it may help you.
Re: ECC status change Hook executeEvent [message #1821882 is a reply to message #1821879] Fri, 21 February 2020 15:26 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 150
Registered: May 2019
Senior Member
@Mr. Zoitl,
not exactly what i want ,
for example, i want the functionality as the bold lines:
once meet the condition, whatever status then route to Stopped status
now if there are 20 status, we have to connect each status to Stopped status 20 times. that makes the GUI difficult to view and check


void FORTE_LightCylinder::executeEvent(int pa_nEIID){
bool bTransitionCleared;
do{
bTransitionCleared = true;


if((Stop() == 1) || (((Automode() == 0) && (Rst() == 1))))
enterStateStop();

//
switch(m_nECCState){
case scm_nStateSTART:
if((scm_nEventONID == pa_nEIID) && (((LScreen() == 1) && (Stop() == 0))))
enterStateForwarding();
else
if((scm_nEventREQID == pa_nEIID) && ((Stop() == 1)))
enterStateStop();
else
bTransitionCleared = false; //no transition cleared
break;
case scm_nStateForwarding:
if((Stop() == 1) || (((Automode() == 0) && (Rst() == 1))))
enterStateStop();
else
if((LCLimit() == 1) && (LScreen() == 1))
enterStateLimit();
else
bTransitionCleared = false; //no transition cleared
break;
case scm_nStateLimitOperation:
if((scm_nEventOffID == pa_nEIID) && (((LScreen() == 1) && (Stop() == 0))))
enterStateBacking();
else
if((Stop() == 1) || (((Automode() == 0) && (Rst() == 1))))
enterStateStop();
else
bTransitionCleared = false; //no transition cleared
break;
case scm_nStateBacking:
if((LCOrigin() == 1) && (((Automode() == 1) || (((Automode() == 0) && (Jog() == 1))))))
enterStateBackingLimit();
else
if((Stop() == 1) || (((Automode() == 0) && (Rst() == 1))))
enterStateStop();
else
bTransitionCleared = false; //no transition cleared
break;
case scm_nStateBackingLimit:
if(1)
enterStateSTART();
else
if((Stop() == 1) || (((Automode() == 0) && (Rst() == 1))))
enterStateStop();
else
bTransitionCleared = false; //no transition cleared
break;
case scm_nStateStop:
if(Stop() == 0)
enterStateSTART();
else
bTransitionCleared = false; //no transition cleared
break;
case scm_nStateLimit:
if((((Automode() == 1) || (((Automode() == 0) && (Jog() == 1))))) && (LScreen() == 1))
enterStateLimitOperation();
else
if((Stop() == 1) || (((Automode() == 0) && (Rst() == 1))))
enterStateStop();
else
bTransitionCleared = false; //no transition cleared
break;
default:
DEVLOG_ERROR("The state is not in the valid range! The state value is: %d. The max value can be: 6.", m_nECCState.operator TForteUInt16 ());
m_nECCState = 0; //0 is always the initial state
break;
}
pa_nEIID = cg_nInvalidEventID; // we have to clear the event after the first check in order to ensure correct behavior
}while(bTransitionCleared);
}

[Updated on: Fri, 21 February 2020 15:33]

Report message to a moderator

Re: ECC status change Hook executeEvent [message #1821918 is a reply to message #1821882] Sat, 22 February 2020 21:57 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1071
Registered: January 2014
Senior Member
Thanks for the clarification. Yes my suggestion is of no help in your case.

What would help in your case would be hierarchical state machines. Hierarchical state machines are currently not in the definitions of the standard. However we are discussing that in the standardization committee to expand the standard with them.
Re: ECC status change Hook executeEvent [message #1821924 is a reply to message #1821918] Sun, 23 February 2020 08:01 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 150
Registered: May 2019
Senior Member
When will it be opened? And is this in the develop version?

[Updated on: Sun, 23 February 2020 08:25]

Report message to a moderator

Re: ECC status change Hook executeEvent [message #1821934 is a reply to message #1821924] Sun, 23 February 2020 15:11 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1071
Registered: January 2014
Senior Member
I can not say. We first need the definitions in the standard before we can start implementing something for Eclipse 4diac.
Previous Topic:Does FORTE run on systems without OS
Next Topic:How does 4diac convert ST into c code?
Goto Forum:
  


Current Time: Mon Nov 30 21:39:39 GMT 2020

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

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

Back to the top