07-08-2011 01:50 PM
Trying not to pull my hair out.
New user to TestStand. We currently have a suite of .exe applications built using LabVIEW that allows the user to manually test UUTs. Trying to get a proof of concept going to show signifiant improvements if we have TestStand take over what the user was doing.
Rebuilt the executeables with ActiveX enabled and can get almost everything to work the way I want to, except for whenever a cluster type is involved. Neither reading nor writing is working. I've created a custom data type to match the cluster type, but I always get a -17308 error complaining that the Variant data type doesn't match the variable type it was expecting. I can get simple data types (including arrays) to work, but for clusters....nothing.
Is there something I'm doing wrong? Is this possible?
Dan
Solved! Go to Solution.
07-08-2011 02:58 PM
The more common use of calling LabVIEW code with TestStand is to directly call the code using the LabVIEW adapter. This allows you to easily pass parameters in and out of code.
To pass a cluster in the way you are trying, you may need to create a simple VI that allows you to pass data from TestStand to LabVIEW, then use VI Server in that VI to set and read the clusters, then pass it back to TestStand.
If possible, though, I'd strongly recommend using the LabVIEW adapter and directly call VIs rather than executables and try to interact with them in VI Server.
07-08-2011 03:07 PM
Not possible in this scenario. We need to retain the ability for the user to take over manually should their testing require it. We also must retain its current build state (executeable). I understand that it is more common to interface directly with VIs through the adapter, but that's not available to us. I take it there is no way to access clusters or cluster elements using the method I described?
Dan
07-08-2011 06:24 PM
There is if you create a VI for that purpose. But not directly using ActiveX in TestStand.
07-13-2011 03:33 PM
I was able to test that this method worked.
To summarize to pass a cluster:
Create a VI that has a cluster as either the input or output cluster you wish to get out of the EXE.
Inside of that VI, use ActiveX to get the Virtual Instrument you want (similar to what you are doing in TestStand). Call Set Control Value (or Get Control Value) on the control you wish to get or set. You can wire up the Cluster directly to Set Control Value (or Get Control Value) in LabVIEW since it stores clusters the same way.
From TestStand, call this VI. Pass in (or out) the parameter you wish to get or set.
I have attached an example that sets a control in the same VI, but you would do something different where you would choose your executables ActiveX server rather than the LabVIEW ActiveX server.
07-14-2011 07:07 AM
Sure. That makes sense. Unfortunately, if I'm not mistaken, in order to run the LabVIEW adapter you need to have LabVIEW installed on the machine. Is that correct? The reason we build executeables is because we do not have the LV environment on each machine that we run these applications on.
The solution that worked for me was to modify the LabVIEW application to add atomic controls that correspond to each field of each cluster. Then I added a separate loop that periodically polled the controls for changes and then updated the actual values of the desired clusters accordingly. A bit clunkly, but it worked for the purposes of a proof-of-concept.
Dan
07-14-2011 07:09 AM
Set the LabVIEW Adapter to use the RTE. You would need to install the LabVIEW RTE on to your system.
07-14-2011 07:35 AM
As I said: New user to TestStand.
Thanks! That opens up a whole new world of possibilities!