Passing LV Class to TestStand as a parameter
Started by
Mirash
, Dec 14 2011 10:59 AM
teststand lvclass
4 replies to this topic
#1
Posted 14 December 2011 - 10:59 AM
Hi all,
I came across developing some custom step types in TestStand with LabVIEW code modules. My LabVIEW code module is architectured with LVOOP concept. But now I wonder how can I pass an LV Class object to TestStand for further use in other step types.
Currently I managed to store it in a LV Global and use it later. But are there any other way?
Regards,
Mirash
I came across developing some custom step types in TestStand with LabVIEW code modules. My LabVIEW code module is architectured with LVOOP concept. But now I wonder how can I pass an LV Class object to TestStand for further use in other step types.
Currently I managed to store it in a LV Global and use it later. But are there any other way?
Regards,
Mirash
#2
Posted 14 December 2011 - 03:13 PM
Hi there Mirash
Firstly what version of TestStand are you working with ?
From what I remember ,there are a few issues with dynamic dispatch not working as it should from TestStand. You have to provide a wrapper around the vi's and let LabVIEW dynamically dispatch. If you try to do this from TestStand you end up always calling the parent method.
You also need to specifiy the LabVIEW class as part of the step settings else come deployment time the TestStand deployment utility see multiple vi's with the same name and throws an error. (It doesn't see the .lvclass part of the name)
Good luck
Chris
Firstly what version of TestStand are you working with ?
From what I remember ,there are a few issues with dynamic dispatch not working as it should from TestStand. You have to provide a wrapper around the vi's and let LabVIEW dynamically dispatch. If you try to do this from TestStand you end up always calling the parent method.
You also need to specifiy the LabVIEW class as part of the step settings else come deployment time the TestStand deployment utility see multiple vi's with the same name and throws an error. (It doesn't see the .lvclass part of the name)
Good luck
Chris
#3
Posted 15 December 2011 - 07:15 AM
Hi Chris,
Thank for the reply.
I am using TestStand 4.2 and LabVIEW 2009 SP1.
Obviously I wanted to use the dynamic dispatch functionality. but I am kind stuck in the initial stage itself
.
When I inserted a LabVIEW Action step type with a code module having a Class as output, I am getting the properties as shown below.
Now I am not sure how do I pass this Parent Class Out to a different code module. As this type is shown as Unknown, I am not able to pass this to a variable also.
parden me if this issue is very silly, but some how I am stuck here.
Looking forward to here form you,
Mirash
Thank for the reply.
I am using TestStand 4.2 and LabVIEW 2009 SP1.
Obviously I wanted to use the dynamic dispatch functionality. but I am kind stuck in the initial stage itself
When I inserted a LabVIEW Action step type with a code module having a Class as output, I am getting the properties as shown below.
Now I am not sure how do I pass this Parent Class Out to a different code module. As this type is shown as Unknown, I am not able to pass this to a variable also.
parden me if this issue is very silly, but some how I am stuck here.
Looking forward to here form you,
Mirash
#4
Posted 16 December 2011 - 07:33 PM
OK,
you need to pass the class data out of the LabVIEW action step to a TestStand variable (of data type Object Reference) and then pass it as an input param to the next LabVIEW step that needs the class data however I am not sure if that is available to you using TestStand 4.2, not sure if TestStand 4.2 allows LabVIEW classes to be passed as an object ref.
Chris
you need to pass the class data out of the LabVIEW action step to a TestStand variable (of data type Object Reference) and then pass it as an input param to the next LabVIEW step that needs the class data however I am not sure if that is available to you using TestStand 4.2, not sure if TestStand 4.2 allows LabVIEW classes to be passed as an object ref.
Chris
#5
Posted 19 December 2011 - 03:46 PM
You're absolutely right - TestStand 4.2 doesn't support the LVOOP object, so the best bet to to flatten it to a string and pass it around in TestStand as a binary string <- note the emphasis, as passing it around as an ASCII string will corrupt it.you need to pass the class data out of the LabVIEW action step to a TestStand variable (of data type Object Reference) and then pass it as an input param to the next LabVIEW step that needs the class data however I am not sure if that is available to you using TestStand 4.2, not sure if TestStand 4.2 allows LabVIEW classes to be passed as an object ref.
TestStand 2010 supports the LVOOP object, but does not support dynamic dispatch.












