QR Code Reader In None
Using Barcode Control SDK for Software Control to generate, create, read, scan barcode image in Software applications.
Generating QR Code ISO/IEC18004 In None
Using Barcode creator for Software Control to generate, create QR Code image in Software applications.
Recognize Denso QR Bar Code In None
Using Barcode recognizer for Software Control to read, scan read, scan image in Software applications.
QR Code JIS X 0510 Drawer In C#.NET
Using Barcode drawer for .NET Control to generate, create Quick Response Code image in Visual Studio .NET applications.
QR Code 2d Barcode Drawer In VS .NET
Using Barcode generation for ASP.NET Control to generate, create QR Code JIS X 0510 image in ASP.NET applications.
Denso QR Bar Code Creation In VS .NET
Using Barcode generation for Visual Studio .NET Control to generate, create QR Code 2d barcode image in VS .NET applications.
FIGURE 13-4 Typical beginner program flow. Input data is passed to a block of code for processing and then output. This program model cannot be used for robot programming.
Draw QR Code 2d Barcode In Visual Basic .NET
Using Barcode maker for .NET framework Control to generate, create QR Code JIS X 0510 image in VS .NET applications.
Code 39 Creator In None
Using Barcode printer for Software Control to generate, create Code 3 of 9 image in Software applications.
13.3 GRAPHICAL PROGRAMMING
UPC-A Supplement 2 Printer In None
Using Barcode encoder for Software Control to generate, create UPC-A Supplement 2 image in Software applications.
Generate GS1 128 In None
Using Barcode generation for Software Control to generate, create UCC-128 image in Software applications.
Bar Code Generator In None
Using Barcode printer for Software Control to generate, create barcode image in Software applications.
Encoding Data Matrix In None
Using Barcode drawer for Software Control to generate, create DataMatrix image in Software applications.
USS 93 Generator In None
Using Barcode drawer for Software Control to generate, create Code 93 Full ASCII image in Software applications.
Decoding Data Matrix 2d Barcode In None
Using Barcode scanner for Software Control to read, scan read, scan image in Software applications.
Make ECC200 In Java
Using Barcode drawer for BIRT reports Control to generate, create DataMatrix image in BIRT reports applications.
UPC-A Drawer In Visual Studio .NET
Using Barcode printer for .NET Control to generate, create GS1 - 12 image in VS .NET applications.
Creating EAN128 In VS .NET
Using Barcode generation for Reporting Service Control to generate, create UCC.EAN - 128 image in Reporting Service applications.
Print Barcode In Objective-C
Using Barcode creator for iPhone Control to generate, create bar code image in iPhone applications.
FIGURE 13-5 Robot program flow with the inputs being continually polled and the data processed into outputs. The delay block slows down the execution to make sure that outputs have time to take effect before the environment is polled again for the next set of output commands.
GS1 128 Reader In Visual C#
Using Barcode recognizer for .NET framework Control to read, scan read, scan image in .NET applications.
UPC Symbol Recognizer In Java
Using Barcode reader for Java Control to read, scan read, scan image in Java applications.
13.3 Graphical Programming
In this chapter, there is a lot of material on text-based programming that probably seems very difficult and complex, especially when you consider that there are many graphical robot programming environments available that could reduce a reasonably complex function like programming a light-seeking robot into the simple chore of drawing a picture like the one in Fig. 13-6. This program will cause a robot to move toward the brightest point in the room. This is a lot easier to understand than the text-based version, which would look something like
while (1) ' If (Left > Right) ' Right Motor = On Left Motor = Off else if (Left < Right) ' Right Motor = Off Left Motor = On else ' Right Motor = On Left Motor = On endif endif Dlay(100) ' Delay 100 ms endwhile Loop Forever Turn Left
Left = Right, Go Straight
which would probably take you a lot longer to program than moving some blocks and lines around in a graphic editor. While being more difficult to understand and longer to develop, the text-based program gives you a great deal of flexibility that you don t have with most graphical programming environments. Both programs perform the same operations and work the same way, but what happens if you discover that rather than turning as soon as the left and right light sen-
Left Light Sensor
Right Light Sensor
FIGURE 13-6 A graphical programming environment can produce simple and readable programs like the one shown here, but it tends to be difficult to tune with exact parameters as well as enhance with extra logic functions.
sors are different values, the robot could run straight while they were within two values of each other. In the graphical programming environment, this would be impossible, but in the text-based program the two if statements could be changed to
if (Left > (Right + 2) if ((Left + 2) < Right)
which would cause the robot to move forward if Left and Right were +/ 2 of each other rather than turning if they weren t exactly equal. There are a lot of other cases where you will find that you need to tweak the program to run optimally, but you find that it is impossible to modify the graphic program for these needs. Another advantage of text-based programming over graphic programming is the ability to add more complex logic to the operation of the robot. For example, if you wanted the robot to turn right if it has turned left five times in a row you can add the code quite easily to the text program whereas the graphic program does not have that capability (and indeed, very few graphical programming environments even have variables). It is important to not generalize. While most beginner and hobbyist graphical programming environments and languages do have the limitations listed here, more professional ones do not. For example, National Instruments LabView programming environment offers the same capabilities and flexibility as a text programming language despite being based on just graphic symbols for operators, variables, and decision structures. Hopefully you realize that these capabilities do not come free; creating a complex graphic program will require at least the same amount of study and practice as developing a text-based one.