39
1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28 (LabVIEW >> Tools >> NXT Tools >> NXT Terminal >> Update Firmware)

1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

Embed Size (px)

Citation preview

Page 1: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

1

Exercise 1: Install PC Software & NXT Firmware

• Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit)

• Upgrade NXT firmware to 1.28(LabVIEW >> Tools >> NXT Tools >> NXT Terminal >> Update Firmware)

Page 2: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

LabVIEW: NXT & TetrixTraining & Exercises

Page 3: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

3

Overview• NXT Review• NXT-G LabVIEW• General Programming• LabVIEW (NXT)• LabVIEW (Tetrix)• Resources• Learn More

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 4: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

4

NXT Hardware

• Inputs (to NXT Brick) Touch Sensor Sound Sensor Light Sensor Ultrasonic Sensor Rotation Sensor NXT Buttons Temperature Sensor (Legacy) Read Bluetooth Messages (Read Files) NEW: IR Sensor

• Outputs (from NXT Brick) Motor Sound Display Lamp (Legacy) Write Bluetooth Messages (Write Files)

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 5: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

5

NXT-G Environment

Workspace

Palettes

Block

Download Options

Configuration Panel Help

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 6: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

6

LabVIEW Environment

Workspace

Palettes

Block

Download Options

Configuration Panel Help

Context Help Window

NXT Toolkit Palette

BlockDiagram

Constants(Inputs)

NXT Terminal Window

VI(Block)

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

jrutledg
edit w/ targeted pic
Page 7: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

7

General Programming

• Data Types Numeric Boolean String Ring

• Dataflow• Loops

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 8: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

8

Data Types: Numeric• Whole Numbers (0,2,-10, …)

• Decimal Numbers (2.2, 12.3, -15.1, …)

Which takes up more memory?

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 9: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

9

Data Types: Boolean

• For Example: On/Off Yes/No True/False

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 10: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

10

Data Types: String

• Grouping of Characters

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 11: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

11

Data Types: Ring

• List of Predefined Items User Can Select

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 12: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

12

Dataflow

• Sequence Beam

• Sequence Flow In/Out

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 13: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

13

Loops

• Repeat Code

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 14: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

14

LabVIEW (NXT)• Context Help Window• User Documentation• Constants• Case Structures• Variables• Real Time User Interaction with Brick• Program Download Options• Debugging

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 15: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

15

Context Help Window

• Help >> Show Context Help• Terminals

Required Recommended Optional

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 16: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

16

User Documentation• Labels (attached)

Right-click >> Show >> Label• Free Labels (unattached)

Double click

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 17: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

17

Constants

• Configuration Panel • Block Diagram

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 18: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

18

Case Structures

• Switch (NXT-G)

• Case Structure

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 19: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

19

Variables

• Variable (NXT-G) • Local Variable

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 20: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

20

Exercise 2: (NXT) Motor

• Task: Move robot in a square using Move Motor and

Timing VIs

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 21: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

21

Exercise 3: (NXT) Motor + Light Sensor

• Task: Move robot inside a square outlined by tape using

Light Sensor

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 22: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

22

Real Time User Interaction with Brick

• Front Panel• Controls• Indicators• Plotting Data

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 23: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

23

Program Download Options

• NXT Terminal (Tools >> NXT Tools >> NXT Terminal)

Compile and Download Compile, Download, and Run Debug

• Front Panel linked to running code Abort

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 24: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

24

Exercise 4: (NXT) Motor + Light Sensor + Front Panel• Task:

Alter Exercise 3: (NXT) Motor + Light Sensor Put light detection threshold value on Front Panel Put turn degrees on Front Panel

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 25: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

25

Debugging

• Debug (download option)

• Broken “Run” Arrow in LabVIEW

• Context Help

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 26: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

26

Demo 3: Direct Commands

• Task: Scan for all Available NXT Bricks User Selects One Brick to Connect Query Brick for All of Its Files Remotely Start One Program Remotely Stop the Program

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 27: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

27

LabVIEW (Tetrix)

• New Hardware Items• Tetrix VIs• Additional Need-to-know

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 28: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

28

New Tetrix Hardware Items

• DC Motors• Motor Controller• Servos• Servo Controller• Touch Mux• Compass

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 29: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

29

Tetrix VIs (formerly FTC)

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 30: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

30

FTC Tools

Page 31: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

31

Additional Need-to-know

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 32: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

32

Exercise 5: 4 Tetrix Motors + 2 NXT Motors• Task:

Move Robot in a Square Open/Close Claws Every 5 seconds

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 33: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

33

Demo 4: ConstantSpeedGodz

• Task: Constant Speed Dead Zone Implementation Sound File Controller Station

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 34: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

34

Resources

• “If You Forget Everything Else”• Help• Examples• Big Differences

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 35: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

35

“If You Forget Everything Else”

• When in doubt, Right-click.• Constants = Inputs (on Block Diagram)• Controls = Inputs (on Front Panel)• Indicators = Outputs (on Front Panel)• Palettes (Right-click on Block Diagram, Front Panel)

• Context Help (“?”, CTRL + H, Help >> Show Context Help)

• NXT Terminal (Tools >> NXT Tools >> NXT Terminal)

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 36: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

36

Help

• Right-click• Context Help (“?”, CTRL + H, Help >> Show Context Help)

• LabVIEW Help (Help >> Search the LabVIEW Help… >> Search: “NXT”)

• PDF Manuals (C:\Program Files\National Instruments\LabVIEW 2009\manuals)

NXT_Getting_Started NXT_Advanced_Programming_Guide FTC_Getting_Started

• LabVIEW for LEGO MINSTORMS NXT (by Michael Gasperi)

• www.ni.com/academic/mindstorms/

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 37: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

37

Examples

• NXT www.ni.com >> Search: “nxt example”

• Tetrix C:\Program Files\National Instruments\LabVIEW 2009\examples\FTC Toolkit

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 38: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

38

Big Differences: NXT-G & LabVIEW• Sequence Beam vs. Sequence Flow In/Out• Front Panel• Debug in Real Time (download option)• Direct Commands• Data Logging• Arrays, Clusters• Numeric, Boolean, String Manipulation• Mathematical Processing• …

Questions?

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources

Page 39: 1 Exercise 1: Install PC Software & NXT Firmware Install FTC Software 2010 CDs (LabVIEW + MINDSTORMS software + FTC Toolkit) Upgrade NXT firmware to 1.28

39

Learn More• Tool Selection Window• Arrays

Graphs• Clusters• Write/Read to File• Flat Sequence Structure• How to Remotely Control your NXT with

LabVIEW• Latching/Switching Booleans

NXT-G LV Gen. Prog. LV NXT LV TetrixNXT Review Resources