Skip to content

Function Block Programming

drag&bot has an built-in code environment for creating and modifying Function Blocks:

  1. Login in drag&bot Studio.
  2. Go to Home view or to Programs view.
  3. Click the small arrow right to New program to see the expanded menu.
  4. Select Create function block to begin. Create a function block from Programs

  5. Alternative: You may also modify a Function Block by clicking Edit program in the Function blocks tab of Program view. (Important Note: Released Function Blocks are not editable you can only save your modifications as a copy.) Modify a function block from Programs

  6. The code editor will open. It is possible there to edit the Python snippet. Check Create a simple function block for a detailed programming guide.

    Edit a function block

  7. You can add, modify and delete input and output parameters.

    Modify input parameters Modify output parameters

  8. The Infomation allows to modify title, description, icon, check current version, and manage error codes as defined in Create an error flow

    Edit Function Block information

Additionally, it is possible to edit the Function Block as JSON Format directly from the JSON tab.

Edit JSON format