Dynamic Signal Acquisition

cancel
Showing results for 
Search instead for 
Did you mean: 

pci- 4462 / visual basic 2005 express API

 

I have a PCI-4462 that I need to get 196K samples per second on each of the 4 channels.

I have vista 64 on a 4 core 3 GHz board.

Signal express can only give me a 60% measurement duty cycle on this system while logging to disk, I need 100%. I do not have the CPU cycles/ disk speed to run a bunch of extra software. I believe I do have a system that will do the job it the software is efficient.

 

I do not see the need for measurement studio. I just want to run Visual basic 2005 EXPRESS with as little overhead as I can get.

 

My problems are:

1) The examples shipping with DAQmx will not run my board. If the example shows commands that the board does not support is it really an example or just a bunch of noise to weed through? They use DAQmx API commands the 4462 does not support.

 

2) I have not been able to find a set of VB text based commands to configure board and acquire data.  I have not been able to find a list of any commands the board can support. I know it does change gain and does read data. Signal Express knows how to talk to it nicely so it will behave. The documentation I have found assumes measurement studio is installed and the 4462 will support all the AI related DAQmx commands.

 

3) I have not found any documents on the 4462 API.

 

I have been working on this for months now and the frustration level is rising. Is there someone who can point me in the correct direction?

 

My configuration:

Hardware ASUS L1N64-SKI WS mother board.
2 AMD FX 74 CPU
OS Name Microsoft® Windows Vista™ Ultimate
Version 6.0.6000 Build 6000
Other OS Description Not Available
OS Manufacturer Microsoft Corporation
System Name JOHN-PC
System Manufacturer ASUSTek Computer INC.
System Model L1N64-SLI WS
System Type x64-based PC
Processor AMD Athlon(tm) 64 FX-74 Processor, 3000 Mhz, 2 Core(s), 2
Logical
Processor(s)
Processor AMD Athlon(tm) 64 FX-74 Processor, 3000 Mhz, 2 Core(s), 2
Logical
Processor(s)
BIOS Version/Date American Megatrends Inc. 0301, 3/13/2007
SMBIOS Version 2.4
Windows Directory D:\Windows
System Directory D:\Windows\system32
Boot Device \Device\HarddiskVolume1
Locale United States
Hardware Abstraction Layer Version = "6.0.6000.16386"
User Name john-PC\john
Time Zone Pacific Daylight Time
Total Physical Memory 4,094.63 MB
Available Physical Memory 2.81 GB
Total Virtual Memory 8.15 GB
Available Virtual Memory 7.05 GB
Page File Space 4.29 GB
Page File D:\pagefile.sys

Visual Basic 2005
version 8.0.50727.867 (vsvista.050727-8600)

 


0 Kudos
Message 1 of 5
(8,024 Views)
Hey John,
I apologize that you were not able to get up and running easily with this setup.  I have a few statements/questions for you.

-"Signal express can only give me a 60% measurement duty cycle on this system while logging to disk, I need 100%."
I don't really understand what you mean by 60% "measurement duty cycle".  Do you mean that you are only getting .6*196KHz sampling rate while using SignalExpress?  Please expound.

-"
I just want to run Visual basic 2005 EXPRESS with as little overhead as I can get."
Sure, why not 🙂

-"
1) The examples shipping with DAQmx will not run my board. If the example shows commands that the board does not support is it really an example or just a bunch of noise to weed through? They use DAQmx API commands the 4462 does not support."
The 4462 uses the same DAQmx API that other NI DAQmx products use, that's the beauty of our driver.  Which example is not working for you?  A "for sure" that I can run on my machine is the example with "Acq-Int-Clk" in the name.  The C version of this example on my machine is located here C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Analog In\Measure Voltage\Acq-Int Clk.

-"
2) I have not been able to find a set of VB text based commands to configure board and acquire data.  I have not been able to find a list of any commands the board can support. I know it does change gain and does read data. Signal Express knows how to talk to it nicely so it will behave. The documentation I have found assumes measurement studio is installed and the 4462 will support all the AI related DAQmx commands."
Again, the 4462 uses the same DAQmx API as the examples you see on your machine.  The function calls/parameter lists, I believe, are the same as our C API, so you can use either those examples or the Measurement Studio examples to help jump start your program.

-"
3) I have not found any documents on the 4462 API."
All DAQmx devices follow the same API.  Just be sure you are not using the traditional DAQ api or attempting to use a traditional DAQ example.

This document (and those that follow) might help clear up some terminology, but please ask any questions you have.:
http://zone.ni.com/devzone/cda/tut/p/id/4344#toc5

Also, you might search the Multifunction DAQ board for "Visual Basic" and see if any posts help you there.

Keep me posted.  We're here to help!

Sincerely,
Gavin Goodrich
Software Engineer
National Instruments

0 Kudos
Message 2 of 5
(8,018 Views)

Hello Gavin,

"I just want to run Visual basic 2005 EXPRESS with as little overhead as I can get."
Sure, why not
It just seems that almost everything I read assumes that I am running more NI software.

