Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
80759d43
Commit
80759d43
authored
Jan 11, 2011
by
Claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Plc loop options added for policy when execution time exceeds scantime
parent
d879e4d3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
1 deletion
+84
-1
src/lib/rt/src/rt_plc.h
src/lib/rt/src/rt_plc.h
+1
-0
src/lib/rt/src/rt_plc_thread.c
src/lib/rt/src/rt_plc_thread.c
+10
-1
src/wbl/pwrb/src/pwrb_c_plcthread.wb_load
src/wbl/pwrb/src/pwrb_c_plcthread.wb_load
+10
-0
src/wbl/pwrb/src/pwrb_td_threadoptionsmask.wb_load
src/wbl/pwrb/src/pwrb_td_threadoptionsmask.wb_load
+63
-0
No files found.
src/lib/rt/src/rt_plc.h
View file @
80759d43
...
...
@@ -154,6 +154,7 @@ struct plc_sThread {
plc_sArea
copy
;
io_tCtx
plc_io_ctx
;
pwr_tBoolean
first_scan
;
int
skip_count
;
};
struct
plc_sProcess
{
...
...
src/lib/rt/src/rt_plc_thread.c
View file @
80759d43
...
...
@@ -282,6 +282,7 @@ scan (
if
(
time_Dcomp
(
&
delta
,
NULL
)
>
0
)
{
pwr_tStatus
sts
;
int
phase
=
0
;
tp
->
skip_count
=
0
;
if
(
tp
->
csup_lh
!=
NULL
)
{
pwr_tTime
now
;
...
...
@@ -322,8 +323,16 @@ scan (
}
break
;
}
else
}
else
{
tp
->
sliped
++
;
if
(
tp
->
PlcThread
->
Options
&
pwr_mThreadOptionsMask_OverExecScanSingle
&&
tp
->
skip_count
<
10
)
{
tp
->
skip_count
++
;
break
;
}
else
if
(
tp
->
PlcThread
->
Options
&
pwr_mThreadOptionsMask_OverExecScanAlways
)
break
;
}
}
while
(
!
tp
->
exit
);
...
...
src/wbl/pwrb/src/pwrb_c_plcthread.wb_load
View file @
80759d43
...
...
@@ -57,6 +57,16 @@ SObject pwrb:Class
EndBody
EndObject
!/**
! Plc thread options.
! Specification of the action when the execution time exceeds
! the scantime.
!*/
Object Options $Attribute 36
Body SysBody
Attr TypeRef = "pwrb:Type-ThreadOptionsMask"
EndBody
EndObject
!/**
! Scan time for the plc thread.
!*/
Object ScanTime $Attribute 3
...
...
src/wbl/pwrb/src/pwrb_td_threadoptionsmask.wb_load
0 → 100644
View file @
80759d43
!
! Proview $Id$
! Copyright (C) 2005 SSAB Oxelsund AB.
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation, either version 2 of
! the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with the program, if not, write to the Free Software
! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
!
! pwrb_td_threadoptionsmask.wb_load -- Defines the enum type ThreadOptionsMask
!
SObject pwrb:Type
!/**
! @Version 1.0
! @Group Types
! Mask for thread options.
!*/
Object ThreadOptionsMask $TypeDef 53
Body SysBody
Attr TypeRef = "pwrs:Type-$Mask"
Attr PgmName = "ThreadOptionsMask"
EndBody
!/**
! When the execution time exeeds the scantime
! the next scan is always executed.
!*/
Object OverExecScanAlways $Bit
Body SysBody
Attr PgmName = "OverExecScanAlways"
Attr Text = "OverExecScanAlways"
Attr Value = 1
EndBody
EndObject
!/**
! When the execution time exeeds the scantime ten times in
! a row, one scan is skipped.
!*/
Object OverExecScanSingle $Bit
Body SysBody
Attr PgmName = "OverExecScanSingle"
Attr Text = "OverExecScanSingle"
Attr Value = 2
EndBody
EndObject
EndObject
EndSObject
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment