LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read serialport from pic microcontroler 2x8bits?

Hi,

I would like to use labview, to get the samples which the pic send to the serial port. The pic sends 2 x 8 bits number in pairs (high byte, low byte.)
Is it possible to works in labivew7?
I would like to see any example to start to work with it.
Any Help or advise?.
I tested a example which i attached but it doesnt run, maybe is for visa with serial port...
0 Kudos
Message 1 of 7
(2,942 Views)
When you say it doesn't run, what do you mean? Do you not get any data or do your get an error? The example was written with the old serial drivers but with LabVIEW 7, only VISA is supported and that should work. Have you tried connecting to the pic with a erminal emulator should as Hyperterminal? Do you see data there?
0 Kudos
Message 2 of 7
(2,942 Views)
Hi Dennis,

I attached a picture, with the error.
I tested the pic with a c++ program with sending the data by serial port, and its run.
Then, if i want to use labview to get the data, Will work the program in lb7?.
I would like to see any example to work with it, I know labview but in pic i dont dominate a lot...
is it possible to adjust this program to work in lb7 with the pic, or any vi example to use?. I suppose anyone will use labview to read the serial port from pic 16f877...
Any help?. It will be great!.
0 Kudos
Message 3 of 7
(2,942 Views)
LabVIEW should be able to read the serial output from any device. The error code is undefined so that doesn't tell me much. Does it happen during the init, read, or write? You say you have a C++ that sends data to the pic. It's not running at the same time as your LabVIEW program is it? Have your tried any of the other serial examples that ship with LabVIEW? I think that there's three. I asked you once about communication with Hyperterminal. Please try this. Unless you wrote the C++ program yourself, there may be some setting that you've missed and it's better to start with something that you know works.
0 Kudos
Message 4 of 7
(2,942 Views)
Hi Dennis,

I can to execute de program, it fail when its read or inicializate..
I want only READ from the serial port, dont write. I use the c++ for read the data from the serial port.
No, i only run the labview program alone.
Can you advise me any example program labview to test if it detect the data from the com1/2?.
I dont understand what is hyperterminal! cable or ...
I use labview to make several calculates with the data,and i dont like save the data in .csv and then read with the labview, i would like to reading and calculating in the same time (almost real time).
I only want the way to read the data, the rest of code i already have done it.
Thanks for your help!
0 Kudos
Message 5 of 7
(2,942 Views)
Hi Dennis,
I already see the hyperterminal. But if it runs for my program c++ to read the data. Should run in labview, doesnt it or no?.
0 Kudos
Message 6 of 7
(2,942 Views)
There are a couple of shipping examples for serial port communication (LabVIEW <-> Serial, Serial Communication, Serial Read With Timeout). Just open the example finder, go to the search tab, and entere serial for the keyword. Others can be found here. I'd be courious to find out what, if any, error code one of these other examples might generate. If there was an error with the code in the database, we might be able to get closer to the root of the problem.

Hyperterminal is a terminal emulator that comes with windows. Go to Start>Programs>Accessories>Communications.
0 Kudos
Message 7 of 7
(2,942 Views)