10-13-2019 06:07 AM
Hi guys, I really need some help from you guys.
I'm recieving some data from DAQ devices and after processing these data from ADC to what i want to express like distance,
I plot data to 3D graph using 3D Scatter plot helper.
Before Applying 3D plot helper, data aquisition and data processing was not slow (almost sensable in real time),
but atfer that, 3D plot Graph's speed remarkably slows down.
I think that data flow which go into 3D plot helper has improper code.
How can i get help and what can i change?
please help me!!
- Seongyeon Kim
10-13-2019 12:56 PM
10-13-2019 01:48 PM
As most of us will tell you, we cannot debug pictures. While you keep the upper array at fixed size (I would recommend to rotate+replace instead of delete+insert), its not clear what's happening with the 3D graph. For example, what's the size of the array constant wired to the z input? Since z seems to be constant, why do you even need a 3D plot? Maybe a simple xy graph would suffice? What is the scatter graph supposed to show?
There are also blatant race conditions due to local variable abuse. For example, your "senor 6 distance" local variable will most likely get read way before the indicator has been updated with new data. Just use a wire!
What currently determines the loop rate and how do you measure it? What is you definition of "real time", "slow", and "almost"? What' in the other loops? What else is there? Please let us see the entire VI, not a truncated picture!
10-14-2019 01:42 AM
Thanks GerdW.
I have heard about producer-consumer structures.
I would learn about it.
thank you for your nice information.
- Seongyeon Kim
10-14-2019 02:23 AM
Hi. altenbach.
thank you for your answer.
Actually i think that i don't understand array data structures yet.
first of all, I used fixed array size for removing noises as Moving Average Filter
Second, I need XY plot for detecting hand's position so that things happened.
I wanted plotting where is hand or object according to data.
Now is, I use two sensor and calculating XY position
later, I will use more than 3 sensors so I will express target's XYZ position graphically.
So I use 3D scatter plot, Would this be wrong choices?
Third, An ambiguous words were my mistakes, such too rough
you enlighten me in some issues like using local variables and arrays
thanks you for active answers
10-14-2019 02:25 AM
Here my VI.
i use some subvis , so would i upload these?
i use CAN communicating addons, so I'm not sure you can open VI without any problems.
thank you
- Seongyeon Kim
10-14-2019 10:57 AM
Your scatter plot is not the problem. If I just use simulated data, it supports loop rates of about 10 microseconds. Everything else is slower.