LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Received "the server threw an exception" when trying to use DS_GetDataType

I'm running labview/CVI evaluation version 8.5 and trying to use DS_GetDataType on a datasocket server.  My code works fine when trying to read an array of longs that were sent from the example DS Writer (from LabView version 8.5).
 
But now I'm receiving a variant (which was originally a cluster).  This is being sent by a registered Labview version 7.1.  I can read it in fine using a block diagram created using Labview 8.5 evaluation version (I just wire the variant to the variant displayer thingie).  But when I try and read it in using CVI DS_GetDataType in C++, I get error 0x80010105, or -2147417851, which in winerror.h says "The Server threw an exception".
 
So what do you suppose is causing this?
0 Kudos
Message 1 of 2
(3,245 Views)

Hello,

I'm not sure exactly what is causing this but if the CVI programs are as similar as you say then it seems to be the data we are passing that is causing the problem.  The DS_GetDataType can handle variants (CAVT_VARIANT) but that doesn't necessarily ensure that it will work with the data you are passing.  One thing that the CVI help file does mention is that this function will not work if it reads the data as an array of variants (which it shouldn't if its a single cluster) and we might be running into this restriction.  I have a feeling that since you are receiving a server error not a data type error this is less likely, but still possible.  We may want to try passing a simplified variant (cast an int to variant) to see if we can pass any variant data.  Unfortunately, clusters are not the easiest types to work with outside of LV, so this may take some work to get it properly setup.

John B.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,215 Views)