background image

Running a Control Program

Once a control program has been written, it can be run by clicking on the  

Start/Stop icon.

To stop the program before it reaches the end, click on the Start/Stop icon.  

This will stop all parts of the program instantly.

•  If the program contains multiple flowcharts (that begin with the Start: command),  

all will begin simultaneously.

•  When a control program is run, the symbols will highlight as they become active.  

The progress of the complete program can be viewed by clicking on the map tab  

in the information panel.

• Click on a flowchart or procedure in the map tab for it to be selected to the edit area.
•  If Follow Flowchart (Debug menu) is checked then the progress of whichever flowchart 

is currently selected to the edit area will be followed in detail through all procedures.

•  To run only the procedure or flowchart that is in the edit area, select Run: Procedure: xx 

or Start: xx (Debug menu).

•  To restrict exactly which flowcharts (those that begin with the Start: command) will run; 

select Start Settings (Debug menu).

To Check and Debug  

a Control Program

If there is an error in the program, it can be difficult to locate exactly where it occurs  

because the program is running so quickly. K’NEX Robotics software includes powerful  

debug features that allows you to restrict which parts of a program runs and slow down  

or stop the program at specific points so the problem can be easily located.
It is easiest to Check and Debug a control program with the Control Box with the required  

inputs and outputs connected to the computer. Doing so allows live feedback from the  

motors and sensors. 
However, the K’NEX Robotics Software includes a “Sensor Emulation” mode that allows you 

to test a control program with no Control Box connected.

Sensor Emulation

When a K’NEX Robotics Interface is not connected to the software, sensor values and inputs 

can be emulated to allow a program to be tested. To do this, click on the sensor/motor/LED 

icon from the I/O panel and set the desired state for the sensor in the pop up window.  

The selected value will be returned to the program.

For example: 

If the program is set to look for a distance of less than 200mm instead of having 

to ensure that the sensor is actually returning this value, it can be set in emulation mode to 

return 180mm constantly.
If a program is running, the set value can be altered manually by changing the value in the 

I/O details panel for the sensor. Depending on your program you may need to change  

sensors values several times.

Education

®

Building Programs

education.com

Education

®

Building Programs

50

K’NEX Robotics User’s Guide

SOFTWARE

Summary of Contents for Education 79100

Page 1: ...ROBOTICS Building System USER S GUIDE 79100 79484 Education Building Programs education com...

Page 2: ...ay from all moving parts USER S GUIDE ROBOTICS Building System 2016 K NEX Limited Partnership Group P O Box 700 Hatfield PA 19440 0700 1 800 KID KNEX email knex com knex com K NEX and K NEX Education...

Page 3: ...he Control Box directly or download programs for later use F 2 Digital Outputs To operate LEDs G LCD Screen To display a list of programs and user options Can also be used to display user generated im...

Page 4: ...Sensors Power Supply Socket Power Switch K NEX ROBOTICS CONTROL BOX BUTTONS The ENTER button is used to start programs progress to the next screen or confirm a choice The square STOP button is used t...

Page 5: ...RE Serial Number Firmware Version Number Press and Hold to Stop Program Wi Fi screens start on next page Optional Wi Fi screen Sensors needed for program to run will disappear upon insertion See pages...

Page 6: ...tion com Education Building Programs 6 K NEX Robotics User s Guide HARDWARE exit without saving exit and save K NEX ROBOTICS WI FI SCREEN NAVIGATION GUIDE If equipped with optional Wi Fi Chart continu...

Page 7: ...K NEX Robotics User s Guide Education education com Education Building Programs 7 HARDWARE Move forward and back through characters...

Page 8: ...f touch sensor When the button is pressed input ON the contacts connect together and allow current to flow When the button is released input OFF the contacts are open and no current flows Distance Sen...

Page 9: ...me LCD is built into the front of the Control Box When the power is switched on the display shows a welcome screen and then defaults to the main menu which displays program and user options The LCD ca...

Page 10: ...onents you will need to download the K NEX Robotics software You will need A PC not Mac compatible with an available USB port The K NEX Robotics software supplied at www knex com robotics The K NEX Ro...

