PIC Microcontroller to Labview

Hello,
I am Samarth and i am working on a Pulse Oximeter for my project. I am supposed to display all the samples, MAX & MIN values on Labview as a graph. I had no knowledge of whatsoever on serial communications at the beginning but i managed to do the following, one step at a time.I did the following:
1) Communicate between two computers; sending of ASCII characters from hyperterminal to hyperterminal.
2) Got the PIC Microcontroller to talk to the PC; implmented the code in my program and the PIC16F877 was able to send ASCII characters to hyperterminal
3) Got Labview and Hyperterminal to commnunicate; was able to send and receive ASCII characters on hypterterminal and labview.
Now, here is the big question? how do i go about sending the samples to Labview and so that i can view the samples as a graph in Labview? Please help me out with this.
I did the following, set up all the hardware, started sending the information and could view the transmission on the oscilloscope. The main problem is that i cannot get it to display as a graph on Labview. Below are the steps taken in Labview:
- Started Labview 7.1 and picked 'New" under the menu.
- Chose 'Instrument I/O' and then picked the 'Read and Display VI template: GPIB, Serial...
-Then, at the block diagram, i clicked on the Instrument I/O Assistant, selected the instrument.
- Selected the next step, which was to query and parse. Sent the 'Identification command, *IDN? and got the following error when i run the step.
Error Code: Timeout expired before operation completed
VISA status code=bfff0015
Please guide me from here so that i can view the graph. I have been working on this for some days trying to figure it out and have been losing alot of hair and sleep over this. Please help, your help will be very much appreciated.
Thank You
Best regds,
Samarth

It's been my experience that when trying to query the a device's information in serial mode, that it's better to break up the *IDN? query into a single write, and two reads. The first read returns the number of bytes to read, and the second actually returns the data that you are looking for. Regardless of whether or not this works, I would recommend breaking up the query simply to be able to tell whether your problem is occuring at the write or reads. Please let me know if this helps!
Logan S.

