建立FB,然后OB1中调用,写的有点不太明确,后期可以交流
#zhongjianjishuzhi := 0;
#linshi := #shuru;
FOR #xunhuan := 0 TO 31 DO
// Statement section FOR
IF #linshi.%X0
THEN
#zhongjianjishuzhi += 1;
END_IF;
#linshi := ROL_DWORD(IN := #linshi, N := 1);
END_FOR;
#shuliang := #zhongjianjishuzhi;
楼主最近还看过