Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

Vb.Net Daqmx,Reading from several SCXI at diffrent Sampling Rate



My System comprises from the following:
Vb.Net 2003
Measurment Studio 7.1
Daqmx 8.1
Win 2000
NI PXI-1052,CHASSIS
NI PXI-8196,CONTROLLER
NI 6280 PXI Daq board
NI SCXI-1112,TERMOCOUPLE   
NI SCXI-1125,VOLTAGE     (SCXI-1327 block)
NI SCXI-1125,4:20MA    (SCXI-1338 block)
NI SCXI-1530,ICP ACCELEROMETER


1-To read diffrent sensors,i Create a virtual channel (Accelerometer,Thermocouple,Voltage)


2-To configure timing i use the following DAQmx Api:
'Configure the timing parameters
myTask.Timing.ConfigureSampleClock("", Convert.ToDouble(rateNumeric.Value), _
SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples, samplesPerChannelNumeric.Text)


QUESTIONS:
Q1-I need to have diffrent sampling rate for each module,like 100Hz for thermocouple,10K for accelerometer,how
to configure myTask.Timing to do that?

Q2-I could't found any Vb.Net example illustrating reading from several SCXI modules ,please i'd like to review such
example.

Best Regards
Ahmed
  


0 Kudos
Message 1 of 6
(4,273 Views)

I can only answer your Q1

It is not possible to have diferent sampling rates for each module

Since all your Modules/channels are multiplexed to the DAQ card and the ADC on the DAQ card is shared between all modules/channels, you cannot have different sampling rate for each module/channel

What you could do is to sample all modules/channels at highest required/ possible rate and decimate those channels in which you want a lower rate

0 Kudos
Message 2 of 6
(4,264 Views)

Hello,

-Normally Thermocouple module SCXI-1112 is sampled with 100Hz,mean while SCXI-1530 is sampled  at 10Khz "according to shipped NI examples"

-Is it Ok to  sample all SCXI-1112 at 10Khz   ??

Thanks

0 Kudos
Message 3 of 6
(4,262 Views)

Hello Kater.

The SCXI-1112 sample rate per channel is directly dependant on the number of channels being sampled at the same time. 

Please refer to the following knowledge base for the ceiling on the sample rate for your particular applicaiton:

Recommended NI Hardware for Thermocouple Measurements
http://digital.ni.com/public.nsf/websearch/F0196F5B6CD8F60286256D4B00728B78?OpenDocument

As far as a good example for thermocouple measurements with SCXI modules and VB.net, please navigate to the following directory: 

C:\Program Files\National Instruments\MeasurementStudioVS2003\DotNET\Examples\DAQmx\Analog In\Measure Temperature\ContAcqThrmstrSmples_IntClkSCXI\Vb

where the C drive is your harddrive.  This gives you a great example of acquiring measurements with SCXI modules.  To add another module, you will need to create another task by following the procedure followed in the above example.

Let us know if there is anything else that we can do for you!

Brian F
Applications Engineer
National Instruments

Message Edited by Brian F. on 02-19-2007 09:46 AM

0 Kudos
Message 4 of 6
(4,244 Views)

Hello Brian,

I'm aware of this shipped example..i reads one module type only..my concern is to read from four modules measuring diffrent parameters.
 SCXI-1112, SCXI-1125,SCXI-1125,SCXI-1125 .

Q1-Is it ok to connect the four modules to ONE daq card? if yes what is the suggested sample rate and no of samples could be suitable for all four scxi modules?
Q2-Please tell me more about creating multiple Daqmx tasks?you ment that we can create multiple tasks that could run in the same time ?

Thanks for support.


0 Kudos
Message 5 of 6
(4,239 Views)

Hello.

It is ok to connect all 4 modules to one DAQ card.  As long as you connect one of the modules to the card, all modules will be able to communicate with the DAQ card via the cable and the SCXI backplane.  The number of samples achievable is highly dependent on the channel count on each of the modules.  As some background, the SCXI-1125 modules have a 333 kS/s maximum, random scanning sampling rate.  The SCXI-1112 module has a maximum rate of 100kS/s / (2*the number of channels).  All of these samples will be multiplexed by the PXI-6280, which has a maximum sampling rate of 500 kS/s.  Thus, the PXI-6280 might be your bottleneck, limiting your acquisition rate at 500 kS/s.  For most applications, this should be more than adequate. 

In terms of creating multiple tasks in DAQmx, this is allowable at the same time.  One task for each set of parameters should suffice.  For each task, you will follow the basic procedure for creating one task as outlined in the example that I pointed you to in my last post.  For more detailed information on this process, please refer to the following Developer Zone article at:

Using NI-DAQmx in Text Based Programming Environments
http://zone.ni.com/devzone/cda/tut/p/id/5409

Good luck with your application!

Brian F
Applications Engineer
National Instruments

0 Kudos
Message 6 of 6
(4,223 Views)