10-14-2009 06:53 AM
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.
10-16-2009 03:59 AM
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,
10-16-2009 06:46 AM
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.
10-16-2009 09:57 AM
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,
10-19-2009 03:50 AM - edited 10-19-2009 03:51 AM
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
10-19-2009 09:42 AM
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.
Regards,
10-20-2009 06:02 AM
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.
10-27-2009 11:14 AM
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,
10-28-2009 09:45 AM
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.
02-26-2013 02:31 PM
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