03-05-2019 08:12 AM
Creating a graph from a 2D array is easy - be it LV or Excel.
Was just wondering if there is any tool that can create the 2D array given the graph … either in LabVIEW native or third party ? Or am i being very ambitious
03-05-2019 08:19 AM
Where are you getting the graph from? Is it in LabVIEW?
Graphs contain the data, so just get the data from the source.
03-05-2019 09:01 AM
@RavensFan wrote:
Where are you getting the graph from? Is it in LabVIEW?
Graphs contain the data, so just get the data from the source.
Actually this is a profiling tool for an analog input to a V-I controller. ( A 0-5V input is converted to 0-3000mA output )
The first basic profile is created by manual entry of values to an array … something like 250 values. And during fine tuning there is a situation where we know how the profile should be like but getting the exact numerics to get that profile is the issue. Takes lots of trial input. The profile has many different slope parts ,,, so the requirement.
03-05-2019 09:38 AM
So you need a tool to edit a graph, and then use the values? Something like a profile editor?
Where does the 2D come from? Sounds like 1D to me...
03-05-2019 09:43 AM
THe curve fitting VIs will return a "best fit" curve along with the polynomial coeef.
Ben
03-05-2019 10:40 AM - edited 03-05-2019 10:42 AM
@MogaRaghu wrote:
Creating a graph from a 2D array is easy - be it LV or Excel.
Was just wondering if there is any tool that can create the 2D array given the graph … either in LabVIEW native or third party ? Or am i being very ambitious
The term "2D array" is way too generic to suggest anything helpful, because you did not tell us the meaning of the array elements and their arrangement.
Similarly, if you say "graph" we have no idea what that means.
If you could show us the apparently "easy" part of how you "create a graph from a 2D array" (sic), we can probably figure out what you are actually trying to do and help you create code that does the reverse operation. Can you attach that easy VI? Thanks!
03-05-2019 10:57 PM - edited 03-05-2019 10:59 PM
Since it appears that the graph can mean so many things let me clarify:
1. The Y Axis varies from 0 to Ymax. Typical value for Ymax is about 3.0
2. The X Axis is in the pattern X0 and dX. Equally spaced time intervals.
See the attached sample. This is the base. Now depending on need the user needs to have a flexibility to "pull " the curve at the points shown as an example. It is not ONLY these points but shown to show the idea.
So starting with this X-Y plot the user must be able to modify the profile and that value should reflect in the Array.
03-05-2019 11:00 PM
wiebe@CARYA wrote:
So you need a tool to edit a graph, and then use the values? Something like a profile editor?
Where does the 2D come from? Sounds like 1D to me...
Sorry about that 2D stuff. My mistake.
03-06-2019 01:54 AM
Hi Moga,
Now depending on need the user needs to have a flexibility to "pull " the curve at the points shown as an example. It is not ONLY these points but shown to show the idea. So starting with this X-Y plot the user must be able to modify the profile and that value should reflect in the Array.
So you want to create a profile editor, as written before!
Create a user interface containing a (waveform) graph. Use the cursor(s) in this graph to let the user move points in a plot. Use cursor/mouse events to handle user input and to change the underlying plot/array data as needed…
03-06-2019 03:32 AM
Hi GerdW,
Thanks. I think this is almost what I wanted,
Based on your hint I have created a VI and reached up to the point of getting the cursor location. But got stuck here as I am not sure how to get the new value into the original array. I have no Index to search and insert the new value … or maybe I am missing something here.
Attaching the VI that I managed to do so far ( which is not much anyway !) Will need some tips to close out.