Structure program

Dividing OB1 in separate subprogrammes

The OB1, in which the program resides, can be divided into 3 FB's:

  • FB1 01-General
  • FB2 02-General_Pick&Placer
  • FB3 03-Cycle_Pick&Placer

With this the programm can be divided into small subtasks, which makes the program clearer. Additionally recurring functions such as moving the axis can be programmed once and reused again and again - which corresponds to the DRY principle.

BlocktypeShortFeatures
Organization blockOB
  • Link between OS and program
  • Graduated priorities (1 to 28)
  • i.e. OB1, OB120
    Function blockFB
    • Parametrable (with memory)
    • IN, OUT, INOUT, STAT, TEMP
    • Usage of instance-DB. Replace actual parameter Formal parameter.
    FunctionFC
    • Gives return value of calling functions
    • Parametrable, but no(!) memory
    • i.e. mathematical functions
    Data blockDB
    • Global data storage
    • Local data storage (Instance-DB)