Commit f883b35f authored by Claes Sjofors's avatar Claes Sjofors

errlog message added when IO stalled by cyclesup

parent aebc2554
...@@ -1435,9 +1435,12 @@ cSup_exec ( ...@@ -1435,9 +1435,12 @@ cSup_exec (
o->AlarmCheck = FALSE; o->AlarmCheck = FALSE;
o->DelayNoted = TRUE; o->DelayNoted = TRUE;
if (o->DelayAction == 2) { if (o->DelayAction == 2) {
int prev_rwflag = l.iohp->IOReadWriteFlag;
l.iohp->IOReadWriteFlag = FALSE; l.iohp->IOReadWriteFlag = FALSE;
l.nodep->EmergBreakTrue = TRUE; l.nodep->EmergBreakTrue = TRUE;
errh_SetStatus( MH__IOSTALLED); errh_SetStatus( MH__IOSTALLED);
if ( prev_rwflag)
errh_Fatal("CycleSup delayed with action Stop I/O");
} }
} }
} }
...@@ -5430,4 +5433,4 @@ static pwr_tStatus emon_redu_receive() ...@@ -5430,4 +5433,4 @@ static pwr_tStatus emon_redu_receive()
} }
qcom_Free( &sts, msg); qcom_Free( &sts, msg);
return MH__SUCCESS; return MH__SUCCESS;
} }
\ No newline at end of file
...@@ -705,9 +705,12 @@ scan ( ...@@ -705,9 +705,12 @@ scan (
time_GetTime(&now); time_GetTime(&now);
delay_action = csup_Exec(&sts, tp->csup_lh, (pwr_tDeltaTime *) &tp->sync_time, (pwr_tDeltaTime *) &tp->after_scan, &now); delay_action = csup_Exec(&sts, tp->csup_lh, (pwr_tDeltaTime *) &tp->sync_time, (pwr_tDeltaTime *) &tp->after_scan, &now);
if (delay_action == 2) { if (delay_action == 2) {
int prev_rwflag = pp->IOHandler->IOReadWriteFlag;
pp->IOHandler->IOReadWriteFlag = FALSE; pp->IOHandler->IOReadWriteFlag = FALSE;
pp->Node->EmergBreakTrue = TRUE; pp->Node->EmergBreakTrue = TRUE;
errh_SetStatus( PLC__IOSTALLED); errh_SetStatus( PLC__IOSTALLED);
if ( prev_rwflag)
errh_Fatal("CycleSup delayed with action Stop I/O");
} }
} }
...@@ -764,4 +767,4 @@ scan ( ...@@ -764,4 +767,4 @@ scan (
if ( tp->loops % MAX( 1, (int)(1.0 / tp->PlcThread->ScanTime)) == 0) if ( tp->loops % MAX( 1, (int)(1.0 / tp->PlcThread->ScanTime)) == 0)
pwrs_Node_SupEmon(); pwrs_Node_SupEmon();
} }
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment