NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

best practice when initializing instrument in teststand?

Recently We are developping a software platform using TestStand. There are some issues when developing the init module, here is the detail:

We creat a step which called a Initializing function in CVI created dll. In the dll, we need to init ten more instrments like power, switch, matrix switch , dmm, siganl generator, etc. First, we read the configuration infomation which resides in the .ini file, then use the info to init the instrument(via viOpen()). After that. we get an array of instrument handlers. we return that array back to teststand from the dll, and use it in the subsequent step, like in the clean up step, we call the viClose() to close the instrument. 

Howerer, the NI salesman told me it is not best practice to transmit complex data types like array in the teststand, Instead, only the standard data type like Number and string is recommonded. It really confuse me. 

So, here is my question:

  1. what on earth is the best practice in the situation above, should I pass the array from dll to teststand, and use that array as the handlers to manipulate the specific instrument?
  2. The salesman suggests me following solutions: instead of Initializing all the instruments in one dll, I should initialize instrument seperately, for examle: I dont have to init the power at the begining of the sequence file, the power should be initialized when it is used. He also said that I should conduct the standard operation in one dll function(first viOpen, then viWrite some SCPI, then viClose). Once I need to operate the power again after calling that dll function, I have to conduct the viOpen again. I really feel this solution is unnecessary yet not generic.

So, is there some best prcatice for situation above?

Thanks!

0 Kudos
Message 1 of 2
(2,961 Views)

Is there any official NI document which confirms this NI guy best practice? I'm using LabVIEWIOControl type pretty often and I initialise e.g. PSUs only at the beginning of sequence. Not to mention that LabVIEWIOControl is the least complex data type that I'm using. If this is wrong approach I also would like to know the official NI position in that matter 🙂

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 2 of 2
(2,947 Views)