Memoq MR-720 Manuel d'utilisateur Page 70

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 109
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 69
REMOTE PROGRAMMING
4-16
char cmd[25];
sprintf (cmd, "UNT UNL MLA TALK %d", address); /* make the talk command string */
transmit (&status, cmd); /* send the talk command string */
StatCheck (address); /* check interface status */
}
/* ********************************************************************* */
void TxGpib (int address,char *command) /* transmit command to address */
{
char t_string[150];
int result;
result = sprintf (t_string, "UNT UNL MTA LISTEN %d DATA '%s' END", address, command);
transmit (&status, t_string); /* can also use the send () function in the CEC
library */
StatCheck (address);
}
/* ********************************************************************* */
void GetGpib (int address) /* get an answer from device at address */
{
char r_string[40], temp[80];
sprintf (r_string, "UNT UNL MLA TALK %d", address);
transmit (&status, r_string); /* make device a talker */
StatCheck (address); /* check status for ok */
strcpy (temp, " "); /* init answer string to null */
receive (&status, &length, temp); /* receive answer */
StatCheck (address); /* check status for ok */
strcpy (recv, temp); /* copy receive string to global strinb recv[] */
}
/* ******************************************************************** */
void StatCheck (int address) /* check the gpib status and exit if error */
{
if (status != 0 && status != 32)
{ printf ("Error at device %d : status = %d",address,status); exit (0); }
}
/* ******************************************************************** */
Vue de la page 69
1 2 ... 65 66 67 68 69 70 71 72 73 74 75 ... 108 109

Commentaires sur ces manuels

Pas de commentaire