04-16-2019 10:22 AM
Hi folks,
using TestStand: 2016 LabVIEW: 2015
I've resurrected a project I was last working on near the end of 2017, back then I had created a bunch of LabVIEW vis, a TestStand sequence, a little hardware based on a PIC 18f2550 demo board (used to relay 9 bit RS232 comms to USB) and the whole thing was working, albeit a little flakey sometimes.
I wanted a way of being able to configure my Rigol M300 DMM so that I could easily change how the Multiplexers and Mutifunction card were connected to my UUT. So I made a vi that allowed me to configure the MUXes and the multifunction card (DIO, Analogue IN/Out, Totalizers), the vi output a property loader TXT file and this was read by the TestStand sequence.
Time moved on, the project was shelved, I've done some other TestStand bits and pieces and now in preference to using the Property Loader to create my FileGlobals:
I'd like to use an INI file (easily man readable) which will be created by my user friendly configuration vi. I'll also have a LabVIEW vi called from TestStand to take the info in the INI file and create Run Time FileGlobals loaded with the values in the INI file.
I've done this before for simple strings and numeric variables, but now my FileGlobals are a little more complex, it's a Container, holding a Number, Enum, String and Number.
What I'm struggling with is firstly knowing if this can actually be done with LabVIEW ? secondly, how to create a container of a specific type (Rigol_IO), third, how do I get the Rigol_IO_In_Out_Type from TestStand and set the variable In_Out_Type to be this type in LabVIEW.
I'm assuming I can get the types I need from the Sequence Context but I'm really not sure how to reference them and am struggling to find any info to point me in the right direction . . . . hence my post.
thanks in advance.
04-17-2019 01:14 AM
Why do this, create you type and variables in TestStand ( you can actually create the type from you VI connector pane inputs and outputs). Then pass your container in and out of you VI.
In your VI you can just use unbundle and bundle nodes.
04-17-2019 02:49 AM
@RayFarmer wrote:
Why do this, create you type and variables in TestStand ( you can actually create the type from you VI connector pane inputs and outputs). Then pass your container in and out of you VI.
In your VI you can just use unbundle and bundle nodes.
I did do what you have suggested, I created the types in TestStand from the vi connector outputs, the reason I need to be able to recreate the variables is because the variable names are one of the fields that can be configured in my LabVIEW configuration vi.
It's not so important for this current project, all the IO to/from the Rigol is decided upon so the variable names aren't likely to change . . . but for future project it will make things easy to setup. I would configure all the IO I need and then have easy access to this information when creating the TestStand sequence. The Rigol_IO container contains all the relevant information needed by my vi that accesses the Rigol unit, namely the channel and port, the IO type, the name and the slot number. I pass this to my vi and it sets up the Rigol, makes the measurement and returns the reading. This goes for voltage (AC or DC), resistance, analogue out, digital in/out (TTL or CMOS levels). totalizer and Mux*
If it can't be done I have the option to keep using the Property Loader, maybe I did it wrong, but writing the Property Loader txt file from LabVIEW seemed to be a bit of a bodge.
* the Mux option is a special case, I can use one of the Multiplexers as an extra 32 channels of Digital out.
04-17-2019 04:27 AM
I’ll sort out an example for you. I’m sure I’ve posted a similar example before.
04-17-2019 04:15 PM
I found this example,
by Seasick.
It uses the API in TestStand and there is an example at the bottom of the page.
I have tried it and it works.
Once you understand the steps, then you can do the same in a VI.
04-24-2019 03:07 AM
@RayFarmer wrote:
I found this example,
by Seasick.
It uses the API in TestStand and there is an example at the bottom of the page.
I have tried it and it works.
Once you understand the steps, then you can do the same in a VI.
Thanks Ray, I'll take a look in the next couple of days when I have finished debugging my hardware, wiring and sequence from 2017. I'll post what I come up with or what I can't figure out