Serial

SerialText Provides functionality for the communication via the Serial Port.

Serial Text

The Serial Text node is able to send and receive simple text messages across a serial (COM) connection. Also it provides the ability to access the RTS/DTR (output) and CTS/DSR/CD/Ring (input) lines to improvise simple GPI/GPO. Setting the RTS/DTS properties will raise the corresponding line signals. The incoming line signals are indicated by their corresponding properties.

SMPTE Breaks are currently not supported.


Port Settings

The property Port defines which COM port is addressed. The actual system port has to be declared in the Device Mapping. By default, the first port is COM1, the second COM2 and so on. The other port properties Baud, DataBits, Parity, etc. define the line settings how the port is accessed. A change to any of these properties forces Ventuz to close and re-open the port again.

It is highly recommend to use only one single Serial Text node per COM port within a single scene or scene tree because multiple nodes would interfere with each other!


Encoding

The Serial Text node sends and/or receives text based messages to/from a connected device. Ventuz internally handles all text (strings) as Unicode characters which have to be converted to/from the text system used by the device. The property Encoding defines which encoding has to be used, the default being ASCII.

The two properties StartOfText and EndOfText define standard characters prefixed/appended to every message send or received. If start or end characters are defined they are automatically attached to each message sent out and removed from every received message. The following table lists the available standard start and end character sequences:

<Zero> Zero #00
<STX> Start-Of-Text #02
<ETX> End-Of-Text #03
<CR> Carriage Return #13
<LF> Line Feed #10
<CR><LF> Carriage Return, Line Feed #13,#10

Messages

Messages are defined via the Custom Model editor. An out message is expressed by a Method and an in-message as an Event. For every Message created, two new node members are attached to the node:

Direction Message Name Function Message Text Description
outSend1 Method SendSend1 OutSend1 If the method !SendSend1 is called, the corresponding message !OutSend1 is transmitted immediately.
inReceive1 Event OnReceive1 InReceive1 The event !OnReceive1 is fired as soon as a message is found in the input queue matching the corresponding message text !InReceive1.

Wildcards or check sum calculation and checking is not supported. The Serial Text nodes have been designed to send/receive simple text commands only to trigger animations, presets, etc. To achieve more complex serial communication, please consider to use the Script nodes.


Binary Data

If messages containing binary data are required, the Convert To Text Node can be used to decode HTML encoded strings. Connect the In or Out message property to the output of the Convert To Text Node. Put the WebEncode/Output property to DecodeHTML and enter the HTML encoded text into the Format property.

&#49;&#27; Character "1" followed by ESC(27)
{0:0000}&#27; Value0 as for digit number followed by ESC(27)
&#240; byte 240 if ISO 8859-1 encoding is used.

The Serial Text node itself also parses HTML entities! The Convert To Text Node is only needed if you need to construct dynamic messages. Static messages can be entered directly in the In and Out properties.

It is highly recommended to the the ISO-8859-1 encoding when binary data are required. This codepage maps the complete first 256 unicode assignments to an 8bit word.