Commit df59cec5 authored by Claes Sjofors's avatar Claes Sjofors

Default ai card changed from 16 to 32 channels

parent 1304e827
......@@ -50,50 +50,51 @@ function int ssab_create_signal( string rname, string resname, string chname, st
chnr_str = extract( 5, 2, chname);
cnam=rname + "-" + cname;
if ( type == "DI")
cardclass = "Ssab_DI32D";
channels = 32;
endif
if ( type == "DO")
cardclass = "Ssab_DO32DKS";
channels = 32;
endif
if ( type == "AI")
cardclass = "Ssab_AI32uP";
channels = 32;
endif
if ( type == "AO")
cardclass = "Ssab_AO8uP";
channels = 8;
endif
if ( type == "CO")
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
if ( type == "DI")
cardclass = "Ssab_DI32D";
channels = 32;
endif
if ( type == "DO")
cardclass = "Ssab_DO32DKS";
channels = 32;
endif
if ( type == "AI")
cardclass = "Ssab_AI16uP";
channels = 16;
endif
if ( type == "AO")
cardclass = "Ssab_AO8uP";
channels = 8;
endif
if ( type == "CO")
cardclass = "Ssab_Co4uP";
channels = 4;
endif
! 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);
create object/dest='resname'/class='type'/name="'rnam'"
sprintf( hnam, "%s-%s", resname, rnam);
if (!ObjectExist(hnam))
create object/dest='resname'/class='type'/name="'rnam'"
sprintf( chnam, "Ch%02.2d", i);
! Connect to channel
set attr/noco/name='hnam'/attr=SigChanCon/value='rname'-'cname'.'chnam'
endif
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
endif
! Set description in signal
sprintf( rnam, "Reserv_%s%s", cname, chnr_str);
set attr/noco/name='resname'-'rnam'/attr=Description/value="'sig_descr'"
......
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