Notice: Constant DATE_RFC7231 already defined in /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc on line 258
Com port configuration | ComScript Manual

Error message

  • Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in drupal_environment_initialize() (line 690 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in drupal_environment_initialize() (line 691 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in drupal_environment_initialize() (line 692 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in drupal_environment_initialize() (line 695 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in drupal_environment_initialize() (line 697 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in include_once() (line 290 of /home2/greeneye/public_html/comscript_manual/sites/default/settings.php).
  • Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in include_once() (line 291 of /home2/greeneye/public_html/comscript_manual/sites/default/settings.php).
  • Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in include_once() (line 299 of /home2/greeneye/public_html/comscript_manual/sites/default/settings.php).
  • Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in include_once() (line 306 of /home2/greeneye/public_html/comscript_manual/sites/default/settings.php).
  • Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in drupal_settings_initialize() (line 860 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in drupal_settings_initialize() (line 869 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Warning: session_name(): Cannot change session name when headers already sent in drupal_settings_initialize() (line 872 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Warning: Cannot modify header information - headers already sent by (output started at /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc:258) in _drupal_bootstrap_page_cache() (line 2485 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Warning: session_set_save_handler(): Cannot change save handler when headers already sent in drupal_session_initialize() (line 242 of /home2/greeneye/public_html/comscript_manual/includes/session.inc).
  • Warning: session_id(): Cannot change session id when headers already sent in drupal_session_initialize() (line 266 of /home2/greeneye/public_html/comscript_manual/includes/session.inc).
  • Warning: Cannot modify header information - headers already sent by (output started at /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc:258) in drupal_send_headers() (line 1305 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Warning: Cannot modify header information - headers already sent by (output started at /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc:258) in drupal_send_headers() (line 1305 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in book_prev() (line 775 of /home2/greeneye/public_html/comscript_manual/modules/book/book.module).
  • Warning: Cannot modify header information - headers already sent by (output started at /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc:258) in drupal_send_headers() (line 1305 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Warning: Cannot modify header information - headers already sent by (output started at /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc:258) in drupal_send_headers() (line 1305 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /home2/greeneye/public_html/comscript_manual/includes/common.inc).

Com port configuration

ComScript supports all of the various Com Port settings.  When establishing communications with your devices, you must know how to configure your PC COM Port to (baud rate, parity, stopbits, etc.) to match your device.  Please refer to your devices support literature for the COM port configuration.  It is strongly recomended to test communications in the terminal emulator before tyring automated communcations in a profile (device command).

If you would like to learn the details of COM Port operation,  read the following segment of a wikipedia article.

Settings

Many settings are required for serial connections used for asynchronous start-stop communication, to select speed, number of data bits per character, parity, and number of stop bits per character. In modern serial ports using a UART integrated circuit, all settings are usually software-controlled; hardware from the 1980s and earlier may require setting switches or jumpers on a circuit board. One of the simplifications made in such serial bus standards as Ethernet, FireWire, and USB is that many of those parameters have fixed values so that users can not and need not change the configuration; the speed is either fixed or automatically negotiated. Often if the settings are entered incorrectly the connection will not be dropped; however, any data sent will be received on the other end as nonsense.

Speed

Serial ports use two-level (binary) signaling, so the data rate in bits per second is equal to the symbol rate in bauds. A standard series of rates is based on multiples of the rates for electromechanical teleprinters; some serial ports allow many arbitrary rates to be selected. The port speed and device speed must match. The capability to set a bit rate does not imply that a working connection will result. Not all bit rates are possible with all serial ports. Some special-purpose protocols such as MIDI for musical instrument control, use serial data rates other than the teleprinter series. Some serial port systems can automatically detect the bit rate.

The speed includes bits for framing (stop bits, parity, etc.) and so the effective data rate is lower than the bit transmission rate. For example with 8-N-1 character framing only 80% of the bits are available for data (for every eight bits of data, two more framing bits are sent).

Common bit rates include 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600 and 115200 bit/s.[9]

Data bits

The number of data bits in each character can be 5 (for Baudot code), 6 (rarely used), 7 (for true ASCII), 8 (for any kind of data, as this matches the size of a byte), or 9 (rarely used). 8 data bits are almost universally used in newer applications. 5 or 7 bits generally only make sense with older equipment such as teleprinters.

Most serial communications designs send the data bits within each byte LSB (Least Significant Bit) first. This standard is also referred to as "little endian". Also possible, but rarely used, is "big endian" or MSB (Most Significant Bit) first serial communications. (See Endianness for more about bit ordering.) The order of bits is not usually configurable, but data can be byte-swapped only before sending.

Parity

Parity is a method of detecting errors in transmission. When parity is used with a serial port, an extra data bit is sent with each data character, arranged so that the number of 1 bits in each character, including the parity bit, is always odd or always even. If a byte is received with the wrong number of 1s, then it must have been corrupted. However, an even number of errors can pass the parity check.

Electromechanical teleprinters were arranged to print a special character when received data contained a parity error, to allow detection of messages damaged by line noise. A single parity bit does not allow implementation of error correction on each character, and communication protocols working over serial data links will have higher-level mechanisms to ensure data validity and request retransmission of data that has been incorrectly received.

The parity bit in each character can be set to none (N), odd (O), even (E), mark (M), or space (S). None means that no parity bit is sent at all. Mark parity means that the parity bit is always set to the mark signal condition (logical 1) and likewise space parity always sends the parity bit in the space signal condition. Aside from uncommon applications that use the 9th (parity) bit for some form of addressing or special signalling, mark or space parity is uncommon, as it adds no error detection information. Odd parity is more common than even, since it ensures that at least one state transition occurs in each character, which makes it more reliable. The most common parity setting, however, is "none", with error detection handled by a communication protocol.

Stop bits

Stop bits sent at the end of every character allow the receiving signal hardware to detect the end of a character and to resynchronise with the character stream. Electronic devices usually use one stop bit. If slow electromechanical teleprinters are used, one-and-one half or two stop bits are required.

Conventional notation

The D/P/S (Data/Parity/Stop) conventional notation specifies the framing of a serial connection. The most common usage on microcomputers is 8/N/1 (8N1). This specifies 8 data bits, no parity, 1 stop bit. In this notation, the parity bit is not included in the data bits. 7/E/1 (7E1) means that an even parity bit is added to the seven data bits for a total of eight bits between the start and stop bits. If a receiver of a 7/E/1 stream is expecting an 8/N/1 stream, half the possible bytes will be interpreted as having the high bit set.

Flow control (handshaking)

A serial port may use signals in the interface to pause and resume the transmission of data. For example, a slow printer might need to handshake with the serial port to indicate that data should be paused while the mechanism advances a line.

Common hardware handshake signals (hardware flow control) use the RS-232 RTS/CTS or DTR/DSR signal circuits. Generally, the RTS and CTS are turned off and on from alternate ends to control data flow, for instance when a buffer is almost full. DTR and DSR are usually on all the time and, per the RS-232 standard and its successors, are used to signal from each end that the other equipment is actually present and powered-up. However, manufacturers have over the years built many devices that implemented non-standard variations on the standard, for example, printers that use DTR as flow control.

Another method of flow control (software flow control) uses special characters such as XON/XOFF to control the flow of data. The XON/XOFF characters are sent by the receiver to the sender to control when the sender will send data, that is, these characters go in the opposite direction to the data being sent. The circuit starts in the "sending allowed" state. When the receiver's buffers approach capacity, the receiver sends the XOFF character to tell the sender to stop sending data. Later, after the receiver has emptied its buffers, it sends an XON character to tell the sender to resume transmission. These are non-printing characters and are interpreted as handshake signals by printers, terminals, and computer systems.

XON/XOFF flow control is an example of inband signaling, in which control information is sent over the same channel used for the data. If the XON and XOFF characters might appear in the data being sent, XON/XOFF handshaking presents difficulties, as receivers may interpret them as flow control. Such characters sent as part of the data stream must be encoded in an escape sequence to prevent this, and the receiving and sending software must generate and interpret these escape sequences. On the other hand, since no extra signal circuits are required, XON/XOFF flow control can be done on a 3 wire interface.

"Virtual" serial ports

A virtual serial port is an emulation of the standard serial port. This port is created by software which enable extra serial ports in an operating system without additional hardware installation (such as expansion cards, etc.). It is possible to create a large number of virtual serial ports in a PC. The only limitation is the amount of resources, such as operating memory and computing power, needed to emulate many serial ports at the same time.

Virtual serial ports emulate all hardware serial port functionality, including Baud rate, Data bits, Parity bits, Stop bits, etc. Additionally they allow controlling the data flow, emulating all signal lines (DTR/DSR/CTS/RTS/DCD/RI) and customizing pinout. Virtual serial ports are common with Bluetooth and are the standard way of receiving data from Bluetooth-equipped GPS modules.

Virtual serial port emulation can be useful in case there is a lack of available physical serial ports or they do not meet the current requirements. For instance, virtual serial ports can share data between several applications from one GPS device connected to a serial port. Another option is to communicate with any other serial devices via internet or LAN as if they are locally connected to computer (Serial-over-Ethernet technology). Two computers or applications can communicate through an emulated serial port link. Virtual serial port emulators are available for Microsoft Windows and some of them run under Windows CE, Windows Mobile and Pocket PC.