11-14-2018 01:24 AM - edited 11-14-2018 01:25 AM
Dear NI TestStand community,
let me ask the following question.
I'd like to implement the following - to have in FileGlobals array of variables, and get values from them based on current TestSocket index.
Everything works fine, expect LabVIEWIOControl types inputs for code modules.
(a) While assigning value to the input, "Device Name" and "Session Number" values are not known -> thus, code module does not receive proper data, and does not work.
(b) When variable is not in the array, then everything is assigned properly.
(c) Also, while assigning "Device Name" and "Session Number" separately, without assigning of "task/channels in" -> then it is assigned properly, but I'm not sure, whether it will work.
My questions are:
1. Is it possible to set LabVIEWIOControl variable from array in a way as in variant (a)?
2. Will variant (c) actually work?
Thanks a lot in advance,
Sincerely, kosist90.
Solved! Go to Solution.
11-14-2018 11:17 AM
What is the datatype of Task in the Array? When I make an array of LabVIWEIOControls it works fine for me.
So basically I have a FileGlobal called Systems and it is simply an array of LabVIEWIOControls.
Then in my LV step I just put FileGlobals.Systems[0] and it works fine.
Can you send a screenshot of your fileglobal systems variable?
Thanks,
11-14-2018 12:08 PM
Thanks a lot for your reply!
Systems - is array of container, which contains Task + other data/containers. Task - is LabVIEWIOControl type.
I guess when it will be an array of LabVIEWIOControl types, then TestStand "knows", which type exactly to expect; so no error occurs...
11-14-2018 04:05 PM
It shouldn't matter. I just tried with a container that contained a LabVIEWIOControl as my array element and it worked fine.
Can you post a screenshot of your FileGlobal that shows the data types? It feels like Task isn't a LabVIEWIOControl.
11-14-2018 04:08 PM
I'm attaching a screenshot of what I did.
11-14-2018 11:53 PM - edited 11-14-2018 11:55 PM
@~jiggawax~ wrote:
It shouldn't matter. I just tried with a container that contained a LabVIEWIOControl as my array element and it worked fine.
Can you post a screenshot of your FileGlobal that shows the data types? It feels like Task isn't a LabVIEWIOControl.
Sure it is LabVIEWIOControl type. But from your last post I see the difference - I've got not initialized array, for which number of elements is set dynamically; and you've got array with explicitely set number of elements. And then it works. Thanks for help!
So this is working solution:
and this one not (which is strange a bit, but...)
11-15-2018 09:24 AM
First of all I think you are missing a "t" in the name of your VI....
Seriously though, this feels like a bug in TestStand. I haven't tested it but I think it will work during run-time as long as you populate the array correctly. However, it should be smart enough to know what the datatype is and not throw the Unknown Value error as long as you are using type defs.
Regards,
11-15-2018 02:22 PM
Actually, unfortunately it does not work during run-time - task value is empty...