Function Block Programming¶
drag&bot has an built-in code environment for creating and modifying Function Blocks:
- Login in drag&bot Studio.
- Go to Home view or to Programs view.
- Click the small arrow right to New program to see the expanded menu.
Select Create function block to begin.
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.)
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.
You can add, modify and delete input and output parameters.
The Infomation allows to modify title, description, icon, check current version, and manage error codes as defined in Create an error flow
Additionally, it is possible to edit the Function Block as JSON Format directly from the JSON tab.