Calculate the Time that a Channel Takes to Transmit each Byte of Data

Certain types of media, such as old analog radios, are prone to ‘clipping’ messages. With such media, ‘padding’ is used to help to prevent the actual message content from being clipped. The documentation supplied with your communications equipment should indicate the amount of ‘padding’ that is required. This is typically given as a time (in milliseconds)—you then use the channel’s port settings to calculate the number of bytes that you need to specify as a Pre- and/or Post-Amble, to allow for that amount of ‘padding’ time.

To ascertain the channel’s transmission rate in bytes per second, use the following formula:

<Baud Rate> / (<One Start Bit> + <Number of Data Bits> + <Parity> + <Number of Stop Bits>)

(where <Parity> is 0 if set to ‘None’, and 1 if set to any other option)

Then to ascertain the milliseconds per byte:

1000/<Result of above calculation>

Example 1:

Geo SCADA Expert is to communicate with an outstation using analog radio. The radio needs 16ms to power up at the start of each transmission.

Using 8N1 1200 baud settings, a byte takes approximately 8.3ms to transmit, therefore a pre-amble of two bytes—four digits—is required as ‘padding’ at the start of each message, to allow the radio the 16ms that it requires to power up.

The Pre-Amble FFFF is used to allow the radio time to power up. This will delay the genuine content of each message by a maximum of 16.6ms.

(At 8N1 1200, the channel transmits 1200/(1 + 8 + 0 + 1) = 120 bytes per second. As such, it takes 1000/120 = 8.3ms to transmit each byte of data. Therefore two bytes—four digits—are required to pad the message by 16.6ms.)

Example 2:

Geo SCADA Expert is to communicate with an outstation using a dial-up modem.

After some initial testing, it has been found that the phone line and modem combination sometimes corrupts the first few bytes of a transmission.

A Pre-Amble is used to ‘pad’ each transmission with a specified number of bytes, which are discarded by the receiving device.


Disclaimer

Geo SCADA Expert 2020