1 getting started with fischertechnik llwin 3.03

82
1 Getting Started with Fischertechnik LLWin 3.03

Upload: clyde-heath

Post on 22-Dec-2015

227 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: 1 Getting Started with Fischertechnik LLWin 3.03

1

Getting Started with Fischertechnik

LLWin 3.03

Page 2: 1 Getting Started with Fischertechnik LLWin 3.03

LLWin 3.02 Index Page

Function Blocks Subprograms Editing Commands Interface not

connected Downloading Copying

Subprograms

Variables for Counting Impulses

Analog Inputs (EX, EY) Using Formulas Menu Commands Setting the system up Starting a new program

Page 3: 1 Getting Started with Fischertechnik LLWin 3.03

What you will need to get started

LLWin 3.02 Software Computer Interface Power supply Serial Cable Fishertechnik Basic Building Blocks

Page 4: 1 Getting Started with Fischertechnik LLWin 3.03

Lets take a look

Page 5: 1 Getting Started with Fischertechnik LLWin 3.03

Setting up the System

Connecting the interface and the computer

Using the provided serial cable connect the interface and computer together

Page 6: 1 Getting Started with Fischertechnik LLWin 3.03

Setting up the Software

Under options Select Setup Interface

Change the port setting

Page 7: 1 Getting Started with Fischertechnik LLWin 3.03

Check Interface

Use this to test connections between computer and model.

Check Output Devices

M1 –M4

Check Digital Input Devices

E1 – E8

Check Analog Input Devices

EX & EY

BACK

Page 8: 1 Getting Started with Fischertechnik LLWin 3.03

Starting a “New” project

Go to Projects and select new

Page 9: 1 Getting Started with Fischertechnik LLWin 3.03

Starting a “New” project

The Start and Stop Function Blocks begin and end a program.

Page 10: 1 Getting Started with Fischertechnik LLWin 3.03

Starting a “New” project

BACK

When Function Blocks are connected, a Flow Chartis created.

This Flow Chart is the program that runs the instruction sets [and fischertechnik model].

Page 11: 1 Getting Started with Fischertechnik LLWin 3.03

Starting a “New” project

Function Blocks

Page 12: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Output Input Edge Position Start End Reset Emergency Stop Terminal

Display Message Show Values Variable +/-1 Assignment Compare Beep Wait Text

BACK

Page 13: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Outputs

Page 14: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Outputs

Electromagnet

Lamp

Motor

Page 15: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

OutputsYou switch one of the inputs M1-M4 of the interface

