MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Manual do Utilizador Página 342

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 408
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 341
8 Serial Port I/O
8-22
Parity = none
PinStatus = [1x1 struct]
PinStatusFcn =
Port = COM1
ReadAsyncMode = continuous
RequestToSend = on
StopBits = 1
Terminator = LF
To display the current value for one property, you supply the property name to
get.
get(s,'OutputBufferSize')
ans =
512
To display the current values for multiple properties, you must include the
property names as elements of a cell array.
get(s,{'Parity','TransferStatus'})
ans =
'none' 'idle'
You can also use the dot notation to display a single property value.
s.Parity
ans =
none
Configuring Property Values
You can configure property values using the set function
set(s,'BaudRate',4800);
or the dot notation.
s.BaudRate = 4800;
To configure values for multiple properties, you can supply multiple property
name/property value pairs to
set.
set(s,'DataBits',7,'Name','Test1-serial')
Vista de página 341
1 2 ... 337 338 339 340 341 342 343 344 345 346 347 ... 407 408

Comentários a estes Manuais

Sem comentários