Serial CHOP

From TouchDesigner 099 Wiki
Revision as of 10:21, 8 September 2015 by Greg (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Summary

The Serial CHOP 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 adaptor and driver.) All of a computer's available serial ports can be found in the Device Manager under the Windows operating system. Their names begin with 'COM'. Example: COM1, COM2, COM3, etc.

This CHOP monitors changes in its input channels, and sends the corresponding script through the serial connection. Any ASCII numeric digits '0'..'9' that are received, are stored and reflected in the output channel named 'return'.

When you need to receive more complex data, other than simple ASCII numbers use the Serial In DAT.

See also Serial DAT, serialDAT_Class, Arduino, send Command.

PythonIcon.png serialCHOP_Class

Parameters - Port Page

Active - This check box enables the serial connection.

State - The type of input transition to monitor.

Port - Selects the COM port that the serial connection will use.

Baud Rate - 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.

Data Bits - 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.

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.

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

Parameters - Scripts Page

Script 0..7 Script 8..15 - These strings are sent out the serial port when the corresponding channel change is detected. For example, Script 2 is sent to the serial port when the third input channel goes from off to on. These scripts will also convert escape sequences like <CR> and \n for carriage returns and \r for line feed.

Standard Options and Local Variables

None.