From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

MAX Programming API / NI System Configuration Functions

Hi all,

I recently came across this given tasks that I need to use C or Python language to wraped one of the remote NI chasiss we own in the company.

We are a big Python house, we used a lot of Python ctypes library to talk to the C windows DLL to control / talk to the NI devices.

Right now I am able to use Python ctypes to talk to the remote chasiss by using NI's DAQmx driver (nicaiu.dll) once the remote chasiss is added and configured in NI MAX utility.

I am wondering if there is a way to programatically control the adding / configurating remote chasiss so that we don't need to manually setup using NI MAX utility.

 

I've been searched around and came across with some possible solutions in C, namely that NI System Configuration API for LabWindows / CVI has a dll / lib that can be called to intialize / search and add the devices.

I believe this library is called "NISysCfgxxxxxx, where xxxx are the different function names. I've also came arcoss some reference on how to call these functions in C. For example:

 

NISysCfgInitializeSession

NISysCfgStatus NISysCfgInitializeSession( const char targetName[], const char username[], const char password[], NISysCfgLocale language, NISysCfgBool forcePropertyRefresh, unsigned int connectTimeoutMsec, NISysCfgEnumExpertHandle * expertEnumHandle, NISysCfgSessionHandle * sessionHandle ); 

 

Some example codes shows in C, we need to include "nisyscfg.h", in order to get the Struct / #define information for types like NISysCfgLocale, NISysCfgBool, NISysCfgEnumExpertHandle, NISysCfgSessionHandle...

However I cannot seems to find this header files anywhere from my installed drives / software... I believe it would be extremely helpful for me to get to read this header file so I can create a wrapper class / function in Python ctypes and utilize the nisyscfg library. Does anyone have any pointers on how to create this kind of wrapper or getting any reference information for this header file?

 

Thanks in advance!

 

-Charlie-

0 Kudos
Message 1 of 3
(4,442 Views)

Hi Charlie,

 

I found nisyscfg.h in the Shared\CVI\Include folder. Likely this was installed when I installed LabWindows\CVI. It id part of our System Configuration driver. You can find that here:

 

http://joule.ni.com/nidu/cds/view/p/id/3667/lang/en

 

One thing to note is that this is only going to be supported when using the softwares listed, being LabVIEW, LabVIEW Real Time and LabWindows\CVI. Your options of creating a c type wrapper with python may be much more limited with these options.

 

Regards,

 

James W.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(4,425 Views)

Hi James,

Thanks for the quick reply! This gives me some pointers and I would make a small Python ctypes wrapper that can call some basic C functions in the dll.

 

Best,

-Charlie-

0 Kudos
Message 3 of 3
(4,393 Views)