Bonjour,
j'aimerais envoyer des commandes sur certaines voies digitales, de ma carte usb6259. En ecrivant le code suivant:
int commande_port_numerique()
{ static TaskHandle gTaskHandle = 0; //declaration de la tache
uInt32 data1[32] = {'0'}; //message a envoyé pour les commandes numeriques
// creation d'une nouvelle tache
DAQmxCreateTask("",&gTaskHandle);
//creation d'une sortie numerique
DAQmxCreateDOChan (gTaskHandle, "Dev1/port0/line0", "Commande1_selec_cart", DAQmx_Val_ChanPerLine);
DAQmxCreateDOChan (gTaskHandle, "Dev1/port0/line1", "Commande2_selec_cart", DAQmx_Val_ChanPerLine);
DAQmxCreateDOChan (gTaskHandle, "Dev1/port0/line29", "enable_commande", DAQmx_Val_ChanPerLine);
data[0] = 0;
data[1] = 1;
data[29] = 1;
//Lancement de la tache
DAQmxStartTask(gTaskHandle);
//Ecriture du message
DAQmxWriteBinaryU32 (gTaskHandle, 1, 1, 0, DAQmx_Val_GroupByScanNumber, data, 0, 0);
//arret de la tache
DAQmxStopTask(gTaskHandle);
DAQmxClearTask(gTaskHandle);
return 0;
}
Mais a l'execution j'obtiens l'erreur suivante:
NON-FATAL RUN-TIME ERROR: "Banc_AP53100_Rev0.c", line 736, col 6, thread id 0x00000CBC: Function DAQmxWriteBinaryU32: (return value == -200526 [0xfffcf0b2]). Measurements: Write cannot be performed because this version of DAQmx Write does not match the type of channels in the task. Use the version of DAQmx Write that corresponds to the channel type. Task Name: _unnamedTask<0> Status Code: -200526
et je ne comprend pas pourquoi
Merci beaucoup.