Office 0049-(0)40 - 866 298 75
Mobil 0049-(0)171-28 52 405

The PMS Function Block Editor FB2

UI of FB2

What is FB2 good for ?

The function block editor FB2 offers you the graphical programming of your applications in a very easy and fast way. PMS FB2 is compatible the the IEC-61131 standard. The PMS Function Block Editor creates automatically a C source code, which is functionally identical to the graphical program. UNIVERSAL PROGRAMMING STUDIO and the PMS Function Block Editor offers a target hardware neutral software development. The portation of function block programs to a big number of target hardware is very easy. All graphical programmng languages of UNIVERSAL PROGRAMMING STUDIO can easily be combined with function block programs. The professional release of  the PMS Function Block Editor offers in combination with UNIVERSAL PROGRAMMING STUDIO a download of target code (EXE, Intel-Hex or Motorla S-Record) to the target hardware. The function block program can be visualized and controlled online via Ethernet, CAN and LIN or be simulated on the PC in real time. The target software can be started and stopped in the target hardware and process data can be read and written in the target hardware in real time.

The Highlights

  � Project oriented programming with the same touch and feel as in other Microsoft tools
 � Programing and documentation in one step
 � Automatical creation of highly efficient real time C code each time you save your function block diagrams
 � Simulation of function blocks directly in FB2
 � Online emulation of function blocks directly in FB2 via Internet, Ethernet, CAN and LIN
 � Cut, copy and paste of function block elements inside projects as well as between projects
 � Unlimited undo and redo functionality
 � Full fexibility and full power editing, as f.x. shift, insert and delete objects and sqeeze and stretch connections
 � The build-in syntax check finds errors in the function blocks and marks them for a fast and easy correction
 � Comments can be placed freely everywhere on the FB2 screen
 � All printing features are offered as f.x. print preview, print function block, print C code
 � Real time access  of all variables on own and other controllers connected to the PMS networks in the watch window
 � Object sizes, object colors, text fonts and many other properties can be set freely
 � The properties list gives you access to all IOs and local variables
 � From the toolbox list you can easily pick all functions, which are defined as function blocks defined as IEC-61131 items
 � Up-to-date context sensitive compressed Htm help with contents and indexes

 

Quick start tutorial

Now let us write a simple function block program. First create a new file with the menu "File-File new" or with Ctrl-N. The new file temp2.fb2 will emerge.

Click on the tab "Functions" and select the or-function "O2". Click the mouse on the worksheet, where you want to place the function.

In the toolbox select "Input" and then click in the window to the right at an empty space to generate a new Input item. Next click the mouse somewhere at the left side of the screen, where you want to place the input. The input object will emerge, together with a connection line, when you have placed the input near to a function input. Repeat this for a second input. In the toolbox select "Output", click on an empty space in the window to the right and then click the mouse, where you want to place the output. The output object will emerge, together with a connection line, when you have placed the output near to a function output.

Now right click on the function box. In the properties window you can see all propoerties of the function. Also right click on other object to see the respective properties. In the property windows you can modify all properties.

Congratulations ! You have just successfully written your first function block program. Isn't this a quick and easy way to write software ? Now you might save your program with the menu "File - File save as". Enter "QuickStart" as the new file name and confirm the inputs by clicking the OK buttom. In the professional release a corresponding C source code file should have been created. Look at the generated C file in the below tab "Generated code".

Additionally to the C source file a IEC-61131 declare file "QuickStart.dcl" was generated. In UPS20 you can look at this ASCII text file. When you want to create new functions of your own, you easily can edit such a declaration file besides the respective C file. In the following you will see that FB2 really has many powerfull features to develop software in a procedural and modular way.

Using pages

The working sheet of FB2 is made for printing your function blocks on DIN A4 paper. This limits the size of  the work sheet But by adding new pages you can extend your software unlimited.

Let's look at how to generate new pages and how to move around in our function block program. First establish a new file by "File - File save as" with the name "UsingPages". Then enter a function block program.

Then you can create a new page by the menu "Navigate - New page" or by clicking on the tool strip object "Add page" (the yellow + sign). The tool strip now displays "2 of 2", because page 2 of two pages is displayed.

When you finaly have saved this flow chart, you can have a look at the generated c code in the tab "Generated code".

Making loops

Loops can easily be implemented by the Jump item. Just click in the toolbox at "Jump" and then in the window to the right at an empty space to generate a new jump item. Then click in the right part of the FB2 working screen, just below the last output of the function. A temporary jump item appears on your FB2 screen. Right click the jump item and rename it to for example "Continue". The type should be bool to make a conditional jump (true->jump, false->don`t jump). Position the jump on a boolean output of a function.

At the position, where you want to start your loop, again select "Jump" in the toolbox and click on the displayed "Continue" item in the windows to the right. Then position your target jump above the first input on the first function to where you want to jump.

Jumps can surely also jump to other pages of the actual function block program. The modular object oriented approach of all PMS Universal Programming tools will anyhow not allow jumps into other graphical or textual editors.