Serial I/O Blocks: Difference between revisions
(Created page with '===MotoHawk:Blocks:Serial I/O Definition=== This MotoHawk® block defines and initializes the serial port. Only one of these blocks is allowed. Each direction, Transmit and Rece…') |
No edit summary |
||
Line 18: | Line 18: | ||
[[Image:SerialTransmitBlock.JPG]] | [[Image:SerialTransmitBlock.JPG]] | ||
===Example Model=== | |||
If you want an example of how to use the serial blockset look at the example . This example will receive data at a baud rate of 9600 for RS485 on the 112 pin controller. It will display the last 6 characters sent. The subystem that displays characters will also have a counter run every time it is enabled. That will allow the user to know that the serial values are being received |
Revision as of 20:05, 19 March 2012
MotoHawk:Blocks:Serial I/O Definition
This MotoHawk® block defines and initializes the serial port. Only one of these blocks is allowed. Each direction, Transmit and Receive, may have a queue attached. Specify a queue size or 0 if no queue is desired. Note that the existence of this block disables the MotoTune protocol via RS-485.
MotoHawk:Blocks:Serial Receive
When this MotoHawk® block executes, the Trigger output port fires once for each character in the receive queue (if attached). The Character output port is set to the corresponding read character.
If no characters are available to be read, the Trigger will not fire.
MotoHawk:Blocks:Serial Transmit
When triggered, this MotoHawk® block places a single character into the serial port transmit queue (if attached), and schedules immediate transmission. Input a uint8 character.
Example Model
If you want an example of how to use the serial blockset look at the example . This example will receive data at a baud rate of 9600 for RS485 on the 112 pin controller. It will display the last 6 characters sent. The subystem that displays characters will also have a counter run every time it is enabled. That will allow the user to know that the serial values are being received