Jump to content


Photo
- - - - -

Problem with testing double arrays


  • Please log in to reply
3 replies to this topic

#1 glennib

glennib
  • Members
  • 2 posts

Posted 16 April 2015 - 09:22 AM

Hi,

 

I have an example VI I would like to test with the VI Tester. It is basically useless, but it provides an example of how one of my other VIs work, and I would like to test it.

 

PaWucbs.png

 

Obviously, this will result in double precision error, since it's difficult to get a constant to represent for example 10/3 or 10/6. I know adding a value to the "delta" input in the test VI works when you're comparing one double value to another, but what if I want to test a whole array like this? I tried to add an array of double precision "1.0" to the delta input, as well as a single constant of it. Both produced error 91, "Variant To Data in TestCase.lvclass:passIfEqual.vi->DivideArray_TestCase.lvclass:test_B_OK.vi".

 

Does anybody have a solution for this?

 

I already read this post, but couldn't find it useful: http://forums.jki.ne...rrays/?hl=array

 

Thank you

Attached Files


  • 0

#2 Ashish

Ashish
  • JKI Team
  • 252 posts
  • Gender:Male

Posted 17 April 2015 - 09:17 AM

Attached is the screenshot showing updated VI that should work.

 

Let me know how it goes.

Attached Thumbnails

  • 2015-04-17_1443.png

  • 0
Ashish Uttarwar
Product Support Engineer and Certified LabVIEW Developer, JKI

#3 glennib

glennib
  • Members
  • 2 posts

Posted 22 April 2015 - 04:47 PM

Hi Ashish,

 

I tried your solution, but found that if there was an error which was not at the last element (e.g. switch the 5 with a 3 in the second element), the error wouldn't show in the VI Tester. However, if you replace the tunnels with shift registers, the errors follow through, and I can use it. Thank you!


  • 0

#4 Ashish

Ashish
  • JKI Team
  • 252 posts
  • Gender:Male

Posted 22 April 2015 - 06:16 PM

Good catch! I did not pay attention to the error and certainly recommend the way you did.

 

Thanks for the updates.


  • 0
Ashish Uttarwar
Product Support Engineer and Certified LabVIEW Developer, JKI