Adlink ACL-8216 Bedienungsanleitung Seite 53

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 75
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 52
C/C++ Library
45
main()
{
unsigned int data;
int ch;
_8216_Initial( CARD_1, 0x220 );
/* Assume NoError when Initialize ACL-8216 */
for( ch=0; ch<16; ch++ )
{
_8216_DI_channel( ch , &data );
printf( "The value if DI channel %d is
%d.\n" , ch , data );
}
}
5.6 _8216_DO
@ Description
This function is used to write data to digital output ports. There are 16
digital outputs on the ACL-8216, they are divided by two ports,
DO_LOW_BYTE and DO_HIGH_BYTE. The channel 0 to channel 7
are defined in DO_LOW_BYTE
port and the channel 8 to channel 15
are defined as the DO_HIGH_BYTE port.
@ Syntax
int _8216_DO(int port_number, unsigned char data )
@ Argument
port_number:
DO_LOW_BYTE or DO_HIGH_BYTE
data:
value will be written to digital
output port
@ Return Code
ERR_NoError
ERR_BoardNoInit
ERR_PortError
@ Example
#include "8216.h"
main()
{
_8216_Initial( CARD_1, 0x220 );
/* Assume NoError when Initialize ACL-8216 */
_8216_DO( DO_LO_BYTE , 0x55 );
printf( "The low byte is now 0x55.\n" );
_8216_DO( DO_HI_BYTE , 0xAA );
Seitenansicht 52
1 2 ... 48 49 50 51 52 53 54 55 56 57 58 ... 74 75

Kommentare zu diesen Handbüchern

Keine Kommentare