Similar Messages

  • How to read and display a signal from my PIC Microcontroller onto Labview

    Hi,
    I am doing a project on a Pulse Oximeter and i am trying to read and display the signal from my PIC Microcontroller on Labview? How do i go about doing it? I am using the PIC16F877 and also making use of the USART?
    How do i implement and initialise the USART in PIC16? What are the steps to be taken, please guide me through the process? The link provides information regarding the USART connection, initialisting and stuff? Is it correct to use these codes in my program?Link: http://ww1.microchip.com/downloads/en/AppNotes/00774a.pdf
    Also, i am using the RS232 serial interface to connect to the PC? The connector i am using is the DB9 Connector. Which template and VI can i use? Am i supposed to use the NI-DAQmx and VISA? Also, for my USART connection, i am using the MAX232 Driver which is applicable for my application as i am working with +5V. So far, i have been reading and trying out on Labview and the steps i have taken are:
    1) Open a New VI and used the Instrument I/O(Read & Display) template?
    2) How do i configure the Instrument I/O Assistant Express VI to read the info from my device connected to COM1?
    3) I was reading the Labview Manual, 'Getting Started with Labview' and i was following the steps under Page 55, Communicating with an Instrument. Am i on the right track?
    4) How do i check and make sure that the port settings of the I/O Assistant and my PIC Micro Match
    Please help me out and guide me through the process. I am student at a polytechnic and i am very new to Labview and the software is used as a development tool for the project. I have a deadline to meet and i hope i can get a response as fast as possible. Your help will be kindly and greatly appreciated. I hope to hear from you guys soon.You can e-mail me all your answers at [email protected]
    Thank You
    Best regards,
    Ashwin
    Ashwin Kumar Mansukhani
    Attachments:
    Getting Started with Labview.pdf ‏901 KB

    Hi Ashwin,
    I am not familiar with the PIC Microcontrollers, but I am assuming you mean that you have the microcontroller sending out serial data that you want to read on another computer with LabVIEW. Please let me know if this is incorrect.
    What type of data is coming out of the serial port? Is it ASCII, or binary? The reason I ask this is that the serial communication in LabVIEW is done through a protocol called VISA, which uses ASCII data to send and receive. You can later convert this data into whatever form you need, but this is what it is designed to read and write.
    You can check the settings such as baud rate and data bits in a configuration utility called Measurement and Automation Explorer, or MAX. When you open up the MAX interface, you can expand the Devices and Interfaces entry on the left, and then expand the Ports entry to see your serial port. When you highlight this port, select the Port Settings tab at the bottom of the window, and you can see what the current settings are, and change them if you need to. You can also set these parameters in LabVIEW using the VISA Configure Serial Port VI.
    You can also test communication in MAX by right clicking on the correct port and choosing Open VISA Session. Then choose the Basic I/O light blue tab, and then go to the Read tab. When you click execute, it should read in what is coming from the serial port. This will allow you to verify that the correct information is coming in before even trying to acquire the data in the LabVIEW environment.
    In LabVIEW, the best resource to use the Basic Serial Write and Read example program that ships with LabVIEW. By examining the block diagram of this program, you will be able to see the basic programming flow of serial communication in LabVIEW.
    I hope this information was helpful! Please let us know if there's anything else we can help with.
    john
    Applications Engineer

  • Help me about communicating PIC microcontroller with Labview

    Hi everybody!!!!!!!!
    I have a few issues about data acquisition in Labview,so i need your instruction.
         Right now,I want to practise a project about the serial communication with PIC16F877A microcontroller ( a microcontroller of Microchip,40-pins,already integrated 10 bit A/D module,with 8 channels)  ,developing the user interface in the Labview 8.0 software.
         My goal is data acquisition from multiple sensors:such as LM35 temperature sensor and a pressure sensor,analyzing and display the data-time graph in Labview
         I intend to use ANx-pins (analog input pins,having 8 pins) in PIC16F877A,connecting to data-pin from sensors,then I use the TTL outputs of the PIC in combination with a MAX232 serial driver chip.As you know,the mAX232 simple converts the TTL outputs to RS232 outputs and forword them on.
         It is of no use to be able to collect various sensor readings into the PIC if there is no-way to transfer that data to a location where a user can use it.To solve this problem,I choose to implement a standard RS232 serial link between the PIC MCU and my personal computer (using DB9 COM terminal)
         This meant that I would need to initialize the A/D converters each time I want to read from a different A/D sensor because the two sensor dit not share a common configuration.
         My troubles is how to transfer data from sensors through PIC MCU to Labview,using RS232 standard,how to program for Labview,which I have to use:files of Serial communication in Serial.VI,or DAQ funtions in DAQ pallete?
       P/Sorry,my English is not good,expecting your sympathy!
       If it is impossible,you could send me an instruction or the same examples in detail,my mail:[email protected]
    THANK YOU VERY MUCH!!!!!!!!

    It would be best if you were to re-post this to the LabVIEW forum.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Is to possible to control a motor by using fuzzy logic toolbox in Labview and motor interfaced with PIC microcontroller

    sir
     I am doing a  PG project on fuzy logic control of robotic arm,In this first i need to write a code in LABVIEW fuzzy toolbox and interface that that code with PIC where motor is connected and a tachogenerator should be connected to motor to send speed to LABVIEW through PIC microcontroller where ADC is inbuilt in it.
    Please help sir me whether  it is possible to do that ,if not tell me do i require any interfacing device  ,I am very new to labview 

    Now for this problem, Fuzzy can be easily used to control the plant. Here is the softwares that would help in this task:
    - LabVIEW Full Development System (FDS) 2009 or later - The is the LV version that allow you accessing the latest Fuzzy Logic develoment
    - LabVIEW PID and Fuzzy Logic Toolkit 2009 - This has PID and Fuzzy Logic functions available for you to develop your controller
    - LabVIEW Control Design and Simulation Module 2009 - This is a complete set of functions that allow you to simulate and develop advanced control applications. In your case, you probably will be using this module for simulation of the DC motor.
    Now, you also will need a way to read the encoder and control the voltage applied to the motor. You have several options from NI for that process. Probably a multi-function Board could help since they have digital counters and Analog Output signals. However, I can't recommend what would be best for this application, but the ideal platform is the CompactRIO platform for your application. They have a Real-Time controller and integrated Input/Output modules with signal conditioning that could allow you to directly drive the DC motor. I would advice to go to our webside (http://www.ni.com/compactrio/) and verify what this platform does. For this platform, you will also need the following sofrware:
    - LabVIEW Real-Time Module 2009 - Allow you to develop you application in Real-Time for deployment.
    Hope this helps.
    Barp - Control and Simulation Group - LabVIEW R&D - National Instruments

  • Can I control PIC programmer using LabVIEW

    Can I program a PIC microcontroller entirely in Labview Environment using a commercial PIC Programmer?
    Could everyone give me any advices? Thank you

    Here is a link to another post asking the same questions.
    Here

  • Program PIC Controller Using Labview

    Dear Team
          I have created an application using LABview, in which i'm testing an Electronic Hardware before and after programming the Microcontroller available in the hardware.I've almost completed the project expect the auto programming Of Microcontroller using LABview.
     I have to use PIC2kit or PIC3kit to fuse the c code.It would be helpfull ,if i get any support or clarification in the above mentioned auto programming using labview.
    My Client requirement is to call the pic2 standalone application used for programming PIC controller Via LABview and program it..Let me know if there is any possibility.. 
    Solved!
    Go to Solution.

    You could use System Exec.vi to run your standalone application.
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.

  • Dumping hex file into pic microcontroller via ICD3

    I am able to dump hex files into pic microcontroller using command line utilities that come with MPLAB. But, whenever I have to dump a hex file, I need to go to the ICD3 programmer utility location (in MPLAB directory) and paste the hex file to be loaded there. I tried feeding the address of the hex file in System Exec vi along with other necessary commands but it is unable to track the hex file and displaying an error as "hex file not found"..Is there any way to implement above functionality?
    (Sorry I didnt get any replies for this query so I am posting it as a new message)
    Solved!
    Go to Solution.

    here is what I tried.
    http://forums.ni.com/t5/LabVIEW/Command-line-arguemts-expansion-at-run-time/td-p/2593047
    I am using this for mass programming. Hence I am doing this using batch mode.
    Can you help me out in this?
    Kudos are always welcome if you got solution to some extent.
    I need my difficulties because they are necessary to enjoy my success.
    --Ranjeet

  • Has anyone tried to program a ST7 microcontroller using LabVIEW

    I'm looking to perform ISP (In-Situ Progamming) on a ST7 microcontroller using LabVIEW and a data acquisition card. Anyone with this sort of experience?

    Danielle,
    i didn't say that a FGV is not good for the task. I only doubt that a single FGV will do the job.
    dsavir wrote:
    [...]because we always adding new capabilities to our hardware[...]
    Does that require complete new elements in your datastructure? If yes, it is very hard to solve it.
    I asuyme that most changes can be captured by using "intelligent" elements in your datastructure like enums and typified clusters.
    Bringing up a very important point: In situations like this, it is imho mandatory to create good typedefinitions in order to keep proper versioning.
    Working with SCC helps a lot, too, because you can track all changes made over time very easy, and switching back is possible as well.
    Regarding the queue-question:
    There are many good examples/tutorials and posts available, so please do a short search.
    I recommend you to start here. 
    hope this helps,
    Norbert 
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Adafruit flora microcontroller and labview, please help!

    Hello,
    I am using an Adafruit Flora wearable platform, which is arduino compatible along with a few Adafruit neopixels (LEDs) and a flora lux sensor (light sensor) and I would like to develop a LabView code to use the sensor and LEDs controlled via the Arduino-compatible wearable platform as an optical spectrometer to measure light absorbance in real time.
    I am new to programming, so I would like to know if someone could please provide some tips on how to start this project or if there are any examples of labview and arduino for real time optical measurements?
    Thank you so much.
    I really appreciate your help.
    Kary.

    Hi Kary,
    Though someone here may have great advice or knowledge about this microcontroller, the LabVIEW forums are specifically targeted towards issue within the software, not so much hardware integration.  That said, we have hardware forums dedicated to different products, where you may find more support and an active community of people, examples, and other helpful resources.  The link below is for our online Arduino community.  I would encourage you to post in the discussions there, as they will have more experience with the Arduino, and perhaps even your specific microcontroller!
    https://decibel.ni.com/content/groups/labview-interface-for-arduino
    Regards,
    David R
    Applications Engineer
    National Instruments

  • I want to write program in Labview that will run on PIC microcontroller.

    Is there some toolkit or similar, that will allow me to write code for PIC micro (10F or 12F)? 
    Solved!
    Go to Solution.

    Jenia_K wrote:
    Serial communication, you mean, only to transfer data, not actually writing an embedded code, right?
    If I use embedded module, can it work with 8bit microcontrollers, like pic18f, pic12f.... ?
    No the LabVIEW embedded toolkit only supports specific development boards out of the box. You can add other boards to that list if they use same CPU architecture. Adapting it to a new CPU architecture and/or toolchain is a LOT more work. And trying to do that for non 32 Bit CPUs will be in vain at best , meaning it's probably not possible at all, and definitely not worth the effort.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How can I control PIC programmer with LabVIEW

    I need to control a PIC Programmer (MPLAB PM3) with LabVIEW. How to do this?

    Hi Paul.
    I am working on a project that is using LabVIEW to communicate via serial communication with 4 programmers (Com 1, 2, 3, & 4). I am currently using the Microchip PM3 programmer DOS utility PM3CMD.exe to send/receive commands from the system exec.vi in LabVIEW. I am attempting to program simultaneously with 4 programmers, but the PM3 programmers are returning a database error if I try and communicate with more-than 2 programmers at a time. I noticed that you have some experience with some drivers from Microchip and using serial commands.
    Do you have any suggestions that may help me.
    Thanks.

  • How to read and display a signal from my PIC Microcontr​oller onto Labview?

    Hi,
    I am doing a project on a Pulse Oximeter and i am trying to read and display the signal from my PIC Microcontroller on Labview? How do i go about doing it? I am using the PIC16F877 and also making use of the USART?
    How do i implement and initialise the USART in PIC16? What are the steps to be taken, please guide me through the process? The link provides information regarding the USART connection, initialisting and stuff? Is it correct to use these codes in my program?Link: http://ww1.microchip.com/downloads/en/AppNotes/007​74a.pdf
    Also, i am using the RS232 serial interface to connect to the PC? The connector i am using is the DB9 Connector. Which template and VI can i use? Am i supposed to use the NI-DAQmx and VISA? Also, for my USART connection, i am using the MAX232 Driver which is applicable for my application as i am working with +5V. So far, i have been reading and trying out on Labview and the steps i have taken are:
    1) Open a New VI and used the Instrument I/O(Read & Display) template?
    2) How do i configure the Instrument I/O Assistant Express VI to read the info from my device connected to COM1?
    3) I was reading the Labview Manual, 'Getting Started with Labview' and i was following the steps under Page 55, Communicating with an Instrument. Am i on the right track?
    4) How do i check and make sure that the port settings of the I/O Assistant and my PIC Micro Match
    Please help me out and guide me through the process. I am student at a polytechnic and i am very new to Labview and the software is used as a development tool for the project. I have a deadline to meet and i hope i can get a response as fast as possible. Your help will be kindly and greatly appreciated. I hope to hear from you guys soon.You can e-mail me all your answers at [email protected]
    Thank You
    Best regards,
    Ashwin
    Ashwin Kumar Mansukhani
    Attachments:
    Getting Started with Labview.pdf ‏901 KB

    Hi Ashwin,
    It is a good idea to first be able to communicate with the microcontroller using some sort of serial communication software such as "HyperTerminal" or "Procomm", etc. Refer to MicroChip's recommendations on this.
    Once that works, then you are ready to use LabView.
    Here is a link which covers many aspects of serial communication. Link - click here
    You probably received a development kit. They usually have a readily available interface. It's been a long time since I played with the PIC, but I seem to remember that you need to program the serial communication driver (as well as at least a bootloader) to get the serial communication going. The driver contains the necessary protocols so that you PC can have a machine conversation with the target (PIC).
    It sounds like a fun & interesting project. Please avoid to have replies to your personal email. By having the answers posted to this thread, you will get much more support and advice.
    Have fun,
    JLV

  • VISA : USB through PIC microcontoller, writing is good, but not reading

    Hi guys;
    I'm trying to put together a simple VISA USB read/write program to test communication from Labview to a PIC microcontroller.
    I've found an example on youtube and wanted to try to implement it.
    Well, in the owners video everything seems to work juste fine, but for me only the writing is working, I can't read data from the microcontroller.
    Can anybody explain to me what is going wrong on this ?
    Here is a the diagram.
    Thank you.

    Give this a try.
    You don't need to initialize the USB port every iteration of your loop.  Nor do you need to close it each time either.  Move those out of the loop.  I also greatly simplified the conversion of your data to write.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Attachments:
    USB Read and Write.png ‏25 KB

  • Can labview do D to A conversion?

    Student needing help:
    Can Labview do D to A conversion? I am reading a digital signal in serial form of 1 start bit, 8 data bit, and 1 stop bit. I want to convert this signal into analog signal and graph it with respect to time.
    I already have the VI to read in the signal. I need help with the D to A conversion. Also, how do you time stamp the signal so you know when data is received.
    I'm new to labview, please be detailed and specific. Thanks for all the help.

    My original signal was an analog signal. It was converted into digital signal and transmit out serially by a PIC microcontroller. The signal was transmitted using a wireless RF transceiver. At the receiver side, an identical RF transciever recieves the signal. Then I use the data acquistion instrument to collect in this signal.
    For example an analog input of 3.4 volts was converted into AA and transmitted out starting with a start bit(which is a 0) and then 01010101(inverse of AA since LSB is transmitted first)then a stop bit(which is a 1).
    So as of right now, the transmitted data is in binary format in groups of 10(1 start,8 data bits, 1 stop), one right after the other. What I want labview to do is to reverse the process I have done at the beginning and convert this serial data back to its original analog form.
    With the stream of data coming in, Labview needs group these data bits in group of 10, starting with the very first bit received. If this group is 0010101011 like mentioned above, then it would convert back to roughly 3.4 volts.
    I am not sure if the process I described about is possible with labview. I suspect that I might need additional D/A hardware to accomplish this task? I'm not sure.
    Help is greatly appreciated, and please let me know if any more information is needed. Thanks,

  • Interfacin​g wsn with pic microcontr​oller

    Hi,
    Since I am new to labview and I want to interface wireless sensor module pioneer with pic Microcontroller using USB is it possible to do so??
    If yes then pls give me some hint
    Thnks in advance

    Hello Asper,
    Thanks for the post!
    I would be happy to post my code. See the attached LV 2010 project. 
    I used a serial SPI capable LCD screen from Crystalfontz to show locally what the temperature (using a thermocouple) and set point (using a potentiometer) are coming into the AI lines of the NI WSN-3212 node. Using just 2 digital lines, one for my SPI software timed clock and another for the data, I was able to update the screen with this information. I just pulled low the chip select line since the only thing I was communicating with was the LCD screen. I used the LabVIEW WSN Module to program LabVIEW directly on the WSN nodes. This is what allowed me to have control of the digital lines to make a CLK and DATA line.  
    Requirements for the project:
    LabVIEW 2010 or later
    LabVIEW 2010 WSN Module (for programming on the node)
    NI-WSN 1.2.1 or later.  
    Best of luck to you on your projects!
    Corby
    WSN R & D Product Support Engineer
    Attachments:
    LCD SPI WSN Project (LV 2010).zip ‏3194 KB

Maybe you are looking for

  • Taking a picture from lock screen automatically unlocks phone?

    I noticed that when you bring up the camera to take a picture from the lock screen it automatically unlocks the phone without having to put in the number code. Is this just a tech. fluke or is there some way to avoid this (in case a phone is stolen,

  • When I print a web page it only prints the first page and not the rest of the web page below the page break.

    When I print a web page firefox will only print the first page, all of the content to the first page break and nothing past that. How can I change the settings so that it will print more than on page?

  • Help 3 diferent answers from apple

    I'm very frustrated with not getting a clear answer from apple ! I'm about to get a new mac pro most likely bto from the online store. I also have a $600 dollar gift card for best buy that I want to use for a 23'' ACD. My question is if I buy the app

  • Urgently need help with webservices

    I really really need to get a simple webservice working But all I'm getting is errors I have a second post describing my problems I'd be forever gratefully if someone would help! cumminsD

  • Implement spinlock

    Hi all, I am trying to implement Spinlocks in kernel. i want to use lckspinsleep() which release a spinlock and sleep until an event occurs, then wake. in this function their is one parameter "event_t event", i want to know how we can set event so lc