LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display your 2D array as intensity graph - Real Time

Solved!
Go to solution

Hi Guys,

i'm a beginner on Labview, I don't have enough experience.
I have two different sensors connected to Arduino and I'm collecting data from COM3. However, my intention is to represent each sensor by a column.
then take those data from the array to display it on both 2D array and intensity graph.

till now I have problem with indexing, as I can see my results only on one column.

please check VI attached and any idea will help.


Thanks

0 Kudos
Message 1 of 13
(4,306 Views)

Hi N.,

 

till now I have problem with indexing, as I can see my results only on one column.

No, it's not a problem of "indexing". It's a problem of stgring to number conversion!

You receive text lines containing two data values: you should parse those lines to get these two values and build an array with them. Then you show that array in your intensity graph!

(Using ExpressVIs to convert 1D-array to 2D-array is almost always wrong…)

Recommendation: Use ScanFromString with a format string of "%s %d %s %d" to parse a text line…

 

please check VI attached and any idea will help.

There is no VI. There are only images…

 

i'm a beginner on Labview, I don't have enough experience.

Having no experience is no problem - but you should take the free online resources offered by NI to actually learn LabVIEW!

 

Another recommendation:

Change your arduino sketch to send the data as "1,xx,2,yy" text line. It will be much easier to parse with your PC…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 13
(4,299 Views)

Hi GredW,

 

i'm planning to have some courses with NI soon enough, in the meantime i'm trying to learn myself, and i'll upload the VI. 

 

sorry it's my bad.

 

 

Regards,

Anthony

0 Kudos
Message 3 of 13
(4,294 Views)

Hi N.,

 

please convert your VI to LV2014 (menu -> "save for previous") as I don't have access to the latest LV version right now…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 13
(4,292 Views)
0 Kudos
Message 5 of 13
(4,288 Views)
Solution
Accepted by topic author N.Ghrayeb

Hi N.,

 

much better!

 

Please try to play with my attachment…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 13
(4,247 Views)

Hi GredW,

 

this is much better and easier than i was expecting. 

 

I do like the smiplicity of the VI. 

 

Thanks, 

 

PS: how can I make the intensity graph display the numbers as small squres not rectangular, 

my plan is to make the intensity graph shows the extra pressure sensor as red squre, the medium as orange and the normal as blue. 

 

your solution is awesome.

 

 

cheers,

Anthony 

 

0 Kudos
Message 7 of 13
(4,239 Views)

Hi Anthony,

 

change the scales until you get square pixels…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 13
(4,214 Views)

Hello GerdW,

 

I want to ask you a question please, 

 

can I update this VI to detect the movement as (sensor spartial resolution technique).

 

looking forward your reply. 

 

Thanks,

 

 

Anthony 

 

0 Kudos
Message 9 of 13
(4,110 Views)

Hi Anthony,

 

you can update any VI as you like to!

🙂

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 13
(4,090 Views)