LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Storing streaming data into array and present it over intensity graph

Hi Guys,

 

i'm trying to save my data that i'm reading from arudino board into an array. then i want to display it over intensity graph. 

 

the arduino code is reading 4 different row sensors and gives 5V to the 4 columns respectivly. 

i'm trying to display the data that i'm collecting form the analogue pins into array, but as long as i'm reading data, the array reads only 2 pins out of 4 ? 

 

also i'm trying to specify a range for the incoming data, and make the array to be coloured depending on the numbers that i'm receiving such as (  value <30 Green , 30> value<45 Amber and 45> value <80  Red). 

 

Also can I have any method to find out which row and which colum i'm reading ? i did this on arduino but didn't figured out how to make on Labview. 

 

the fact of the intensity graph is ( i want to make it fixed and represent the Rows vs Columns, but whe i tried i couldn't read all the data as it's streaming and not storing in the array i guess)

 

any ideas will help. 

 

please check the attached code of arduino and the VI. 

 

 

 

 

Thanks

0 Kudos
Message 1 of 4
(2,940 Views)

Hello,

 

I’m afraid that I can’t help you very much with the Arduino code, but I can help you with the LabVIEW.

 

One of the main problems here is that you can’t update a graph like this. Please see here for the difference between graphs and charts in LabVIEW:

http://digital.ni.com/public.nsf/allkb/95FEE9F5B252507E862562BA00007657

If you want to have a ‘live’ chart, which updates as new data is acquired, you need to use an intensity chart.

If you want to acquire all your data and then display it, you need to use an intensity chart.

 

There is a way around this though, if you want to use a graph instead of a chart (for example for plotting x-y data):

http://digital.ni.com/public.nsf/allkb/18B56D8556D44BF18625753D006EFF7C

 

This document here describes how to use colour mapping with intensity charts and graphs:

http://zone.ni.com/reference/en-XX/help/371361J-01/lvconcepts/types_of_graphs_and_charts/#Using_Colo...

 

I think if you implement these changes I think this will solve your problems.

 

Best wishes,

 

Adam.

0 Kudos
Message 2 of 4
(2,871 Views)

hello Adam, 

 

thanks for your reply, 

 

i've been through all those details before and i tried many of those examples. Please check the new question from me (

Initialize and Index real time data into 2D array

 

i have problem with indexing. for instant my VI is indecating my 3rd row and display it on the 2nd intensity graph, but i'm trying to index all my data at the same time, and i'm having a problem with indexing more than one column or row. 

 

the whole idea is indexing all my data that come from VISA and display it over the graph to detect the resolution as (spatial resolution). 

 

 

Thanks again 

 

 

0 Kudos
Message 3 of 4
(2,868 Views)

Hi N.,

 

please keep discussions in one place!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 4
(2,865 Views)