Page 11: ...Click on the Connect control box icon to establish connection to the Control Box When a connection is established the icon changes to show Disconnect which is used to break off connection with the Co...

Page 12: ...and K NEX model connected to the computer As you write the control program you can test the functionality of the model to ensure it works as intended With the Control Box connected to the computer and...

Page 13: ...run If there are no user programmed graphics being displayed the LCD will display running development control program o If there is a mismatch between the sensors and motors connected to the Control...

Page 14: ...h program can use up to 32 images Technical Specifications USB V 1 1 V2 0 V3 0 full speed compatible Power supply Output 7 5V 2 A regulated dc with a positive center and negative outer pin 6 sensor in...

Page 15: ...computer platform it is being used with Windows 7 8 etc The software and its version number from the Help and about menu A description of the problem being encountered If possible telephone from a lo...

Page 16: ...ontrol project that helps the student to understand a problem that the student can identify with be it from firsthand experience or via a subject area they are interested in The K NEX Robotics set off...

Page 17: ...the location the files were downloaded and click on setup exe Follow the on screen instructions to complete the installation of the software and its associated files When the installation is complete...

Page 18: ...Single Step Run through a program one step at a time Connect Connect to a control box Download Download a program to a control box Education education com Education Building Programs 18 K NEX Robotics...

Page 19: ...is symbol to operate a motor play a sound or display graphics or text on the LCD See page 30 Process use wait for the time that an output should be switched on procedure for the flowchart to call up a...

Page 20: ...ll be in red italics until the flow line is correctly set i e a flow line connects the symbols Right click in the area to alter the font size If you click on a line in text view it will highlight the...

Page 21: ...ecome active when this tab is selected If you click on a Start or Procedure in the map view it will become active in the edit area The Variables Tab Clicking this tab displays a list of variables and...

Page 22: ...is tab will remain blank The Sensor References Tab This tab will display all sensor motor and LED connections required by the active flowchart Consult this tab to confirm your model has the proper con...

Page 23: ...a This area displays the current status of the sensors motors and digital outputs in the control program Icons representing I O components connected to a Control Box will populate this panel when the...

Page 24: ...is limited by program memory but there can only be 14 nested levels as mentioned on page 14 Placing Symbols and Entering Commands Click on the symbol you require in the symbol toolbar it will highligh...

Page 25: ...For example When you place an Output symbol the selection panel will look like this K NEX Robotics User s Guide Education education com Education Building Programs 25 SOFTWARE...

Page 26: ...lthough the selection panel changes according to which symbol is selected it always follows a similar format The command is built up by clicking on buttons As the command is built up the selected choi...

Page 27: ...ly and only reposition when symbols are added deleted or moved 4 Repeat this process until all of the symbols are connected To deselect the Flow Line tool either click back on the Flow Line icon or cl...

Page 28: ...select when Flow Line is selected To select a symbol mputer Click on the symbol it will highlight to show it is selected To deselectystem Click in the blank space in the edit area To select more than...

Page 29: ...w flowchart or procedure click on the Start icon a new Start symbol will automatically be placed in the edit area To edit click on the Start symbol it will highlight to show it is selected Alter the c...

Page 30: ...on the Output icon move the mouse into the edit area and click to fix it in place In the selection panel click on the Motor Output Sound Image or Text tab Make your selection from the panel and enter...

Page 31: ...hed on for 3 seconds and the flowchart forced to stay at this point until the 3 seconds has elapsed by checking the Wait for motor s to finish box In most cases if you specify a number of seconds or r...

Page 32: ...an be controlled in one command if desired Simply make the selections you want for both before clicking on OK To edit Click on the selected number button to deselect and deactivate that output The sel...

Page 33: ...he flowchart moves on to the next step Start playing sound and then repeatSoftware The sound file will play entirely and repeat from the beginning until the flowchart stops running or the Stop playing...

Page 34: ...the Use Existing Image button Select the image from the pop up list that includes the image title and a picture of the image After the existing file is chosen click the OK button in the pop up window...

