11-10-2025 09:59 AM
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?
Thank You
11-11-2025 12:28 AM
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.
11-11-2025 11:19 PM
@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.
11-11-2025 11:32 PM
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.