Serial DAT

From Derivative
Jump to: navigation, search

Summary
[edit]

The Serial DAT is used for serial communication through an external port, using the RS-232 protocol. These ports are usually a 9 pin connector, or a USB port on new machines. (Using a USB port requires a USB-to-serial adapter and driver.) All of a computer's available serial ports can be found in the Device Manager in the Windows operating system under Computer –> Manage -> Devices -> Serial… -> COM ports. Their names begin with 'COM'. Example: COM1, COM2, COM3.

To send bytes out this connection, see the send methods in the serialDAT_Class, or in Tscript the send Command.

See also Arduino and Serial CHOP.

PythonIcon.pngserialDAT_Class


Parameters - Connect Page

Active active - This check box enables the serial connection.

Row/Callback Format format - - Interpret the incoming data as binary or ASCII data. If the format is Per Byte, one row is appended for each binary byte received. If the format is Per Line, one row is appended for each null or newline delimited message received.

  • One Per Byte perbyte - (formerly called 'binary').
  • One Per Line perline - (formerly called 'Ascii') null/newln delimited.
  • One Per Message permessage - Full incoming msg.

Port port - Selects the COM port that the serial connection will use. Default port names 1 through 8 are available in the popup menu, though any name can be manually entered in this field.

Baud Rate baudrate - - The maximum number of bits of information, including "control" bits, that are transmitted per second. Check your input device's default baud rate and set accordingly.

  • 1200 1200 -
  • 2400 2400 -
  • 9600 9600 -
  • 19200 19200 -
  • 38400 38400 -
  • 57600 57600 -
  • 115200 115200 -
  • 230400 230400 -
  • 460800 460800 -
  • 921600 921600 -
  • 1382400 1382400 -

Data Bits databits - - This parameter sets the number of data bits sent in each. Data bits are transmitted "backwards". Backwards refers to the order of transmission, which is from least significant bit (LSB) to most significant bit (MSB). To interpret the data bits, you must read from right to left.

  • 6 6 -
  • 7 7 -
  • 8 8 -
  • 9 9 -

Parity parity - - This parameter can be set to none, even, or odd. The optional parity bit follows the data bits and is included as a simple means of error checking. Parity bits work by specifying ahead of time whether the parity of the transmission is to be even or odd. If the parity is set to be odd, the transmitter will then set the parity bit in such a way as to make an odd number of 1's among the data bits and the parity bit.

  • Even even -
  • Odd odd -
  • None none -

Stop Bits stopbits - - The last part of transmission packet consists of 1 or 2 Stop bits. The connection will now wait for the next Start bit.

  • 1 1 -
  • 2 2 -

DTR dtr - -

  • Disable disable -
  • Enable enable -
  • Handshake handshake -

RTS rts - -

  • Disable disable -
  • Enable enable -
  • Handshake handshake -
  • Toggle toggle -


Parameters - Received Data Page

Callbacks DAT callbacks - The Callbacks DAT will execute once for each message received.

Execute from executeloc - - Determines the location the script is run from.

  • Current Node current - The script is executed from the current node location.
  • Callbacks DAT callbacks - The script is executed from the location of the DAT specified in the Callbacks DAT parameter.
  • Specified Operator op - The script is executed from the component specified in the Component parameter below.

From Operator fromop -

Clamp Output clamp - The DAT is limited to 100 messages by default but with Clamp Output, this can be set to anything including unlimited.

Maximum Lines maxlines - Limits the number of messages, older messages are removed from the list first.

Clear Output clear - Deletes all lines except the heading. To clear with a script command, here is an example: opparm -c /serial1 clear

Bytes Column bytes - Outputs the raw bytes of the message in a separate column.


Parameters - Common Page

Language language - - Select how the DAT decides which script language to operate on.

  • Input input - The DAT uses the inputs script language.
  • Node node - The DAT uses it's own script language.


Edit/View Extension extension - - Select the file extension this DAT should expose to external editors.

  • dat dat - various common file extensions.
  • From Language language - pick extension from DATs script language.
  • Custom Extension custom - Specify a custom extension.


Custom Extension customext - Specifiy the custom extension.


Word Wrap wordwrap - - Enable Word Wrap for Node Display.

  • Input input - The DAT uses the inputs setting.
  • On on - Turn on Word Wrap.
  • Off off - Turn off Word Wrap.


DATs
Art-Net • CHOP Execute • CHOP to • Clip • Convert • Experimental:CPlusPlus • DAT•  Execute • DAT xport• Error • EtherDream • Evaluate • Examine • Execute • FIFO • File In • File Out • Folder • In • Indices • Info • Insert • Introduction To DATs id• Keyboard In • Experimental:Lookup • Merge • MIDI Event • MIDI In • Monitors • MQTT Client • Multi Touch In • Experimental:NDI • Null • OP Execute • OP Find • OSC In • OSC Out • Out • Panel Execute • Experimental:Parameter • Parameter Execute • Perform • Render Pick • Reorder • Script • Select • Serial • SOP to • Sort • Substitute • Switch • Table • TCP/IP • Text • Touch In • Touch Out • Transpose • TUIO In • UDP In • UDP Out • UDT In • UDT Out • Web • WebSocket • XML

An Operator Family that manipulates text strings: multi-line text or tables. Multi-line text is often a command Script, but can be any multi-line text. Tables are rows and columns of cells, each containing a text string.

TouchDesigner's original built-in Command scripting language prior to Python.

Some operators have a DAT docked to them that contains some python functions. These functions, called "callbacks", get called when something in the operator changes.

The generic thing that holds an Operator, and includes Flags (display, bypass, lock, render, immune) and its position/size in the network. Whether you "lay down an Operator" or "lay down an Node", you're doing the same thing.

Any of the procedural data operators. OPs do all the work in TouchDesigner. They "cook" and output data to other OPs, which ultimately result in new images, data and audio being generated. See Node.

An Operator Family that contains its own Network inside. There are twelve 3D Object Component and eight 2D Panel Component types. See also Network Path.