Visual Productions forum

Author Topic: Serial communication (e.g. RS-232 RS-422)  (Read 2458 times)

October 08, 2008, 07:31:16 PM
Read 2458 times

Maarten Engels

  • Administrator
  • Member
  • *****
  • Posts: 2383
    • www.visualproductions.nl
From VisualDMX release 1.49 build 26 we have added support for receiving serial communication. This enables you to have actions triggered by the computer's COM port using RS-232, RS-422, etc.

To use this feature simply add an action list with source "Serial" and actions to this list.

Set your transmitting device to a rate of 19200 baud, 8 data bits, no parity and one stop bit. Connect the cable to COM1 of your computer, and send data in the following format:

Just to trigger an action:  <action_index>E
Example: 0E

To switch a parameter: <action_index> bool "on"/"off"E
Example: 13 bool "on"E

To set a level: <action_index> float 0.0000E
Example: 20 float 0.7231E

To set a colour <action_index> colour 0xRRGGBBE
Example: 3 colour 0xff88FFE

The data sent is ASCII based; this is helpful while debugging your application. Also, the commands are parsed case insensitive.

Each message is marked with an ETX (End of Text) character E (0x45) as the last byte. To preserve the E character to be used within the data of the message, a DLE (Data Link Escape) character D (0x44) is used to perform byte stuffing.

Any E character not being an ETX should be preceded by a DLE. Consequently, any D character not being a DLE should be preceded by a DLE as well.

For example the following string is not a correct command:
3 colour 0xDD00E0

It should be replaced by:
3 colour 0xDDDD00DE0E
« Last Edit: October 08, 2008, 07:38:51 PM by Maarten Engels »
Maarten Engels
Visual Productions BV

 

SMF spam blocked by CleanTalk