NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX -17502 System Level Exception

Solved!
Go to solution

I've compilied a VI in LV2009 into an ActiveX server. I've tested the ActiveX functionality with a calling VI to read a control value and it works fine. It opens the executable using the "Automation Open Function"; uses the method "Get VI Reference" to get the reference; then uses that reference to get the control value.

 

If I try to create a VI reference from the Teststand 4.2 ActiveX COM adapter, the sequence throws a "17502 System Level Exception" error. The executable does open, and does work once it's opened if I run it manually. The 'ERROR OUT' cluster on the front panel does not indicate any error.

 

I've attached screenshots of the LV block diagram and the TestStand step in case I'm missing something. The path to the VI was copied form the LV string path so it's obviously correct.

 

I'm baffled by this one.

 

 

 

 

Download All
0 Kudos
Message 1 of 5
(4,711 Views)

@Cabman wrote:
[..] The path to the VI was copied form the LV string path so it's obviously correct.

 

 


No, it is not correct as it does not address escape characters.

 

Nevertheless, error -17502 indicates another issue. I guess that your VI isnt executing at all.

So please test what happens if you pass an invalid path in your LV test environment.

Also update the exe with debug options so you can make sure that TS calls the exe correctly as you currently seem to believe.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 5
(4,684 Views)
Solution
Accepted by Cabman

Don't do Create From File, that's not what that setting is for. That setting is for deserializing an object saved to disk. You should be using the default setting of "Create New" instead. TestStand will find your server using the Windows registry (really the OS is what does that) you do not need to specify a path to your server.

 

Hope this helps,

-Doug

Message 3 of 5
(4,671 Views)

@dug9000 wrote:

Don't do Create From File, that's not what that setting is for. That setting is for deserializing an object saved to disk. You should be using the default setting of "Create New" instead. TestStand will find your server using the Windows registry (really the OS is what does that) you do not need to specify a path to your server.

 

Hope this helps,

-Doug


 

This is what I did before with LabVIEW 7.1, but with LabVIEW 2009 it was throwing this error:

 

"An exception occurred calling 'GetVIReference' in '_Application' of 'MightexCCDSnapControl 9.0.1f3 Type Library'
LabVIEW: File not found. The file might have been moved or deleted, or the file path might be incorrectly formatted for the operating system. For example, use \ as path separators on Windows, : on Mac OS, and / on Linux. Verify that the path is correct using the command prompt or file explorer.
Source: LabVIEW"

 

I had found a Knowledge base article describing this issue occured with LV8.6 and later and was under the impression that it would not longer work for me. But I took the advice from the previous post and added the escape backslash to my path backslashes and it's all working now.

 

Thanks Smiley Happy

0 Kudos
Message 4 of 5
(4,656 Views)

@Cabman wrote:

@dug9000 wrote:

Don't do Create From File, that's not what that setting is for. That setting is for deserializing an object saved to disk. You should be using the default setting of "Create New" instead. TestStand will find your server using the Windows registry (really the OS is what does that) you do not need to specify a path to your server.

 

Hope this helps,

-Doug


 

This is what I did before with LabVIEW 7.1, but with LabVIEW 2009 it was throwing this error:

 

"An exception occurred calling 'GetVIReference' in '_Application' of 'MightexCCDSnapControl 9.0.1f3 Type Library'
LabVIEW: File not found. The file might have been moved or deleted, or the file path might be incorrectly formatted for the operating system. For example, use \ as path separators on Windows, : on Mac OS, and / on Linux. Verify that the path is correct using the command prompt or file explorer.
Source: LabVIEW"

 

I had found a Knowledge base article describing this issue occured with LV8.6 and later and was under the impression that it would not longer work for me. But I took the advice from the previous post and added the escape backslash to my path backslashes and it's all working now.

 

Thanks Smiley Happy


@I think that error was referring to the path specified as a parameter to the GetVIReference method. In newer versions of TestStand you can use the @ symbol to avoid having to escape backslashes in expression string literals. For example:

 

@"c:\mydir\myfile"

 

is equivalent to:

 

"c:\\mydir\\myfile"

 

-Doug

Message 5 of 5
(4,637 Views)