LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

help with serial

no solution???

0 Kudos
Message 21 of 46
(1,912 Views)

If that is the code that is generating the serial data, then the following modification to the example I showed you will read the values:

0 Kudos
Message 22 of 46
(1,903 Views)

WHY DIDNOT you put visa write?

i need it in another stage or it will affect

0 Kudos
Message 23 of 46
(1,892 Views)

What are you talking about? What VISA Write?

0 Kudos
Message 24 of 46
(1,876 Views)

how did you do visa read in your modified example and you dont know visa write

i mean  write string

0 Kudos
Message 25 of 46
(1,862 Views)

The microprocessor code you uploaded does not require a write to send data. It's always sending data, which is the ADC_Read(0). It reads the port in each iteration. If it sees a "g" character it sets portd, bit 7 high, whatever that means. I don't see how this is related in any way to the ADC reading and sending of the value over the serial port. Did you write that code?

Adc_Read(0)
0 Kudos
Message 26 of 46
(1,849 Views)

i wrote it , but i send g to microcontroller when an action happened in lab view

your example work well but it display yhe plot too fast , i made delay and it it give error

so i used string to unsigned byte array that u used ,i used it in basic read write and it doing well

 

but i cant detect the frequency do you know about it?

0 Kudos
Message 27 of 46
(1,829 Views)

What do you mean it displays the plot too fast, and what error did you get?

0 Kudos
Message 28 of 46
(1,821 Views)

the wave pass too fast on display may be it reads too many bytes so i made delay too see it

and message error appear

dont care

i used it in basic one and it go well

how to measure the frequency

i used tone in express but it didnt work

0 Kudos
Message 29 of 46
(1,812 Views)

How many packets of data is your controller sending per second?

 

If you are just banging out bytes as fast as possible, and LabVIEW code is running fast enough to keep up, then yes, data is going to be just flying across a chart.  And if you put in a delay to slow it down, then the error you are getting is probably due to a buffer overflow.  I don't know why you didn't post the error code like Smercurio asked.  Providing answers to the questions you are asked will help give you more relevant information and answers to whatever your original questions might be.  Smiley Wink  Also, don't say things like "it didn't work".  Tell us how it didn't work.  Was there an error?  Were there results that just didn't match what you expected?  You got zeroes, no data?  What?

 

What kind of frequency are you trying to measure?  Is any kind of timing information provided as a part of the serial data stream?  If you are trying to figure out a frequency based on the raw data coming packet by packet from your serial port, I don't know how good that analysis will be since you are basically just relying on the speed of your communication protocol to be the time base of your data.

0 Kudos
Message 30 of 46
(1,802 Views)