Page 35: ...e displayed until another text command replaces that line or an image is displayed or the flowchart hits a stop Clear Image remove all lines of text previously specified NOTES You can specify 1 line o...

Page 36: ...ck to fix in place In the selection panel click on either the Wait Procedure or Make button Make your selection from the panel Click on OK to enter the completed command into the process symbol Educat...

Page 37: ...PC keyboard Variables and simple equations using variables can also be used to determine the time for the wait The smallest increment of time you can use in a wait is 0 1 seconds Procedure This functi...

Page 38: ...rocedures will not be visible in the existing procedures list until they have been created using a new start in the edit area If required type in the number of times you would like the procedure to be...

Page 39: ...multiplication and division e g Make x x 5 OR Make x x 3 OR Make x x 2 NOTE Variables are stored to 1 decimal place and can be in the range 107374182 3 A variable can be used to store information For...

Page 40: ...ied condition is met and decides what to do next It has both a YES and a NO line since these are the two options for any condition The decision symbol can check the value of a variable the status of i...

Page 41: ...f a variable Enter the condition to be checked for using either the radio buttons or the PC keyboard For example Is Counter 5 Checks to see if the variable Counter is 5 Is Counter 99 Checks to see if...

Page 42: ...ed sensor from the sensor drop down list Enter the condition to be checked for using either the radio buttons or the PC keyboard For example Is 1 Distance 250 Checks the value of distance sensor plugg...

Page 43: ...ed for using either the radio buttons or the PC keyboard To query motor direction use a 1 for forward and a 1 for reverse For example Is A Motor 1 Checks to see if the motor plugged into port A is run...

Page 44: ...u can select the desired LED color from the radio buttons or use the corresponding number shown on the button in your command line For example Is 1 Output Green is equivalent to Is 1 Output 4 For exam...

Page 45: ...e unaffected Stop at the end of a procedure all procedures must have a stop without one the program will eventually fail When the stop is encountered the procedure will stop running and return to the...

Page 46: ...of connections will generate errors when the program is run The Text Tool Use this tool to add text labels to the flowchart Text labels can be quite useful to describe what portions of your flowchart...

Page 47: ...cs software allows you to quickly and easily develop multi tasking or multi thread programs Traditionally this is a very complex programming task but the software offers this programming method in a v...

Page 48: ...for running separate flowcharts There are many occasions where having separate flowcharts within a program is useful Here are just a few When an emergency stop is required The first flowchart can be u...

Page 49: ...down the page forever Procedures can also be used effectively for a repeating task Creating a procedure for the task and then calling the procedure for X number of repeats reduces programming time an...

Page 50: ...ickly K NEX Robotics software includes powerful debug features that allows you to restrict which parts of a program runs and slow down or stop the program at specific points so the problem can be easi...

Page 51: ...tart Stop icon the entire control program all flowcharts and all procedures will run To restrict which flowcharts starts will run select Start Settings from the Debug menu Then select Run only the sel...

Page 52: ...orking with in the edit area select Single Step xx the flowchart name from the Debug menu Breakpoints Breakpoint is an advanced debugging tool which can be used to stop and pause a program when a cert...

Page 53: ...loaded a program to the K NEX Robotics Control Box the download name will be saved to the control program and will be displayed in parenthesis at the top of the software window If you choose to save a...

Page 54: ...Save The first time this option is selected a dialog box will open to allow the file to be saved using a filename of your choice After you have saved your file once each additional use will overwrite...

Page 55: ...menu They will allow you choose what you wish to print and how it will be fitted to the page The options are Page Setup Use this option to select your printer paper size and orientation etc K NEX Robo...

Page 56: ...ll all be scaled so they will fit on one sheet If the All flowcharts option is selected this essentially prints the map view on a single page Each flowchart on separate sheets and each shrunk to fit t...

Page 57: ...the printout before printing Options Click this icon to modify the default K NEX Robotics Programming software settings Toolbar display options Small Toolbar Icons Display Toolbar Text These options l...

Page 58: ...Check the position of the switch and confirm the LCD is on Is the Control Box ignoring the software because it is running in remote mode Press the stop button on the Control Box to stop the remote pr...

Reviews: