Lab View with crio Tutorial. Control System Design Feb. 14, 2006



Similar documents
Getting Started with the LabVIEW Mobile Module

Getting Started with the LabVIEW Mobile Module Version 2009

Installation and Operation Guide

1. Installing The Monitoring Software

Lab 3: Introduction to Data Acquisition Cards

Network Scanner Tool R3.1. User s Guide Version

XEROX DOCUPRINT N4525 NETWORK LASER PRINTER QUICK NETWORK INSTALL GUIDE

DSP Laboratory: Analog to Digital and Digital to Analog Conversion

C-more Remote Access, Data Log, FTP File Transfer, and Tutorial

LabVIEW Report Generation Toolkit for Microsoft Office

Software Installation Requirements

Getting Started Manual

BASLER ACE QUICK INSTALLATION GUIDE

EET 310 Programming Tools

Getting Started with the LabVIEW Embedded Module for ARM Microcontrollers 1.0 For the Keil MCB2300

How To Use First Robot With Labview

LabVIEW Report Generation Toolkit for Microsoft Office User Guide

Omni 56K USB Lite Quick Start Guide

Moxa Device Manager 2.3 User s Manual

USER GUIDE. Ethernet Configuration Guide (Lantronix) P/N: Rev 6

How To Use Mview On A Powerline 2.2 (Powerline) On A Pc Or Macbook 2 (Powerplst) On An Iphone Or Ipa 2 (Aldo) On Your Iphon 2 (

TECHNICAL BULLETIN. Configuring Wireless Settings in an i-stat 1 Wireless Analyzer

Windows 2000/XP Network

How to connect to VUWiFi

Virtual Office Remote Installation Guide

Getting Started with the NI LabVIEW Embedded Module for ARM Microcontrollers

Device Installer User Guide

Hands-On: Introduction to Object-Oriented Programming in LabVIEW

How to setup a VPN on Windows XP in Safari.

LPR for Windows 95/98/Me/2000/XP TCP/IP Printing User s Guide. Rev. 03 (November, 2001)

SATO Network Interface Card Configuration Instructions

Windows 98 and Windows Me

Configure SPLM 2012 on Windows 7 Laptop

NI InsightCM Server Version 1.0

Using SSH Secure Shell Client for FTP

How To Install And Configure Windows Server 2003 On A Student Computer

DUKANE Intelligent Assembly Solutions

System Overview and Terms

Course: WIN310. Student Lab Setup Guide. Summer Microsoft Windows Server 2003 Network Infrastructure (70-291)

Detective. Family. HPGe-Based Portable Nuclide Identifiers. Wireless Remote Operation With SOTI s Pocket Controller Software

DP-313 Wireless Print Server

How To Connect A300 To A300 Time Clock On A Pc Or Mac Computer

Downloading Driver Files

LabVIEW Day 6: Saving Files and Making Sub vis

64-Bit Compatibility with Micromeritics Applications

Step-by-Step Setup Guide Wireless File Transmitter

PROFINET IRT: Getting Started with The Siemens CPU 315 PLC

Step-by-Step Setup Guide Wireless File Transmitter FTP Mode

How do I configure the wireless printer using a USB or Ethernet cable and install the printer driver in Windows?

CMP-102U. Quick Installation Guide

IDDERO TOUCH PANELS. Video door phone configuration

Lab - Configure a Windows Vista Firewall

Deploying Windows Streaming Media Servers NLB Cluster and metasan

enervista UR Setup Software Quick Connect Instructions:

Migrating MSDE to Microsoft SQL 2008 R2 Express

Agilent System Protocol Test Release Note

HOW-TO-GUIDE. Installer Service Tool: Downloading Data and Event Logs for the Eltek Theia

Network Scanner Tool V3.5. User s Guide Version

INF-USB2 and SI-USB Quick Start Guide

Windows 2000, Windows XP, and Windows Server 2003

Ethernet Radio Configuration Guide

Page 1 S5.5 Monitoring Software Manual Rev 1.2 for Software Ver 1.0

UltraSite32 Network Installation Guidelines

Lab - Configure a Windows 7 Firewall

Appendix B Lab Setup Guide

Section 5: Installing the Print Driver

Interfacing Basler GigE Cameras With Cognex VisionPro 7.2

IntraVUE Plug Scanner/Recorder Installation and Start-Up

Setting Up Your FTP Server

P-660R-T1/T3 v2 Quick Start Guide

IDDERO TOUCH PANELS. Video door phone configuration

Application Note: Connecting to a 2500 Series Processor using PLC Workshop

Allworx OfficeSafe Operations Guide Release 6.0

Configuring Your Firewall for Client Access in Professional Edition

OPERATION MANUAL. MV-410RGB Layout Editor. Version 2.1- higher

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

Exercise 10: Basic LabVIEW Programming

Pre-lab and In-class Laboratory Exercise 10 (L10)

About This Guide SolarEdge Configuration Tool Software Guide. About This Guide

Moxa Device Manager 2.0 User s Guide

Application Notes for Valcom PagePro IP with Avaya IP Office Issue 1.0

ACT High Speed WiMAX Internet

Print Server. Quick Installation Guide

Ethernet Interface Manual Thermal / Label Printer. Rev Metapace T-1. Metapace T-2 Metapace L-1 Metapace L-2

WatchGuard Mobile User VPN Guide

Easy Setup Guide for the Sony Network Camera

1. Set Daylight Savings Time Create Migrator Account Assign Migrator Account to Administrator group... 4

Instructions for Installing and Using the FOCUS DL-15 Data Transfer Software

Crown Field Support Engineering

Using Cisco UC320W with Windows Small Business Server

Best Practises for LabVIEW FPGA Design Flow. uk.ni.com ireland.ni.com

How to Attach Files in Blackboard Learn , Messages, Discussions, and Assignments

Internet Guide. Prepared for 55 John Street

WA Manager Alarming System Management Software Windows 98, NT, XP, 2000 User Guide

Additional Requirements for ARES-G2 / RSA-G2. One Ethernet 10 Base T/100 Base TX network card required for communication with the instrument.

Configuring the WT-4 for ftp (Ad-hoc Mode)

icom Software Update Guide Updating the icom using the Service Tool (ist)

Application. 1.1 About This Tutorial Tutorial Requirements Provided Files

Setting Up Internet Connection Sharing (ICS) on a Server

Transcription:

Lab View with crio Tutorial Control System Design Feb. 14, 2006

Pan and Tilt Mechanism Experimental Set up Power Supplies Ethernet cable crio Reconfigurable Embedded System Lab View + Additional Software Amplifiers

Control Hardware NI recommends configuring a private network between the crio and the host system (student laptops): IP: 192.168.0.2 IP: 192.168.0.3 IP: 192.168.0.2 IP: 192.168.0.3 IP: 192.168.0.2 IP: 192.168.0.3 Student Laptops

Configuring the Network 1. crio network settings already configured: IP address: 192. 168. 0. 2 Subnet mask: 255. 255. 0. 0 2. Network settings of the host system (student laptops): 1. Open Network Connections (accessible through Control Panel) 2. Right-click the appropriate Local Area Connection and select Properties. On the General tab, under This connection uses the following items, click Internet Protocol (TCP/IP), and then click Properties.

Configuring the Network (cont d) 3. To specify an IP address click Use the following IP address, and enter the following IP address and subnet mask. 4. Click OK. 5. Click Close.

crio and Host Computer Operation 1. crio starts a LabVIEW Real-Time Module executable when powered on. The executable contains the LabVIEW FPGA Module code. 2. The LabVIEW Real-Time Module executable waits for an incoming TCP/IP connection from the host in order to pass control messages. 3. The crio establishes a second TCP/IP connection for transferring data back to the host when the host initiates an acquisition. 4. The USER1 LED remains lit until the acquisition finishes or an error occurs after establishing a connection with a host system.

crio and Host Computer Operation (Cont d) Complete PAC Architecture Using LabVIEW FPGA, LabVIEW Real-Time and Host PC

Developing an FPGA Application 1. Launch LabVIEW. 2. Select the FPGA device that is connected to the CompactRIO R Series Expansion chassis from the Execution Target pull-down menu in the LabVIEW window. 3. LabVIEW automatically launches the Embedded Project Manager window. In the Embedded Project Manager window, select File»New. The New dialog box appears. 4. On the Projects tab, enter the name of your project in the Project name text box. 5. Click the Browse button. The Select project directory dialog box appears. 6. Browse to the directory where you want to save the LEP file. Click the Select Cur Dir button. The directory path appears in the Project location listbox. 7. Click the OK button.

Developing an FPGA Application (Cont d) Configuring a crio Expansion System in Software: 8. In the Embedded Project Manager window, select Hardware»Configure Target for CompactRIO. The Configure Target for CompactRIO dialog box appears. 9. Click Discover Modules to auto-detect all modules installed in the chassis. 10. Click OK. 11. Select File»Save Project in the Embedded Project Manager window. LabVIEW saves the configuration settings in the LEP file.

Developing an FPGA Application (Cont d) Develop a FPGA VI: In the Embedded Project Manager window, select Project»Add to Project»New. The New dialog box appears. Select Blank VI in the left pane. Enter the name of the file to be implemented in the FPGA in the Filename text box. Verify that the Add to active project checkbox is selected. Click the OK button. The blank VI appears.

Developing an FPGA Application (Cont d) 2 PIDs for the pan and tilt mechanism: Build the FPGA application shown below in Figure 1. For detailed instructions, refer to the instructions below: Place 3 While Loops on the block diagram. Right-click the conditional terminal for the three of them and select Create»Control from the shortcut menu. Place an Digital Input function in the lower left While Loop. The Digital Input function is on the FPGA Device I/O palette. Double-click the function. The Configure Digital Input dialog box appears. Select Slot4/cRIO-9411/DI 0 from the Terminal pull-down menu. Click the Add Input button and select Slot4/cRIO-9411/DI 1 from the Terminal pull-down menu. Click the Add Input button and select Slot4/cRIO-9411/DI 4 from the Terminal pull-down menu.

Developing an FPGA Application (Cont d) 7. Click the Add Input button and select Slot4/cRIO-9411/DI 5 from the Terminal pull-down menu. 8. Click the OK button. 9. On the block diagram, use the subvi EncSignalSub1(fpga).vi and make the interconnections shown in the lower left While Loop of figure 1.

Developing an FPGA Application (Cont d) 10. Place an Analog Output function in the lower right While Loop. 11. Double-click the function. The Configure Analog Output dialog box appears. 12. Select Slot2/cRIO-9263/AO 3 from the Terminal pull-down menu. 13. Click the Add Output button and select Slot2/cRIO-9263/AO 2 from the Terminal pulldown menu. 14. Click the OK button.

Developing an FPGA Application (Cont d) 15. On the block diagram, Right-click the Slot2/cRIO-9263/AO 3 terminal of the Analog Output function and select Create»Control from the shortcut menu. Repeat this for the Slot2/cRIO-9263/AO 2. Label the indicators PAN, and TILT respectively. 16. Place a Flat Sequence Structure inside the upper While Loop. Right-click the border structure and add to more frames. 17. In the first frame of the Flat Sequence Structure place a Loop Timer. Double click the Loop Timer icon and select μs in the Counter Units pull-down menu. Right-click the input of the Loop Timer and select Create»Control from the shortcut menu. 18. In the second frame of the Flat Sequence Structure place two Discrete PIDs. The Discrete PID function is on the FPGA Math & Analysis»Control»Discrete Linear Systems palette.

Developing an FPGA Application (Cont d) 19. Right-click the setpoint input of the Discrete PID function and select Create»Control. Right-click the PID gains input of the Discrete PID function and select Create»Control. Right-click the output range input of the Discrete PID function and select Create»Constant. The constant values must be, 32767 and -32768. 20. For the control variable inputs of the two Discrete PID functions use local variables of the Position TILT and Position PAN indicators in the lower left While Loop. 21. For the outputs of the two Discrete PID functions use local variables of the PAN and TILT controllers in the lower right While Loop. 22. Finally, in the In the third frame of the Flat Sequence Structure place an Interrupt function and connect it as it is shown in figure 1. The Interrupt function is on the FPGA Device I/O» Advanced FPGA Device I/O palette. 23. Save the VI.

Developing an FPGA Application (Cont d) Block Diagram of the FPGA VI: Figure 1

Developing an FPGA Application (Cont d) Front Panel of the FPGA VI: Figure 2

Developing an FPGA Application (Cont d) You have finished developing the FPGA VI. You are ready to build and download the VI to the FPGA device: 1. In the Embedded Project Manager window, click the Build button. 2. In the FPGA Project Builder dialog box, confirm that the VI Path is correct. Make sure that 40 MHz is selected in the Design Clock Rate pull-down menu. 3. Place a checkmark in the Auto Run VI checkbox. 4. Click the Build button. 5. In the Warning: Beginning compile for FPGA dialog box, click the OK button. 6. When LabVIEW returns the Successful Compile Report dialog box, click the OK button. 7. In the Embedded Project Manager window, click the Download button. Click the Run button when the VI has finished downloading. The VI is now running on the FPGA of your device!

Developing the Host Interface for crio Use the host VI to communicate with the FPGA VI. You can run the host VI on a RT target or on a Windows PC. Build the Host Interface application shown below in Figure 3 on a RT target. For detailed instructions, refer to the instructions below: 1. In the LabVIEW window, select RT Target: <IP ADDRESS> from the Execution Target pull-down menu, where <IP ADDRESS> refers to the network address of your Reconfigurable Embedded System.

Developing the Host Interface for crio (Cont d) 2. Select File»New VI. 3. Right-click on the block diagram and navigate to the All Functions»FPGA Interface palette. Place the Open FPGA VI Reference function on the block diagram. Use this function to open a reference to the VI you downloaded to the FPGA device. 4. Right-click the function and select Select Target VI from the shortcut menu. The Select Target VI dialog box appears. Browse to the VI that you downloaded to the FPGA and click the OK button. 5. Right-click the Open FPGA VI Reference function and select FPGA»cRIO-9101. 6. Place a While Loop on the block diagram to the right of the Open FPGA VI Reference function. Right-click the conditional terminal and select Create»Control. 7. Place the Close FPGA VI Reference function outside of the While Loop. 8. Place the Read/Write Control function inside the While Loop. 9. Wire the HW Exec Ref Out and Error out outputs of the Open FPGA VI Reference function to the HW Exec Ref and Error in inputs of the Read/Write Control function. 10. Right-click the Unselected output of the Read/Write Control function and select Position TILT from the shortcut menu. This terminal corresponds to the actual Position TILT indicator you created in the FPGA VI.

Developing the Host Interface for crio (Cont d) 11. Right-click the Read/Write Control function and select Insert Control. 12. Right-click the Unselected output and select Position PAN from the shortcut menu. 13. Right-click the Read/Write Control function and select Insert Control. 14. Right-click the Unselected output and select i from the shortcut menu. 15. Right-click in Position TILT and Position PAN select the option to Create»Indicator.

Developing the Host Interface for crio (Cont d) 16. Place another Read/Write Control function. Wire the HW Exec Ref Out output of the first Read/Write Control function to the HW Exec Ref input of the second Read/Write Control function. 17. Right-click the Unselected output and select SP PAN from the shortcut menu. 18. Right-click the Read/Write Control function and select Insert Control from the shortcut menu. Right-click the Unselected output and select SP TILT from the shortcut menu. 19. Repeat the same procedure for PID gains TILT (x2^8), PID gains PAN (x2^8), Count(uSec), CONTROLLER, AMPLIFIERS, ENCODERS, Reset TILT, and Reset PAN. 20. Wire the HW Exec Ref Out output of the second Read/Write Control function to the HW Exec Ref input of the Close FPGA VI Reference function. 21. Wire the error in and error out clusters. 22. Make all the other standard connections shown in figure3. 23. Save the Host VI and run it.

Developing the Host Interface for crio (Cont d) Block Diagram of the Host VI: Figure 3

Developing the Host Interface for crio (Cont d) Front Panel of the Host VI: Figure 4

References For more detailed information see the following tutorials: http://zone.ni.com/devzone/conceptd.nsf/webmain/3f941a040879e64086256fa20067041a http://zone.ni.com/devzone/conceptd.nsf/webmain/15bd07db49ada54786256fa10055c0f0 http://zone.ni.com/devzone/conceptd.nsf/webmain/ee941144ad73496e86256f040061d590 http://zone.ni.com/devzone/conceptd.nsf/webmain/41ce640f5b31999186256f04006a9c3b