using the output block (a motor, Lamp or Electromagnet can be connected

You must select which output you want to use in the “Type” dialog field

BACK

Page 16: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Inputs

Page 17: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Inputs

Switch

Reed Contact

Photo-Transistor

Page 18: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks Inputs

The “Input” function block queries the state of a digital input E1-E8 on the interface. They may be a Pushbutton switch, Photo-transistor, or a Reed contact.

A digital input can only have one of two states, 0 or 1.Examples: Pushbutton switch Pushed or not pushed

Photo-transistor Light or DarkReed Contact Switched or not switched

BACK

Page 19: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Edge

Page 20: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

EdgeThe Edge function waits until a digital input

switches either from 0 to 1 or from 1 to 0. This transition is called an “Edge”.

BACK

Page 21: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Position

Page 22: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

PositionThe position function block counts impulses at a digital input until the desired result is reached. Each edge at the input is counted, i.e., if a button is pushed and then released, two inputs are counted.

The current number value is stored in the counter variable. If you activate the “Use standard counter” button in the dialog box, a counter Z1-Z16 is assigned automatically to a digital input E1-E16

Page 23: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Position

The input Counter Result

Counting Direction

BACK

Page 24: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Start

Page 25: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

StartA flowchart always begins with a start function

block.

***If this block is missing at the beginning, the flow chart is not processed***

If a project has several flowcharts, each of them must contain a start block. The different flowcharts are then started simultaneously.

BACK

Page 26: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

End

Page 27: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

EndIf a flowchart should be ended, you connect the output of the last block with the End block. A flowchart sequence can be ended at different spots using the End function block. But it is also possible to connect several outputs with one single End blocks. But it is possible that a flowchart sequence is a continuous loop and does not contain any End Icon.

BACK

Page 28: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Reset

Page 29: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Reset.The Reset function block resets all sequences

of a project to the start as soon as the condition entered in the dialog box has been fulfilled.

*** The Reset block is placed on the programming surface with out connection lines to the other

blocks***

***Only one Reset block may be used in a project***

Page 30: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks Reset.

You enter the condition, which triggers the reset, in the dialog box when you insert the block. A simple Reset condition can be “E1”, for example. Then the Reset is triggered as soon as this condition is fulfilled, i.e., E1 becomes 1.

The program will start at the beginning as soon as the condition no longer applies, i.e., E1 becomes 0 again.***Consequently, a project that is running on the intelligent interface in download mode without connection to a PC can be stopped and restarted

via a digital input, for example, without the necessity of you having to delete it.***

Page 31: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Reset.A mathematic formula can be entered as a

condition in the dialog box, e.g., Var. 5 = 6. The comparison operations, the logical links and the parentheses can be clicked directly in the help for edit of the dialog box. Maximum length of a formula is 40 characters.

BACK

Page 32: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Emergency Stop

Page 33: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Emergency StopThe (Emergency) Stop function block switches

off all outputs at the interface when it is activated.

***Only one Stop Block may be used in a project***

It is setup the same way as the Reset Block

BACK

Page 34: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Terminal

Page 35: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

TerminalThe terminal function block serves to display

and enter specific values during the program operation.

It is also placed on the programming surface without connection lines to the other blocks.

Page 36: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Terminal Uses

Output Display

Input Variable Display

Text Display

Emergency Off Switch

Terminal Parameters EA – ED

Page 37: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

TerminalOutputs

Analog Inputs

Message block

Presentable inputs

10 Digital Switches

BACK

Page 38: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Display

Page 39: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks Display

The Display function block serves to display a value, a variable or the inputs EX – EY or EA – ED on one of the two displays of the terminal. When you insert the block, you select in the function dialog box which of the two displays DIS1 or DIS2 you want to use and which value should be shown.

BACK

Page 40: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Message

Page 41: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

MessageDisplays messages up to 17 characters as text

with the ability to change colors.

BACK

Page 42: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Show Values

Page 43: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks Show Values

This block shows the current value of a variable when the program is in online mode. The block is placed on the programming surface without connection lines to other blocks.

You enter in the dialog box which variables (VAR1-99, Z1-Z16) should be shown. In addition to variable values, the values of digital and analog inputs as well as the current values of parameter EA-ED can be output.***It is also possible to show another variable in the block while the

program is running. To do this, you call the dialog using the mouse button on the left and change the Variable***

BACK

Page 44: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Variable

Page 45: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

VariableYou can increase and decrease the value of a

variable by one using this function block. You enter which variable should be processed in the dialog fields. The variables VAR1-99 as well as the standard counters Z1-Z16 are available. You can also select whether the value should be increased or decreased by one. This counter direction is also displayed in the icon of the block

BACK

Page 46: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks Assignment

Page 47: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

AssignmentA specific value can be assigned to a variable

VAR1-99 or a counter Z1-Z16 using the Assignment function block.

BACK

Page 48: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Compare

Page 49: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

CompareYou enter the condition in the Compare

function block. Depending on weather the condition is fulfilled, the flowchart branches to the right or is continued at the lower output of the block. The numbers 0 and 1 at the output stand for the “Condition fulfilled” and the “Condition not fulfilled”

*** The condition is entered in the dialog box as a formula e.g., Var1=300***

BACK

Page 50: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Beep

Page 51: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

BeepThe beep function block emits a signal tone via

the PC speaker. The sound level and length can be set in the dialog box.

***Sounds will not work if the program is downloaded***

The sound may last up to 5 seconds and range from 50 to 10000Hz or as a note from c-b in 5 octaves.

BACK

Page 52: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Wait

Page 53: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

WaitYou can program a delay in a flowchart with

the “Wait” function block. The delay begins when the function block is reached in the flowchart sequence.

***Maximum wait time is 999.99seconds***

BACK

Page 54: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

Text

Page 55: 1 Getting Started with Fischertechnik LLWin 3.03

Function Blocks

TextThe text entered here can be placed as

commentary at any place on the worksheet, e.g., for program documentation.

BACK

Page 56: 1 Getting Started with Fischertechnik LLWin 3.03

Editing Commands

Function Keys Switching to the different editing modes Keyboard combinations for editing block

s and connections Zoom Check Interface

BACK

Page 57: 1 Getting Started with Fischertechnik LLWin 3.03

Editing Commands

Function KeysF1 Direct call to online help for the operator.

CTRL+F1 When the cursor is about a block, this calls the online help for it directly.F6 Switches to the main program for editing.F7 Switches to a subprogram for editing.F8 Switches to the init mode.F9 Stop the control programF10 Save the project

Shift+F5 Cascade windowsShift+F4 Tile windows

BACK

Page 58: 1 Getting Started with Fischertechnik LLWin 3.03

Editing Commands

Switching to different editing modesYou can switch between the different editing modes with the digits 1-5

1 Insert blocks

2 Delete blocks

3 Replace blocks

4 Draw lines

5 Delete lines

BACK

Page 59: 1 Getting Started with Fischertechnik LLWin 3.03

Editing Commands

Keyboard combination for editing blocks and connections

CTRL+I. Mouse button Insert blocks in edit mode. This makes it possible to select individual

blocks. Draw lines in editing mode. This makes it possible to move lines.

Shift+I. Mouse button Select a group of blocksCTRL+A Select allCTRL+U Undo selectionCTRL+X Cut selected blocksCTRL+C Copy selected blocksCTRL+V Insert copied blocksDEL Delete selected blocks

BACK

Page 60: 1 Getting Started with Fischertechnik LLWin 3.03

Editing Commands

ZoomYou can change the zoom factor very quickly with

the + and – keys on the keyboard and consequently enlarge or reduce the size of the display.

BACK

Page 61: 1 Getting Started with Fischertechnik LLWin 3.03

Editing Commands

Check InterfaceYou can activate the output for the length of the

mouse click with the right or left button. If you first press the CTRL key and then the output, it stays on. Clicking it again switches it off.

BACK

Page 62: 1 Getting Started with Fischertechnik LLWin 3.03

Downloading

Downloading your program to your interface

Select “Run” in the pull down menu Select Download, this will take only a few seconds After the download has finished it is on the interface Start the program from the computer and then

disconnect the serial cable If the interface loses power the program will be lost from

the interface

BACK

Page 63: 1 Getting Started with Fischertechnik LLWin 3.03

Subprograms

A “Subprogram” is a self-contained algorithm that is inserted in a main program. The advantage of a subroutine is that it allows a programmer to write just once an algorithm that will be used two or more times in the complete program.

The subprograms represented by one block in the main program, but is comprised of many function blocks hidden at a different level.

Page 64: 1 Getting Started with Fischertechnik LLWin 3.03

Subprograms LLWin 3.0 has a template for a subprogram or ”subroutine” named “UP1”. UP

stands for subprogram. This block contains two icons for the computer program to “enter”(the line at the

top of the block) and “exit” ( the line at the bottom of the block) the subprogram. You can use this template or create your own.

Page 65: 1 Getting Started with Fischertechnik LLWin 3.03

Subprograms Creating your own Subprogram From the EDIT menu Click the Subprogram Command Type the name of the subprogram. In this case “BLACK” Click “OK” and we have created a subprogram and are now one level below the

main program. This is your worksheet on which you can now create the flowchart for the

subprogram

Page 66: 1 Getting Started with Fischertechnik LLWin 3.03

Subprograms

In the Windows menu click the”Tile”command Two windows appear in the work area. A window with the

name “$MAIN”, which contains the control program(main program) and a window for our subprogram named “BLACK”.

Page 67: 1 Getting Started with Fischertechnik LLWin 3.03

Subprograms

Paste the input and output by selecting the SUBIN and SUBOUT blocks for the Function Blocks toolbox.

Page 68: 1 Getting Started with Fischertechnik LLWin 3.03

Subprograms

Add the Function blocks necessary to complete the subprogram and save.

The black subprogram runs the motor over to the

side(black bin) for one second, then stops, and

brings the sensor back to check the next marble

Page 69: 1 Getting Started with Fischertechnik LLWin 3.03

Subprograms

If you look at the Function Blocks toolbox under “Subprograms” you will see that the block is there but it has no connection lines.

Without these you cannot connect

the block to the program.

You must edit the Subprogram

Function Block

Page 70: 1 Getting Started with Fischertechnik LLWin 3.03

Subprograms

SUBPROGRAM EDITING Under the Subprogram menu click on “Design”

After you click a new window

opens in which you can change

the features of the selected

subprogram block.

Page 71: 1 Getting Started with Fischertechnik LLWin 3.03

Subprograms In the Design window the SubIn and SubOut function blocks which you

pasted in the flowchart are displayed as circles on the left in the table. Place the cursor on them(keeping the left mouse button pressed down)

and drag them into the desired position on the function block frame. These represent the connections, which connect with the Main program

Close the editing window by clicking on the “X”

Page 72: 1 Getting Started with Fischertechnik LLWin 3.03

Subprograms You can place

multiple SubIn and SubOut Function blocks on one subroutine so multiple connections can be made in the Main Program. Once you master subprograms your Main program could look like this.

BACK

Page 73: 1 Getting Started with Fischertechnik LLWin 3.03

Copying Subprograms

You can copy a subprogram from one program(project) to another program(project).

Run two concurrent sessions of LLWin 3.0. This allows you to switch between the two sessions to Copy from one and Paste to the other.

From the EDIT menu Click the Subprogram command and choose the subprogram to be copied.

From the EDIT Menu

Click the Select All command

Click

Copy

Page 74: 1 Getting Started with Fischertechnik LLWin 3.03

Copying Subprograms

Open the second sessions of LLWin 3.0. Create a new subprogram with the same name as in the first program.

BACK

From the EDIT menu Click the Subprogram command and choose the subprogram just created. It should be a blank screen

From the EDIT menu ClickPaste

Page 75: 1 Getting Started with Fischertechnik LLWin 3.03

Interface Troubleshooting No Connection to interface?

In the case of this message make sure:

-You have selected the right port (COM1 or COM2) for serial interfaces and (LPT1 or LPT2) for parallel interfaces

-Do you have Power-Is the port working at all (Refer to page 82 of

the handbook)Double check the setup

BACK

Page 76: 1 Getting Started with Fischertechnik LLWin 3.03

Variables for counting impulses

Variables are often used for counting. We use counting to measure a path of movement electronically. e.g. The movement of the gripper on a robotic arm. It needs to open and close the exact same way each and every time. This can be done in LLWin 3.0 using a Position block, Switch, and an impulse wheel (a geared wheel with 4 teeth, on revolution will count to 4). This impulse wheel is place so it will trigger the switch and create a counting device. (this is further explained on page 103 in the LLWin 3.0 handbook)

BACK

Page 77: 1 Getting Started with Fischertechnik LLWin 3.03

Analog Inputs

EX and EY are the two analog input spots on the interface, they will read a range from 0 to 1024

You may use a Potentiometers, Thermisitor, Photo-transistors or Inferred device.

Use the check interface to pre-read these values

Page 78: 1 Getting Started with Fischertechnik LLWin 3.03

Analog Inputs

Check Interface

Analog Displays

BACK

Page 79: 1 Getting Started with Fischertechnik LLWin 3.03

Using Formulas They may be used in Compare, Stop, and Reset Blocks

Digital Inputs (E1-E8)The simplest condition is when looking whether the state is 0 or 1

Variables (Var1- Var99) and Position blocks (Z1- Z16)

Analog Inputs (EX, EY)

Terminal Parameters (EA, EB, EC, ED)

Integer operands from –32567 to +32567

Page 80: 1 Getting Started with Fischertechnik LLWin 3.03

Using Formulas

Comparison Operators

= Equals

< Smaller than

> Greater than

<= Smaller or equal to

>= Greater or equal to

e.g. Var. 1 >= 567

Page 81: 1 Getting Started with Fischertechnik LLWin 3.03

Using Formulas

Various expression can be linked logically with AND, OR, and NOT.

e.g. E1 AND E2 AND NOT E3

Var.1=5 OR Var.2=3

Finally you may use parentheses

BACK

Page 82: 1 Getting Started with Fischertechnik LLWin 3.03

Menu Commands

BACK

New project

Open project

Save project

Print page

Check interface / terminal

Main program

Subprogram

Program design

Init

Start

Download

Insert block

Delete block

Replace blocks

Draw lines

Delete lines

Undo

Copy

Cut

Paste

Delete