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
chnr_str = extract( 5, 2, chname);
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")
cardclass = "Ssab_DI32D";
channels = 32;
......@@ -65,8 +60,8 @@ function int ssab_create_signal( string rname, string resname, string chname, st
channels = 32;
endif
if ( type == "AI")
cardclass = "Ssab_AI16uP";
channels = 16;
cardclass = "Ssab_AI32uP";
channels = 32;
endif
if ( type == "AO")
cardclass = "Ssab_AO8uP";
......@@ -76,23 +71,29 @@ function int ssab_create_signal( string rname, string resname, string chname, st
cardclass = "Ssab_Co4uP";
channels = 4;
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 object/dest="'rname'"/class='cardclass'/name="'cname'"
! Create signalobjects in reserv hierarchy
for ( i = 1; i < channels + 1; 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'"
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);
set attr/noco/name='resname'-'rnam'/attr=SigChanCon/value='rname'-'cname'.'chnam'
endfor
! Connect to channel
set attr/noco/name='hnam'/attr=SigChanCon/value='rname'-'cname'.'chnam'
endif
endfor
endif
! Set description in signal
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