The_pirate_angle
Wonverson
2019-05-10 20:52

如何用simtalk语言实现固定存储中的装卸载功能,我只知道混合存储的,怎样在上面修改

  • 开发语言

(sensorID : integer)
is
i, j, k, m, p, w:integer;
Name:string;
Obj,Res:object;
do
p:=ascii(ProductType)-64;
w:=WH_var[3,p].YDim;
if CurrTask=1 then
for k:=1 to w loop -- 先搜索存储区块
-- 再按行搜索,即按储位搜索
for i:=WH_var[3,p][3,k] to WH_var[3,p][4,k] loop
-- 然后按货架搜索
for j:=WH_var[3,p][1,k] to WH_var[3,p][2,k] loop
-- 最后按货架层搜索
for m:=1 to WH_nums loop
Res:=str_to_obj(sprint("Store_",m));
Obj:=str_to_obj(sprint("Status.StoreData_",m));
if Res[j,i].empty=true then
Obj[j,i]:=sprint(ProductType, PartType);
@.cont.move(Res[j,i]);
@.backwards:=true;
return;
end;
next;
next;
next;
next;
promptmessage(sprint(ProductType,"类物品存储空间已满,请先释放相应空间!"));
@.cont.move(Drain);
@.backwards:=true;
else
if TransNums>0 then
for k:=1 to w loop -- 先搜索存储区块
-- 再按行搜索,即按储位搜索
for i:=WH_var[3,p][3,k] to WH_var[3,p][4,k] loop
-- 然后按货架搜索
for j:=WH_var[3,p][1,k] to WH_var[3,p][2,k] loop
-- 最后按货架层搜索
for m:=1 to WH_nums loop
Res:=str_to_obj(sprint("Store_",m));
Obj:=str_to_obj(sprint("Status.StoreData_",m));
if Res[j,i].empty=false then
--print "OK:",Res[j,i].cont.curricon;
Name:=sprint(ProductType, PartType);
if Name=Res[j,i].cont.currIcon then
Obj[j,i]:="";
Res[j,i].cont.move(@);
@.backwards:=false;
return;
end;
end;
next;
next;
next;
next;
promptmessage(sprint(ProductType,"类物品暂时缺货,请先补充库存!"));
TransNums:=0;
@.backwards:=true;
--@.move(Drain);
else
TransNums:=0;
@.backwards:=true;
--@.move(Drain);
--EventController.Reset;
end;
end;


  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

0条回答

为你推荐