Commit df59cec5 authored by Claes Sjofors's avatar Claes Sjofors

Default ai card changed from 16 to 32 channels

parent 1304e827
...@@ -50,12 +50,7 @@ function int ssab_create_signal( string rname, string resname, string chname, st ...@@ -50,12 +50,7 @@ function int ssab_create_signal( string rname, string resname, string chname, st
chnr_str = extract( 5, 2, chname); chnr_str = extract( 5, 2, chname);
cnam=rname + "-" + cname; cnam=rname + "-" + cname;
if (!ObjectExist(cnam))
! Create the rack and reservhierarchy if not created
ssab_create_object( rname, "Rack_SSAB");
ssab_create_object( resname, "$PlantHier");
! The card didn't exist, create it
if ( type == "DI") if ( type == "DI")
cardclass = "Ssab_DI32D"; cardclass = "Ssab_DI32D";
channels = 32; channels = 32;
...@@ -65,8 +60,8 @@ function int ssab_create_signal( string rname, string resname, string chname, st ...@@ -65,8 +60,8 @@ function int ssab_create_signal( string rname, string resname, string chname, st
channels = 32; channels = 32;
endif endif
if ( type == "AI") if ( type == "AI")
cardclass = "Ssab_AI16uP"; cardclass = "Ssab_AI32uP";
channels = 16; channels = 32;
endif endif
if ( type == "AO") if ( type == "AO")
cardclass = "Ssab_AO8uP"; cardclass = "Ssab_AO8uP";
...@@ -76,23 +71,29 @@ function int ssab_create_signal( string rname, string resname, string chname, st ...@@ -76,23 +71,29 @@ function int ssab_create_signal( string rname, string resname, string chname, st
cardclass = "Ssab_Co4uP"; cardclass = "Ssab_Co4uP";
channels = 4; channels = 4;
endif endif
if (!ObjectExist(cnam))
! Create the rack and reservhierarchy if not created
ssab_create_object( rname, "Rack_SSAB");
ssab_create_object( resname, "$PlantHier");
! The card didn't exist, create it
! Create the card ! Create the card
create object/dest="'rname'"/class='cardclass'/name="'cname'" create object/dest="'rname'"/class='cardclass'/name="'cname'"
! Create signalobjects in reserv hierarchy ! Create signalobjects in reserv hierarchy
for ( i = 1; i < channels + 1; i++) for ( i = 1; i < channels + 1; i++)
sprintf( rnam, "Reserv_%s%02.2d", cname, i); sprintf( rnam, "Reserv_%s%02.2d", cname, i);
sprintf( hnam, "%s-%s", resname, rnam);
if (!ObjectExist(hnam))
create object/dest='resname'/class='type'/name="'rnam'" create object/dest='resname'/class='type'/name="'rnam'"
endfor
! Connect channels and signals
for ( i = 1; i < channels + 1; i++)
sprintf( rnam, "Reserv_%s%02.2d", cname, i);
sprintf( chnam, "Ch%02.2d", i); sprintf( chnam, "Ch%02.2d", i);
set attr/noco/name='resname'-'rnam'/attr=SigChanCon/value='rname'-'cname'.'chnam' ! Connect to channel
endfor set attr/noco/name='hnam'/attr=SigChanCon/value='rname'-'cname'.'chnam'
endif endif
endfor
endif
! Set description in signal ! Set description in signal
sprintf( rnam, "Reserv_%s%s", cname, chnr_str); sprintf( rnam, "Reserv_%s%s", cname, chnr_str);
......
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