Commit 99a0b36d authored by Claes Sjofors's avatar Claes Sjofors

IO process mask updated to match definition in rt_io_base.h (refs #109)

parent 076867aa
......@@ -2114,7 +2114,10 @@ static pwr_tStatus io_init_card(
strcpy( attrname, cname);
strcat( attrname, ".Process");
sts = gdh_GetObjectInfo( attrname, &process, sizeof(process));
if ( ((EVEN(sts) && ctx->Process == io_mProcess_User) ||
if ( ((EVEN(sts) && (ctx->Process == io_mProcess_User ||
ctx->Process == io_mProcess_User2 ||
ctx->Process == io_mProcess_User3 ||
ctx->Process == io_mProcess_User4)) ||
(ODD(sts) && ctx->Process == (int) process)) && !swap) {
if ( process == io_mProcess_Plc) {
/* Check thread also */
......
......@@ -102,6 +102,9 @@ typedef enum {
io_mProcess_IoComm = 1 << 1,
io_mProcess_Profibus = 1 << 2,
io_mProcess_User = 1 << 3,
io_mProcess_User2 = 1 << 4,
io_mProcess_User3 = 1 << 5,
io_mProcess_User4 = 1 << 6,
io_mProcess_All = ~0
} io_mProcess;
......
......@@ -69,23 +69,33 @@ SObject pwrb:Type
EndBody
EndObject
!/**
! User1. Device is handled by a user process.
! Reserved for profibus handling.
!*/
Object User $Bit
Object Profibus $Bit
Body SysBody
Attr PgmName = "User1"
Attr Text = "User1"
Attr PgmName = "Profibus"
Attr Text = "Reserved"
Attr Value = 4
EndBody
EndObject
!/**
! User. Device is handled by a user process.
!*/
Object User $Bit
Body SysBody
Attr PgmName = "User"
Attr Text = "User"
Attr Value = 8
EndBody
EndObject
!/**
! User2. Device is handled by a user process.
!*/
Object User2 $Bit
Body SysBody
Attr PgmName = "User2"
Attr Text = "User2"
Attr Value = 8
Attr Value = 16
EndBody
EndObject
!/**
......@@ -95,7 +105,7 @@ SObject pwrb:Type
Body SysBody
Attr PgmName = "User3"
Attr Text = "User3"
Attr Value = 16
Attr Value = 32
EndBody
EndObject
!/**
......@@ -105,7 +115,7 @@ SObject pwrb:Type
Body SysBody
Attr PgmName = "User4"
Attr Text = "User4"
Attr Value = 32
Attr Value = 64
EndBody
EndObject
EndObject
......
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