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

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

  • 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.

  • 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.

  • Please help this newbie make a start with LabView 7

    Sorry for these very very basics but I failed to resolve these myself though I did my best.
    I try to make a GPIB i/o on a block diagram.How to ?
    I cannot find such in the functions menu.
    I find only a vi for typing direct commands ( which does work ).
    I tried many many variances, but end of all i get stuck, e.g. at : file>new>instrument i/o(gpib)>read and display>right click>controls>search>i/o....i get stuck.
    I am afraid I do miss a lot.....
    I have a NI GPIB PCI 488.2 card and some HPIB instuments.
    The PCI card and the NI 488.2 drivers work.
    I can read the instruments' dev.#.
    How should I implement instruments' r/w commands in an i/o block diagram ( if possible at all ).
    I cannot use VISA ( I
    assume C++ or VB is needed for that, which is beyond my capabilities ).
    Any help will be gratefully welcomed.
    Peter van Daalen.

    LabVIEW can do VISA and NI-488.2 directly; you don't need C++ or VB.
    First of all, you should see if there are instrument drivers available for your instruments. There are thousands of free drivers available on http://ni.com/idnet/. Search there first, because if you can find a driver for any of your instruments, it will save you a lot of time.
    If you can't find a driver, you will have to send and receive messages from the instrument directly, and this is where NI-VISA and NI-488.2 come in. The simplest way to get started with this direct communcation is to use the "Instrument I/O Assistant". This is in your "Functions->Input" palette, and you can read about it in the online help.
    The Instrument I/O Assistant will bring up a dialog to select th
    e device, send it a command and parse the results. Once you click "OK", it creates an Express VI on your diagram for you to incorporate into the rest of your application.
    I hope this helps you get started.
    Brian

  • Programming AVR microcontrollers with LabVIEW

    Hi Folks,
    I'm currently trying to program an AVR microcontroller with LabVIEW 7.1 via
    the JTAGICE mkII interface. I've got all of the ATMEL literature regarding
    the interface, and can get the the device recognised in MAX when used on the
    USB bus, but whether USB or RS232 I just cannot get a reply from the JTAG.
    Has anyone got any suggestions / links that may help me along with this
    project? I know a company sells a programmer with a LabVIEW interface, but
    I'd rather not fork out the £700+ if I can avoid it.
    All the best
    Andy

    Hi Andy,
    I don't know what you need to do, but I think it might be an initializing problem. Make sure that you have them set as the manual says and that you are initializing the microcontroller properly. Usually it is that you are not wiring correctly or not initializing something the way it should.
    I found this link on the internet. They might also be able to help you on this.
    KDI
    Hope this helps.
    Ricardo S.
    National Instruments.

  • Sending internet E-Mail with LabVIEW?

    Hi folks,
    I'm stuck with a task that obviously wasn't foreseen when NI created the
    internet toolkit for LabVIEW - I want to send E-Mail via SMTP, not only
    inside our company's mail system but also to recipients with mail addresses
    from other (internet) domains.
    Our internet mail server (like most others, too) requires an
    authentification before it allows to send mail, and since SMTP does not have
    any authentification mechanisms it uses the poular "MAIL after POP"
    proceeding, that is: You have to look after incoming mails first with POP
    (post office protocoll), which is using a login name and password, and
    afterwards your machine is allowed to send internet mail via SMTP (simple
    mail transport protocoll) for several
    minutes.
    My problem is: The internet toolkit does not offer any POP functions at all,
    so sending SMTP mail to a domain different from our own one does not work!
    Does anyone know where to go from here? Has any helpful soul ever
    implemented POP functions with LabVIEW?!?
    Many thanx,
    Hans-Jürgen Philippi

    In info-labview group Jack Hamilton mentioned that he has done that and also
    offered to share it, so you could email him for more assistance, his email
    is [email protected]
    Also if you are on MS machine, then you can use Outlook to send mail using
    ActiveX, it will use your default mail account, where at least in my case I
    have already specified SMTP username and password.
    Also you could find SMTP spec and just use that since SMTP is a plain text
    protocol then it should not be too hard.
    Try telneting to some SMTP server, type hello and you will see that response
    is plain text.
    "Hans-Jürgen Philippi" wrote in message
    news:8i7ni8$475lf$[email protected]..
    > Hi folks,
    >
    > I'm stuck with a task that obviously wasn't foreseen when NI created the
    >
    internet toolkit for LabVIEW - I want to send E-Mail via SMTP, not only
    > inside our company's mail system but also to recipients with mail
    addresses
    > from other (internet) domains.
    >
    > Our internet mail server (like most others, too) requires an
    > authentification before it allows to send mail, and since SMTP does not
    have
    > any authentification mechanisms it uses the poular "MAIL after POP"
    > proceeding, that is: You have to look after incoming mails first with POP
    > (post office protocoll), which is using a login name and password, and
    > afterwards your machine is allowed to send internet mail via SMTP (simple
    > mail transport protocoll) for several minutes.
    > My problem is: The internet toolkit does not offer any POP functions at
    all,
    > so sending SMTP mail to a domain different from our own one does not work!
    >
    > Does anyone know where to go from here? Has any helpful soul ever
    > implemented POP functions with LabVIEW?!?
    >
    > Many thanx,
    > Hans-Jürgen Philippi
    >
    >
    -----= Poste
    d via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 80,000 Newsgroups - 16 Different Servers! =-----

  • 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

  • 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 am using report generation toolkit 1.1 with Labview 7.0 and Office 2003 profession​al. The create new report VI opens Excel but throws error (-21471672​62- from automation open VI) when I try to open MS word. please help...

    I am using report generation toolkit 1.1 with Labview 7.0 and Office 2003 professional. The create new report VI opens Excel but throws error (-2147167262- from automation open VI) when I try to open MS word. please help...

    Hi Leo22,
    Does this error occur if you use any of the example programs that come shipped with LabVIEW? I would try opening one of the examples that write data to Word and see if those give you an error. Also, have you tried just putting down a New Report.VI and change the report type to Word? If this simple vi (that's all you need to open Word) breaks, I would check to see if there are any instances of Word still open. Check the task manager to see if any word processes are still open. There should not be a problem accessing Word 2003 from LabVIEW 7.0. If neither of these solutions work, please give some more detail about your application and we can research further. Thanks!
    Jeremy L.
    National Instruments
    Jeremy L.
    National Instruments

  • TCP/IP communication with LabVIEW Full?

    Hi,
    I would like to know if the TCP/IP VIs are included with the Base or Full version of LabVIEW?
    I was looking at the different versions of LV and one of the features of the Pro version is 'Network Communication'.
    I have done TCP/IP communication a while ago and I am quite sure it was with the Full version. I have the Pro version now but this is for a customer.
    This brings another question: Is there a trick to be sure your code is going to work on a system with LV Base if you develop on a system with LV Pro?
    Thanks!

    I think that was a good answer to your first question. To answer your second question, if you are creating executables to be run on a computer with LabVIEW Base there will be no problem running the executable because LabVIEW Base has the run time engine. If you are sending VIs to another computer with LabVIEW Base they will not be able to access any VIs that are not included in there package. There is no simple way to tell that these VIs are not included except through the link in the previous post. In LabVIEW 8.6 many of the help documents state what LabVIEW package installs the VI. If all of the VIs state that they are installed with LabVIEW Base you will have no problems.
    Vince M
    Applications Engineer

  • HELP -FPGA SPARTAN 3E-100 CP132 WORKS WITH LABVIEW FPGA ?

    HI EVERYBODY, IM TRYING TO USE MY FPGA BOARD WITH LABVIEW, BUT I DONT KNOW THAT IF ITS COMPATIBLE, I INSTALLED DRIVERS, FPGA MODULE, AND LABVIEW 2012, IM USING WINDOWS 7 32 BITS, AND AFTER I COMPILE ITS SAID :
    LabVIEW FPGA called another software component, and that component returned the following error:
    Error Code: -310601
    NI-COBS:  Unable to detect communication cable.
    Please verify that the communication cable is plugged securely into your computer and target. Also verify that the appropriate drivers are installed.
    THANK YOU .
    =)
    Solved!
    Go to Solution.

    Hi dvaldez2.
    LabVIEW FPGA does not offer support for any third party hardware, other than the Spartan 3E XUP Starter Kit. Those are probably the drivers you downloaded.
    http://digital.ni.com/express.nsf/bycode/spartan3e?opendocument&lang=en&node=seminar_US
    However, this driver only supports the Starter Kit board itself (http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,400,790&Prod=S3EBOARD). You can't use the driver with any other FPGA from Xilinx.
    Hope this helps.
    Aldo H
    Ingenieria de Aplicaciones

  • Tcp/ip communication with LabVIEW

    Does anyone have experience building an application with LabVIEW that
    communicates over a socket? I new to LV, but it appears that the
    application I have in mind is possible. Specifically, the LV
    application would open a socket (port and IP known ahead of time) and
    send a character to that socket. Depending on the character sent, the
    application on the other end (a UNIX process) would send back a one
    integer value to indicate the number of packets to expect. The LV
    application would next need to parse each packet for such things as the
    packet length, data length and so forth and then distribute those data
    to appropriate sub-processes. The header value types are integer,
    double, byte and character. The data values are all 4-
    byte integers.
    The sending code (on the UNIX side) was written in C. The aggregate
    throughput is relatively low; no more than 2,000 bytes per second,
    including packet headers.
    If I can get this to work, the results would represent a significant
    cost savings over competing alternatives. As a federal employee, I'm
    always looking for the most cost effective solutions.
    Thanks.
    -Robert
    Basically, I'm just looking for confirmation that this sort of thing is
    possible with LV. And, I'd like to get a better idea of how hard it
    would be to do.
    Sent via Deja.com http://www.deja.com/
    Share what you know. Learn what you don't.

    Hi everyone,i am currently trying to communicate with two computers at the moment using TCP/IP.I have done a simple server and client VI but the server doesnt seem to be writing the string im trying to send and it also gives an error message
    Error 1 occurred at TCP Write in Server.vi
    Possible reason(s):
    LabVIEW:  An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.
    Please find attached the simple server and client VIs i have done.can you help me?
    Thanks
    Osowoaji
    Attachments:
    Server.vi ‏13 KB
    Client.vi ‏13 KB

  • How to use a namespace in a C++ code communicated with labview

    I have a long code written in c++.  Now I want to acquire data with labview, send some data points as an entry to my c++ code and it will return a value to Labview.  I tried with a simple sum of two elements and it worked, but in my long code I have so use some namespaces and subfunctions.  If I try to compile it does not accept a namespace such as std.
    Can anybody help me?

    I'm not certain the difference (and there isn't an attachment). However, if the functions you are exposing from your DLL are not marked as extern "C", then you'll have a lot of difficulty calling it from LabVIEW. You don't want to deal with the C++ name mangling, so keep the API simple and straight C. Behind the function signature, however, you can use whatever you want.
    If you are already doing this, can you answer the following
    1. What, exactly, is going wrong?
    2. What version of LV?
    3. What version and platform is the C++ compiler?
    Brian Tyler
    http://detritus.blogs.com/lycangeek

  • Question about Communication with Oracle 7

    Hi,
    Generally we use Oracle Snapshots for Communication, but since Oracle 9.2.0.5 do not work with Oracle 7.1.5.2.4. we are thinking about do use Oracle Interconnect for this Link.
    Now I have the following two Questions about Communication with Oracle 7:
    1. Is an Adapter for Oracle 7.1.5.2.4 available?
    2. From your experience, does it make sense to install Oracle Interconnect for implementation of only one read only Link with 3 Tables if an OAS for BI is available?
    Thanks,
    Hannes

    1. The Oracle database adapter is for Oracle 8i and up. I checked the code needed in the database and doubt that will work in Oracle 7.
    1. The other option Advanced Queuing also needs 8i and up.
    2. For me it doesnt make sense that you want to connect to Oracle 7. Oracle 7 is unsupported and should not have to be developed against. Also the license costs for Oracle Interconnect ~17K without any discount is a bit steep for read only links to three tables. Having the OAS means you wont have to pay another additional ~17K for the apps server.

Maybe you are looking for