Moxa Technologies V2401 Manuel d'utilisateur Page 13

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 61
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 12
V2401/2402 WinXP User’s Manual Introduction
1-10
*/
unsigned int hDIO;
unsigned int port_no;
int data;
int intDout,intDin;
int nDout=0;
int port=0,mode=0;
int n=0;
WCHAR sin,smode;
printf("UART Mode Test Program\n");
printf("\t (0) Exit Program\n");
printf("\t (1) Display DIN\n");
printf("\t (2) Display DOUT\n");
printf("\t (3) Set DOUT value\n");
printf("\t (4) Display both DIN and DOUT\n");
sin=getwchar();
n=_wtoi(&sin);
do
{
switch (n)
{
// if char == '1', display the digital input
case 1:
//Open dio
hDIO=mxdio_open();
for(int i=0;i<=3;i++)
{
//Get digital input
port_no=i;
intDin=mxdio_get_din(hDIO,port_no);
printf("Din%d = %d\n",port_no,intDin);
}
//Close DIO
Vue de la page 12
1 2 ... 8 9 10 11 12 13 14 15 16 17 18 ... 60 61

Commentaires sur ces manuels

Pas de commentaire