Hi there,
I'm working in a project of wago controller which is programmed by codesys 3.5, and I'm looking for way to let the operator to reset the controller from the HMI, so if there any ready function that can make this directly from the software without physical touching the controller.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Create program:
PROGRAM Ethercat_INode
VAR
pApp: POINTER TO CmpApp.APPLICATION;
result: RTS_IEC_RESULT;
xInit: BOOL:= TRUE;
xRestartApp: BOOL; //Visu
END_VAR
VAR RETAIN
xAutoRestart: BOOL;
END_VAR
IF xInit THEN
pApp:= AppGetCurrent(pResult:= result);
xInit:= FALSE;
xAutoRestart:= FALSE;
END_IF
IF xRestartApp THEN
xRestartApp:= FALSE;
CmpApp.AppReset(pApp:= pApp, usResetOption:= CmpApp.RTS_RESET);
xAutoRestart:= TRUE;
END_IF
Create function:
FUNCTION SysEvent_StopDone : DWORD
VAR_INPUT
EventPrm: CmpApp.EVTPARAM_CmpAppStop;
END_VAR
IF Ethercat_INode.xAutoRestart THEN
CmpApp.AppStartApplication(Ethercat_INode.pApp);
END_IF
In Task Configuration/System Events add event Handler StopDone and fuction call to SysEvent_StopDone.
Hopefully this helps.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This works kind of...
I'm using a PFC200 controller with the latest firmware. When the user resets or restarts the wago controller from his HMI the application restarts like it should but the run led on the controller turns red and stay red until the controller is power cycled. The controller is fully functional but the run led remains red. Could someone find a fix or a solution for this?
Last edit: awal 2021-04-27
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes. The controller works ok after the user requests a reset but the run led is red. Not sure how reliable the controller would be when the run led isn't green. Ok for a hobby project maybe, or during development but not in production.
Last edit: awal 2021-05-14
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there,
I'm working in a project of wago controller which is programmed by codesys 3.5, and I'm looking for way to let the operator to reset the controller from the HMI, so if there any ready function that can make this directly from the software without physical touching the controller.
Hi,
My solution:
Create program:
PROGRAM Ethercat_INode
VAR
pApp: POINTER TO CmpApp.APPLICATION;
result: RTS_IEC_RESULT;
xInit: BOOL:= TRUE;
xRestartApp: BOOL; //Visu
END_VAR
VAR RETAIN
xAutoRestart: BOOL;
END_VAR
IF xInit THEN
pApp:= AppGetCurrent(pResult:= result);
xInit:= FALSE;
xAutoRestart:= FALSE;
END_IF
IF xRestartApp THEN
xRestartApp:= FALSE;
CmpApp.AppReset(pApp:= pApp, usResetOption:= CmpApp.RTS_RESET);
xAutoRestart:= TRUE;
END_IF
Create function:
FUNCTION SysEvent_StopDone : DWORD
VAR_INPUT
EventPrm: CmpApp.EVTPARAM_CmpAppStop;
END_VAR
IF Ethercat_INode.xAutoRestart THEN
CmpApp.AppStartApplication(Ethercat_INode.pApp);
END_IF
In Task Configuration/System Events add event Handler StopDone and fuction call to SysEvent_StopDone.
Hopefully this helps.
This works kind of...
I'm using a PFC200 controller with the latest firmware. When the user resets or restarts the wago controller from his HMI the application restarts like it should but the run led on the controller turns red and stay red until the controller is power cycled. The controller is fully functional but the run led remains red. Could someone find a fix or a solution for this?
Last edit: awal 2021-04-27
U mean the controller work OK the only issue is the red led??
Yes. The controller works ok after the user requests a reset but the run led is red. Not sure how reliable the controller would be when the run led isn't green. Ok for a hobby project maybe, or during development but not in production.
Last edit: awal 2021-05-14