Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use USB 6008 with Borland C++ Builder v6.0 ?

For others who might want to know- how did you solve it?
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 11 of 18
(2,740 Views)

Hello,

what is the meaning of "KB". Sorry for this stupid question !

KU
0 Kudos
Message 12 of 18
(2,730 Views)

Hi!

KB stands for KnowledgeBase.

Well I solved the Borland problem by the following command in my C source code:

#pragma path "c:\borland"
#pragma link "nidaqmx.lib"

Now I'm not sure but I got it to work with only the second commanline also. Now as those of you who know borland understand I'm a beginner in this enviroment and I guess that this command is basic knowledge. The Lib file (from the KB) that was attached in a previously message worked fine !  

Thanks for all the help!

Regards
Daniel
0 Kudos
Message 13 of 18
(2,721 Views)
Hi,
 
now the next Queation:
 
I´m using Borland C++ Builder 6 and the NI-DAQmx Base 1.5 drivers.
 
Everything is working fine. I´m using GPIO and the Analog-Input Functions.
 
But sometimes the complete System will hang and i must reboot the computer. In the Doc. "NI-DAQ 7.5 Readme " i have read that that this will happen when the USB device will removed during a DAQ Operation, but i do not remove my USB device.
 
Until I included the "NI-DAQmx Base" i did not have any problems like that Smiley Mad
 
 
Do anyone help me ?
 
 
Regards KU
 
 
0 Kudos
Message 14 of 18
(2,722 Views)
Hi !

Well I don't think I know what to do about your computer freezing but I would suggest to change driver from the DAQmx Base to the new DAQmx 7.5 driver. I'm currently using the driver and it works just fine. You can find it here:

http://digital.ni.com/softlib.nsf/websearch/CF7ECCEA4C4CC7DE86257038004D88AE?opendocument&node=13206...

If you are having any trouble with after the new installation check that you have chenged the driver you are using for the USB device, see the KB link:

http://digital.ni.com/public.nsf/websearch/4d915a820a76823c862570390075ebf5

Try it and hopefully your problems will be gone ! Smiley Happy

Regards
Daniel
0 Kudos
Message 15 of 18
(2,718 Views)

Salvador,

Will nidaqmx_74_delphi.zip be updated (if necessary) to reflect any changes for DAQmx 7.5 ?

http://digital.ni.com/public.nsf/websearch/A6715AA42405ACD786256F0A00633B8F?OpenDocument

Would such changes be found under this document ID 3D8C2TPC3D8C2TPC or elsewhere ?  Is there a download site that will always contain the latest version of the DAQmx wrapper files for Delphi ?

Thanks for NI's efforts in supplying support for Delphi.  It's appreciated.

Steve

0 Kudos
Message 16 of 18
(2,902 Views)
@Daniel,
 
thanks for the Tip with the DAQmx 7.5 driver, it works much more stabel Smiley Happy
 
But now i have the next problem:
 
I tried the Example-Code for AI-Input, and all the time I get the Error-Message-No: -200278.  What is the meaning of: "Specify a position and offset which select a sample "  ???
 
 
 
With the DAQmx Base 1.5 Driver it work (not all the time, but it work )  Smiley Mad
 
KU

 

look here ==>

/*********************************************/
 /*/ DAQmx Configure Code
 /*********************************************/
 DAQmxErrChk (DAQmxCreateTask("",&taskHandleA));
 DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandleA,"Dev1/ai0","",DAQmx_Val_RSE, 0.0, 8.0, DAQmx_Val_Volts,NULL));
 DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleA,"",1000,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,1000));

    /*********************************************/
 /*/ DAQmx Start Code
 /*********************************************/
 DAQmxErrChk (DAQmxStartTask(taskHandleA));

   Sleep (8000);
 /*********************************************/
 /*/ DAQmx Read Code
 /*********************************************/
 DAQmxErrChk (DAQmxReadAnalogF64(taskHandleA, -1, 10.0,DAQmx_Val_GroupByChannel,data,1000,&read,NULL));

 

Error:
 if( DAQmxFailed(error) )
  DAQmxGetExtendedErrorInfo(errBuff,2048);
 if( taskHandleA!=0 )  {
  /*********************************************/
  /*/ DAQmx Stop Code
  /*********************************************/
  DAQmxStopTask(taskHandleA);
  DAQmxClearTask(taskHandleA);
 }
 if( DAQmxFailed(error) )
  MessageDlg(errBuff, mtConfirmation, TMsgDlgButtons() << mbYes << mbNo, 0);

 

Message Edited by GalamaAG on 08-19-2005 09:31 AM

0 Kudos
Message 17 of 18
(2,703 Views)
Hi, Daniel,

I am starting with a NI 6008, and I need to use with C++ Borland (v6. or v5). Before I use Visual Studio C, but now I have to migrate to Builder, and I need to configure de libraries, etc.
Do you have some basic C source code for C++ Builder that adquire analog an digital inputs?
I saw that

Thanks for your help.Smiley Wink

Germán

0 Kudos
Message 18 of 18
(2,426 Views)