From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

plotting values and getting a "minimum" error message

    Below is the call I make within my C# application plotting the X and Y axis to a scatter graph.

// Push the two dimensional array which contains all the Y Data for each trace
gph.PlotXYAppendMultiple( oPlot.Data, dblData );

dblData value
{Dimensions:[1, 3]}
    [0, 0]: 144.456
    [0, 1]: 144.456
    [0, 2]: 144.45600000000002

oPlot.Data
{Dimensions:[3]}
    [0]: 1.2
    [1]: 2.3
    [2]: 3.4

When this call is made I receive an "Argument Exception" with the message "minimum"  As per the Argument Exception

the gph.Plots[0].ProcessSpecialValues does = true and the x and y data does not contain special values at the same index. 


Now,

If I were to change the dblData[ 0 , 2 ] = 144.45600000000005    I would not get the ArgumentException. 

Does this have something to do with the size of the double dabbling in the territory of how big a double can be?

Thanks for any advice,

matt
The Only Easy Day Was Yesterday.
0 Kudos
Message 1 of 4
(3,100 Views)
Hi Toedwy,

Can you post a small example that demonstrates the behavior?

Thanks

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 2 of 4
(3,092 Views)
Hi Jonathan,

My initial post contains the information that demonstrates the behavior.

This line of code....                   gph.PlotXYAppendMultiple( oPlot.Data, dblData );  is basically appending the passed arguments data to a scatter graph.  The values of these passed arguments (oPlot.Data and dblData) were defined above.  Take a look at the dblData arguments last item (this happens to be the Y value).  It contains a 14 significant digit value. [0, 2]: 144.45600000000002.  Oddly, this throws an ArgumentException.  However, when I changed this item's value to dblData[ 0 , 2 ] = 144.45600000000005. I would NOTget the Measurement Studio Argument Exception error "mininum".

What is odd about the error is the terse message!!  And, if I were to change the value's last significant digit from 2 to 5 it appears to work without error.

Let me know if this explaination does not help out.

Thanks

Matt
The Only Easy Day Was Yesterday.
0 Kudos
Message 3 of 4
(3,087 Views)
Hi Toedwy,

I have tried reproducing the issue but have been unable to so far. Can you please post a Visual Studio solution and project that I can run that demonstrates the behavior. That would honestly be the fastest and quickest way for us to see the problem.

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 4 of 4
(3,079 Views)