工控肥仔
工控肥仔
級別: 網絡英雄
|
各位大師,指導下我這個問題: 比如:M0--M1--M2--M3--M4--M5--M6--M7八個點位中, 用開關量的方式,有多少種組合? 比如組成方式:比如1.1.1.1.1.1.1.1 0.0.0.0.0.0.0.0 1.0.1.0.1.0.1.0 1.1.1.1.0.0.0.0 |
---|---|
|
榮耀我是傳奇
級別: 探索解密
|
Sample: array[1..8] of bool;//樣本 EmptyFlag:bool;//樣本無標志 EmptyCoords:int;//無樣本坐標 MoveFlag:bool;//移動標志 i:int; EmptyFlag:=true; if MoveFlag=true then for i=1 to 8 do if Sample=false then EmptyFlag:=false; EmptyCoords:=i; exit; end_if; end_for; end_if; if EmptyFlag=false then MoveFlag:=true; 前移位置:=EmptyCoords; else 一次放入窄帶 end_if; if 移動完成 then 放入產品; 前移位置:=0; MoveFlag:=false; end_if; 我給你寫個大致思路,詳細細節(jié)你自己豐富 樓主留言:非常感謝!這種方式的程序目前看不懂,能幫我改成梯形圖嗎? |
---|---|
本帖最近評分記錄: |