Digital Multimeters (DMMs) and Precision DC Sources

cancel
Showing results for 
Search instead for 
Did you mean: 

asynchronous multipoint acquisition with niDMM & niSwitch

Hello
I am looking for a CVI or VB6 example of asynchronous multipoint scanner acquisition (NI4060+SCXI1127), using
niDMM_Initiate and niDMM_FetchMultiPoint?

I saw only examples in which the two previous functions are used together, one after the other, in a syncronous way.

I have to scan a lot of channels, but I would like to let the processor idle during the scanning...

Thank you very much in advance...
Bye
DiGi
0 Kudos
Message 1 of 17
(9,290 Views)

Greetings DiGi,

 

Thanks for contacting National Instruments. I am trying to understand exactly what you are looking for. Why would you want asynchronous scanning? Also, I am a little confused by what you mean by “let the processor idle”? Are you noticing that the processor is NOT being idle during synchronous scanning?

 

One way you could implement software timed or handshaking could be with an immediate or software trigger. (this is not really asynchronous) I don’t think there is a specific example that illustrates this but you could start with:

 

C:\Program Files\IVI\Drivers\niSwitch\Examples\CVI\niSwitchDMMSwitchSynchronousScanning

 

If you might be able to explain a bit more about what you are looking, then I can also do some more research on this side to look for examples. I’m sure someone has implemented something similar to what you are looking for! Smiley Happy

 

Thanks again,

Jordan Randall
National Instruments Italy
0 Kudos
Message 2 of 17
(9,269 Views)
Ok, I try to explain better.

In our application we scan up to 120 thermocouples.
When I call the niDMM_ReadMultiPoint it takes several seconds (tic-tic-tic-...-tic for 120 times!) to scan all the channels, and the instruction does not return immediately the control.
I read in manual that for this reason you have given us also
   niDMM_Initiate
   and
   niDMM_FetchMultiPoint
but I did not understand the way to use them, in order to obtain asynchronous acquisition.

To better explain, I have developed a similar system using FieldPoint.
To implement asynchronous acquisition I use the FP_Advise configured for asynchronous callback method, passing a Callback_functionPtr to it.
After FP_Advise initiates the operation, it immediately returns,and my (multitask) program is able to manage other jobs.
When the asynchronous  Callback_function is called, I stop the advise operation, and then I transfer the acquired values from the advise buffer, to my variables.

This is the program structure that I would like to implement using niSwitch and niDmm.
Do you think is this possible?

I hope I ahve explained you my problem clearly.
Thank you very much
Debora



0 Kudos
Message 3 of 17
(9,256 Views)
   
... I see in niDAQmx that with the function
DAQmxRegisterEveryNSamplesEvent
it is possible to call a callback after the acquisition of NSamples....

This could be a good solution for my application, but :
  • is it possible to use niDAQmx functions to acquire (thermocoouples) from NI4060+SCXI1127 ?
(I know that this is possible using SCXI1600+SCXI1102)

Thanks
Debora
0 Kudos
Message 4 of 17
(9,250 Views)

Hey Debora,

 

Unfortunately, the 4060 is only supported with Traditional NI-DAQ. To use "DAQmxRegisterEveryNSamplesEvent", the only solution is to upgrade to a card that supports NI-DAQmx. The card that I most often use is the 4070 that is capable of controlling switches in DAQmx and has 6 1/2 digits of precision.

 

http://sine.ni.com/nips/cds/view/p/lang/en/nid/12933

 

Are you familiar with programming with NI-DAQmx? Here are some really helpful links that I have used in the past!

 

NI-DAQmx Frequently Asked Questions

http://www.ni.com/support/labview/nidaq7faq.htm

 

Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition

http://zone.ni.com/devzone/cda/tut/p/id/2835

 

Some of the contents of these links discuss LabVIEW, but it also references CVI and almost every VI in LabVIEW directly correlates to a CVI function call.

 

Regards,

Jordan Randall
National Instruments Italy
Message 5 of 17
(9,250 Views)
Hello,
   The 407x DMMs are not programmed using DAQmx.  They are programmed using NI-DMM, like the 4060.  To do what you are asking, you start the acquisition by calling niDMM_Initiate.  Now you can check the status of the acquisition by calling niDMM_ReadStatus.  This will tell you whether the acquisition is finished or not, and if it's not, how many points have been acquired so far.  Once the acquisition is finished, you can get the measurements by calling niDMM_FetchMuliPoint.

.
.  Initialize and configure the DMM session
.

niDMM_Initiate(vi);
long backlog;
short acqDone;
niDMM_ReadStatus(vi, &backlog, &acqDone);
while (acqDone == 0)
{
   sleep(5);  // You can do other stuff here as well.
   niDMM_ReadStatus(vi, &backlog, &acqDone);
}
niDMM_FetchMultiPoint(vi, ...);

You can also use niDMM_ReadStatus to find out how many points have been acquired so far, then only fetch that many without blocking to wait for the remainder.  This way you can start processing the data without waiting for the entire acquisition to finish.

.
.  Initialize and configure the DMM session
.

niDMM_Initiate(vi);
long backlog;
short acqDone;
long totalPointsFetched = 0;
while (
totalPointsFetched < (triggerCount * sampleCount))
{
   sleep(5);
   niDMM_ReadStatus(vi, &backlog, &acqDone);
   niDMM_FetchMultiPoint(vi, backlog, ...);
  
totalPointsFetched += backlog;
   // Plot the points acquired so far ...
}


Good luck,
Mark
DMM SW
 
 
Message 6 of 17
(9,240 Views)
Thank you Mark and Jordan,
your hints were very usefull to me.

I have another question, for both of you.

I have to "double" an old system (NI4060+SCXI1127, a lot of thermocouples and some resistances).
I would like to use SCXI1600+SCXI1102 for this doubling.
  • First of all, is it advisable to use NI4060+SCXI1127 and SCXI1600+SCXI1102 (two separate SCXI chassy) in the same system?
  • In the second place, is it possible to use traditional niDAQ and new niDAQmx together in the same application?
Thank you very much.

Debora

0 Kudos
Message 7 of 17
(9,216 Views)
Hey Debora,
 
To answer your question about using Traditional NI-DAQ and NI-DAQmx in the same application, the answer is yes. Instead of going into a long description about this process I will refer you to this discussion post.
 
 
It goes into great detail about your question, and it will keep our discussion post primarily focused on NI-DMMs and Switches.
 
Thanks,
Jordan Randall
National Instruments Italy
0 Kudos
Message 8 of 17
(9,213 Views)
    ... why I don't find niDMM_ReadStatus in "National Instrument Digital Multimeter" functions?

What version of the niDMM is necessary to find this function?

Thank you
Debora
0 Kudos
Message 9 of 17
(9,212 Views)


@JordoTheGreat wrote:
Hey Debora,
 
To answer your question about using Traditional NI-DAQ and NI-DAQmx in the same application, the answer is yes. Instead of going into a long description about this process I will refer you to this discussion post.
 
 
It goes into great detail about your question, and it will keep our discussion post primarily focused on NI-DMMs and Switches.
 
Thanks,


This discussion is not so pertinent to my problem: he wanted to use NI-DAQ and NI-DAQmx on the same board, in the same application, and had some problems.....
 In any case, to be brief, the important is to be sure to be able to use both of them in the same application, the traditional one for NI4060+SCXI1127, and the mx one for SCXI1600...

Thanks
Debora

0 Kudos
Message 10 of 17
(9,211 Views)