06-10-2009 12:54 PM
Can anyone help with this? I've already posted it to the OpenG forums and Jim Kring thinks it's probably a LV bug. Can anyone confirm?
The problem occurs when I set the data type to VISA session - LabVIEW crashes just before the read key (variant) vi runs.
I'm using LV 7.1, and I've attached an example to show what I mean.
Any ideas what's going on? And if someone could try it in a later version of LabVIEW that would be really interesting too.
Thanks & regards,
Jon
06-10-2009 02:09 PM
06-11-2009 11:09 AM
Hi Jon,
I've tried out the code also, and I can aggree with GerdW.
Essentially you need to strip out the path again (as shown in Image) as the path is effectively <directory>\Variant config test.llb\Variant config test.vi.
So firstly you strip out the name of the vi, and this leaves you with <directory>\Variant config test.llb so it's necessary to strip out the Variant config test.llb part of the path also.
Hope this helps,
StevenH
06-11-2009 12:48 PM
Guys - thanks for checking it out and discovering my little mistake.
However, now that I've fixed it, and actually put some data in the text file, you can now actually see the problem I was seeing!
Woudl you mind trying it again? Sorry for the mistake!
Jon.
06-12-2009 05:11 AM
Hi Jon,
So I ran the new code again in LabVIEW 7.1.1, and all worked fine! Couldn't get the VI to crash unfortunately.
Could I suggest that you try debugging theRead Key (Variant) SubVI if that's where it crashes.
Open up the SubVIs front panel by double-clicking on it, go to File»VI Properties, then select Execution from the Category context menu. From here uncheck the Reentrant Execution checkbox, then select OK.
From here go to the Block Diagram and turn on Highlight Execution. This way you will be able to isolate where exactly the problem is occuring.
Please post back and let me know how you get on.
Best Regards,
Steve
06-12-2009 05:56 AM
OK,I feel a bit on an idiot because I got the filename wrong in the VI.
Anyway, I tried it in 8.5 (I only have 7.1 at home) and I can see exactly where the problem is. In 8.5 it gives an error rather than a complete crash.
I've attached a much simplified version. I get Error 116:
"Error 116 occurred at Flattened String To Variant in Variant config test2.vi
Possible reason(s):
LabVIEW: Unflatten or byte stream read operation failed due to corrupt, unexpected, or truncated data.
Any idea what's going on?
Jon.