LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error when passing automation refnum to teststand variable

Hi All

 

I am trying to pass an automation refnum to teststand. However when i run the sequence i get the following error in the teststand variable watch i setup after the vi has run.

 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

The Automation open is calling an activeX which is configured to use DCOM for remote operation.

I pass the refnum as an indicator from the vi and then use a function to set the local variable in teststand.

 

I have also tried using the Teststand set property.vi but this will not accept the refnum as an input value even though i set the type to 'object'.

 

Thanks in advance for any help with this.

 

 

0 Kudos
Message 1 of 10
(4,123 Views)

Hello Daz37,

 

Reading through the error message, it appears that there are some access rights that you do not have as a user.  Although I have not seen the remainder of your sequence, it appears that the problem is not with how you are passing the reference to a variable, but with the connection the reference is trying to make to DCOM. 

 

Please reply to the following questions:

 

Which version of TestStand are you using?

Have you been able to use ActiveX controls in the past without similar problems?

Which Operating System are you using?

What are you trying to control with ActiveX?

 

Have checked if you have access rights under the Windows environment to access DCOM?  You can check for DCOM servics by going 'Start'->'Run' and typing "dcomcnfg", and clicking OK. Ensure that the correct user names have access to DCOM.

 

Regards,

 

George T.
Senior Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 2 of 10
(4,098 Views)

Hi George,

 

Im using teststand 4.1, Labview 8.6.

windows XP

The activeX runs on a Spectrum Analyser.

DCOM is configured correctly as far as i can tell, the instrument provides a setup utility for DCOM and it passes its self test. Also i can run the vi only and this works.

I have configured both the local and remote system to use the same user name. and have set there access rights in DCOM.

 

There is some history about this issue in another thread that i posted to: Re: Run remote application with ActiveX

 

I have tried the same but with the activeX on a local machine using COM and i do not get the error message.

 

 

 

0 Kudos
Message 3 of 10
(4,086 Views)

Hello Daz37,

 

Thank you for the reply with the information.  It looks like you have taken the next step I was going to suggest, which was to check the settings on the remote system.  This Knowledgebase Arcticle covers the correct settings for controlling a system remotely through DCOM.  Please run through it so that we have a common point of reference material.

 

The next thing to check is:

 

whether there is a firewall in place on either side of the connection that could be causing an issue.

whether the ActiveX resource is already reserved by another process.

whether the error message you are receiving is being generated by TestStand or LabVIEW.  Please post a screenshot.

 

Regards,

 

George T.
Senior Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 4 of 10
(4,080 Views)

Hi George,

 

I have configured DCOM as per the Article, and disabled all firewalls but i still get the error. Attached is a set of screen shots that's shows the labview function does not error but in teststand it does.

I can also see from the Task Manager on the remote instrument that the function opens an instance of the application therefore suggesting that the DCOM is configured correctly.

 

Regards

 

Daz

Message Edited by Daz37 on 10-19-2009 03:51 AM
0 Kudos
Message 5 of 10
(4,063 Views)

Hello Daz,

 

Looking at the document has helped.  The screenshots of the block diagram were useful.  In the past, there have been reports of it being necessary to set a specific property note of the Automation Open, so that it is visible to remote machines. 

 

I have pasted this picture below as a reference.  In your screenshot of the Block Diagram, please just add the property node and the machine name, if required.  The While Loop is not necessary, and only serves as an example.

 

Please let me know if the Property Node has helped.

 

DCOMKB.PNG

 

Regards,

George T.
Senior Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 6 of 10
(4,054 Views)

Hi George,

 

I tried as you suggested but this does not fix the issue.

I have also tried casting the refnum to a numeric, this has worked with limited success. I can get the reference and in the next vi cast it back to an Automation refnum, once i try to go to a third function however the reference currently stops working. attached is a screen capture showing the problem.

0 Kudos
Message 7 of 10
(4,040 Views)

Hello Daz,

 

I do not believe you are required to type cast the refnum into a numeric to be able to pass a reference between VIs in TestStand.  In LabVIEW, you can pass a reference by linking it to an output terminal.  In TestStand, then create a Local Variable of type Number (U32).  Add the VI as a step in your sequence.  In  the 'Module', select your Parameter Name to be the reference and the Value to be Locals.(your variable). 

 

You can then pass the reference through the TestStand Local Variable.

 

 

Regards,

George T.
Senior Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 8 of 10
(3,971 Views)

Hi George,

 

This takes us back to the start of the thread, i was passing the refnum to a variable in Teststand and this is when i was getting the error message. I do not get the error when casting it however.

I am therefore changing my functions to using the cast method and replacing each property node and invoke method which then works.

0 Kudos
Message 9 of 10
(3,957 Views)

Hi George,

 

I am having the exact same problem. I have changed all my LabView functions to use type cast and I am getting error when test stand execute the third function. How did you fix this?

 

Regards,

 

Oshana

 

0 Kudos
Message 10 of 10
(3,439 Views)