Borrar filtros
Borrar filtros

How to pass double data to analog output pin of DAQ

2 visualizaciones (últimos 30 días)
A R
A R el 3 de Mzo. de 2020
Hi, I am using USB 205 MCC DAQ. It has 2 analog output pins. I want to transmit 2 data's, 1x256 data to analog output pin 1 and 1x12 data to analog output pin 2. I tried transmitting 1x256 data to analog output pin using a mex file and It works well
int ch1 = 0;
int Row1, Col1;
int Chan1, ExitFlag;
int NumAOChans, dummy1;
float EngUnits, voltsSent;
int ChannelType1 = ANALOGOUTPUT;
char rangeName[RANGENAMELEN];
for (i=0;i<N;i++)
{
// mexPrintf("\nThe output is %f",data[i]);
ULStat = cbAOut(BoardNum, Chan1, Range, data[i]);
ULStat = cbAIn(BoardNum, Chan, Range, &data[i]);
// mexPrintf("\nThe output is %f",data[i]);
bb[i] = data[i];
}
I tried changing the channel number in the above code, but that crashes matlab.The above code is from Universal Library C program examples. I dont know how to transmit the second data to analog output pin 2. How to change the channel number in the mex program?

Respuestas (0)

Categorías

Más información sobre Periodic Waveform Generation en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by