LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plotting Iterations of a subVI

Solved!
Go to solution

@altenbach wrote:
  • You can convert your data to a array of points and use "interpolate array" to find the Y for an arbitrary x-value (make sure the x values are non-descending, of course)

Here's how that could look like.

 

altenbach_0-1587331190921.png

 

0 Kudos
Message 11 of 20
(995 Views)

@eallder wrote:

I got the wires to work to the Lumens per Ohm file express, but the file is only writing data for one x and one y value (the final one),


We cannot debug images, especially when express VIs and dynamic data are involved. These are completely opaque! For example we have no idea how the "to dynamic data" and express VIs are configured. Also, it makes no sense to create a 2D array of 1D CDB and DBL arrays.

 

Did you see my solutions above?

0 Kudos
Message 12 of 20
(993 Views)

I think it would be better to have an Excel file of all the slopes and lumen values like I have for the Lumens vs. Ohms....then I can just look up the value I want to get. Also, there is no way that the slope at 6 Lumens is 93.5163 as shown on your VI screenshot. Something isn't right.

0 Kudos
Message 13 of 20
(988 Views)

It's at 4 lumes and I did not check your original formula, just blindly used your math. Here's zoomed into the sensitivity graph:

(Make sure to check all units, etc.)

 

altenbach_0-1587332680307.png

 

0 Kudos
Message 14 of 20
(986 Views)

@eallder wrote:

I think it would be better to have an Excel file of all the slopes and lumen values like I have for the Lumens vs. Ohms....


USe my code and give the file a *.txt extension. Later right-click the file...open with ... excel. Excel will know what to do.

 

(If you want a native excel file output, form the 2D array correctly and make sure the "toDDT" and express VIs are configured correctly. I can't help you with that because I don't even have excel installed)

0 Kudos
Message 15 of 20
(978 Views)

Point taken. Here is the VI....it's essentially exactly the same as the one you showed.

0 Kudos
Message 16 of 20
(977 Views)

You did not attach the subVI. Of course your file only contains resistance and lumens. It does not contain any derivative (I thought that's the "sensitivity")

 

 

0 Kudos
Message 17 of 20
(974 Views)

The only subVI is the one I made out of your code for running the calculation involving the sine function. The Lumens vs Ohms write-to-file (top one) seems to be working fine. It's the other one I'm having issues with. I'm running the output from the derivative calculations (sensitivity) to it.

0 Kudos
Message 18 of 20
(970 Views)

I wasn't aware that the subVI wouldn't automatically attach when I attached the VI.

0 Kudos
Message 19 of 20
(969 Views)

As I said, I cannot test because I don't have excel, but if you look at the 2D array right before you convert to dynamic data, all data is there as two rows. Are you sure you are later opening the correct file as configured in the express VI? Maybe you are opening a similarly named stale file from earlier instead? Also be aware that if the file is already open in excel, LabVIEW will not be able to write to it.

 

Your lumens are between about 0 and 8, so why are you entering 50 to get the interpolated sensitivity value? That's way outside your range. Maybe you copied the B control. Make sure to redefine the default value to something reasonable before saving (right-click...data operations...make current value default... save VI).

 

Of course for the sensitivity, you are only sending a single scalar to the file. Build a 2D array from the same 1D array inputs currently also wired into the "index and bundle cluster array"). Just branch the wire. Alternatively, create a single file with three columns.

0 Kudos
Message 20 of 20
(955 Views)