From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing an NI 4060 from Borland C++ 5.5 or TestPoint 3.4 generates a fatal error.

I am trying to get an NI 4060 DMM card working in my programming environment. I have tried to compile a few example programs with the Borland C++ 5.5 command line compiler, but when I run them, they crash on the niDMM_Initiate call.
After the process has been terminated, on Windows 2000, the system dies with a Blue Screen Of Death.
When I try the same sequence of calls to NIDMM_32.DLL with TestPoint 3.4, the niDMM_Initiate call causes a floating point exception in nidaq32.dll at 0x21193dce.
On a Windows 98, the C programs gave the same result (except for the BSOD). I haven't tried TestPoint on that system.
I have used the software on the CD (NI-DMM 1.5, NI-VISA 2.01,
NI-DAQ 6.7, IVI engine 1.61) and also later versions from the web.
In all environments the DMM soft front panel did work.

I also tried to use NI Spy to see what calls the DMM soft front panel uses.
Unfortunately, with NI-DMM 1.5, the soft front panel crashes when NI Spy is running, and with NI-DMM 1.6, the soft front panel apparently mostly uses functions that are not captured by NI Spy.

Can anyone give me a clue what is going wrong and what I need to do to get things working?
0 Kudos
Message 1 of 4
(2,997 Views)
Mr. Broekhuizen,
Thanks for using the NI Developer Exchange! The only programming environments that are officially supported by the NI-DMM driver are Microsoft Visual C++, Microsoft Visual Basic, CVI, and LabVIEW. If your particular version of Borland can link to a MSVC .lib file, though, there is a possibility that the driver could work properly. The driver has never been thoroughly tested with either Borland or TestPoint. I apologize for the inconveniences this has caused you.

Best Regards,
Jace Curtis
NI Applications Engineering
0 Kudos
Message 2 of 4
(2,997 Views)
Dear Mr. Curtis,

Thanks for your answer.
Borland cannot link to an MSVC .lib file. However, it is very easy to create an import library for Borland from any .DLL that exports functions by name.
Furthermore, NI-DMM v1.6 does provide a Borland .lib file (v1.5 does not).

I managed to get hold of Visual C++, and indeed, the example applications do work when compiled with Visual C++.

However, the mere fact that that identical source file generates a fatal exception when compiled with Borland C++, and in a TestPoint environment that sequence of calls gives the same problems, gives me doubts about the quality of the NI software.
Apparently Visual C++ gives an environment that prevents the exception from happening or catches it without anyone noticing.

Or perhaps the MSVC .lib file is more than just an import library.

One way or the other, we invested in four NI 4060 cards to be used in our factory test systems. We really want to use these instruments, and will probably buy more if we get them to work. Our test software is mainly written in TestPoint, with time-critical parts and low-level stuff written in C/C++, using the Borland compiler.
Not being able to get this combination to work would be a major dissatisfier.

Best regards,

Bert Broekhuizen
Agere Systems Nederland B.V.
0 Kudos
Message 3 of 4
(2,997 Views)
Bert,
Would you mind sending us the borland example that you are trying to compile, or can you simply compile an initialize function and an immediate close function to reproduce this behavior in Borland?

You can contact us at http://www.ni.com/ask and include the file as an attachment to your Email if necessary.
Thanks,
Jace Curtis
NI Applications Engineering
0 Kudos
Message 4 of 4
(2,997 Views)