Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

performing DB DAQ there is a discontinuity between the two HB

 I am using a PCI_MIO_16E_4 card to Simultaneously AO AI a signal using  double buffering, CDA channel = for WFM and CAD channel 0 for DAQ.  The sequence of instructions used is as follows:

 Init_DA_Brds(); WFM_Scale(); Set_DAQ_Device_Info(); WFM_DB_Config ();  WFM_Group_Setup(); WFM_Load ();
 Select_Signal (); Select_Signal (); DAQ_DB_Config();  WFM_Group_Control(); DAQ_Start( );  

 while(ulContCicloAOAI < ulLimiteMaxArEntEscr){       /* Do the double-buffering --------*/
     WFM_DB_HalfReady ();
    if (iReady == 1)   {  
         WFM_DB_Transfer ();
         ulContCicloAOAI++;}
     DAQ_DB_HalfReady();
     if (iReady == 1) {
         DAQ_DB_Transfer(;}
         }
     ProcessSystemEvents();
        } 
  /* Disable timeouts*/          
 WFM_Group_Control();
 // Clear the analog input
 DAQ_Clear(iDevice);
 AO_VWrite(iDevice, iChan0, 0.0);
 
The problem is that in the junction of the two HB, there is a discontinuity caused by the 2nd HB starting from cero instead of from the point the 1st left the data. Can anybody help me? Thanks in advance.
0 Kudos
Message 1 of 3
(2,607 Views)

Eugenio,

Have you taken a look at the double buffer shipping examples?  You can find them in ..\Program Files\National Instruments\NI-DAQ\Examples\VisualC\Ao.  Also, is there a reason you are using tradition NI_DAQ functions.  I would highly recommend using NI_DAQmx.  Continuous generation examples can be found in ..\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Analog Out.  Take a look at these examples and see if they help you out.  Thanks and have a great weekend!

Regards,

LA

0 Kudos
Message 2 of 3
(2,598 Views)

Hi Irallen:

Thanks for your reply.

The main reason for not trying NIDAQmx is that I have got Labwin CVI 5.01 so I will have to either migrate to version 7 or change to Labview. You have convinced that I must change my software and I will do it.

thanks again for your help.

eugenio.

0 Kudos
Message 3 of 3
(2,579 Views)