LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem when starting DIAdem with LV Connectivity VIs

When I start DIAdem with parameters, such as /CScriptstart, everything works. I then close DIAdem from the script with Application.Exit or ApplicationExit. When I after that call DIAdem Open Reference from LV, the command line parameters of the last start of DIAdem are used. This leads to DIAdem e.g. starting a script, and LV (after a short time) giving a message: Fehler 8808 No DIAdem Interface Connection
Only when I start DIAdem without parameters and close it afterwards can I Open a reference with LV without DIAdem doing stuff. DIAdem Version is Base 9.01, LV 7.1 Base, Conn. VIs 3.0
Is this a general problem with the VIs or do I have to wire an additional constant or sth.?
Thanks for your attention
0 Kudos
Message 1 of 26
(3,533 Views)
Dear Themad,

could you post your script and your VI. I want to reproduce the error, because I do not find something about this Error description.

Thanks in advanced,

best regards.

SebastianN
0 Kudos
Message 2 of 26
(3,524 Views)
Thx for your help. I have contacted the support and it was sth about LV using the before reference and not creating a new one. Stefanie Hofmann sent me a modified DIAdem Open Reference.vi in which the registry key is cleared. It is included with this post. So problem is solved.
0 Kudos
Message 3 of 26
(3,524 Views)
I have included here a file for you to test the issue: First you will have to create a lnk in your Win Explorer:
"C:\Path to DIAdem\DIADEM.exe" "/CMsgBoxDisp('HelloWorld')"
Include all " and '

Open this link, then close DIAdem and open DIAdemRef.vi. You will notice that DIAdem pops up the dialog although it shouldnt.
0 Kudos
Message 4 of 26
(3,524 Views)
Hi,
I have a similar problem: I start from a DIAdem-Script a VI (with ExtProgram), which uses the "DIAdem Open Reference.vi" in order to get some DIAdem-variables. When I start the DIadem-Script manual everything works fine, but when I use a link to start the script automatically (CScriptStart) the VI doesn´t run and an error occurred: "Error 8808 occurred at DIAdem Open Reference"
Thanks
Andreas
0 Kudos
Message 5 of 26
(3,267 Views)

Hi Andreas,

It sounds like your VI is actually running but encountering an error. You could test this by setting a breakpoint in your VI and checking if it runs. If you are able to debug your VI, I would then step through the VI (specifically into the DIAdem Open Reference VI) and attempt to find where the VI starts.

When I drilled into the DIAdem Open Reference VI, I found that error 8808 occurs when the VI is unable to obtain a reference to the open instance of DIAdem. This occurs when LabVIEW attempts to access the bInterfaceLocked property which requests the status of the OLE interfaces from DIAdem. If the bInterfaceLocked property returns the value True (1), the OLE DIAdem interface is locked. It appears that this would cause an error in the LabVIEW VI.

Since you are using this script with the CScriptStart command, I believe you are getting this error because DIAdem has not fully initialized. This would explain why the script works when called directly from DIAdem (after the OLE has been initialized) but not as a "link."

Matt M.
NI

0 Kudos
Message 6 of 26
(3,242 Views)
Hi Matt,
thanks for your help.
I don´t think that DIAdem has not fully initialized, but maybe LV uses a old reference instead of creating a new one, like themad descripes. For better understanding I add some files, which you can put in c:\temp in order to figure out the problem.
I start the small script with the link, the script opens a SUD-Dialog, on which you can start the LabVIEW-VI-EXE per button-click.
My DIAdem Version is Base 9.01, LV 7.1 Base, Conn. VIs 3.0
Andreas
0 Kudos
Message 7 of 26
(3,237 Views)

Hi Andreas,

Thanks for the example. I was able to replicate your problem with it.

I have forwarded this along to my R&D contacts and they are going to take a look at it. I will get back to you when I have more information.

Regards,

Matt M.
NI

0 Kudos
Message 8 of 26
(3,224 Views)

Hi Andreas,

When I looked at your code, I was able to drill down into the VIs and find where the error (8808) was being caught and thrown by LabVIEW. LabVIEW was evaluating whether the bInterfaceLocked property was true of false. If it is locked, then LabVIEW throws the error.

I talked to my R&D contacts and they said that this this property is not locked once DIAdem is loaded; however, it is locked during the initialization of DIAdem. The reason for this lock is that com provides an interface immediately if the interface exists and is available. While the interface exists during the start of DIAdem, it is not available (this is true for some other DIAdem functions and variables as well) and then the error is thrown.

We have filed a CAR for this issue. This means our R&D will consider including a fix in future editions of DIAdem.

Matt M.
NI

0 Kudos
Message 9 of 26
(3,214 Views)
Hi Matt,
I think it must have something to do with the SUD-Dialog, because when I start the LabVIEW-VI-exe from DIAdem-Script, everything works fine. You can see this in the example.
Unfortunately my last test produces once more the error and up to now (and after two computer-restarts) I´m not able to start DIAdem any more: the starting dialoge appears and after a few seconds disappears without starting DIAdem -> great behavior!
Andreas
0 Kudos
Message 10 of 26
(3,208 Views)