09-09-2007 08:20 AM
I seem to be having a unique problem with Network Published, Custom Data, Shared Variables (SV). I say it is unique because I am not finding any information and most issue seem to be associated with older versions of LabVIEW. I am using LabVIEW 8.2.1, using network published but for now both applications are running on the same PC (no network cable). I am getting random, “Error 91 occurred at Variant to Data”. Stop the program and restart and everything is OK sometime.
I have run the program with the Variable Manager open and it is reporting no errors. I have tired Refresh, Remove All Processed, and rebooting my PC. This seems to fix the problem for awhile then it comes back. I am not using data binding to controls but polling the variables and read / writing them through out the program. The custom data type includes clusters with a few elements to 20 elements of mixed data types. We have changed the custom data type several times during the program development.
Even more disturbing I have witnessed using debug mode while updating one SV seeing it changing the value of a different SV. Are my SVs corrupt, data types too big for custom, polling too often, misusing SVs? Should I rebuild them, make them smaller, use front panel binding? I am looking for some suggestions otherwise going to ripe them out of the code and starting over ;(
Disappointed but have hope it can be resolved,
Thanks!
Matt
09-10-2007 07:41 AM
All,
I am going to try a new project and rebuild the custum data type Shared Variables. Any ideas on what is causing the issue would be appreciated! I am using LV 8.2.1.
Matt
09-10-2007 11:33 AM
09-10-2007 11:52 AM
Trey,
The variant error is caused by the shared variable engine trying to decode the custom data type (AKA Cluster). The error originates from the SV call to read variable (see images attached in first post). Yes, works sometimes and other times it bombs out with an error. I will look over the attached link to network document.
Thanks!
Matt
09-10-2007 06:35 PM
09-10-2007 06:38 PM
Trey,
Thanks for the information!
Matt
10-03-2007 08:21 AM
10-03-2007 10:28 AM
You need to initialize all variable (write a vale to all of them) before using them. That was tech support's answer tot he issue. In our application we ended up removing the Shared Variables.
Matt
10-04-2007 02:01 AM
In my previous example I used an array of strings to the variant, which causes error 1 or or 91 when reading the variable, because property setting "array of strings" was not there in Labview 8.2.(I can't remember).
Variants probably cannot handle "array of string" very well ?
Setting the shared variable property to "array of strings" and not using the " to and from variant" option, solved my problem.
Frank
10-04-2007 03:25 PM - edited 10-04-2007 03:25 PM
@Engelenfve wrote:
Hi,I am have the same problem, using Labview 8.50 on a Win2000pro local PC,testing local. (seen attachment).Errors in this examples always returns an error 1 or 91 ,depending on wether you connect the error input or not.In my application, which is more complicated, the error does not return when running as sub-vi, but does return an error running the sub-vi in a main vi.At first I tried several delay's on several locations but this did not help.Strange story.Do we have to do some special property-setting for the vi?kind regards,Frank
Message Edited by Trey B on 10-04-2007 03:26 PM