type
Tpmd = (pmdOne, pmdTwo, pmdThree);//如果还有可以再增加
Tpmds = set of Tpmd;
...
var
pmd: Tpmds = [pmdOne]; //定义变量
...
//循环,一般是弄个定时器让它不停地跑
begin
if pmd = [pmdOne] then
begin
pmd := [pmdTwo];
{做其它事情}
end;
if pmd = [pmdTwo] then
begin
pmd := [pmdThree];
{做其它事情}
end;
if pmd = [pmdThree] then
begin
pmd := [pmdOne];
{做其它事情}
end;
end;