MATLAB XPC TARGET 4 - DEVICE DRIVERS Especificações Página 44

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 653
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 43
2 RS232 I/O Support
2-14
Note Field names in the structures are case sensitive.
RS232_Send_Receive(1).SendData = ’da_1234,%d,%f,;\n’;
RS232_Send_Receive(1).InputPorts = [1 2];
RS232_Send_Receive(1).RecData = ’noerror\n’;
RS232_Send_Receive(1).OutputPorts = [1];
RS232_Send_Receive(1).Timeout = 0.01;
RS232_Send_Receive(1).EOM = 1;
3 From the File menu, click Save As. In the Save as file dialog box, enter the
name of the M-file script. For example, enter
RS232_Messages.m
4 Close the text editing window.
5 In the MATLAB command window, type the name of the M-file script you
created with the RS-232 structures. For example, type
RS232_Messages
MATLAB loads and runs the M-file script to create the message structures
in the MATLAB workspace needed by the RS-232 driver blocks.
6 Open your Simulink model, or press Ctrl+D.
Simulink updates the RS-232 driver blocks with the information from the
structures. For example, Simulink adds inputs and outputs defined in the
structures to the blocks.
7 Connect the input and output ports on the RS-232 driver blocks to other
blocks in your Simulink model.
You model should look similar to the figure shown below.
Vista de página 43
1 2 ... 39 40 41 42 43 44 45 46 47 48 49 ... 652 653

Comentários a estes Manuais

Sem comentários