Please give us the explainantion how to use the TYPE AND END_TYPE, NO Sturecture
like below:
"
TYPE DataTypeEnum_EngineType :
(MtuT4, CATT3, PerkingsT3);
END_TYPE
"
HOW TO Define the value to " DataTypeEnum_EngineType" inside of "()"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2014-10-20
Originally created by: scott_cunningham
To define an ENUM, use TYPE and END_TYPE with ( and ); inside like this:
TYPET_MACHINE_STATE:(
  BOOTING,              //0
  INIT,
  WAITING_FOR_ETHERCAT_BUS,
  STARTING_DEVICE_CHECK,
  CHARGING,
  WAITING_FOR_INPUT_RUN, //5
  RUN_ACCELERATION,
  RUN_AT_SPEED,
  STOPPING,
  ESTOP,
  ESTOP_RESET,         //10
  CODE_FAULT);END_TYPE
It is also possible to force certain values and the datatype (in this example it should be a DINT) like this:
TYPEBigEnum:(  yellow,  blue,  green:=16#8000)DINT;END_TYPE
NOTE! I believe it is important to NOT have a comma (",") after the last ENUM item!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Good days,:
Please give us the explainantion how to use the TYPE AND END_TYPE, NO Sturecture
like below:
"
TYPE DataTypeEnum_EngineType :
(MtuT4, CATT3, PerkingsT3);
END_TYPE
"
HOW TO Define the value to " DataTypeEnum_EngineType" inside of "()"
Originally created by: scott_cunningham
To define an ENUM, use TYPE and END_TYPE with ( and ); inside like this:
It is also possible to force certain values and the datatype (in this example it should be a DINT) like this:
NOTE! I believe it is important to NOT have a comma (",") after the last ENUM item!
to give a value:
etype : DataTypeEnum_EngineType ;
in declaration
(MtuT4, CATT3, PerkingsT3);
in program etype.MtuT4:=value;