Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

how to plot real time data recieve by serial port

hi
i write a program in ARM lpc1768 for A/D converter and send the result to pc by serial port in labview that i attach the design.
i can recieve data in binary and numeric.
now i wanna plot this data into the garph like time/amplitude (real time) but i cant import the data as input for the wave form chart
hope to someone can help me in this case!

 

0 Kudos
Message 1 of 10
(4,729 Views)

What is the protocol you created with your ARM program?  Put another way: How is the message your ARM microcontroller you are sending the the PC formatted?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 10
(4,723 Views)

dear 

i designed the plotting part

but now i have an another problem that cant troubleshoot it
when i sending data from processor, i recieve it correctly but the chart only show the first recieved data and others just show in read string box

i attach my design so you can see it and tell my mistake
thanks alot

0 Kudos
Message 3 of 10
(4,709 Views)

What are you expecting to acquire? what is what you are receiving? it is posible that you are losing some information on the conversion of data.

0 Kudos
Message 4 of 10
(4,683 Views)

Your problem is that you are just concatinating the read string and doing the conversion on the entire string, which will only return the first value.  Again, what is the protocol you are using for the serial communications?  You can simplify your LabVIEW code a lot if you have a termination character.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 10
(4,681 Views)

i use usb to send data
is it possible that usb cant provide the sufficient rate to send/recieve data?

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

notvery likely. your problem lies probably more in the  handling of the data.

USB depending on the version 2 or 3 is very fast.

please send the vi you tried to use,and a description of what is sending.

greetings from the Netherlands
0 Kudos
Message 7 of 10
(4,646 Views)

Hi Ben,

 

Im sorry that Im not here to give solution, but to ask you another question. How do I port my ARM embed LPC1768 in Labview? I cant find any working solution for this porting guide. There is no connection in NI-MAX for my embed so I cant get its serial port name in the front panel.

I refer to this link https://developer.mbed.org/cookbook/Interfacing-with-LabVIEW but I get stucked at the first step.

 

Thank you

0 Kudos
Message 8 of 10
(4,344 Views)

hi there
its so simple,after you connect your arm to your pc with usb,then just use the block "VISA Serial"
for more help,i attach my design,hope to find it usefull 🙂

0 Kudos
Message 9 of 10
(4,325 Views)

@benyamin wrote:

i use usb to send data
is it possible that usb cant provide the sufficient rate to send/recieve data?


As crossrulz mentioned earlier you have an issue where you are A) Missusing a Chart B)reconverting the first 4 characters received only C)failing to convert all data recieved and likely converting those characers to the wrong representation.  And, your BD is something of a mess (OK "Unmake Space" help clean up the BD a lot! and you don't have that available in 2014- its a 2015 and later feature)

 

To get you going in a "righter" direction I made some mods and attached a code capture in 2014.  THERE ARE almost certainly still problems!  When you tell us what the format on the received data is (not HOW you transfer it but, what the strings represent such as: ASCII encoded numeric characters or, 8 bit ADC Counts to string or, other.) we can help iron out those conversions as needed

 

ben_BD JJBMOD.png


"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 10
(4,322 Views)