RoboPro en
RoboPro en
ROBOPro
USA
TABLE OF CONTENTS
1 Introduction – controlling 5 Level 3: Variables, panels & Co .......53
fischertechnik models with ROBO 5.1 Variables and commands....................53
Pro ........................................................ 3 5.2 Variables and multiple processes........55
1.1 Installation of ROBO Pro....................... 3 5.3 Panels..................................................56
1.2 Installing the USB driver........................ 4 5.4 Timers..................................................59
1.3 First Steps ............................................. 7 5.5 Command inputs for subprograms ......60
5.6 Lists (Arrays) .......................................63
2 A quick hardware test before 5.7 Operators.............................................64
programming ..................................... 11
2.1 Connecting the Interface to the PC ..... 11 6 Level 4: User defined commands ....69
2.2 Getting the right connection – Interface 6.1 Processing of commands in a process 69
settings ................................................ 11 6.2 The command filter..............................70
2.3 Wrong connection: no connection to the 6.3 Sending arbitrary commands to sub
Interface!? ........................................... 12 programs .............................................71
2.4 Is everything working – the Interface test13
7 Controlling several Interfaces..........73
3 Level 1: Your first control program . 15 7.1 Controlling Extensions.........................73
3.1 Creating a new program...................... 15 7.2 ROBO TX Controller and ROBO
3.2 The elements of a control program ..... 16 Interface together ................................73
3.3 Inserting, moving and modifying 7.3 Interface assignments in subprograms75
program elements ............................... 16 7.4 Tips and Tricks ....................................76
3.4 Linking program elements................... 19 7.5 Changing the ROBO Interface serial
3.5 Testing your first control program ....... 20 number ................................................76
3.6 Other program elements ..................... 22
8 Program element overview...............78
3.6.1 Time delay .................................. 22
8.1 Basic elements (Level 1) .....................78
3.6.2 Wait for input............................... 23
8.1.1 Start.............................................78
3.6.3 Pulse counter .............................. 23
8.1.2 End ..............................................78
3.6.4 Counter loop ............................... 24
8.1.3 Digital Branch..............................78
3.7 Online and download operation—what’s
8.1.4 Analog Branch.............................79
the difference?..................................... 24
8.1.5 Time delay...................................80
3.8 Tips and Tricks .................................... 26
8.1.6 Motor output ................................80
4 Level 2: Working with subprograms28 8.1.7 Encoder Motor (Level 1)..............81
4.1 Your first subprogram.......................... 29 8.1.8 Lamp output (Level 2) .................82
4.2 The subprogram library ....................... 33 8.1.9 Wait for input ...............................83
4.2.1 Using the Library......................... 33 8.1.10 Pulse counter ..............................84
4.2.2 Using your own library ................ 33 8.1.11 Counter loop................................85
4.3 Editing subprogram symbols............... 34 8.2 Send, Receive (Level 2-4) ...................85
4.4 Tango .................................................. 35 8.2.1 Sender (Level2)...........................85
4.4.1 Motor control with pulse switches37 8.2.2 Receiver (Branch when command
4.4.2 Motor control with encoder motors40 is received, Level 2) ....................87
4.4.3 Tango main program................... 41 8.2.3 Receiver (Level 3) .......................88
4.5 Tango 2: Communication through 8.2.4 Wait for command (Level 4) ........88
Bluetooth or RF data link..................... 43 8.2.5 Command Filter (Level 4)............89
4.5.1 Radio settings for the Robo 8.2.6 Exchange Message (Level 4)......89
interface ...................................... 47 8.2.7 I2C Write (Level 4).......................90
4.5.2 Bluetooth settings for the TX- 8.2.8 I2C Read (Level 4).......................91
Controller .................................... 50 8.3 Subprogram I/O (Level 2-3).................92
1
GB
ROBOPro
USA
8.3.1 Subprogram entry (Level 2) ........ 92 8.9.3 Wait for input (ROBO Interface) 116
8.3.2 Subprogram exit (Level 2)........... 92 8.9.4 Pulse counter (ROBO Interface)116
8.3.3 Subprogram command input (Level 8.9.5 Digital input (ROBO Interface) ..117
3) ................................................. 92 8.9.6 Analog input (ROBO Interface) .117
8.3.4 Subprogram command output 8.9.7 IR Input (ROBO Interface).........119
(Level 3) ...................................... 93
8.4 Variable, List, ... (Level 3).................... 93 9 Panel elements and panels: overview120
8.4.1 Variable (global) .......................... 94 9.1 Displays .............................................120
8.4.2 Local variables ............................ 95 9.1.1 Meter .........................................120
8.4.3 Constant...................................... 95 9.1.2 Text display ...............................121
8.4.4 Timer variable ............................. 96 9.1.3 Display lamp..............................122
8.4.5 List............................................... 97 9.2 Control elements ...............................123
8.5 Commands (Level 3) ........................... 98 9.2.1 Button ........................................123
8.5.1 = (Assignment)............................ 99 9.2.2 Slider .........................................124
8.5.2 + (Plus)........................................ 99 10 Drawing functions ...........................125
8.5.3 – (Minus) ................................... 100
8.5.4 Right.......................................... 100 11 New Functions for the ROBO TX
8.5.5 Left ............................................ 100 Controller..........................................127
8.5.6 Stop........................................... 100 11.1 Installation of the ROBO TX Controller
8.5.7 On ............................................. 100 USB-driver .........................................127
8.5.8 Off ............................................. 100 11.2 Environment (Level 1 and above)......127
8.5.9 Text ........................................... 101 11.3 Interface independent programming..128
8.5.10 Append value ............................ 101 11.4 Conversion of programs ....................129
8.5.11 Delete value(s) .......................... 101 11.5 Universal inputs, sensor type and input
8.5.12 Exchange values....................... 101 mode..................................................129
8.6 Compare, wait for, ... (Level 3) .......... 101 11.6 Fast counter inputs and extended motor
8.6.1 Branch (with data input) ............ 102 control ................................................129
8.6.2 Comparison with fixed value ..... 102 11.6.1 Encoder Motor (Level 1)............130
8.6.3 Compare ................................... 103 11.6.2 Extended Motor Control in Level 3130
8.6.4 Time delay................................. 103 11.7 Display ...............................................132
8.6.5 Wait for...................................... 104 12 Working with decimals....................134
8.6.6 Pulse counter ............................ 104 12.1 Comparing floating point numbers.....134
8.7 Interface inputs/outputs ..................... 105 12.2 Displaying floating point numbers......134
8.7.1 Universal input .......................... 105 12.3 Calculation of Precision .....................136
8.7.2 Counter input............................. 106
8.7.3 Motor position reached ............. 106 13 Connecting more than one ROBO TX
8.7.4 Motor output .............................. 107 Controller to one PC........................137
8.7.5 Lamp output .............................. 108
8.7.6 Panel input ................................ 109
8.7.7 Panel Output ............................. 109
8.8 Operators........................................... 110
8.8.1 Arithmetic operators.................. 110
8.8.2 Comparative operators (relational
operators).................................. 111
8.8.3 Logical operators....................... 111
8.8.4 Bit operators.............................. 112
8.8.5 Functions................................... 113
8.9 ROBO Interface................................. 114
8.9.1 Digital Branch (ROBO Interface)114
8.9.2 Analog Branch (ROBO Interface)115
2
GB
ROBOPro
USA
If you are already familiar with ROBO Pro and only want to find out what new features were
added with the ROBO TX Controller, you should read only chapters 11 through 13 of the ma-
nual.
So let’s go! You must already be itching to know what possibilities ROBO Pro gives you for pro-
gramming your fischertechnik models. Have fun!
3
GB
ROBOPro
USA
Important note for the installation under Windows 2000, XP and Vista:
The USB driver can only be installed by a user with PC systems administrator privileges.
Should the installation program advise you that you are not permitted to install the USB driv-
er, you must either ask your system administrator to install your driver or install ROBO Pro
without this driver.
4
GB
ROBOPro
USA
In order to install the USB driver, you must first connect the ROBO TX Controller or the ROBO
Interface with a USB cable to your computer and supply it with power. Windows recognizes auto-
matically that the Interface is connected and displays the following window:
Depending on the operating system, the appearance of the window can be somewhat differ-
ent from the illustration above!
Here you must select Install software from a list or specific source and press Next.
5
GB
ROBOPro
USA
In the next window you deactivate Search removable media and activate Also search following
sources. Then you click Search and select the sub-directory USB Driver Installation in the
directory in which ROBO Pro is installed (the standard directory is C:\Program Files\ROBOPro\).
For the ROBO TX Controller you first select the sub-directory TXController, for the ROBO Inter-
face the sub-directory ROBOInterface, and then the sub-directory containing the driver for your
operating system, for example WinXP.
Under Windows XP, you may see the following message after pressing Next:
6
GB
ROBOPro
USA
The USB driver is still being tested by Microsoft. Once testing is completed the driver will be ap-
proved by Microsoft, so that this notice no longer appears. In order to install the driver, press
Proceed with installation.
Finally, the following message will appear:
7
GB
ROBOPro
USA
The Uninstall entry allows you to uninstall ROBO Pro. The Help entry opens the ROBO Pro Help
file, and the ROBO Pro entry opens the ROBO Pro program. Now select the entry ROBO Pro to
launch the program.
The window has a menu bar and toolbar with various operating buttons above as well as a window
on the left-hand side with program elements. If you see two stacked windows in the left margin,
ROBO Pro is not set on Level 1. To allow the functionality of ROBO Pro to match your growing
knowledge, you can set ROBO Pro from Level 1 for beginners up to Level 5 for experts. Look in
the Level menu to see whether there is a checkmark by Level 1: Beginners. If not, please switch
to level 1.
ROBO Pro is configured to use the ROBO TX Controller as interface. You can see this by the
presence of the button ROBO TX in the toolbar. In Chapter 11.2 Environment you learn how you
can switch to the earlier ROBO Interface and what you need to pay attention to.
8
GB
ROBOPro
USA
Now you may either create a new program file or open an already existing program file. We do not
intend to create a new program file until Chapter 3, when we will write our first control program. To
familiarize ourselves with the user interface, we shall open an already existing sample program. To Open
do this, you click the entry Open in the File menu, or use the Open button in the toolbar. The
sample files are found in the folder C:\Program Files\ROBOPro\Sample Programs.
Here you can see what a simple ROBO Pro program looks like. In programming, control-program
flow charts are created in the program window using program elements from the element window.
The finished flow charts can then be checked before being tested using a connected fischertechnik
Interface. But not too fast: we shall learn programming step-by-step in the following chapters!
Having thus gained your first impression of the user interface, you close the program file using the
9
GB
ROBOPro
USA
Close command in the File menu. You can answer No to the question of whether you want to
save the file.
10
GB
ROBOPro
USA
Here you can select the port as well as the Interface type.
11
GB
ROBOPro
USA
Once you have selected the appropriate settings, close the window with OK. Now open the Inter-
face test window with the Test button on the toolbar.
Test
It shows the inputs and outputs available on the Interface. The green bar in the lower left of the
window displays the connection status of the PC to the Interface:
• Connection: Running confirms correct connection to the Interface
• Connection: Stopped indicates that the connection has not been correctly set up and the
PC was unable to establish a connection to the Interface. In this case, the bar will appear red.
To be able to change the Interface or connection settings, you must close the Test window (with
the X in the upper right) and select another port or another Interface type as previously described,
via the COM/USB button in the toolbar.
If you have been able to set up the connection between PC and Interface as described and the
green bar appears, you will be relieved to know you can skip the next section.
If not, perhaps the tips in the next section can help you out.
12
GB
ROBOPro
USA
supply sufficient voltage. If the battery voltage falls below 6 V, the ROBO TX Controller’s pro-
cessor may stop working. In this case the display will stop showing any information. If the
voltage is too low, you must replace or, where appropriate, recharge the batteries, or, if pos-
sible, test the Interface with a mains power supply.
• Has the USB driver been installed correctly?
You can find this out by checking in the Device Manager in the Windows Control Panel
whether the entry fischertechnik USB ROBO TX Controller appears under connections (COM
and LPT) and functions properly. Should this entry not appear, install the USB driver again. If
an error appears, uninstall the driver (click on the respective entry with your right mouse but-
ton) and install it once again.
• Is there a conflict with another device driver on the same port (e.g. a modem)? This driver
may need to be deactivated (see Windows or device handbooks).
• If you still can’t establish a connection to the Interface, then probably either the Interface or
the connection cable is faulty. In this case, you should consult fischertechnik Service (Ad-
dress: see menu: “?” / Information about).
13
GB
ROBOPro
USA
14
GB
ROBOPro
USA
Now you see a large white drawing surface, in which you will enter your first program. If you see
two stacked windows in the left margin, please switch to Level 1: Beginners in the Level menu.
15
GB
ROBOPro
USA
Functional description:
Imagine a garage door that can be opened automatically. Maybe you’ve even
got one at home! You arrive at the garage in your car and, with the push of a
button on the transmitter, the door, driven by a motor, is opened. The motor
must keep running until the garage door is completely opened.
Words are a rather cumbersome and not very graphic way to describe a control
program. So what we call flow charts are used to represent the sequence of
actions to be performed and the conditions that need to be fulfilled for these
actions. In the case of our control system, the condition for the action “switching
on motor” is that the button be pressed. It is easy to read one of these flow
charts: just follow the arrows step-by-step! These show exactly how the control
system works – the individual steps can only be carried out in the order given
by the arrows, never in any other way. Otherwise it wouldn’t be worth going to
all the trouble, would it?
Using our ROBO Pro software, we can now draw precisely this flow chart and in so
doing create the control program for the connected hardware (Interface, motors,
switches, etc.). The software does the rest, which, as it happens, is just the way it
is with large industrial applications too! So we can concentrate fully on the creation
of the flow chart.
You put the flow chart together from program elements. Another new concept?
Don’t worry! In ROBO Pro the individual elements that are put together to form a
flow chart are called program elements. The action “switch on motor” means just
that: the Interface should actually switch on the motor that is connected to it! You
will find the available program elements in the element window on the left-hand
side.
16
GB
ROBOPro
USA
The next element in the program flow chart queries an input and then
branches to one path or another depending on its state. In the element
window, click on the element depicted right and then move the mouse
below the previously inserted Start element. If the upper input of the
Branch element is one or two grid points below the exit of the Start
element, a connecting line will appear in the program window. If you
left-click again, the Branch element is inserted and automatically con-
nected with the Start element.
17
GB
ROBOPro
USA
Hint: If you connect a mini-sensor as a “closer”, using connections 1 and 3 of the switch, the
program branches to the “1” branch if the switch is depressed, and otherwise to the “0”
branch.
If you connect a mini-sensor as an “opener”, using connections 1 and 2 of the switch, the
program branches to the “1” branch if the switch is depressed, and otherwise to the “0”
branch.
The next element in our garage door control system is a Motor ele-
ment. Insert it into the program as you did with the previous two
elements, this time under the Branch element. It is best to place the
element in such a way that that it is automatically connected to the
element above.
18
GB
ROBOPro
USA
19
GB
ROBOPro
USA
Hint: It a line should ever not correctly joined to a connection or another line, this will be indi-
cated by a green rectangle at the point of the arrow. In this case you have to create the
connection by shifting the line or by deleting it and drawing it again. Otherwise the program
flow will not work at this point.
Note: Connecting the Interface to the PC and establishing Interface settings has already been
covered in the previous chapter, which you can refer back to for details.
Before testing the program, you should save the program file on the hard drive of your computer.
Click on the command Save as on the File menu. The following dialog window will then appear.
20
GB
ROBOPro
USA
If you have received an error message, you must first of all correct the reported error. If you do not,
the program will not be started.
Note: You will find a full explanation of this mode of operation and of “Download Operation” in
Section 3.7, on page 24.
21
GB
ROBOPro
USA
The first Branch element will be marked in red. This shows that the program is
waiting at this element for an event, namely the pressing of the button on I1,
which is supposed to open the garage door. As long as the switch on input I1
has not been pressed, the program takes the No (N) alternative of the branch
and goes from there back to the beginning of the branch again. Now press the
switch connected to input I1 of the Interface. This fulfils the condition for
proceeding, and the motor is switched on. In the next step, the program waits
for the end switch on input I2 to be pressed. As soon as you operate the end
switch on I2, the program branches to the second Motor element and switches
the motor off again. Finally the program arrives at the program end. A mes-
sage will appear saying that the program has been terminated.
Did everything work? Congratulations! That means you’ve created and tested
your first control program. If it doesn’t work properly—don’t give up, just check
through everything carefully again; there must be a mistake hidden in there
somewhere. Every programmer makes mistakes, and making mistakes is the
best way to learn. So keep your chin up!
22
GB
ROBOPro
USA
Symbol
Wait for Input=1 Input=0 Change 0-1 Change 1-0 Any change
(closed) (open) (open to (closed to (1-0 or 0-1)
closed) open)
Same
function
using
Branch
alone
A combination of Branch elements could be used instead, but the Wait for Input element makes
things simpler and easier to understand.
23
GB
ROBOPro
USA
changes are regarded as pulses. With pulse wheels, one normally waits for changes in either
direction, so that a resolution of 8 steps per revolution is obtained with 4 gear teeth.
24
GB
ROBOPro
USA
tested, the program can be downloaded onto the ROBO TX Controller. The problematic USB cable
can be replaced by a Bluetooth connection. In that way the model has unrestricted mobility even in
online operation (see manual ROBO TX Controller).
But online operation also has advantages compared with download operation. In comparison with
the Interface, a computer has much more working memory, and can calculate much faster. This is
an advantage with large programs. Also, during online operation a ROBO TX Controller and a
ROBO Interface can be controlled simultaneously from a program.
An overview of the two modes of operation
25
GB
ROBOPro
USA
For mobile robots, the option Start program with key on Interface makes more sense. This is
because, if you don’t have a Bluetooth interface, you still have to unplug the USB cable before
your program sets the robot in motion. In this case, you start the downloaded program by using the
left selection key of the TX Controller.
By using the function Autostart of the ROBO TX Controller, a program is started automatically as
soon as the Interface is supplied with power. In this way, you can for example you can supply the
Interface with power via a mains adapter with a time switch, and start the program every day at the
same time. Then you don’t have to either leave the Interface permanently switched on or start the
program with the selection key every time you switch it on.
Note:
You can also find a comprehensive description of the functions of the ROBO TX Controller in
the accompanying operating manual.
If the mouse is positioned over a horizontal connection line, you can move the whole
horizontal line while holding down the left mouse key.
If the mouse is positioned over an oblique connection line, a new point is inserted into the
connecting line when you left-click. You have to hold the left mouse key down, not releas-
ing it until the mouse is positioned where the new point is to be placed.
If the mouse is positioned near an end point or a corner of a connecting line, you can
move this point while holding down the left mouse key. You can only move a connected
line endpoint to another suitable program element connection. In this case the endpoint of
the connecting line will be linked to this connecting line. Otherwise, the point will not be moved.
26
GB
ROBOPro
USA
27
GB
ROBOPro
USA
But don’t worry! The element window is still there, only it’s now empty. In Level 2 there are more
program elements, so that you would lose track of them if they were all packed into one window.
For that reason, from Level 2 onwards, all the elements are classified into element groups. The
elements are organized into groups in a similar way to how files on your computer’s hard disk are
organized into folders. If you select a group in the upper window on the left-hand side, all the
elements in this group appear in the lower window. You will find the elements from Level 1 in the
group Program elements / basic elements. Since the element window is now only half as big,
you have to use the scroll bar on the left of the element window to display the lower elements.
So, now let’s get down to the real topic: subprograms! Of course the flow charts we have designed
so far have not been on such a large scale that we could not take them all in at once, but surely
you can imagine that this could very easily happen in the case of larger projects with more com-
plex flow charts. Suddenly your worksheet is full of components, there are connecting lines
everywhere and you have to constantly scroll back and forth on the screen. “Now where was this
or that exit?” In short—minor chaos threatens! What to do? Is there no way to bring some order
into this chaos? Yes there is—it’s called subprograms!
28
GB
ROBOPro
USA
You can switch between the main program and the sub-
program at any time by clicking on the program name in the subprogram bar. As both programs
are still empty, however, you won’t see any difference yet.
We now want to divide the garage door control system from the previous chapter (see Section 3.6
Other program elements on page 22) into subprograms. The program consists of four functional
units:
• Wait until button I1 is pressed
• Open door
• Wait ten seconds
• Close door
Now we want to separate opening and closing off into two subprograms. Either subprogram can
then be called from the main program with a single symbol. The waiting for sensor I1 and the 10-
second time delay remain in the main program, as each of them consists of only a single element
anyway. You have just established a new program with a subprogram named Subprogram 1.
However, Open and Shut would be better names for these two subprograms. You can rename the
already created subprogram by first selecting Subprogram 1 via the subprogram bar, if it is not
already selected.
29
GB
ROBOPro
USA
Are you ready to write your first subprogram? Well let’s go! But just how does a subprogram start?
Good question! You have always begun a main program with the start element. A subprogram
begins with a similar element the Subprogram Entry. The element has this name because it is
through this element that program control passes from the main program into the subprogram. You
can’t use a Start element here, because of course no new process is being started.
Subprogram entry Here program control is handed over from the main
program to the subprogram
You will find the Subprogram entry in the element group window
under Subprogram I/O. Now place the Subprogram entry near
the top of the program window for the Open subprogram. You
may also give a Subprogram Entry element a different name than
Entry, but this will only be necessary if at some later time you
write a subprogram with multiple entries.
The subprogram now runs identically to the part of the main program which does the opening. You
switch on the motor M1 in the left-rotating (anticlockwise) direction, wait until the sensor on input I2
is closed and then switch the motor off again.
To close off the program you use a Subprogram Exit. The difference between the Subprogram Exit
and the Stop element is the same as between the Subprogram Entry and the process Start.
30
GB
ROBOPro
USA
31
GB
ROBOPro
USA
In the element group Loaded programs / unnamed1 you will find two green subprogram symbols.
The first, with the name Main program, is the symbol for the main program. This is used rather
infrequently as a subprogram, that even that is possible, for example if you are controlling a whole
machine park, and you have previously developed the control systems for the individual machines
as main programs. The second symbol, with the name Open, is the symbol for your new subpro-
gram. Open is the name you entered under Properties. Now insert the subprogram symbol, in the
same way as you’re used to doing it with ordinary program elements, into your main program. It’s
as easy as that!
You can close your main program right now with a stop element and try it out, if you like. The door
will be able to be opened by pressing the button on I1, but we haven’t programmed the closing part
SP New yet. To do that, you write another subprogram. Press the SP New button on the toolbar and enter
the name Shut in the New subprogram window. You are not obliged to enter a description, but it
wouldn’t hurt, so you won’t forget later what the subprogram is meant to do.
Now enter the program for shutting the garage door in the program window for the subprogram
Shut. Once again, you start with the Subprogram entry. First the motor M1 should turn to the right
(clockwise). As soon as the end switch on I3 is closed, the motor M1 should stop. Once again the
subprogram is closed off with a Subprogram exit.
Now use the subprogram bar to switch back to the main program. If you previously closed off the
main program with a Stop element so as to try it out, you must delete the Stop element again. After
being opened, the garage door should remain open for 10 seconds before being closed again.
After a 10-second Time Delay, you insert the Shut subprogram symbol from the element group
Loaded programs / unnamed1. The main program and the two subprograms should look some-
thing like this:
32
GB
ROBOPro
USA
The program starts at the Start element in the main program. Then it waits until sensor I1 is
depressed. Incidentally, you could also do this using the Wait for Input element (see Section 8.1.9
Wait for input on page 83). After the switch I1 has been pressed, the main program calls the sub-
program Open. This switches program control to the Subprogram Entry for the subprogram Open.
The subprogram Open opens the garage door and then reaches its Subprogram exit. At this point
program control returns to the main program. After the subprogram finishes the main program
waits for 10 seconds. Then program execution switches to the subprogram Shut, which shuts the
garage door again. After control returns from the subprogram Shut, the main program comes to a
Stop element, which terminates the program.
Caution: If you insert a program from the Library, in some cases further subprograms that are
used by this subprogram will also be inserted. You can remove all these subprograms again
by selecting the Undo function on the Edit menu.
33
GB
ROBOPro
USA
stored in one folder. Each file in this folder will be represented by its own group in the group selec-
tion display.
You can specify which folder you’d like to store your own library in the File menu under Own
library directory. The default directory for your own library is C:\Programs\ROBOPro\Own Library.
If you have your own user directory on your computer, it is a good idea to create your own folder
there and use this to store your library.
Tip: Initially you can specify, under Own library directory, the folder in which you also store
your ROBO Pro programs. That way you will have rapid access to all subprograms in all files
in your working directory.
34
GB
ROBOPro
USA
entry or exit. The connection elements are generated automatically, even if you have switched to
manual symbol generation.
As soon as you leave the symbol-editing window, all calls to the subpro-
gram in the main program or in other subprograms will be modified
accordingly. Please take note that, if you have moved the connections of a
subprogram, this can cause a little confusion with subprogram calls, if the
connections were already connected. The endpoints of the connecting lines
may in some circumstances no longer occur at the right connection, which
will be shown by a cross at the endpoint of the line and at the connection (see diagram). As a rule,
it is generally sufficient to left-click anywhere on the connecting line. The line will then be automati-
cally re-aligned. But it can happen in the case of subprograms with a lot of links that you will have
to edit the line further.
4.4 Tango
So far, you only became acquainted with rather simple programs and maybe you are eagerly
waiting for new program elements and possibilities. But before we deal with variables and still
more difficult things in the next chapter, let us first see everything what can be done with the pro-
gram elements in the level 2. How would it be, for example, if would provide tangoing to your
mobile robot? For the “Nerdse" among you: Tango is danced to music in the 2/4 measure. The
basic step includes 8 steps in 3 measures. For the gentlemen, the step sequence is as follows:
• One slow step forward with the left foot (1/4 measure)
• One slow step forward with the right foot (1/4 measure)
• Now comes the continuous 4/8 measure „swing step“. Thereby you move the feet a little to
not at all, but only displace your weight. At first, you displace your weight by 1/8 measure on
the left back foot, then by 1/8 on the right fore foot and then again by 1/8 on the left back foot.
For finishing the swing step, you take a break of 1/8 measure.
• Three quick steps follow: First, make a small step backwrds with the right foot, so that it lays
again near the left foot. Then you make a step aside with the left foot and, in the end, you
place again the right foot near the left foot. These three steps also last 1/8 measure each
and they will be finished again with a 1/8 measure break.
For the lady, the step sequence is symmetrical, that means left and right, as well as forward and
backward are inverted. The whole repeats till the music comes to the end, you hit on the borders of
the room or it becomes boring to you. In both the last cases, you should ask a dancing master for
advice.
But now again to robotics. Maybe you have a Fischer technique building set for mobile robots. The
robots in this set mostly have two driving wheels, with an independent motor each. Guiding is
made by these robots in the same way as for track vehicles. If you turn both driving motors in the
same direction, the robot moves straightforward. If a motor is at rest, the robot runs a curve.
35
GB
ROBOPro
USA
Naturally, with these robots you can also move backward, straightforward and about the curve. If
both the driving engines turn in opposite direction, the robot turns in place. Let us now try to trans-
late the tango step sequence in wheel turns. One 1/4 measure should thereby last one wheel turn.
We get then:
• Left wheel 1 turn forward ( usually motor M2 left ).
• Right wheel 1 turn forward ( usually motor M1 left ).
Now comes the „swing step“. But naturally, our robot can not move the body without moving the
"feet". Also, the side step in the 3-rd measure is quite difficult for a robot. Therefore we make a
light turn left in the 2-nd measure and move then in the 3-rd measure a small portion straightfor-
ward, for simulating the side step. For the 2-nd measure, it results:
• Left wheel ½ turn back ( usually motor M2 right ).
• Right ½ turn forward.
• Left wheel ½ turn backward.
Both on „left backward“ and on „right forward“ the robot turns left. In the 3-rd measure, we make
now the following:
• Right wheel ½ turn backward.
• Straightforward ½ turn forward.
• Right wheel backward and left wheel forward for ½ turn.
Consequently, first we turn again the robot quite a little to the right, then we move straightforward
(in foreward left direction), for simulating the side step to the left, then we turn again the robot
straight.
Now let's try to perform this sequence of steps in ROBOPro. The form of execution will differ,
depending on whether you are using a TX controller with encoder motors or a model with pulse
switches. The two cases are described separately below: 4.4.1 Motor control with pulse switches
on page 37 and 4.4.2 Motor control with encoder motors on page 40.
36
GB
ROBOPro
USA
37
GB
ROBOPro
USA
and you can stop the second motor. In all, it is unfortunately somewhat complicated, because you
do not know whether the pulse switches are open or closed at the beginning. Because two pulse
switches exist, there are in all four possibilities. But fortunately, there is already a completed sub
program from the library for this function. Create a “Straight 1/8“ sub program and insert the
„SyncStep“ sub program from the homonymous library in the “ROBO Mobile Set” folder. If you do
not know any more how it goes on, please check up in the chapter 4.2 The subprogram library, at
page 33.
Now for the inquiring people among you, the „SyncStep“ sub program represented below will still
be also shortly explained. The people for whom a look at the sub program is sufficient may will-
ingly overleap the following paragraph and the duty. It is entirely all right to use a sub program
without understanding how it works -- as long as you understand what it does.
The sub program first asks about the states of both the pulse switches, I1 and I1. Depending on
whether I1 and I2 are 0 or 1, the sub program jumps in 4 different program branches. The branch
quite on the left is for the case in which I1 and I2 have the 1 value at the beginning. The sub pro-
gram must then wait, in a logical way, that I1 or I1 should receive the 0 value. This will be done in
the loop with the two branching elements. As long as I1 and I2 have the 1 value, the program turns
in a circle. But as soon as one of the two inputs becomes 0, the respective motor will be immedi-
ately switched off. Then the sub program waits with a „Wait on input“ element until the second
input becomes 0 and then switches the second motor off. The loop in which it is being waited on
both inputs is necessary, because you do not know which of the two motors turns faster and which
of the pulse switches changes therefore faster. The other 3 branches operate exactly so, but they
start from another initial state and are therefore waiting the final state respectively opposite to the
initial state. For example, in the second branch from left, at the beginning, I1=1 and I2=0, as you
can test easily, by pursuing the way via the first two branching elements. Consequently, the sec-
ond branch waits that the values should become I1=0 and I2=1. If you would like to write the
38
GB
ROBOPro
USA
program yourself, you must watch out very exactly which are the initial values of the pulse switches
in each branch, and which you must wait accordingly.
If you have already browsed something over variables in the following chapter, try once to write a
sub program with same function with variables. That is easier, because you can save at the begin-
ning the value of the two pulse switches with the = command elements in two variables and you
only need one program branch, in which you can compare the current value of the inputs with the
values of variables.
So, now back to the tango: The purpose of the SyncStep
sub program consisted in writing therein a „1/8 Straight
line“ sub program, which goes 4 half-steps straightfor-
ward. If you start the motors M1 and M2 and you execute
then the SyncStep sub program, the motors are again
stopped after a half-step. Consequently, you must make
all of it 4 times, and it runs at the best with a loop ele-
ment.
If you watched out very well, you now probably worry
that the motors, at the end of the SyncStep sub program
are switched off, and then switched again on immedi-
ately. With the slower of two engines there is a very short
break between switching off and on, which is necessary
to adapt the speeds of the two motors to each other.
That is however harmless for the motors. In fact, the
interface regulates the motor speed also by constant switching off and on. That is called the PWM
(pulse width modulation). On the contrary, with the faster motor, switching off and on occurs so fast
that the motor takes absolutely no notice of it. However, in the SyncStep sub program you could
also give up switching off the second motor and switch off both the motors as soon as the loop is
completed. With programming too, different ways often lead to the goal.
Try out whether a robot with the SyncStep sub program really runs better straightforward, than if
you simply switch on a certain number of pulses on both the motors.
The last sub program, which we still need, should turn the robot 4 half-steps long to the right on the
spot. It is interesting that you can use for that exactly the same “SynchStep” sub program as for
the “1/8 Straight line” sub program. „The SyncStep “sub program namely stops the motors only,
and the stop command does not depend on the direction of rotation. You start the motor M1 in the
loop simply with a direction of rotation right instead of left. The pulse switches are also independ-
ent of the direction of rotation. It is all the same whether the motors turn to the left or to the right,
the pulse switches always change from 0⇒1 and from 1⇒0. Consequently, in order to create the
„Turn 1/8” sub program, you only need to copy the „1/8 Straight line“ sub program and to
change the direction of rotation.
39
GB
ROBOPro
USA
40
GB
ROBOPro
USA
that the robot would therefore not dance in reproducible forms. On the other hand, using the ad-
vanced motor control ensures that the two wheels always cover exactly the same distance, even if
the battery is flat or one wheel is stiffer than the other.
Now we just need the subprograms for the straight 1/8 step and the
1/8 turn on the spot. The advanced motor control also offers the possi-
bility of controlling two motors at the same time, with the
Synchronous and Synchronous Distance actions. The Synchro-
nous action ensures that two encoder motors turn at exactly the same
speed. As a result, your robot moves almost straight ahead. However,
exactly straight ahead is not possible with encoder motors, because
the wheels always have a certain slip. In our case, M1 and M2 should
turn at the same speed over a distance of 75 pulses. To do this, use
the Synchronous Distance action. For motors with synchronous
coupling, the target reached signal is not set for both motors until both
motors have reached their target. It is therefore sufficient to wait for
one of the two target reached signals. Don't forget to stop both motors
again at the end!
Try out whether a robot really does move straight ahead with more
accuracy using the Synchronous Distance action compared to con-
trolling both motors separately with the Distance action.
The last subprogram that we need is supposed to turn the robot to the
right on the stop for 37 pulses. Here again, use the advanced motor control with the Synchronous
Distance action, with both motors turning in different programs for the subprogram "Turn 1/8":
Think about which way M1 and M2 have to turn for the model to turn to the right on the spot.
41
GB
ROBOPro
USA
You find the finished tango program in the ROBOPro installation list under:
Sample programs\Manual\Tango Encoder Motor\TangoSolo.rpp
Sample programs\Manual\Tango Pulse Switch\TangoSolo.rpp
However, if you have a suitable robot, test once your self-written program or the finished program.
Now maybe you think: it is fairly nice, but actually two belong to dancing. Writing a program which
executes the lady step suitable for the gentleman step is however not difficult. You must thereto
only interchange leftwards and rightwards and forwards and backwards. First load your program
for the gentleman step and save it under a new name, for example TangoSoloLady.rpp. Now
change the sub programs, for example Left 1/4 to Right 1/4 B. For that purpose, you must change
M2 to M1 and the direction of rotation from left to right. You can change the name of the sub
program by clicking on the properties tab and there enter a new name. The name also changes
automatically in the main program where the sub program is called.
The Turn 1/8 sub program does not change. Can you imagine why? Interchange leftwards and
rightwards (M1 and M2 in the sub program) and forwards and backwards (motor left-
wards/rightwards) in Turn 1/8, and compare the original sub program with the changed sub
program.
If you have two mobile robots, now load into one the TangoSolo.rpp program and into the other
the TangoSoloLady.rpp program. If you have only one robot, perhaps you can try it out together
with someone which has also a robot. While downloading, you should state that the program is
started over the feeler at the interface. Now place both robots against each other as in the drawing
below, easily displaced, and start both robots at the same time by briefly pressing the Start feeler
(TX Controller) or the PROG feeler (ROBO interface) at both interfaces.
42
GB
ROBOPro
USA
If you have started both robots somewhat at the same time, both will dance tango awhile prettily in
time with one another. However, because the motors and accumulators are not exactly alike, the
motors do not turn just equally fast and sooner or later the robots come distinctly off tact. How is it
done so that that both robots should remain in tact over longer time, you will learn in the next
chapter.
† Starting from the level 4, there are groups of receivers for this purpose.
43
GB
ROBOPro
USA
44
GB
ROBOPro
USA
On the left, you see the characteristic window of the receiver element. As with the transmitter, you
can select an command (a message). Then you must further select whether the receiver only
reacts to commands which were sent directly to the interface, consequently with a certain radio call
number, or to commands which were sent to all interfaces. You can also select both. At last, you
can still interchange the Yes and No connections, as with any branching element.
So far we have spoken of „Messages“. In the characteristic windows of the transmitter and receiver
and later on in the level 3, however the term „command“ will be used. From the view point of the
Data transmission, that is the same. Whether a message is an command, depends on the interpre-
tation, and not on the kind of the transmission. In the level 3, you will have very much to do with
messages, which are, for example, commands for controlling a motor or a variable. Therefore, in
ROBOPro, the term „command “ is generally used for messages.
45
GB
ROBOPro
USA
46
GB
ROBOPro
USA
The „Gentleman“ could naturally, also after transmitting, wait 1/10 seconds and then fisrt check
whether he has received an answer. Waiting in a loop 10 times 1/100 second has however the
advantage that the „Gentleman” can continue the program nearly immediately, if he has received ROBO-IF
the answer from the „Lady“. Now try out whether the program works better, if you change the Sync
sub program in TangoSyncGentl. rpp, as described above. The robots should now always start
as soon as the program on the second robot is started, independently of which robot is first started.
If you let your robots dance, until one of the accumulators becomes empty, the synchronisation is
no more sufficient per step cycle. The robots synchronize in fact at the beginning of each step
cycle, but during the cycle they run noticeably apart, if one of the accumulators comes to its limits.
It is better to insert an additional synchronisation after each step. Here it is however clear that both
programs run, so that you can give up a repetition. So that the initial synchronisation and the step
synchronisation should not come in disorder, you should use for that two different sub programs
Sync1 and Sync2, which use different messages, for example SH1, SL1 and SH2, SL2. You find
the finished programs in the installation list of ROBOPro under
Sample programs\Manual\Tango Encoder Motor\
Sample programs\Manual\Tango Pulse Switch\
TangoGentl.rpp
TangoLady.rpp
You find there a TangoNachrichtenMonitor.rpp. If you have a third TX-Controller or a third interface
with ROBO RF data link module, you can start this program in on-line mode, while both Tango
robots dance. The program shows on the screen which messages were sent. The program uses
level 3 elements and you need not understand for the moment how the program works.
47
GB
ROBOPro
USA
All the ROBO interfaces with RF Data Link, which are adjusted to the same frequency, must have
a different radio call number between 1 and 8. The radio call number 0 is reserved for the PC
Module of the RF Data Link, the „red box“. Thus, maximaum 8 interfaces with instellaed radio
module and an RF Data Link PC module can communicate with one another. The radio call num-
ber is, to say so, the telephone number of an interface in the radio net. You can assign the
numbers 1 to 8 arbitrarily to up to 8 interfaces.
The Enable hook is nearly always set. However, you can deactivate a radio module in an interface,
if you just do not use it in a model and you would like to save current without dismantling the
module.
After you have made all the adjustments, you can save the adjustments in the interface with the
Write to interface button. As a rule, you will write the adjustments in the Flash memory. The
adjustments are then preserved, even if you switch the interface off. If you would only like to try
something out only briefly, you can however write the adjustments into the temporary memory as
well.
You need not care about the firmware version, that is the version of the internal control program
for the RF Data Link. ROBOPro prompts you to automatically update the firmware, if that should be
necessary.
In order to make communication possible between the two Tango robots, first connect one of the
two robots with the USB PC interface and open the interface test window. Possibly you must press
the COM-USB button before and select the interface. In the interface test window, change to the
partner info and adjust there the frequency 2 and the radio call number 1 and save the adjust-
ments with the Write to interface button. Now close the interface test window, connect the other
robot with the USB interface and adjust the frequency 2 and the radio call number 2.
48
GB
ROBOPro
USA
In order to adjust the frequency of the PC radio module, connect that PC module to the PC USB
interface. You can then adjust the frequency over the Info Partner of the Interface test window
exactly as in an Interface radio module . If the PC radio module cannot reach an interface with
built-in radio module, for example because the frequency is not yet correct, you receive an error
message when you open the Interface test the window. However, the error message only refers to
the fact that no interface was found and that no inputs and outputs are thus available. However,
you can make the adjustments in the Info window despite the error message.
49
GB
ROBOPro
USA
COM/USB button once again. If you cannot any more reach an interface by radio, connect it at the
best directly to the PC USB interface and control the RF DATA Link adjustments for the interface.
† For Bluetooth experts who can manage without instructions: the main code is 1234.
50
GB
ROBOPro
USA
Central control
Central control
51
GB
ROBOPro
USA
The exchange of messages between 3 or more controllers uses a star topology. One of the con-
trollers acts as central control as shown here on the left. For controller 2 to exchange messages
with controller 3, the messages are sent via the central control. It is usually unimportant which
controller assumes the central control function. However, it DOES matter which controller acts as
central control for mobile robots that can move outside the radio range. This selection is again
made in the window for Bluetooth settings. Another important point is that the online connection
with the central control is more difficult and less reliable. This is because the PC plays the role of
central control for the online connection, while the central controller acts as control centre for some
Bluetooth connections, but not for others. As already indicated, this does actually work but it takes
much longer to set up a connection.
52
GB
ROBOPro
USA
Just imagine that you discover a fascinating machine in a preciously unexplored side corridor of a
museum, and you just have to emulate it in fischertechnik. But while investigating the machine you
lose track of time, and don’t notice that all the other visitors are leaving the museum. Only when
the museum is already closed have you studied the machine sufficiently thoroughly to be able to
make a replica. But unfortunately you must first spend an unpleasant night alone in the museum
before you can set to work. So that this doesn’t happen again, you go to the curator of the museum
and volunteer to program a visitor counter, which will count all the visitors on the way in and on the
way out again, and switch on a red warning lamp as long as there are still visitors in the museum.
But how do you do that? How can you count something with ROBO Pro? The answer: with vari-
ables.
53
GB
ROBOPro
USA
54
GB
ROBOPro
USA
The entry turnstile operates the sensor on I1; the exit turnstile operates the sensor on I2. As soon
as I1 is pressed, the program sends a +1 command to the variable Counter. Then the program
waits until the sensor on I1 is released again. With the sensor for the exit on I2, the behavior is
exactly the same, except that here a –1 command is sent to the variable Counter. Every time the
counter changes, the state of the counter is checked. If the variable Counter has a value >0, the
red warning lamp on M1 is switched on; otherwise it’s switched off.
Copy the above program and try it out. As soon as you press the sensor on I1 and release it again,
the warning light on M1 lights up. If you operate the sensor on I2, it goes out again. If you operate
I1 several times, you must operate I2 the same number of times to make the warning lamp go off
again. Now try to see what happens if first 5 visitors come, then 2 go, then another 3 come. How
many times do you have to operate the sensor on I2 to make the warning lamp go off again?
55
GB
ROBOPro
USA
Now independent processes are used for I1 and I2. If the sensor on I1 is pressed, the process for
I2 remains independent of this and can continue to monitor the sensor on I2. A separate process is
also used to query count values and to switch the warning lamp on and off.
As you see, there is no problem about accessing a variable from several processes. You can send
a variable commands from several processes and you can use the value of the variable in several
processes. So variables are very well suited for exchanging information between processes.
The museum curator is so enthused by your brilliant visitor counter that he immediately asks you
for the solution to another problem: The museum has installed a new exhibit. But as all the visitors
want to see the new exhibit, there is such a crush there that nobody can see anything at all any
more. So the curator would like to limit the number of visitors in the exhibition area to 10. The
curator has installed a turnstile at the entry and exit respectively of the exhibit. The turnstile at the
entry may be locked electronically. Now he only needs a competent program developer: you!
Try to develop the described program with ROBO Pro. Essentially, it functions like the visitor
counter. You can simulate the electronic locking of the entry with a red lamp on M1, which should
be switched on when there are 10 visitors in the exhibition.
5.3 Panels
After you solve the problem with the exhibit, the museum curator has yet another assignment for
you. He would like to know how many people visit his museum in one day. Of course a program
that can count is no problem for you, but how can you display the value? Of course, you could
execute the program in online mode, which allows you to follow the values of variables. But for a
computer-illiterate like the curator, that is rather complicated. Something simpler is required!
For cases like this, ROBO Pro has panels. A panel is a page of your own on which you can put
displays and control buttons. Load your visitor counting program and, in the function bar, switch to
Panel.
Initially, the control panel is an empty gray space. Onto this area you place
displays and control elements which you find in the element group window und
Panel elements. Among the panel elements you will find buttons, slider con-
trols and the like. Under Displays you will find text displays, display lamps, and
displays with rotary pointers.
Caution: A panel is part of a subprogram. If you have subprograms, make sure you create the
panel under Main program and not under a subprogram! Later on, as a “pro”, you will be able
to create multiple panels.
If you have drawn a panel and it has thereafter suddenly disappeared, then presumably you
selected a subprogram in the subprogram bar. Switch back to Main program and your panel
is sure to be there again.
For the visitor counter, you take a Text display (the color doesn’t
matter) from the Panel elements / displays element window, and
position it in the panel. This display is now required to show the
number of visitors to the museum.
56
GB
ROBOPro
USA
But first you must add to your program a second variable, which will count the number of visitors at
the entrance without deducting them from the total again at the exit. In the function bar, you switch
back to Functions, and insert the variable Total as follows:
As you can see, a Command element can also be used to send a command to two variables at the
same time. The variable Total does not receive the –1 commands, because commands are only
transmitted along the orange lines in the direction of the arrows. On the other hand, the +1 com-
mands are passed to both variables. But this is only done here as an example. As a rule it is
simpler and more transparent to use a second Command element.
Tip: If orange lines branch, it is often more practical to draw the lines from their target to their
origin. If you would like for example to draw the line to the variable Total, click first on the in-
put to the variable Total and then move the line backwards to the branch point. If, on the other
hand, you want to start an orange line on an existing orange line, you will have to double-click
(with the left mouse button) on the point where the new line is to begin.
So, now you have a text display in the panel and a variable which you
would like to present in the display. Now how do we link the two? As the
text display and the variable are on separate pages, you would have trouble
trying to connect the two with a line. For this reason there is a special
element that transmits a value that is to be presented in a panel to the corresponding display. You
will find the element Panel output, depicted above, at the end of the Inputs, outputs group. Insert
one of these Panel output elements into your program next to the Total variable, and join the right-
hand connection of the variable to the Panel output’s connection.
As you will normally have more than one display in a panel, you still need to
let the panel output know which display to send the variable values to. This is
done quite simply by means of the Properties window of the element. If you
right-click on the Panel output element, you will see a list of all the displays
that have been inserted so far into a panel. As every subprogram can have its
own panel, the panels are listed according to subprogram. In our example,
there are no subprograms, only the main program. Within this there is one
display with the name Text. Select this display and click on OK.
As soon as you have linked the Panel output with a display, the symbol and
the inscription change accordingly. The panel out we’re using produces a
connection with the text display named Text in the (sub)program MAIN.
Once you have inserted the panel output and linked it to the text display, the program looks like
this:
57
GB
ROBOPro
USA
Try it out straight away. As soon as you have started the program in online mode, the display in the
panel shows the number of visitors that have passed through the turnstile at the entry.
Hint: If you want to use more than one display in a panel, it is important that you give every
display a different name, so that you can distinguish between them when linking them with
the program. To do this, you right-click on the display in the panel. There, you can enter a
name under ID / Name. Then, if you connect a panel output with the display, this name will
appear in the selection window of the panel output. As we have only one display for the mo-
ment, however, the name is not important, and we retain the name Text.
The program is not quite perfect yet. What is still missing is a switch to reset the counter. For this
purpose, however, we don’t want to use a normal pushbutton switch, but rather a button we can
push on the panel.
You will find this operating button in the element window under the group Oper-
ating / Control elements. In the function bar, switch to Panel and insert a button
into your panel next to the text display. The inscription Button is of course not
quite appropriate, but it can easily be change using the button’s Properties window. Right-click on
the button, enter for example 0000 as Inscription and confirm with OK.
Exactly as in the case of the text display, we also need a program element
that will link the button to the program. So start by switching back to Func-
tion in the function bar. You will find the illustrated Panel input element in
the Inputs, outputs group in the element window. Position it in the flow
chart below the existing program.
Now you still have to link the panel input with the button in the panel.
To do this, you right-click on the Panel input element. As with displays,
the control elements are listed according to subprogram, as every
subprogram can have its own panel. Now select the 0000 button and
confirm with OK.
You may have noticed that it is possible to set this element to all sorts
of inputs through the tab bar of the Properties window. However, this
will not be explained until the next section but one, Command inputs
for subprograms.
The value delivered by a panel input is queried with a Branch element.
You have already used this element to query variables. The complete
program with the “set-to-zero” function now looks like this:
58
GB
ROBOPro
USA
Whenever the 0000 button is pressed, an =0 command is sent to the Total counter and sets the
counter to zero.
5.4 Timers
After your triumphs, the museum curator does know what he could do without you, and so appoints
you the museum’s computer consultant. Of course, a position like this carries a lot of glory and
renown with it, but also a lot of work, for example the following: The museum has many models
that move when a button is pressed. But some visitors push for rather a long time on the buttons,
so that the models overheat and keep needing to be sent off for repairs. Now the curator would the
models to run for as long as the button is pressed, but only up to a maximum of 30 seconds at a
time. Once the model has run, it should then take a pause of 15 seconds before it can be switched
on again.
Hmm, no problem, you may be thinking. A few time delays, a few program branches, and you’re
done. Feel free to try it! After a while you will come to the conclusion that it is not so simple, and for
two reasons:
• During the period of 30 seconds the program must query the button to establish whether the
button is released before the 30 seconds expires. OK, granted, you can solve that with two
concurrent processes, see Section 5.2 Variables and multiple processes on page 55.
• If a visitor releases the button after 5 seconds, and then presses it again after 15 seconds,
the 30 second time delay must be started all over again. But the time delay has only been
running for 5 + 15 = 20 seconds, and so is still active. Even with processes running in parallel,
you can’t start a time delay over again. Perhaps it would work in three processes with two
time delays which you start in alternation, but thinking this through will bring on a headache.
59
GB
ROBOPro
USA
60
GB
ROBOPro
USA
Indeed you could, but here a problem emerges: If you use the usual
sensor queries from the Basic elements group in a subprogram,
every call of the subprogram queries the same sensors and controls
the same motors. The reason is that, in a Motor output element for
example, the control command for the motor (right, left, or stop) and
the motor output number (M1,...,M8) form a unit. As there is only one version of the subprogram,
the same motor always appears in it. If you alter the motor number for one subprogram call, it will
also be altered for all occurring calls of the subprogram. So, once again, you’d have to copy the
subprogram 7 times, give every subprogram a different name and go all the way through manually
adjusting the inputs and outputs.
But there is a much more elegant solution to this problem. The trick is to
separate the control commands from the motor symbols. Then you can put
the control commands (left, right, stop) in the subprogram and the Motor
elements in the main program. In the subprogram, using a Command
element, which you have already encountered with variables, you then send the left, right or stop
commands to the main program, where you can then dispatch them to the various motors. For a
motor there is a Motor element that only represents a motor, without determining what the motor is
to do. This element has a command input, to which you can send commands. You can replace
elements from the Basic elements group with a Command element and a Motor element as
follows:
In the upper row you see Motor elements from the Basic elements group. In the second row are
depicted the corresponding combinations, achieving exactly the same effect, consisting of a com-
mand element from the Commands group with a motor element from the Inputs, output group. In
fact, the upper elements are just abbreviations or simplifications for the combinations in the lower
row. Each sends a left, right or stop command to motor M1.
The same also applies to querying sensors:
In the upper row, you see again elements from the Basic elements group. In the lower row you
will find, for each of these basic elements, a corresponding combination of a digital input and an
element from the group Branch, Wait, .... You will find the orange Digital input element, like the
Motor element, in the group Inputs, outputs.
61
GB
ROBOPro
USA
Using this trick, you can separate the logic of a program from the inputs and outputs. But there is
still something missing. If the motor and sensor elements are supposed to be in the main program
and the commands in a subprogram, there must of course be a way of linking the sensor and
motor elements with the subprogram. You will find the connection elements needed for this in the
Subprogram I/O group.
Via a subprogram command input, you can send commands to a subprogram
from outside. The Digital input element (sensor) sends its new value over the
orange line if the state of the input changes (with what is known as an “= com-
mand”). In the element’s dialog field you can give the input a name.
Via a subprogram command output you can send commands from a subprogram.
So, for example, you can send the commands left, right, or stop from a subpro-
gram to a motor. For this element too, you can enter a name in the dialog field.
Now you have everything you need for your multiple-model timer with subprograms.
The subprogram Time is almost exactly the same as the program in the previous section. The
Wait for digital input elements at the beginning and in the loop have, however, been replaced by
Wait for elements, with data connections for orange lines, from the group Branch, Wait, .... Both
are linked to the subprogram command input Sensor. The two motor control elements at the
beginning and end of the program have been replaced by command elements. Both send their
commands to the subprogram command output Motor.
The subprogram Time is called four times in the main program. The subprogram command input
Sensor has automatically generated the orange connection S on the left-hand side of the green
subprogram symbol. The connection M on the right-hand side got there because of the subpro-
gram command output Motor. The connection S of the subprogram symbol is connected each in
case with one of the sensors I1 to I4 respectively. One of the motors M1 to M4 respectively is
connected in each case to the connection M. In this way, each calling of the subprogram Time
queries a different sensor and controls a different motor!
62
GB
ROBOPro
USA
Try copying the above subprogram and main program and trying it out. You must draw the subpro-
gram first, because otherwise you won’t be able to insert the subprogram into the main program. If
you have difficulties with the subprogram, refer once again to Chapter 4, Level 2: Working with
subprograms on page 28.
To test the program, it is helpful to reduce the loop delay from 5 minutes to a few seconds.
You must now be wondering how you can read the stored values back from the list. There are two
possibilities here: You can read the values as for an ordinary variable and process them further in
your program. As the list contains more than one element, you first select the number of the ele-
ment you want to retrieve at the left data input, marked I. Then the value of this element is given
out at the data output R in the right-hand side.
63
GB
ROBOPro
USA
5.7 Operators
The illumination- and temperature-recording program worked well, but it became apparent from the
recorded data that the temperature in the exhibition space of the museum has nothing to do with
the sun. It has been established that some visitors have confused the airconditioning control in the
exhibition space with a model control, and have been busily tinkering around with it. No wonder the
temperature in the exhibition space has gone crazy!
But this problem can be easily avoided with an electronic combination lock. The combination lock
is to have a keypad with keys 1 to 6. If three figures are entered correctly one after another, the
combination lock should release the climate-control cover by means of a magnet.
64
GB
ROBOPro
USA
At first sight, such a lock is quite simple: The program simply waits until
the right keys have been pressed in the right order. A program like this
for the combination 3-5-2 can be seen on the right. But, on closer ex-
amination, this program has a problem. The lock can be quite easily
picked, by pressing all keys from 1 to 6 three times in succession. In that
way, the right key has always been pressed in every case. As Albert
Einstein put it so aptly: “Things should be made as simple as possible—
but no simpler.” So the program must enquire not only whether the right
keys are pressed, but also whether any wrong keys are pressed. Now
the program looks like this:
65
GB
ROBOPro
USA
This program opens the lock only when the keys 3-5-2 are pressed without any other key being
pressed in between. If for example the key 3 is pressed, the program first waits until the key is
released again. If any key other than 5 is pressed next, the program starts again from the begin-
ning. So the program works correctly, but it is neither simple nor conspicuous. Moreover, it is very
difficult to change the code. But don’t worry; it can also be done simply and correctly, using opera-
tors. There are various sorts of operators. You will find them under Program elements in the
group Operators. For the combination lock, we first need an OR operator.
66
GB
ROBOPro
USA
Several signals can be connected to the inputs of the OR operator. The operator
always yields 1 whenever at least one of the inputs is 1 (or >0). If several pushbut-
ton sensors are connected to the inputs of the OR operator, the output of the
operator is always 1 when at least one of the buttons is pressed. The number of
inputs can be set via the operator’s Properties window to up to 26. So all 6 keys can
be connected to one operator. Perhaps you are asking yourself how we can use this
to simplify the combination lock? Quite simple: with the operator you can initially wait in each step
until any key is pressed. Then you can check whether it is the right key. Then you need 2 rather
than 7 program elements per digit.
The buttons on inputs I1 to I6 are bundled together via an OR operator with 6 inputs. If at least one
of the buttons is pressed, the OR operator yields an output value of 1; otherwise 0. With a Wait for
element, the program waits until one of the buttons is pressed. Following this, we test immediately
whether it was the right button. If so, we wait for another key to be pressed. If a wrong button was
pressed, the program starts again from the beginning.
Alter the above program so that it uses panel elements in a panel instead of pushbutton sensors.
Start by drawing a panel with 6 buttons marked 1 to 6. Then alter the digital inputs via the Proper-
ties window. You have to replace the branches by branches with data input and panel inputs.
The combination lock now functions without a hitch, but it is still not so easy to change the code (3
5 2). The inputs in three branch elements must be altered. It is not necessary to change the code
regularly for the museum’s airconditioning system, but if, for example, you were using the lock for
an alarm system, you would presumably want to change the combination regularly. Of course, it
would be easier if the code could be stored in a variable. The code could even be changed auto-
matically. If, for example, a silent alarm is set off in the alarm system, the normal combination
could be replaced by a special alarm combination.
67
GB
ROBOPro
USA
In order to compare the combination variable with the input, you must also store the input itself in a
variable. In the beginning the input variable should have the value 0. When you now press the 3
key, the variable should have a value of 3, with the next keystroke on the 5 key a value of 35, and
finally after pressing the 2 key a value of 352.
The combination lock with code variable has two processes. In the process on the left, a number is
assigned to each key with some times operators and a plus operator. The 1 key gets number 1,
the 2 key number 2, and so on. The keys return a value of 0 or 1, and if you multiply this value by a
fixed number X, a value of 0 or X results. As the values for unpressed keys are 0, you can add up
all the values and end up with the numerical key value. As soon as a key is pressed, the input
variable is set to 10 times the previous value plus the value of the key pressed. Multiplication by 10
shifts the existing value of the input variable one decimal place to the left (e.g. 35 becomes 350).
The process on the right waits until the OK key in the panel is pressed following input of the com-
bination. The code variable Code, which has the value 352 if the code is correctly entered, is
compared with the input variable. If they both have the same value, the opening magnet is acti-
vated, not otherwise. Finally the input variable is reset to 0. The variables Entry and Code are
compared by comparing their difference with 0. You could also have use a Compare element.
If you press two leys at the same time, the values of the keys are added. So, for example, if you
press 3 and 6 at the same time, the value 9 results. In this way you can build a super-secret lock,
in which sometimes several keys must be pressed at the same time. Think which keys in which
order you must press to open the lock with a code of 495. Don’t forget that the Wait for ... element
continues the program when the value increases, not only when it changes from 0 to 1.
Does the combination lock also work for 2- or 4-digit codes? If so, up to what number of digits does
it work, and why? And what about the other combination lock programs?
68
GB
ROBOPro
USA
In the level 3, you were extensively engaed in how you can process Data by means of commands
and you can, for example, steer motors. Thereby you used exclusively pre-defined commands like
the = command or the right, left and stop command. In Level 4, sending commands over orange
connections and using your own commands are now being linked with one another.
69
GB
ROBOPro
USA
70
GB
ROBOPro
USA
71
GB
ROBOPro
USA
Even if you send a = command to an Any Command input, the commands are not repeated
with the sub program start. It may then occur that the value which the sub program input
passes on should not correspond to the real value value at the input.
72
GB
ROBOPro
USA
73
GB
ROBOPro
USA
74
GB
ROBOPro
USA
Caution: Unlike with the earlier ROBO Interface, only one ROBO TX Controller is connected
to a PC via USB or Bluetooth. To this so-called master you can connect up to 8 ROBO TX
Controllers as so-called extensions.
If you would like to operate more than one ROBO Interface on the USB bus, you must first
assign to each Interface its own serial number. By default, all ROBO Interfaces were supplied
with the same serial number, in order to void problems when exchanging Interfaces. The
Windows operating system, however, only detects Interfaces with different serial numbers.
You will learn more about this in Section 7.5 Changing the ROBO Interface serial number on
page 76.
• Under Remember Interface you can specify how the program remembers the selected
Interface. There are two possibilities here: If you select By serial number, the program
stores the serial number of the ROBO Interface. Even if you connect other ROBO Interfaces
to the USB bus and remove them, the program can always find the selected Interface again
by means of the serial number. On the other hand, this has the disadvantage that the pro-
gram now only works with an Interface with the same serial number. If you would like to use
the program with an Interface with a different serial number, then you must change either the
Interface assignment or the serial umber of the Interface. To get around problems with serial
numbers, there is a second possibility: By sequence. If you select this item, the program
stores the sequential order rather than the serial number. Although this can lead to confusion
if you add or remove Interfaces on the USB bus, the program will run unaltered with any In-
terface.
75
GB
ROBOPro
USA
Test
76
GB
ROBOPro
USA
Caution: If the serial number is changed, the driver may have to be re-installed, which re-
quires administrator privileges under Windows. If you change the serial number but can’t re-
install the driver, because you lack administrator privileges, you can no longer access the In-
terface via USB. In this case, you power down the Interface and hold down the Port button
while powering up again. Then the Interface will start with the serial number 1, and will once
again be recognized by the already installed driver. However, this does not reset the serial
number permanently, i.e., on the next start-up without the Port button the previous serial
number will be restored. To reset the serial number permanently, you proceed as described
above.
• Finally, under Update firmware, you can update the internal control program of your ROBO
Interface, if fischertechnik should ever offer a new version of the Interface firmware.
77
GB
ROBOPro
USA
8.1.2 End
If a process is to be terminated, the exit of the last element is connected to an
End element. A process can also be terminated at various different places with
this element. There is also the possibility of linking the exits of different elements
to a single End component. But is also quite possible that a process is executed
as an endless loop and contains no End element.
The End element has no properties that you can alter. For this reason, if you right-click on this
component, unlike most other elements, no Properties window is opened.
78
GB
ROBOPro
USA
• Buttons M1E-M4E allow you to query one of these four internal ROBO Pro inputs. They are
set to 1 as soon as a motor that is controlled by an Extended Motor Control element reach-
es a preset position.
• Under Interface / Extension you can select whether you want to use an input of the Inter-
face or an input of an extension module. You can find out more about this in 7 Controlling
several Interfaces on page 73.
• Under Sensor type you can select the sensor connected to the input. Digital inputs are
mostly used with push-button sensors, but often also with phototransistors or reed contacts.
ROBO Pro selects the Input mode of the universal input automatically according to the se-
lected sensor. In Level 4 and above you can also select the Input type independent of the
sensor.
• Under Interchange 1/0 connections you can interchange the positions of the 1 and 0 exits
of the Branch. Normally the 1 exit is below and the 0 exit is on the right. But often it’s more
practical to have the 1 exit on the right. Press Interchange 1/0 connections and then the
two connections will be interchanged as soon as you close the window with OK.
79
GB
ROBOPro
USA
80
GB
ROBOPro
USA
tion of rotation.
If you right-click on the element, the Properties window is
displayed:
• Under Motor output you can set which of the four
motor outputs M1 to M4 should be used.
• Under Interface / Extension you can select whether
you want to use an output of the Interface or an out-
put of an extension module or of another Interface.
You can find out more about this in Chapter 7 Con-
trolling several Interfaces on page 73.
• Under Image you can select an image to represent
the fischertechnik component connected to the out-
put.
• Under Action you set how the output is to be af-
fected. You can run a motor to the left (counterclockwise) or to the right (clockwise) or stop it.
If you connect a lamp to a motor output (see tip under Lamp output), you can turn it on or off.
• Finally, you can specify a Speed or Intensity between 1 and 8. 8 is the greatest speed,
brightness, or magnetic field strength; 1 the least. In the case of stopping or switching off, you
naturally do not need to specify a speed.
Here are listed some action symbols and images.
Tip: Sometimes even a motor is only operated in one direction, e.g. for a conveyor belt. In this
case you can use a lamp output for the motor, so as to use one connection less.
81
GB
ROBOPro
USA
Tip: If you only wish to connect four lamps or motors, you can also use motor outputs for
lamps. This is more practical, because in this way you can connect both lamp connections
directly to the Interface output, rather than having to connect all the negative terminals sepa-
rately to one of the ground sockets.
82
GB
ROBOPro
USA
83
GB
ROBOPro
USA
• Under Digital input you may enter which one of the inputs is to be queried. You can select
one of the universal inputs I1-I8. The other inputs are described in section 8.3.1 Digital
Branch on page 78.
• Under Interface / Extension you can select whether you wish to use an input of the Interface
or an input of an extension module or of another Interface. You can find out more about this
in Chapter 7 Controlling several Interfaces on page 73.
• Under Sensor type you can select the sensor connected to the input. Digital inputs are
mostly used with push-button sensors, but often also with phototransistors or reed contacts.
ROBO Pro selects the Input mode of the universal input automatically according to the se-
lected sensor. In Level 4 and above you can also select the Input type independent of the
sensor.
84
GB
ROBOPro
USA
• Under Interface / Extension you can select whether you wish to use an input of the Interface
or an input of an extension module or of another Interface. You will learn more about this in
Chapter 7 Controlling several Interfaces on page 73.
• Under Sensor type you can select the sensor connected to the input. Digital inputs are
mostly used with push-button sensors, but often also with phototransistors or reed contacts.
ROBO Pro selects the Input mode of the universal input automatically according to the se-
lected sensor. In Level 4 and above you can also select the Input type independent of the
sensor.
85
GB
ROBOPro
USA
86
GB
ROBOPro
USA
to a list. With a list, it finally makes a difference whether an element 1x or 2x is added. In the
level 2, the option delete if identical to the last buffered command is always selected.
• Under Data type you can select whether the value of the sent command is a whole number
or a floating point number. Also see chapter 12 Working with decimals on page 134.
87
GB
ROBOPro
USA
• Under swap Y/N branches, you can interchange the position of the Y and N outputs of the
branching. Normally, (Y) is the Yes output down and the No (N) output on the right. Often it is
however more practically if the Yes output is on the right. Press the swap Y/N branches,
then the Y and N connections are exchanged, as soon as you close the window with OK.
88
GB
ROBOPro
USA
89
GB
ROBOPro
USA
90
GB
ROBOPro
USA
If you use a 16-bit sub-address, you can select whether the MSB (=Most Significant Byte) or
LSB (=Least Significant Byte) is to be transferred first.
• Under Data size you can select whether the element sends 8 or 16 bit data to the I2C module.
With 16-bit data, you can select whether the MSB or LSB is to be transferred first, as with
sub-addresses.
• Under Speed you can select the I2C clock speed. This can be 100kHz or 400kHz. When all
connected I2C modules support 400kHz, you should use 400kHz, otherwise 100 kHz.
• Under Error handling you can select what happens when the connected I2C modules cannot
process the data properly. You can select between Repeat until successful, Repeat 10
times or abort immediately. In the case of the last two options, the element at the bottom
right is provided with an additional error output.
• When keep open is checked, the element does not send a stop over the I2C bus at the end.
This allows further data to be written or read with an additional I2C write or I2C read element.
If read and write operations are not accomplished alternately or a read command with sub-
address executed, the device address of the following I2C elements is not sent again. A re-
start is accomplished on the I2C bus to change over between read and write operations; not a
stop/start sequence. The I2C bus remains reserved for the current process, until an I2C ele-
ment performs the current process without the option "keep open". Other processes are
disabled, if they use the I2C element.
91
GB
ROBOPro
USA
• Under Data size you can select whether the element reads 8 or 16 bit data from the I2C
module. With 16-bit data, you can select whether the MSB or LSB is to be read first, as with
sub-addresses.
• Under Speed you can select the I2C clock speed. This can be100kHz or 400kHz. When all
connected I2C modules support 400kHz, you should use 400kHz, otherwise 100 kHz.
• Under Error handling you can select what happens when the connected I2C modules cannot
process the data properly. You can select between Repeat until successful, Repeat 10
times and abort immediately. In the case of the last two options, the element at the bottom
right is provided with an additional error output.
• The option Keep open has the same effect as with the I2C Write element
92
GB
ROBOPro
USA
Property window
• Under Name you can enter the name for the
command input. Only the first two characters are
displayed in the green subprogram symbol.
• Under Data type you can select whether the
value of the received command is a whole num-
ber or a floating point number. Also see 12
Working with decimals on page 134.
• Under Passing mechanism (Level 4 and above)
you can select whether the input accepts only
“=” commands or arbitrary commands. If vari-
ables or Interface inputs are connected to the
input in the subprogram call, you should select only “=” commands. In this case the subpro-
gram input stores the lastly transmitted value, making the correct value available immediately
when the subprogram is started. If you select arbitrary commands, you can also send com-
mands like stop or own commands to the input. These commands will only be forwarded to
the subprogram if the subprogram is active. This makes sense when the subprogram con-
tains a motor element, for example, and you would like to send commands to this element
from outside. You will find more information in section 6.3 Sending arbitrary commands to
subprograms on page 71.
93
GB
ROBOPro
USA
Incidentally, the odd value range of -32767 to 32767 results from computers calculating in the
binary system, and not in the decimal system as we do. In the binary system 32767 is a round
number, a bit like 9999 in the decimal system. But we don’t need to worry about this, as the com-
puter converts all the numbers from the binary to the decimal system. We only notice anything in
the maximum values and when there is an overflow in calculations.
94
GB
ROBOPro
USA
8.4.3 Constant
Like a variable, a constant has a value, but this value
cannot be altered by the program You can link a
constant with a data input of a subprogram symbol, if
the subprogram is to use the same value at all times. Constants are
also very practical for calculations with operators. You will find an
example of this at the end of Section 5.7 Operators on page 64.
Property window for constant
• Under Data type you can select whether the value of the
95
GB
ROBOPro
USA
constant is a whole number or a floating point number. Also see 12 Working with decimals on
page 134.
• Under Value you enter the value of the constant.
96
GB
ROBOPro
USA
8.4.5 List
The List element corresponds to a variable in which one may store not just
one but several values. The maximum number of values that can be stored in
a variable is determined in the Properties window.
You can append values to the end of the list or remove values at the end of
the list. You can also change or read any value in the list or exchange any
value in the list with the first value in the list. A value cannot be inserted in the middle or the begin-
ning of the list directly. But you can write an appropriate subprogram that will perform these
functions.
The following functions of a list are used by sending commands to the W (for write) input. The
following commands can be sent to the W input:
Delete 0 to Deletes the given number of elements from the end of the list. The value
32767 communicated with the command is the number of elements to be
deleted. If the number is greater than the number of elements in the list,
all elements are deleted. If the number is 0 or negative, the command is
ignored.
Exchange 0 to Exchanges the given element with the first element in the list. The value
32767 passed with the command is the position number of the element to be
exchanged.
Via the I (for Index) input, a specific element of the list can be selected. To do this, you send an =
command to the I input with the desired element number. The first element is element number 0.
Another value can be assigned to the element selected via the I input by sending an = command
with the desired value to the W input.
The element selected via the I input can be queried via the R (readout) output. If the I input, or the
value of the entry selected by the I input, changes, the list sends the current value of the selected
entry to those elements connected to the R output.
Via the I output you can query whether the index defined at the I input is valid. If N is the number of
elements, a value between 0 and N-1 must be present at the I input. If this is the case, the I output
sends an = command with the value N, in any other case with value 0, to all connected elements.
97
GB
ROBOPro
USA
98
GB
ROBOPro
USA
There are various commands like right, left or stop, which have different effects on the connected
element. As a rule, the connected elements understand only a few commands. The commands
each program element understands and the effects of these commands are listed alongside the
various program elements. Most commands are also accompanied by a value. With a right com-
mand for example, one specifies also a speed between 1 and 8. A stop command, on the other
hand, has no additional value.
Properties window for command elements
• Under Command you can select the desired command
from a list of all possible commands.
• Under Value you enter the numerical value that should be
passed with the command. If no value is to be passed,
this field remains empty.
• Under Value description you can enter a short indicative
text (e.g. X= or T=), which will be displayed in the com-
mand element with the value. The text should make clear
what sort of value is involved. But this serves only as a
comment, and has no other function.
• Under Data type you can select whether the value of the command is a whole number or a
floating point number. Also see 12 Working with decimals on page 134.
• Under Data input for command value you can specify whether the command element is to
have an orange data input on its left for the value to be passed. With all command elements,
the value can either be entered directly in the command element or read in through a data in-
put on the left side of the command element. In this way a motor, for example, can be
controlled in a servo loop with a variable speed.
8.5.1 = (Assignment)
The = command assigns a value to the receiver. As a rule, it is used to
assign a value to variables, timer variables, list elements or panel outputs.
But the = command is sent not only by command elements, but by all pro-
gram elements with data outputs. All elements send = commands when the
value of an output is altered. A Digital input element, for example, sends an =1 command when a
sensor on the input is closed and an =0 command when the sensor is opened. But no command
element is used to do this. Program elements with data outputs have, so to speak, = command
elements built in.
All ROBO Pro program element data inputs can process at least the = command. This makes the =
command the most frequently used command in ROBO Pro.
8.5.2 + (Plus)
The + command is send to a variable or a timer variable to increase the value
of the variable. Any desired value can be passed with the + command, and
will be added to the variable. As the value passed with the command can
also be negative, the value of the variable can also be decreased by this
command. See Section 8.4.1 Variable on page 94 and Section 8.4.4 Timer
variable on page 96.
99
GB
ROBOPro
USA
8.5.3 – (Minus)
The – command is used similarly to the +command described above. The
only difference is that value passed with the command is subtracted from the
value of the variable.
8.5.4 Right
The Right command is sent to motor output elements to switch on the ele-
ment with clockwise rotation. See Section 8.7.4 Motor output on page 107.
The value is a speed from 1 to 8.
8.5.5 Left
The Left command is sent to motor output elements to switch the motor on in
a counterclockwise direction. See Section 8.7.4 Motor output on page 107.
The value is a speed from 1 to 8.
8.5.6 Stop
The Stop command is sent to a motor output element to stop the motor. See
Section 8.7.4 Motor output on page 107.
No value is passed with the Stop command.
8.5.7 On
The On command is sent to a lamp output element to switch the lamp on.
See Section 8.7.5 Lamp output on page 108. An On command can also be
sent to a motor output element; it corresponds to the Right command. For
motors, however, it is better to use the Right command, as the direction of
rotation is then directly recognizable.
The value is the brightness or intensity, from 1 to 8.
8.5.8 Off
The Off command is sent to a lamp output element to switch the lamp off.
See Section 8.7.5 Lamp output on page 108. An Off command can also be
sent to a motor output element; it corresponds to the Stop command.
No value is passed with the Off command.
100
GB
ROBOPro
USA
8.5.9 Text
The Text command is a special command in that it doesn’t send a
command with a number, but rather a text of your choice, to the con-
nected element. However, there is only one program element that can
process the Text command, and that is a text display in a panel. You will
find further information in Section 9.1.2 Text display on page 121.
101
GB
ROBOPro
USA
Note: This element does not exist for floating point numbers since floating point numbers are
prone to rounding errors. Therefore it might not be reasonable to ask whether two values are
102
GB
ROBOPro
USA
exactly the same. You can do a two-way comparison with a program branch. See section
8.6.1 Branch (with data input) on page 102.
8.6.3 Compare
With the Compare program element, the two values at the data inputs
A and B may be compared with one another. Depending on whether
A is less than B, A is greater than B, or A equals B, the element
branches to the left, right, or middle exit. The most common applica-
tion for this is the comparison of a nominal value with an actual value.
According to where the nominal value lies in relation to the actual
value, then, for example, a motor can turn left or right or be stopped.
The Compare program element has no options to be set, and therefore no Properties window.
Note: This element does not exist for floating point numbers since floating point numbers are
prone to rounding errors. Therefore it might not be reasonable to ask whether two values are
exactly the same. You can do a two-way comparison with a comparative operator (see sec-
tion 8.8.2 Comparative operators (relational operators) on page 111 and a program branch
(see section 8.6.1 Branch (with data input) on page 102).
103
GB
ROBOPro
USA
104
GB
ROBOPro
USA
105
GB
ROBOPro
USA
These inputs are not real inputs but logical inputs to control encoder motors.
You will learn more in section 11.6.2 Extended Motor Control in Level 3 on page 130.
106
GB
ROBOPro
USA
In addition, a motor element can receive commands for extended motor control (synchronous,
distance, reset), as explained in section 11.6.2 Extended Motor Control in Level 3 on page 130.
107
GB
ROBOPro
USA
108
GB
ROBOPro
USA
109
GB
ROBOPro
USA
you can also insert display elements in your panel. In these display elements you can display, for
example, the axis coordinates of a robot or the state of an end switch. You alter the value to be
displayed by inserting a Panel output element in your program and sending the element an =
command, e.g. by connecting a variable, an analog input or a command element to it.
Panels can only be used in online mode. You will learn more about this in Section 3.7 Online and
download operation-what's the difference? on page 24.
Properties window for Panel displays:
One panel belongs to every main program or subprogram.
Panel displays are listed under the name of the respective
programs. If you have not yet established any panel elements,
then no elements will appear in the list. So you must first draw
the panel before you can link a panel input to a panel element.
8.8 Operators
All program elements in this group are what are called operators. Operators have one or more
orange data inputs. The values from the data inputs are combined by the operator to create a new
value which is transmitted from the operator’s output by means of an = command.
Properties window for operators
All operators use the same Properties window. Through the
Properties window, you can even transform an operator into a
different operator.
• Under Operation you can set how the operator is to
combine its inputs. The individual functions are ex-
plained in the next two Sections.
• Under Number of inputs you can set the number of
inputs the operator is to have.
110
GB
ROBOPro
USA
If the Minus operator has more than two inputs, all subsequent input values are subtracted from
the value in input A. If the Minus operator only has one input, the operator changes the sign of the
input value.
If the Divided by operator has more than two inputs, the value in input A is divided by all further
input values.
equal not equal less than less than greater than greater than
or equal to or equal to
A=B A≠B A<B A≤B A>B A≥B
If a comparison is true, the output value is 1, otherwise 0. The output value is always a whole
number even if the input values are floating point numbers.
Besides the not equal operator you can use any of the comparative operators with more than two
inputs. The result then becomes 1 if the condition is true for A and B as well as for B and C, and so
on. For example, this way you can determine with one single operator, whether a value lies within
the given upper and lower bound.
And Or Not
A>0 and B>0 A>0 or B>0 A <= 0
111
GB
ROBOPro
USA
The logical operators interpret a value greater than zero as yes or true and a value less than or
equal to zero as no or false. Digital inputs return a value of 0 or 1, so that 0 is interpreted as false
and 1 as true.
The And operator sends an = command with the value 1 to the elements connected to its output if
all inputs have the value true, i.e. a value >0. Otherwise the element sends an = command with the
value 0.
The Or operator sends an = command with the value 1 to the elements connected to its output if at
least one input has the value true, i.e. a value >0. Otherwise the element sends an = command
with the value 0.
The Not operator sends an = command with the value 1 to the elements connected to its output if
its input has the value false, i.e. a value <=0. Otherwise the element sends an = command with the
value 0.
The function of logical operators can also be emulated with several Branch elements. But it often
makes for much easier understanding to combine several inputs using operators.
For example, for the number 3 the bits 0 and 1 are set to 1 because 20 + 21 = 3 ist. Bit operators
carry out the same operations as logical operators with the exception that they do it for every
individual bit. Thus 3 AND 6 yields the value 2 because the bit 21 is the only one that is set in both
3 = 20 + 21 and in 6 = 21 + 22. Please note that the numerical value 32768, for which only the bit 215
is set to 1, has a special meaning in ROBOPro and is used for error or blank. To generate a vari-
able with this value you simply enter nothing (blank) for its value.
112
GB
ROBOPro
USA
8.8.5 Functions
Functions are similar to operators but they always have only one input. Functions include trigono-
metric functions, roots, exponential and logarithmic functions.
Note 1: In many cases, functions are difficult to compute. Since the TX Controller makes sure
that every process can carry out a command at least 1000 times per second, the number of
functions that can be evaluated in one command is limited. Networks of organge data lines
are always processed in one command and are not split up. Therefore one should not call too
many functions in a row in an orange network.
Note 2: ROBOPro does not use arithmetics with extended precision to compute functions.
Therefore, the precision of results is typically about 2 bits less than the maximal possible pre-
cision of the 48-bit floating point format. The precision of the results is estimated by ROBOPro
and saved in the result.
Basic functions
abs Absolute value: Returns the positive value of the input, for example 3.2 for -3.2
113
GB
ROBOPro
USA
sqrt Square root: Returns the square root of the input, for example 1.4142... for 2.0
114
GB
ROBOPro
USA
practical to have the 1 exit on the right. Press Interchange 1/0 connections and then the
two connections will be interchanged as soon as you close the window with OK.
115
GB
ROBOPro
USA
116
GB
ROBOPro
USA
117
GB
ROBOPro
USA
analog inputs, which measure various physical quantities. There are analog inputs for resistance
measurements, for voltage measurements and for a special distance-measuring sensor.
The usual fischertechnik sensors, NTC resistor, phototransistor and photoresistor, transform the
quantity measured (temperature of light intensity) into a resistance. Therefore, you must connect
these sensors to the AX or AY input. The voltage inputs A1 and A2 are designed for all sensors
that produce a voltage between 0 and 10V.
There is no socket on the ROBO Interface for the AV input. It is always linked to the Interface’s
supply voltage. In this way you can, for example, monitor the battery voltage and put the model
into its exit position before the battery is flat.
The distance sensor inputs D1 and D2 accept connection to special fischertechnik sensors that
can measure the distance to, for example, an obstacle.
The Intelligent Interface has only two analog inputs, EX and EY. These correspond to the AX
and AY inputs of the ROBO Interface. The other analog inputs cannot be used with the Intelli-
gent Interface!
118
GB
ROBOPro
USA
119
GB
ROBOPro
USA
In the empty gray field below you can then insert panel elements. A panel always belongs to the
main program or subprogram in which you were when you created the panel. Therefore it is impor-
tant that you always select the right subprogram in the subprogram bar before creating a panel.
Panels are generally created under the main program.
Panels contain displays and control elements. With displays, you can display for example variable
values or text messages. Control elements, on the other hand, function as additional sensors of
analog inputs.
To every panel element that you insert in the panel there is a corresponding
element in the program: a Panel input (for control elements) or a Panel
output (for displays). You establish the link between your program and
your panel through these program elements. You find them in the Inputs,
outputs element group. A different symbol is displayed according to which
type of panel element you link to these program elements. But in the ele-
ment list there are only two elements: one for displays and one for control
elements.
9.1 Displays
Displays are used in a similar way to Interface outputs. You can set the value of a display with an =
command.
9.1.1 Meter
The Meter is based on an analog instrument with pointer. It is
mostly used to display the value of analog inputs; but you can also
use it for variables or other program elements.
The meter is controlled from the program via
a panel output. You will find the Panel out-
put in the element group Inputs, outputs.
You set the value of the meter by sending an = command to the
corresponding panel output in the program. Almost all program
elements with data outputs send an = command when their value
changes. You can connect analog inputs or variables for example
directly to the panel output.
120
GB
ROBOPro
USA
121
GB
ROBOPro
USA
122
GB
ROBOPro
USA
You can switch the lamp on or off by sending the corresponding panel output
an On or Off command, as you would also do for a real lamp output. You can
also switch a display lamp on or off via an = command. If the value is greater
than 0, the lamp is switched on If the value is less than or equal to 0, the lamp
is switched off
Properties window for display lamps
• Under ID / Name you should first enter a name for the
display lamp. The name is important so that you can distin-
guish between more than one display lamp in your program.
• Under Color you can change the color of the display lamp.
To do this, click on the Edit button.
• If Initially on has a cross next to it, the display lamp is on
until the corresponding program element receives a com-
mand. Otherwise the display lamp is initially off.
9.2.1 Button
You can use the Button panel element like a fischertechnik sensor or switch
connected to one of the inputs of the Interface.
The Button is queried from the program via a panel input. You will find the
Panel input in the element group Inputs, outputs.
You can connect the panel output associated with the button, like an
Interface digital input, to any program element with a data input, for exam-
ple to the Branch element. If the button is depressed it returns 1 as its
value, otherwise 0.
123
GB
ROBOPro
USA
9.2.2 Slider
You can use the Slider like a potentiometer connected to an analog
input of the Interface. Unlike the button the slider can return not only the
values 0 and 1, but many different values, like an analog input. The
range of values can be set through the Properties window. The slider can be used for example to
set the motor speed between 1 and 8.
The Slider is queried from the program via a panel input. You will find the
Panel input in the element group Inputs, outputs.
As soon as you have linked the Panel output with a slider by means of its
Properties window, the symbol changes and the name of the panel (e.g.
Main) and of the slider appear.
You can connect the panel output associated with the slider, like an Interface
analog input, to any program element with a data input. Very often the slider
is connected to a command element with a data input, so that the slider
controls the speed of a motor.
124
GB
ROBOPro
USA
10 Drawing functions
With drawing functions you can illustrate your panels and programs, to make their function clearer.
Here for example is illustrated a user-designed panel for a robot.
The buttons, co-ordinate displays and end switch lamps are kept in each case in the same color as
the respective individual axes in the schematic drawing of the robot. This results in panel that is
very easy to understand.
The application of the drawing functions should present no great difficulties. So only a few points
that might not be immediately clear are presented in the following:
• Graphical objects like rectangles and circles are not delineated as in many programs by
holding down the mouse button, but through two mouse clicks, one in the upper left corner
and one in the lower right corner.
• Text is not edited in a dialog window, but directly in the working area. When you insert a new
text object, initially only a bright blue frame appears. You can now simply type at the key-
board and the text you type will appear directly in the working area. You can also insert text
from the clipboard with CTRL+V.
• Once you have drawn an object, you can edit it by moving the small blue handles. There are
also handles for turning and distorting objects. A rectangle has two handles at the upper left.
If you displace the second, larger handle, you can round off the corners of the rectangle. You
can exit editing mode by right-clicking with the mouse or by pressing the ESC key.
• If want to edit the object later, select the Edit function in the Draw menu. If you the click on
an object, the bright blue handles will appear again.
• Many objects have two or more editing and drawing modes. While drawing or editing an
object, you can switch between the individual modes with the TAB key on the keyboard. In
the case of a circle, for example, you may select whether you would like to specify two boun-
dary points or the center and one boundary point. In the case of polygons, you can change
between point editing and functions like “rotate”. With text objects, you can switch between
editing the text and changing the font size or angle of rotation.
125
GB
ROBOPro
USA
• In the Draw menu there is functions to put the object in the foreground / background. With
this function you can put all selected objects (drawn in red) forward or back, so that the ob-
scure other objects or are obscured by them.
• With the Raster snap function in the Draw menu you can switch on or off the character
matrix. You should however take note that the matrix is switched on when you are editing
your program, as all program elements are aligned to the matrix.
• You can alter the alignment of text objects by pressing CTRL+ a key from 1-9 on the numeric
keypad. But this only works if the Num-Lock light on the keyboard is on. If not, you must first
press the NUM key.
126
GB
ROBOPro
USA
127
GB
ROBOPro
USA
*Note: Only the ultrasonic sensor with 3 connectors and order number 133009 can be at-
tached to the ROBO TX Controller. The ultrasonic sensor matching the ROBO Interface has 2
connectors and order number 128597.
**Note: The abbreviation C1D means, that the counter input C1 is used as simple digital in-
put. If C1 is used as fast counter input, the window shows C1C.
If your program uses only the inputs listed above, and if the input mode for the universal inputs I1-
I8 matches on the ROBO TX Controller as well, you can load your program on the ROBO Interface
as well as on the ROBO TX Controller. The mapping is done automatically, if you start the program
128
GB
ROBOPro
USA
in online or download mode. So you can develop a program in ROBO Interface mode using ROBO
Interface inputs, but select via COM/USB a ROBO TX Controller.
129
GB
ROBOPro
USA
If you defined a distance, the element does not wait until the chosen dis-
tance is reached, but immediately continues with the next program element.
This way the program can continue and stop the motors in case of some
event. In order to test if the motor has reached its target, there are internal
inputs M1E to M4E, one for each motor. You can query these inputs using a
branch or a wait for input program element.
The inputs M1E to M14 become 1, if the corresponding motor had reached
the given number of pulses (distance). The inputs stay 1 until you send a
new distance command for the motor. For the wait element it is therefore
best to wait for 1 as in the picture. If you control two motors synchronously,
you need a wait element for the first motor only. In the case of synchro-
nously controlled motors the inputs become 1 when both motors have
reached their destination.
An example for using this element is shown in the section 4.4 Tango on page 3.
130
GB
ROBOPro
USA
131
GB
ROBOPro
USA
11.7 Display
Another new feature of the ROBO TX Controller is the display. Similar to an operation panel, the
display can be used to control a program or to output status data. A display is designed in the TX
Display tab in the same way as on operation panel:
The available control elements are also the same as for an operation panel: a slider and a push
button. For displaying status data, a text display is available. For structuring the display area, there
is a line element and a rectangle element.
If you want to change the size of a control element, you can use the menu option Draw / Edit.
The connection between display elements and the program is done in the same way as for an
operation panel using input and output elements.
132
GB
ROBOPro
USA
In the same way as every subprogram can have its own operation panel, every subprogram can
have its own display content. But there is a difference: the display contents changes automatically
if a subprogram is entered or left. This way it is possible to develop quite complex menu structures
without much effort. It is advisable to run all subprograms with display contents in a single process.
Otherwise it might become difficult to predict which display contents is shown in what situation.
133
GB
ROBOPro
USA
134
GB
ROBOPro
USA
displayed using the exponent notation common in technology, for example k for thousand as in km.
The exponent abbreviations are as follows:
In case the exponent is outside of this range, which mostly happens in case of calculation errors,
the error ?FORMAT? is displayed.
Of cause floating point numbers can be displayed using the notation more common with computers
and pocket calculators as well. The text command offers the following options:
135
GB
ROBOPro
USA
Example:
Two constants are added and the result is displayed for 5
seconds. Then the display is erased (entry of \c in the text
command) and the word “End“ is displayed.
Please note the following hints regarding formatting:
• The number of valid digits as well as the number of digits
in the exponent can be varied in all formats.
• You can use a point or comma as decimal separator.
• In front of the point or comma, at least 2 # characters are
required, one for the sign and for the at least 1 digit in
front of the decimal separator.
ROBOPro uses the following codes to display special values and to flag error situations:
• 0 is used to represent an exact zero (no error) or numbers that are less than approximately
±10-2500.
• ?FORMAT? The number cannot be displayed using the chosen format.
• ?OVERFLOW? The calculation resulted in an arithmetic overflow. For example, division by
zero results in an overflow.
• ?NAN? Not A Number is the result of invalid calculations like square root of -1
• ?UNDEFINED? This value is e.g. used for subprogram inputs before they receive a value.
• ?LOST? is displayed for entries like 0/0 etc.
• ?CORRUPTED? This should never happen. If you have a program that shows this value,
please send it to the fischertechnik service.
• ??.?? See next section.
136
GB
ROBOPro
USA
137