jimmyk Posted October 7, 2009 Report Share Posted October 7, 2009 For my tests, I need to launch several ancillary VIs that manage, among other things, CAN messaging and timing concerns. These VIs must be active to stimulate the UUT for relevant measurements. These elaborate stimulation VIs are actually subsystem simulators - synchronous state machines to be general - not by any measure passive objects. Precision timing and communication are fundamentally used to drive these routines. As I am learning TestStand, it is not clear to me how to interact with or control a VI while it is active in a sequence execution thread. (Reading page 3-12 of the LabView with TestStand manual, it doesn't even appear possible). It is imperative that these stimulation VIs are launched and the main sequence can then carry on with the actual assessment, while still being able to interact with the stimulation routines. I've gotten far enough to be able to implement a VI and then return to the main sequence after implementing other threads, but I do not know how to pass information to or from these other VIs. Global variables only seem to be available in the TestStand variable space...exclusive from what the LabVIEW engine sees...is this true? We were on the road to develop our own "test executive" (which we actually recognize more or less as a system simulator because our UUTs are only smaller components of a much larger system, so we simulate parts of the rest of the system to interact with the UUT), but we were strongly encouraged that TestStand could accomplish these things for us. So I'm trying to develop some tests on it to see if it's the thing. any comment would be greatly appreciated. james k Quote Link to comment
TobyD Posted October 7, 2009 Report Share Posted October 7, 2009 I've gotten far enough to be able to implement a VI and then return to the main sequence after implementing other threads, but I do not know how to pass information to or from these other VIs. Global variables only seem to be available in the TestStand variable space...exclusive from what the LabVIEW engine sees...is this true? Hi James. Welcome to Lava! By passing a reference to the Sequence Context into your VI, you can access your Global variables. The code below simply checks to see if the variable exists, but browse through the other properties to see what else you can do. Hopefully this gets you going in the right direction. To get the sequence context reference control drop an "Automation Refnum" onto your front panel, then pop-up on it and choose Select ActiveX Class --> TS.SequenceContext. Quote Link to comment
crossrulz Posted October 8, 2009 Report Share Posted October 8, 2009 I like to have VIs that wrap a queue to communicate between the threads. You can visit here for a good example. I mostly do this to avoid polling and I know I get every data point. Quote Link to comment
jimmyk Posted October 8, 2009 Author Report Share Posted October 8, 2009 Ah! That's easy enough. I like both of those replies. Give me a bit to tinker with these methods and I can post an epilouge. My only concern now is maintaining some precise timing, which looks like ques can perhaps help out with. Any idea of how stable (or possible at all?) these TS references are when ported to an RT chassis? thanks alot guys... james k Quote Link to comment
TobyD Posted October 8, 2009 Report Share Posted October 8, 2009 Any idea of how stable (or possible at all?) these TS references are when ported to an RT chassis? thanks alot guys... james k No Problem...I don't have any experience with a setup like this in RT, but I can't think of any reason why it shouldn't work. -Toby Quote Link to comment
jimmyk Posted October 20, 2009 Author Report Share Posted October 20, 2009 So after nearly two weeks of developing with what I've come to realize as some real power in testStand, I feel stupid for asking the original question. Then again, I have found the NI documentation very lacking with respect to the OOP and inter-application operability in the TS API. I managed to find this (very outdated) document which got me more pointed in the right direction, and helped me associate some vague instruction in the regular TS Manual... ftp://ftp.ni.com/support/teststand/updates/1.0/TestStand1.0APIHelp.pdf So I've come to understand the TS word "execution" as roughly equivalent to the traditional OOP word "process", and therefore passing variables into a new TS execution from a VI is not recommended...true? However passing between active threads is the way to do business. I have yet to pass a new variable from a VI into a new execution...havn't figured that out. Comments? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.