LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ASCII and serial communication problem

Hallo!
 
I have read  that VISA only reads in ASCII. Is that true? I´m wondering this becasue I´ve got a problem when I´m trying to recive and plot my signal in Labview. I´ve built an eye movement detector which indicates the amplitud with voltage. Depending on the movement you get a different frequency. From this detector I transform the signal with a PIC -proccesor (PIC18F452) from analog to digital. This is an 10-bits A/D transformer that I´ve built. The signal goes then from the PIC to the computer via the serial communication. I then use Labviews example: "Basic Serial Write and Read"  with some small adjustements to get my signal in a waveform. Everything seems to work fine when i run the Hyperterminal, it recives what I send. But it´s in Labview everything seems to go wrong. I´m really fresh with labview. Any advice are welcome! Thanks guys!
 
Yours sincerely
 
Fadde
0 Kudos
Message 1 of 12
(9,168 Views)
I have read that VISA only reads in ASCII. Is that true?

Just curious - where did you read that?

It just ain't so.

VISA manages the serial port and reads characters and passes them on to you. It can be ASCII or UNICODE or binary code of your own making.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 12
(9,142 Views)
Any advice are welcome!

The first advice is that "everything seems to go wrong" is not a good enough description of your situation to do anythinng more than guess.

Tell us what happens!

Can you send test data of your own choosing?

What happens when you send a binary 0000000001, for example?

Do you get a number like, say, 256?

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 3 of 12
(9,141 Views)
Are you using the proper termination character within LabView for transmissions to the PIC?  Typically \n for linefeed.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 4 of 12
(9,119 Views)
Hello
 
Thank you guys for you fast reply, I really appreciate it! But I think we´ve solved my problem, I got help from a friend. Anyway...If someone have similar problem, I´ll be glad to help. I´ll be in touch and ask for more help if I get stuck. Thanks!!!
 
Sincerely
 
Fadde
0 Kudos
Message 5 of 12
(9,095 Views)

Student81:

For future reference, what was the solution?

Sounds like a pretty cool assignment involving hands on electronics, PIC programming, communication and LabView.

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 6 of 12
(9,078 Views)

Hello!

 

Sounds like a nice application you have been working on since it involves so many different areas. Why not share it to other people? You have the possibility to share your presentation here:

 

http://www.ni.com/devzone/dev_exchange/ex_search.htm

 

Great that everything worked out well for you.

 

Regards,

Jimmie A.

Applications Engineer, National Instruments

Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

0 Kudos
Message 7 of 12
(9,050 Views)
Sorry guys that I´ve not respond earlier, but I´ve rally been busy with my project. Unfortunately I cant go in to deep with my project since it still under research. But as soon I finnish I can tell (whoever is interested) you more about it.
 
But now I´m hooked up with another probelm. I would like to analyse the frequency of my signal who goes from my circuit through the A/D-converter (PIC18F452) to the computer and in Labview. The frequency from my signal can be from 0-100 Hz but it usually lies around 70-80 Hz, and I would like to discern it from the noise who comes from the power network (this frequency is exactly 50 respecive 100 Hz). How can I do this? I´ve tried to put in the "spectral measurements" (FFT) block in my code in Labview, but I´ve failed. I dont know if this is the right thing to do and I´m really fresh with Labview so any suggestions are welcome.
 
Thanks!
 
Fadde
0 Kudos
Message 8 of 12
(8,987 Views)
Hi There, i need some help in sending commands (Ascii) to serialport via buttons(One button = one command)on frontpanel.How can this easly be done?
0 Kudos
Message 9 of 12
(6,665 Views)

Hi Dustyboy,

 

Please start a new thread to discuss a solution.

There are some details that you should provide, such as "do you want to implement a static command per button"?

In that new thread, try to provide more dretails about exactly what you are trying to accomplish. 

There might be many solutions based on what you are trying to do.  THe solution should be simple to implement.

 

R

0 Kudos
Message 10 of 12
(6,660 Views)