How to pass double data to analog output pin of DAQ
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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?
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Hardware Discovery and Setup dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!