MATLAB XPC TARGET 4 - DEVICE DRIVERS Spezifikationen Seite 643

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 653
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 642
CAN-AC2 and CANopen devices
16-21
// AIC711 SDO object 6423: enable global interupts
CANAC2_init[0].port=1;
CANAC2_init[0].identifier=AIC711_sdo_base+AIC711_node_1;
CANAC2_init[0].data[0]=0x22;
CANAC2_init[0].data[1]=0x23;
CANAC2_init[0].data[2]=0x64;
CANAC2_init[0].data[3]=0x00;
CANAC2_init[0].data[4]=0x01;
CANAC2_init[0].no_bytes=5;
CANAC2_init[0].wait_ms=20;
// put AIC711_node_1 from pre-operational into operational state
CANAC2_init[1].port=1;
CANAC2_init[1].identifier=MAS_boot;
CANAC2_init[1].data[0]=0x01;
CANAC2_init[1].data[1]=AIC711_node_1;
CANAC2_init[1].no_bytes=2;
CANAC2_init[1].wait_ms=20;
////////////////////////////////////////////////////////////////
// Termination section
////////////////////////////////////////////////////////////////
// put AIC711_node_1 from operational into pre-operational state
CANAC2_term[0].port=1;
CANAC2_term[0].identifier=MAS_boot;
CANAC2_term[0].data[0]=0x80;
CANAC2_term[0].data[1]=AIC711_node_1;
CANAC2_term[0].no_bytes=2;
CANAC2_term[0].wait_ms=20;
As soon as this file is placed into your project directory and the xPC Target
application is rebuilt the messages defined above will be sent during
initialization and termination phase of the setup driver block.
The SIMULINK-model could look as follows
Seitenansicht 642
1 2 ... 638 639 640 641 642 643 644 645 646 647 648 ... 652 653

Kommentare zu diesen Handbüchern

Keine Kommentare