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

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

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 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 5 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

15.0.1 Lab 11 - IO Using Labview15.0.1.1 - Purpose15.0.1.2 - Background15.0.1.3 - Theory15.0.1.4 - Prelab15.0.1.5 - Equipment15.0.1.6 - Experimentalegr345 lab guide - 15.115.0.1 Lab 11 - IO Using Labview15.0.1.1 - PurposeTo use Labview for analog digital and analog IO.15.0.1.2 - BackgroundProgramming 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.15.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, shown in Figure 15.1, 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 - 15.2Figure 15.1 PCI-1200 Card edge connector pinoutNOTE: 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 case there is only one, and it is designated device ’1’. There are also many LEGEND:Analog inputs - ACHxAnalog input ground - 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)ACH0ACH2ACH4ACH6AIGNDAGNDDGNDPA1PA3PA5PA7PB1PB3PB5PB7PC1PC3PC5PC7EXTUPDATEOUTB1OUTB2CLKB1GATB2+5VACH1ACH3ACH5ACH7DAC0OUTDAC1OUTPA0PA2PA4PA6PB0PB2PB4PB6PC0PC2PC4PC6EXTTRIGEXTCONVGATB0GATB1OUTB2CLKB2DGND1357911131517192123252729313335373941434547492468101214161820222426283032343638404244464850egr345 lab guide - 15.3inputs 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.15.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.15.0.1.5 - EquipmentPC with LabVIEW software and PCI-1200 DAQ cardInterface cableSignal generatorDigital multimeter15.0.1.6 - Experimental1. Review the LabVIEW QuickStart Guide used before the laboratory. This will also be a good review for those who have used LabVIEW in previous courses.2. Enter the LabVIEW program (layout) schematically shown in Figure 15.2 and connect a signal generator to the analog input (ACH0). (Note: there is a pin dia-gram for the connector in the Labview tutorial section.) Start the signal genera-tor with a low frequency sinusoidal wave. Use the ‘DAQ Configure’ software to test the circuitry and verify that your hardware is operational. Then run your Labview program. Record the observations seen on the screen.egr345 lab guide - 15.4Figure 15.2 Analog input using Labview3. Run additional programs such as browsers, spreadsheets, etc. and see how this affects the data collection speed.4. Connect the multimeter as shown in Figure 15.3. Test the circuit using the ‘DAQ Configure’ 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. Figure 15.3 Analog output using LabviewACH0AIGNDFront Panel Wiring Diagramwaveform chart+comsignalgenerator1ACH0singlelineinDBLDeviceChannelDAC0OUTAGNDUser Display Diagram+commultimeterinput knob output meterDBLDAC0OUT10 singlelineoutDeviceChannelLineegr345 lab guide - 15.55. Connect the digital input and output circuits to the DAQ card, as shown in Fig-ure 15.4, 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 Lab-VIEW screen


View Full Document

GVSU EGR 345 - Lab 11 - IO Using Labview

Documents in this Course
Y Axis

Y Axis

2 pages

Load more
Download Lab 11 - 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 11 - 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 11 - 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?