NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use nationalinstrumentvisa.dll with Teststand

Hello, 

I want to use  nationalinstrumentvisa.dll with TestStand. To Open Comport, Write, And Read through This DLL.I have tried to do but did not get success. 
Could you please suggest how to do or what function I need to use? 

Rshah31_0-1762790286949.png
Thank You

 

0 Kudos
Message 1 of 4
(120 Views)

First of all, you need to have the headerfile or equivalent information to be able to configure the call (https://www.ni.com/docs/de-DE/bundle/teststand/page/c-c-dll-adapter.html?srsltid=AfmBOorwG_AAuxLBAlw...

 

On the other hand, best practice in TestStand is to have Hardware Access in CodeModules instead of directly from TestStand.

0 Kudos
Message 2 of 4
(98 Views)

@Oli_Wachno wrote:

 

On the other hand, best practice in TestStand is to have Hardware Access in CodeModules instead of directly from TestStand.


I second this thought, one must use Code Modules to implement logic. There are some exceptions where the logic is simple enough to implement as a few steps and as long as it doesn't complicate things at TS layer.

 

Why do you want to invoke a VISA action directly in TS instead of abstracting the low-level VISA detail inside a code module?
For instance, to read a voltage measurement, create a code module "read voltage" and hide the details on VISA transactions with the instrument to achieve reading a voltage measurement.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution
0 Kudos
Message 3 of 4
(88 Views)

Santosh,

 

I agree: there's a time and place for everything!

 

Yet I regarded it as my responsibility to point out these best practices to a (given the other post by this user) new TestStand user to avoid the build up of technical debts.

 

 

Message 4 of 4
(85 Views)