You are on page 1of 10

Creating a LabVIEW Project for the MCB2300

Create in new folder in the root directory of your home space (F drive) called MCB2300. This will be required later. Complete the following steps to create a project with an ARM target and a blank VI. 1. Launch LabVIEW and setup an ARM project Double click the LabVIEW 2009 icon on the desktop. The startup window below should appear.

Select launch LabVIEW. The LabVIEW getting started screen should appear as below.

In the bottom left hand corner of the Getting started screen under the Targets heading ensure ARM Project is selected and select Go. 1 AH 2009 V1.0

2 AH 2009 V1. Blank VI is selected and select next. Select MCB2300 from the menu and press next to continue. The final setup screen shown overleaf will appear.0 . You must now select the target hardware.The screen should appear as below Ensure the option New ARM project.

lvproj) VIs (*.Make sure the Run on simulator box is unchecked and select finish. You must now save your project and associated files. (b) You will now be asked to name the VI call this ex1 make sure the Save as type is Projects (*. b.vi.lvproj) and select ok. a.vit) and select OK. A prompt will appear as above. A further message prompt as shown below will appear. You must first save the project and then the program (VI) which is in the project.0 .*. Select save. (a) Save the project as ex1 make sure the Save as type is Projects (*. 3 AH 2009 V1.

Right click in the white space on the block diagram and the functions palette will appear.The LabVIEW front panel and project explorer windows should now appear as below.0 . This is where we enter the programme. 4 AH 2009 V1. From the task bar select Window>>Show Block Diagram The block Diagram will now appear. 2 Creating your first program You will now write a simple program which toggles an LED on the evaluation board every 1 second. From the Programming>>structures menu select a flat sequence structure and drag this onto the block diagram.

Right-click the LED number (0-7) input on the MCB2300 turn LED on .VI and select Create»Constant from the shortcut menu. The sequence structure should now be split into 2 sections. Resize the structure so the boxes are approximately equal as shown below. Your block diagram should appear as shown on the next page. located on the Programming>>Time. Enter 500 to wait 500 milliseconds between the execution of each sequence. Right-click the millisecond multiple input and select Create»Constant from the shortcut menu. Enter a value of 1 into the blue constant box. Place a Wait Until Next ms Multiple function. Repeat this procedure for the right hand box using the MCB2300 turn LED off.vi. Your block diagram should appear as below.Right click on the outline of the flat sequence structure and select add frame after. inside each section of the sequence structure.0 . From the functions palette select ARM>>MCB2300>>LED>>MCB2300 turn LED on. Now add the VIs to switch on and off the LED. Dialog & Error palette. 5 AH 2009 V1.vi and drag this into left hand side box of the sequence structure.

A dialog box should appear showing the current status of the system. which is an input terminal.0 . Your final diagram should appear as below. This may take several minutes. While Loops repeat the inner subdiagram until the conditional terminal. The default Boolean constant in the While Loop is FALSE. The code generation and compilation of your program should now start. 3 Compiling and running your program Select the arrow (play icon) from the taskbar if prompted save your program. receives a particular Boolean value. 6 AH 2009 V1. Right-click the conditional terminal in the lower right corner of the While Loop and select Create Constant from the shortcut menu. If your program has no errors the program will be downloaded to the target hardware and automatically start running. located on the Programming>>Structures palette.Place a While Loop. around sequence structure on the block diagram.

0 .LED 1 on the MCB2300 boards should now be flashing. LED1 7 AH 2009 V1.

Open up the Analog Input selection menu by clicking on the + symbol to the left.vi to also read the analogue input of the LPC2368. Select AI0 and add this to the right panel by clicking the right arrow icon. Select OK to close the window.Lab 2 Reading the analogue input In this lab you will modify ex1. 8 AH 2009 V1.0 . In the Project Explorer window right click on the MCB2300 icon and select New>>Elemental I/O as shown below The new Elemental I/O window should appear.

In the block diagram in the functions menu select ARM>>Elemental I/O >> Elemental I/O Node.You must now add the analogue input to your block diagram. and place this within the while loop on the block diagram. Your front panel should appear similar to the screenshot below. You can resize the chart as and label the axes as necessary. 9 AH 2009 V1. You must now connect the chart on the front panel to the Analogue input AI0 on the block diagram.vi. Right click on the I/O item and select Elemental i/o>>Analog input>>AI0. Select Graph Waveform Chart and place it on the front panel. Your block diagram should be similar to the one shown below. On the front panel right click and the controls palette will appear.0 . On the block diagram place the Waveform chart terminal next to the Elemental I/O node and using the wiring tool connect the output AI0 to the input of the Waveform Chart terminal.

The corresponding digital value will be displayed on the waveform chart.As in the previous example compile and run your program. Potentiometer connected to AI0 10 AH 2009 V1. Your program will now also read from ADC channel 0 and display the output on the front panel graph. AI0 (Analogue input 0) is physically connected to the potentiometer on the MCB2300 board. By rotating the potentiometer the voltage to AI0 will vary between 0 and 3.0 .3V.