quote:以下是引用taoplln在2009-03-16 22:04:18的发言:
StructAxesTOs :STRUCT
Pos_Axis :ARRAY[1..2] OF posaxis := [2(TO#NIL)];
Following_Axis :ARRAY[1..2] OF followingAxis := [2(TO#NIL)];
External_Encoder :ARRAY[1..2] OF externalEncoderType := [2(TO#NIL)];
Following_Object :ARRAY[1..2] OF followingObjectType := [2(TO#NIL)];
Printmark :ARRAY[1..2] OF measuringInputType := [2(TO#NIL)];
END_STRUCT;
事例中设定结构变量时,默认值[2(TO#NIL)]什么意思?
SyncPosBuffer :STRUCT
SyncPos :ARRAY[0..SPB_max] OF LREAL;
SP_read :ARRAY[0..SPB_max] OF BOOL;
SP_entered :ARRAY[0..SPB_max] OF BOOL;
END_STRUCT;
数组变量的数量在ST中可以用变值表示,在mcc中是否可以?