1) The 4462 uses the same DAQmx API that other NI DAQmx products use, that's the beauty of our driver.  Which example is not working for you?  A "for sure" that I can run on my machine is the example with "Acq-Int-Clk" in the name.  The C version of this example on my machine is located here C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Analog In\Measure Voltage\Acq-Int Clk.
John: Elizabeth found 2 examples that would run on my system.
 There are a lot of commands DAQmx that a 4462 cannot do. An example it does not do AO or any digital and I would not expect it to.  Besides these there are commands that are not as obvious.
I would like to know all the commands  it does support so I do not limit my self artificially.  When I was doing software development we had a saying  if it is not documented it does not exist.

2)  The function calls/parameter lists, I believe, are the same as our C API, so you can use either those examples or the Measurement Studio examples to help jump start your program.
Are  you telling me the "Measurement Studio examples" do not use any Measurement Studio code?

3) All DAQmx devices follow the same API
John: the problem is the API is very large and about 3/4 of it does not work in my setup.
Measurement Studio help has a much bigger index than real pages. It looks like all the Measurement Studio index is there but the Measurement Studio only pages are not. I spend a lot of time fallowing ling to pages I do not have. Feels like the lawyer who ask for a letter and the other lawyer sent the letter along with 100,000 other letters in an 18 wheel truck.


Here is a MAX 4462 configuration.

I am trying to do this configuration in VB

DAQmx] MajorVersion MinorVersion

        8       6       
[DAQmxChannel] AI.Coupling AI.Max AI.MeasType AI.Min AI.TermCfg I.Voltage.Units ChanType PhysicalChanName
PPI2/PrimaryVolts DC 42 Voltage -42 Differential Volts Analog Input Dev1/ai0
PPI2/PrimaryCurrent DC 1 Voltage -1 Differential Volts Analog Input Dev1/ai1
PPI2/SecondaryVolts DC 42 Voltage -42 Differential Volts Analog Input Dev1/ai2
PPI2/SecondaryCurrent DC 1 Voltage -1 Differential Volts Analog Input Dev1/ai3
[DAQmxTask] Channels SampClk.ActiveEdge SampClk.Rate SampClk.Src SampQuant.SampMode SampQuant.SampPerChan SampTimingType
Rising 195000 Continuous Samples 2000 "" Sample Clock
PPI2 PPI2/PrimaryVolts, PPI2/PrimaryCurrent, PPI2/SecondaryVolts, PPI2/SecondaryCurrent
[DAQmxDevice] BusType DevSerialNum PCI.BusNum PCI.DevNum ProductNum ProductType
Dev1 PCI 0x127B518 0x5 0x6 0x7170 PCI-4462


Thank You very much for the input.

John
0 Kudos
Message 3 of 5
(8,012 Views)
Hey John,
This might help you with your search in the help files:
http://digital.ni.com/public.nsf/allkb/B31EDC5BF7E76EF286256E93007EB5AC

As far as what API commands are compatible with what device, there is no clear-cut answer that I can find right off the bat.
Anything regarding general AI, like the examples I mentioned, should work for you.  External clocking is not supported, so none of those examples would work, but several will.
Did you say that 2 examples worked for you on your device?  Which ones?
I put together a picture of the ones I know will not work with the 4462.  See the picture for details

Hope this helps

Sincerely,
Gavin Goodrich
Software Engineer
National Instruments
0 Kudos
Message 4 of 5
(8,007 Views)
Hi Gavin,
Thanks for the comments.

I could not find the dexplore.exe file but I did find a NI-DAQ .NET Framework 2.0 help file in the programs>> National Insterments>> NI-DAQ folder.
It seems to have the Measurement Studio index but only the help pages that work without Measurement Studio seem to be loaded.

I have been 2 of the cont* files I will look at the write to disk version as well.

I use ContAcqVoltageSamples_IntClk.2005 the most.

I still get error 9009 when I try to build.

Here is what it really tells me:

Error    1    The command ""D:\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE\..\..\SDK\v2.0\bin\mt.exe" -manifest "D:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNET2.0\Analog In\Measure Voltage\ContAcqVoltageSamples_IntClk\vb\ContAcqVoltageSamples_IntClk.exe.manifest" -outputresource:"D:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNET2.0\Analog In\Measure Voltage\ContAcqVoltageSamples_IntClk\vb\bin\ContAcqVoltageSamples_IntClk.exe";#1
    " exited with code 9009.    ContAcqVoltageSamples_IntClk.2005

This simplifies to D\...mt.exe -mainifest D:\...ContAcqVoltageSamples_IntClk.exe.manifest D:\...ContAcqVoltageSamples_IntClk.exe";#1" exited with code 9009.  

I have added /dev/AI0:3 to the Physical Channel and been able to get 4 channels of data to print. I did have to make the output window wider for the 4th column to show.




0 Kudos
Message 5 of 5
(7,997 Views)