请找到并告诉我它是什么类型的代码

请找到并告诉我它是什么类型的代码

本文介绍了请找到并告诉我它是什么类型的代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 IF NOT data.big_or_small THEN 
FOR jj:= 1 TO 4 DO
FOR ii:= 1 to 6 DO
master6_MC_CAMSWITCH_TR [ii +(jj-1 )* 12] .TrackNumber:= II;
master6_MC_CAMSWITCH_TR [ii +(jj-1)* 12] .FirstOnPosition:= INT_TO_REAL(240 *(jj-1))+ INT_TO_REAL(40 *(ii-1));
master6_MC_CAMSWITCH_TR [ii +(jj-1)* 12] .LastOnPosition:= INT_TO_REAL(240 *(jj-1))+ INT_TO_REAL(40 *(ii-1))+ data.quyang_pos;
END_FOR
END_FOR
ELSE
FOR jj:= 1 TO 2 DO
FOR ii:= 1 to 6 DO
master6_MC_CAMSWITCH_TR [ii +(jj-1 )* 12] .TrackNumber:= II;
master6_MC_CAMSWITCH_TR [ii +(jj-1)* 12] .FirstOnPosition:= INT_TO_REAL(480 *(jj-1))+ INT_TO_REAL(80 *(ii-1));
master6_MC_CAMSWITCH_TR [ii +(jj-1)* 12] .LastOnPosition:= INT_TO_REAL(480 *(jj-1))+ INT_TO_REAL(80 *(ii-1))+ data.quyang_pos;
END_FOR
END_FOR
END_IF
updown_MC_MoveVelocity(
执行:= M_R_TRIG2.Q,
速度:= Data.g_r_updownvelocity_M,
加速度:= 1000,
减速:= 1000,
方向:=,
轴:=上升,
InVelocity => ;,
CommandAborted => ;,
错误=> ;,
ErrorID =>);
解决方案



IF NOT data.big_or_small THEN
FOR jj:=1 TO 4 DO
FOR ii :=1 TO 6 DO
master6_MC_CAMSWITCH_TR[ii+(jj-1)*12].TrackNumber:=ii;
master6_MC_CAMSWITCH_TR[ii+(jj-1)*12].FirstOnPosition:=INT_TO_REAL(240*(jj-1))+INT_TO_REAL(40*(ii-1));
master6_MC_CAMSWITCH_TR[ii+(jj-1)*12].LastOnPosition:=INT_TO_REAL(240*(jj-1))+INT_TO_REAL(40*(ii-1))+data.quyang_pos;
END_FOR
END_FOR
ELSE
FOR jj:=1 TO 2 DO
FOR ii :=1 TO 6 DO
master6_MC_CAMSWITCH_TR[ii+(jj-1)*12].TrackNumber:=ii;
master6_MC_CAMSWITCH_TR[ii+(jj-1)*12].FirstOnPosition:=INT_TO_REAL(480*(jj-1))+INT_TO_REAL(80*(ii-1));
master6_MC_CAMSWITCH_TR[ii+(jj-1)*12].LastOnPosition:=INT_TO_REAL(480*(jj-1))+INT_TO_REAL(80*(ii-1))+data.quyang_pos;
END_FOR
END_FOR
END_IF
updown_MC_MoveVelocity(
Execute:= M_R_TRIG2.Q ,
Velocity:= Data.g_r_updownvelocity_M,
Acceleration:= 1000,
Deceleration:= 1000,
Direction:= ,
Axis:= updown,
InVelocity=> ,
CommandAborted=> ,
Error=> ,
ErrorID=> );
解决方案



这篇关于请找到并告诉我它是什么类型的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 06:58