Sensoray 2600 Bedienungsanleitung Seite 14

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 77
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 13
Sensoray 2600 Programming Guide 10 Initialization and Status Functions
if ( ( faults = S26_BoardOpen( 0, 0, MMAdrs ) ) != 0 )
{
//
// .... Handle error ....
//
S26_DLLClose();
return faults;
}
// Reset MM number 0 and all of its connected I/O modules.
S26_ResetNetwork( 0 );
// Detect and register all IOMs connected to MM number 0.
S26_RegisterAllIoms( 0, 1000, &NumIoms, IomList, IomStatus, 1 );
printf( "%d IOMs were detected.\n" );
//
// .... Do all I/O operations and run the application’s main function ....
//
// Close the 2600 system middleware. S26_BoardClose() is called implicitly.
S26_DLLClose();
return 0;
}
4.4.4.2 Linux
int main()
{
u32 faults;
char MMAdrs[] = "10.10.10.1"
int NumIoms;
u16 IomList[16];
u8 IomStatus[16];
// Open the MM middleware.
if ( ( faults = S26_DriverOpen() ) != 0 )
{
//
// .... Handle error ....
//
return faults;
}
// Open MM number 0 and process any errors.
if ( ( faults = S26_BoardOpen( 0, 0, MMAdrs ) ) != 0 )
{
//
// .... Handle error ....
//
S26_DriverClose();
return faults;
}
// Reset MM number 0 and all of its connected I/O modules.
S26_ResetNetwork( 0 );
// Detect and register all IOMs connected to MM number 0.
S26_RegisterAllIoms( 0, 1000, &NumIoms, IomList, IomStatus, 1 );
printf( "%d IOMs were detected.\n" );
Seitenansicht 13
1 2 ... 9 10 11 12 13 14 15 16 17 18 19 ... 76 77

Kommentare zu diesen Handbüchern

Keine Kommentare