10-06-2005 05:58 AM
10-06-2005 07:39 AM - edited 10-06-2005 07:39 AM
What you propose is fine.
Doing all the instrumentation open/initialization in setup and the close in cleanup of Main is common.
You can do all your acquisition in main if you like, and for a simple program this is very easy to understand and maintain.
If your program becomes more complex, you can add additional sequences in your file and call those sequences from Main. The advantage of this is that each sequence has it’s own setup/cleanup. This provides a convenient place to reset/configure instruments between tests and has some advantages when executing a sequence in debug modes or a loop.
You are not forced into placing instrument initialization or configuration into any specific location by Test Stand. You can even put your config/init steps into it's own sequence and call that sequence from the setup of another sequence if you choose. It is very flexible, and will allow you to place almost any action in the location that is most convenient for you.
Good Luck
Message Edited by mvr on 10-06-2005 07:40 AM
10-07-2005 04:10 AM
Hi mvr,
Thanks for replying me. I got it.
Regards
Nihal
10-20-2005 04:27 AM
Hello Mvr,
I am trying to develop TestStand Sequence for NI RFSA 5660.
I want to use Setup for initialization of RFSA (ni5660 Initialize.vi) and Cleanup for closing (ni5660 close.vi) as discussed. while in the Main, I call acquisition & measurement.
During Initialization, ni5660 Initialize.vi generates receiver info out, a reference handle to the instrument session to the next VI. {The Manual says: Do not modify the contents of this (receiver info out) wire manually. }
How can I pass this reference to the next VI, which is in the Main via TestStand and also to susequent VI. In other words how to access same instrument session across the different Step Groups.
Regards
Holy
10-20-2005 08:21 AM - edited 10-20-2005 08:21 AM
Message Edited by mvr on 10-20-2005 08:22 AM
10-20-2005 08:41 AM
If you are calling into a DLL another way to deal with instrument handles is to pass them or use them as globals inside the DLL file itself. If you don’t need to pass the handle back to test stand for any reason you can maintain the instrument handles completely within your DLL just as you would if you were writing a stand alone application.
10-20-2005 09:46 AM
Hi,
Using the TestStand string you are using as the resourse name or alias string that you use to initialise the instrument eg: "GPIB0::5::INSTR".
Instead of using the reference returned from the initialise vi, just wire the Teststand resource string again to you vi's in the Main. You can either cast the string using the VISA I/O constant or IVI I/O constant ( not sure which interface you are using), or just wire your string directly to your instrument vi.
I have used this method successfully in the past.
hope this hopes
Regards
Ray Farmer
10-24-2005 02:12 AM
10-24-2005 03:53 AM
Hi,
This seems to be a tortuous route.
In the TestStand palette in labview you should find a couple of VI's that will convert your instrument reference to an integer and integer to instrument reference. You store your reference as a number in Teststand.
Or
you can try my other suggest in this thread.
Regards
Ray Farmer
10-24-2005 03:56 AM - edited 10-24-2005 03:56 AM
Hi,
Try this example
Regards
Ray Farmer
Message Edited by Ray Farmer on 10-24-2005 09:56 AM