MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Uživatelský manuál Strana 342

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 408
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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')
Zobrazit stránku 341
1 2 ... 337 338 339 340 341 342 343 344 345 346 347 ... 407 408

Komentáře k této Příručce

Žádné komentáře