Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Porting strategy - NIDAQ application to NIDAQmx

Hello

 

i need a help to convert this fonctions to NIDAQmx language 

I need to use NI-DAQ to read a single digital line, on a PCI-6503 card, i have upgrade CVI from 4.5 to 2009 the library can not communicate with this code

 

int Etat_Input(short *iLed1,short *iLed2,short *iLed3,short *iLed4,short *iLed5,short *iLed6,short *iLed7,short *iLed8)
{
int Erreur=0;
short Led1 = 0;

Erreur = DIG_In_Line (ADR_6503, PORT_2, 0,iLed1 );
Erreur = DIG_In_Line (ADR_6503, PORT_2, 1,iLed2 );
Erreur = DIG_In_Line (ADR_6503, PORT_2, 2,iLed3 );
Erreur = DIG_In_Line (ADR_6503, PORT_2, 3,iLed4 );
Erreur = DIG_In_Line (ADR_6503, PORT_2, 4,iLed5 );
Erreur = DIG_In_Line (ADR_6503, PORT_2, 5,iLed6 );
Erreur = DIG_In_Line (ADR_6503, PORT_2, 6,iLed7 );
Erreur = DIG_In_Line (ADR_6503, PORT_2, 7,iLed8 );
ProcessDrawEvents();
return (Erreur);

}

0 Kudos
Message 21 of 22
(597 Views)

Hello

 

i need a help to convert this fonctions to NIDAQmx language 

I need to use NI-DAQ to read a single digital line, on a PCI-6503 card, i have upgrade CVI from 4.5 to 2009 the library can not communicate with this code

 

int Etat_Input(short *iLed1,short *iLed2,short *iLed3,short *iLed4,short *iLed5,short *iLed6,short *iLed7,short *iLed8)
{
int Erreur=0;
short Led1 = 0;

Erreur = DIG_In_Line (ADR_6503, PORT_2, 0,iLed1 );
Erreur = DIG_In_Line (ADR_6503, PORT_2, 1,iLed2 );
Erreur = DIG_In_Line (ADR_6503, PORT_2, 2,iLed3 );
Erreur = DIG_In_Line (ADR_6503, PORT_2, 3,iLed4 );
Erreur = DIG_In_Line (ADR_6503, PORT_2, 4,iLed5 );
Erreur = DIG_In_Line (ADR_6503, PORT_2, 5,iLed6 );
Erreur = DIG_In_Line (ADR_6503, PORT_2, 6,iLed7 );
Erreur = DIG_In_Line (ADR_6503, PORT_2, 7,iLed8 );
ProcessDrawEvents();
return (Erreur);

 

0 Kudos
Message 22 of 22
(597 Views)