LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to compare and reduce from 1000 X 512 arrays to smallnumber arrays( VI is Attached)

Hi there,
 
Here i am sending VI containing the 1000 X 512 data and it's Image. ( 1000 Lines and 512 elements)
 
Information:This is Plastic Image taken by (OCT-Laser System) will be use for thickness measurement. This OCT system takes 1000 Lines per Second,  AS you can see image of plastic at Input side. As out of this image we want to  measure thickness between two layer of plastic. for that we have decide to take two highest vale of each line and average it will 1000 lines and show as output graph.
 
Problem: 1000 lines per second become huge data to process and give result at time on screen. At a time means User moving prob of OCT over the Plastic surface and want to see its thickness on the screen. In this 1000 lines  most of lines are repeating, it may be next line or randomly but surely repeating, so i want first stage which reduce this line to small number so remaining process take less time and give result at a time.
 
NOte. Out put shown in this VI as average A scan is not a perfect one.
 
Thanx in Advance,
dipen
0 Kudos
Message 1 of 17
(3,526 Views)
Sorry the VI Is not in last mail but in this mail, --ZIp format
0 Kudos
Message 2 of 17
(3,523 Views)
Hi dipen,

cleaned up your vi a little bit...

You should definetily use less memory when processing those data (1000*512*SGL=2MB) as you create a lot of copies. You should also learn to use auto-indexing features of LV. I removed some unneeded structures (use initializing of shift register instead of case structure, use math on arrays instead of stacked for loops, etc.) You should also use style guide when publishing vis 🙂 And you should include subvis when you want other to run your program! (Save with options -> development distribution).
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 17
(3,509 Views)

HI GerdW,

Sorry for inconvenience i made for you, I am very new in Labview field, i have to learn lost of thing, and this NI forum is really helping  a lot to learn new things, Thank you very much for that.

Here i am sending Main VI with Sub VI, I tried to save it with all sub vi, If it is not working then please tell me how to save with subvi option. In this Main VI the SUbvi lable with "thL" are taken from the private company so it is password protected by the company so .we dont need to edit in them.Rest of programme me and my colleague try to build, but it is not best way.

Problem with this is when we running our OCT system with this Main VI its slowdown scanning speed and it is not giving proper result, can you please help me to find solution of it. we have use lost of loops and sub loops, is there any other alternative?

Thank you very much for your help and offcourse to NI Forum,

dipen

 

0 Kudos
Message 4 of 17
(3,496 Views)
Hi dipen,

still missing (even more) subvis!

As I wrote in my last message: "save with options" -> "development distribution"  to make a llb from your main & subvis!

What's your screen size? Your vis are sooo big...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 17
(3,494 Views)

Hi once again,

Finally i got save with option, i was looking in front pannel,

Hope this will work.

Thanx again,

dipen

0 Kudos
Message 6 of 17
(3,486 Views)
Hi dipen,

made some cleanups and left some comments (here & there). It's not much faster now, but you do calculations on a big array of data...

Try to code as clean as possible!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 17
(3,472 Views)
Hi dipen,

more simplifications, more comments on some of your subvis!
You do lots of unneccessary calculations, slowing down your program...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 17
(3,461 Views)

HI GerdW,

Thanx a lot for your Genius work...i have spend more then 2 month to develop this programm but after that i found it two slow.. and you did magic and add new life in it...now i will try it on original Instrument to see result..I will inform you about result..

Thanx a lot for your help and also for highlighting my faults

dipen

 

0 Kudos
Message 9 of 17
(3,449 Views)
Hi,
 
Just for your reference, here is a KnowledgeBase article detailing the different options in the "Save with Options" dialog box. Happy coding!
Amanda Howard
Americas Services and Support Recruiting Manager
National Instruments
0 Kudos
Message 10 of 17
(3,443 Views)