03-02-2011 09:52 AM
Hi AJL,
Now you've got me confused. When you call a VI from DIAdem, you use the "LVRuntime" object in a VBScript to invoke the VI, set its inputs, tell it to run visibly or invisibly, then read off the resulting outputs. When you call DIAdem from LabVIEW you invoke a connection to one or both of the DIAdem ActiveX servers "ToCommand" and "ToDataSheet", then you call methods with invoke nodes and read and write properties with property nodes. The LabVIEW Connectivity VIs hide some of this detail from you, but that's what's happening underneath.
The point I'm trying to make is that these are two very different scenarios. How can you mean that you've tried the same code both ways? Why would you call a VI from DIAdem that controls DIAdem? How can you control DIAdem with a VI that just runs a calculation?
Brad Turpin
DIAdem Product Support Engineer
National Instruments
03-02-2011 10:16 AM
Sorry for the confusion. I use DIAdem to call LabVIEW (using ActiveX as you discribed) that steps though a series of VI's that retrieve, process, etc. data then using connectivity toolkit I pass all the data LabVIEW gathered and write it to DIAdem for further analysis and reporting. I did it this way because the LabVIEW part for retrieving data is used for other functions and if modofications are needed I don't have to modify DIAdem scripts as well as the LV code. When I said if I run the LV code to populate DIAdem it works fine that was just during troubleshooting to see where the error is generated. Doing this I see the error is generated in the LV DD connectivity toolkit VI that uses the TOcommand and TOdatasheet references you mentioned. What is happening is in that VI, open DIAdem interface I think, there is a loop that runs to see when the interface lock is released. If not the 8088 error message is generated. I see I have valid TOcommand and To datasheet references but the interface lock boolean never changes state.
Hope I cleared up some confusion and not added more.
Thanks,
AJL
03-03-2011 02:27 PM
Hi AJL,
Has this ever worked? I would be surprised if DIAdem could call a VI to control itself. It should work to push data back to DIAdem with the ToDataSheet server, but I would not expect that you could connect to the ToCommand server while the VBScript was still running in that DIAdem instance.
I was NOT suggesting that DIAdem should call LabVIEW VIs using ActiveX. That was the case many years ago, but the built-in "LVRuntime" object in DIAdem VBScript can call a VI without using VI Server and is therefore much faster. For large data sets I still have the VI create a temporary TDMS file and pass the file path to an output terminal for DIAdem to read.
Brad Turpin
DIAdem Product Support Engineer
National Instruments