MATLAB XPC TARGET 4 - DEVICE DRIVERS Spécifications Page 87

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 653
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 86
GPIB Simulink Block Reference
3-21
Shortcuts and Features for Messages
xPC Target defines the abbreviations wrt and rd to make message writing
easier with GPIB commands. When the message interpreter sees the
statements:
Structure_name(index).’wrt’, it is replaced with
Structure_name(index).’wrt ADDR’. For example, you could write
GPIB_Initialize(1).Command = ’wrt 8’;
or you could write
GPIB_Initialize(1).Address = 8;
GPIB_Initialize(1).Command = 'wrt’;
The following message fields, with the keyword ADDR, use the address value
8 defined in the message field .Address.
Structure_name (index).Command = ’rd’, it is replaced with
Structure_name(index).Command = ’rd #LENGTH ADDR’. For example, you
could write
GPIB_Initialize(1).Command = ’rd #10 8’;
or you could write
GPIB_Initialize(1).Address = 8;
GPIB_Initialize(1).RdLength = 10
GPIB_Initialize(1).Command = 'wrt’;
If you enter numerical values in the wrt and rd commands, then the command
uses those values instead of the values in the variables ADDR and LENGH.
For example, the following message uses the GPIB address 10 even though the
value for ADDR is defined as 8.
GPIB_Initialize(1).Address = 8;
GPIB_Initialize(1).Command = 'wrt 10';
Changes to the Read Command — When a GPIB rd command is sent to the
GPIB controller, the controller responds with the data and length of data. To
make using this command easier, the xPC Target diver block, discards the
length of data information. For example, using the normal GPIB
rd command,
you could write
GPIB_Message(1).Command = ’rd #20 16’;
Vue de la page 86
1 2 ... 82 83 84 85 86 87 88 89 90 91 92 ... 652 653

Commentaires sur ces manuels

Pas de commentaire