runtime.var 2.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. (*Common Functionblock Status*)
  2. VAR CONSTANT
  3. ERR_OK : UINT := 0; (*no error*)
  4. ERR_NOTIMPLEMENTED : UINT := 9999; (*function or function block not implemented*)
  5. ERR_FUB_ENABLE_FALSE : UINT := 16#FFFE; (*function block parameter "enable" is FALSE*)
  6. ERR_FUB_BUSY : UINT := 16#FFFF; (*function block still working*)
  7. ERR_FUB_REDUNDANT : UINT := 35688; (*This FUB can not be used on the standby CPU*)
  8. ERR_FB_NOT_IMPLEMENTED: DINT := -1070585592;(*function or function block not implemented for the target system*)
  9. END_VAR
  10. (*IEC 61131-3 Datatypes*)
  11. VAR CONSTANT
  12. IEC_DATATYPE_BOOL : UINT := 1; (*8 Bit containing a boolean value FALSE=0 or TRUE=1*)
  13. IEC_DATATYPE_SINT : UINT := 2; (*8 Bit signed integer*)
  14. IEC_DATATYPE_INT : UINT := 3; (*16 Bit signed integer*)
  15. IEC_DATATYPE_DINT : UINT := 4; (*32 Bit signed integer*)
  16. IEC_DATATYPE_USINT : UINT := 5; (*8 Bit unsigned integer*)
  17. IEC_DATATYPE_UINT : UINT := 6; (*16 Bit unsigned integer*)
  18. IEC_DATATYPE_UDINT : UINT := 7; (*32 Bit unsigned integer*)
  19. IEC_DATATYPE_REAL : UINT := 8; (*32 Bit floating point number*)
  20. IEC_DATATYPE_STRING : UINT := 9; (*Variable-length single-byte character string*)
  21. IEC_DATATYPE_ULINT : UINT := 10; (*64 Bit unsigned integer*)
  22. IEC_DATATYPE_DATE_AND_TIME : UINT := 11; (*32 Bit of Date in Seconds since 01.01.1970 00:00:00*)
  23. IEC_DATATYPE_TIME : UINT := 12; (*32 Bit of Time in ms*)
  24. IEC_DATATYPE_DATE : UINT := 13; (*32 Bit of Date (only)*)
  25. IEC_DATATYPE_LREAL : UINT := 14; (*64 Bit floating point number*)
  26. IEC_DATATYPE_TIME_OF_DAY: UINT := 16; (*32 Bit Time of day (only)*)
  27. IEC_DATATYPE_BYTE : UINT := 17; (*Bit string of length 8*)
  28. IEC_DATATYPE_WORD : UINT := 18; (*Bit string of length 16*)
  29. IEC_DATATYPE_DWORD : UINT := 19; (*Bit string of length 32*)
  30. IEC_DATATYPE_LWORD : UINT := 20; (*Bit string of length 64*)
  31. IEC_DATATYPE_WSTRING : UINT := 21; (*Variable-length double-byte character string*)
  32. IEC_DATATYPE_LINT : UINT := 23; (*64 Bit signed integer*)
  33. END_VAR