DOC PREVIEW
GVSU EGR 345 - Lab 10 - IO Using Labview

This preview shows page 1-2 out of 6 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

12.0.1 Lab 10 - IO Using Labview12.0.1.1 - Purpose12.0.1.2 - Background/Theory12.0.1.3 - Theory12.0.1.4 - Prelab12.0.1.5 - Equipment12.0.1.6 - Experimentalegr345 lab guide - 12.112.0.1 Lab 10 - IO Using Labview12.0.1.1 - PurposeTo use Labview for analog digital and analog IO.12.0.1.2 - Background/TheoryProgramming languages are essential components of complex systems. Languages such as ’C’ execute one function at a time as the program executes. This is good for program with a clear execution order. However for programs dealing with a continuous system this can be cumbersome. Labview is a dataflow methodology, like a block diagram. This allows the creation of programs that show how inputs flow through functions to create outputs. Labview allows us to write programs for calculation and data collection, but instead of typing instructions we draw function blocks and connect them. How we connect them determines how the data (numbers) flow. The functions are things like data reads and calculations.In general people can learn to write simple Labview programs quickly, however more complicated programming tasks can be more difficult than similar pro-grams written in C. But, Labview has a distinct advantage when developing Graphical User Interfaces.12.0.1.3 - TheoryThe computers we will use all have DAQ (Data AcQuisition) boards - National Instruments PCI-1200 DAQ cards. These cards have capabilities that include:24 I/O bits - TTL 0,5VDC, 20mA max.8 single ended or 4 double ended analog inputs - 12 bits3 counters - 16 bits2 analog outputs - 12 bitsThe connector for the card can be found on the back of the computer. It will have a connector with pinouts like the one shown below. A ribbon cable will be used to make electrical connection to the connector in the back of the computer.egr345 lab guide - 12.2NOTE: LABVIEW MANUALS ARE AVAILABLE ON-LINE, AND CAN BE FOUND ON THE COURSE HOME PAGE.In this lab we will be using Labview to connect to a data acquisition (DAQ) board in the computer. This will allow us to collect data from the world outside the computer, and make changes to the world outside with outputs.When interfacing to the card using a program such as Labview, there must be ways to address or request information for a specific input or output (recall memory addresses in EGR226). The first important piece of information is the board number. There can be multiple DAQ boards installed in the computer. In our ACH0ACH2ACH4ACH6AISENSE/AIGNDAGNDDGNDPA1PA3PA5PA7PB1PB3PB5PB7PC1PC3PC5PC7EXTUPDATEOUTB1OUTB2CLKB1GATB2+5VACH1ACH3ACH5ACH7DAC0OUTDAC1OUTPA0PA2PA4PA6PB0PB2PB4PB6PC0PC2PC4PC6EXTTRIGEXTCONVGATB0GATB1OUTB2CLKB2DGND1357911131517192123252729313335373941434547492468101214161820222426283032343638404244464850LEGEND:Analog inputs - ACHxAnalog input ground - AISENSE/AIGNDAnalog outputs - DACxOUTAnalog output ground - AGNDDigital inputs and outputs - PAx, PBx, PCxDigital input/output ground - DGNDControl handshaking - EXTTRIG, EXTUPDATE, EXTCONVCounter inputs/outputs - OUTBx, GATBx, CLKBxpin 1Looking at the connector(on the back of the computer)egr345 lab guide - 12.3case there is only one, and it is designated device ’1’. There are also many inputs and outputs available on the card. For analog outputs there are two chan-nels so we need to specify which one when using the output with 0 or 1. For analog inputs there are 8 channels, and as before, we must specify which one we plan to read from using 0 to 7. For digital I/O there are a total of 24 pin dis-tributed across 3 ports (1 byte each). Therefore when connecting inputs and out-put we must specify the port (PA=0, PB=1, PC=2) and the channel from 0 to 7. Note is that we can make the ports inputs or outputs, but not mixed - in other words we must pick whether a port will only be used for inputs or for outputs.The voltage levels for the inputs and outputs are important, and you will need to be aware of these. For the digital outputs they will only ever be 0V or 5V. But the analog inputs and outputs will vary from -5V to 5V. This is build into the board. If we exceed these voltage limits by a few volts on the inputs, the boards have built in protection and should be undamaged. If we exceed the input voltages significantly, there is a potential to permanently damage the board.12.0.1.4 - Prelab1. Go through the LabVIEW QuickStart Guide (on the course homepage). This will also be good review for those who have used LabVIEW before. Please note, the tutorial mentions a video, skip this step.2. Write a Labview program that will count from 1 to 100, square the values, and print the results on a strip chart.12.0.1.5 - EquipmentPC with LabVIEW software and PCI-1200 DAQ cardInterface cableSignal generatorDigital multimeter12.0.1.6 - Experimental1. Review the LabVIEW QuickStart Guide used before the laboratory. This will also be good review for those who have used LabVIEW in previous courses.2. Enter the LabVIEW program (layout) schematically shown below and connect a signal generator to the analog input (ACH0). (Note: there is a pin diagram for the connector in the Labview tutorial section.) Start the signal generator with a low frequency sinusoidal wave. Use the ‘DAQ Configure’ software to test theegr345 lab guide - 12.4circuitry and verify that your hardware is operational. Then run your Labview program. Record the observations seen on the screen.2b. Use a stop watch to determine the average number of samples per second. Run additional programs such as browsers, spreadsheets, etc. and see how this affects the data colection speed.3. Connect the multimeter as shown below. Test the circuit using the ‘DAQ Con-figure’ utility. Enter the LabVIEW program schematically illustrated below and then run it. You should be able to control the output voltage from the screen using the mouse. Record your observations.ACH0AIGNDFront Panel Wiring Diagramwaveform chart+comsignalgenerator1ACH0singlechannelinDBLegr345 lab guide - 12.54. Connect the digital input and output circuits to the DAQ card and use the test panel to test the circuits. To do this, run the ‘DAQ Configure’ utility, double click on the ‘PCI-1200’, run the test panel window and ensure that the inputs and outputs are working correctly. Create the LabVIEW screen schematically illustrated below. This should allow you to scan an input switch and set an out-put light. When done, quit the program and run your LabVIEW program.5. Write a program that collects analog inputs, displays them on


View Full Document

GVSU EGR 345 - Lab 10 - IO Using Labview

Documents in this Course
Y Axis

Y Axis

2 pages

Load more
Download Lab 10 - IO Using Labview
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lab 10 - IO Using Labview and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lab 10 - IO Using Labview 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?