I prepared this project few weeks ago. It is a kick start to all developers who wants to use LABVIEW to control the outside world using Serial Port. The project carries a real time testing of proteus circuit controlled by a LABVIEW program. This is an exclusive demo since none carried out such a project between LABVIEW and proteus.
I have also created a generic PIC Serial Board
that can be used to implement the simulated circuit.Project Files:LABVIEW Interfacing Assets by VBCoderSoftware Requirements
Screen Shot of LABVIEW Program
- LABVIEW 8.6.1 or above and NI DAQ installed to be able to use serial port
- Proteus 7.2 or above
- Virtual Serial Port Driver Software (included in the project file)
- MikroBasic Pro for PIC 2009 (to display PIC source code)
- Eagle PCB (version 4.0 or above)
Screen Shot of Proteus Circuit
The project mainly controls 3 LEDS from LABVIEW via serial port.Step 1:
- After you install and register the Virtual Serial Port Driver Software, you will be able to connect 2 serial ports virtually.
make sure that you connected COM3
by selecting them from the dropdown comboboxes
and click on the "add button
" as in the picture
Now you have two serial ports connected to each other. It means if you send data out from COM3, it will be received on COM4 where we shall use to send commands from LABVIEW to Proteus Circuit.Step 2:
Open "proteus model
" found in the project files included using ISIS. Then click on the virtual COM
that emulates Serial Port Terminal. Then, Choose COM3
from the physical ports combobox.
Now double click on the PIC Microcontroller
chip and make sure you choose "PIC Project.Hex
" as your program source code. The MikroBASIC code is included in case you want to learn how command is interpreted which is simply checking for a number sent from LABVIEW. I have commented each line of code I wrote.
Now, run your circuit and minimize it till performing the next step.Step 3
Open the "LV Client Application.vi
" which is LABVIEW program. The drop down Combbox will display all available serial ports on your machine. Select COM4
. Remember, you already selected COM3
in proteus circuit.
Now Run the VI, click on "Connect
" and you can control the LEDS in proteus circuit from LABVIEWStep 4:
You will find the Schematic and layout of a generic serial interfacing board I designed in case you want to implement a physical circuit.
I hope this project gives you a good understanding of serial port interfacing. If you wish to ask about any part of either labview code or PIC code, I'll be more than happy to answer as soon as I have a time slot.
If you learn anything from this project, please spread it so others can learn from it too. I just hope you point to our forum and not copy and paste it