Defining any Default Pre- and Post-Amble Message Settings for a Channel
Some communications equipment or media require ‘padding’ or specific digits (an additional message) to be inserted at the start and/or at the end of each message that is transmitted using that equipment or media. Prefixed digits or padding are referred to as Pre-Amble and suffixed digits or padding as Post-Amble. Pre- and Post-Ambles comprise an even number of digits, so giving a whole number of bytes. Pre- and Post-Ambles are typically used to help to prevent messages from being ‘clipped’ (truncated). However, some communications equipment may use Pre- and Post-Ambles to correctly interpret both the start and end of each transmitted message (or ‘data packet’), or to specify a delay to allow a channel to synchronize before any data is transmitted.
If Pre- and Post-Ambles are required, the actual digits that you need to specify differ, depending on:
- ‘Padding’ Requirements—Certain types of media, such as old analog radios, are prone to ‘clipping’ messages, therefore padding is required to help to ensure that the actual message content is not clipped. The amount of padding required differs, depending on the communications equipment or media—see the documentation supplied with your communications equipment for 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 to make allowance for the ‘padding’ time that is required (see Calculate the Time that a Channel Takes to Transmit each Byte of Data).
If Pre- or Post-Ambles are used as padding, you can typically specify any Hexadecimal digits that are compatible with the protocol, as long as you specify a sufficient number of digits. Be aware that in some protocols, each message begins with a particular sequence of bytes. Such bytes must not be used as Pre- or Post-Amble padding. Refer to the driver- or product-specific documentation for further details. Typically, the digits FF are used for padding.
- Instructions for Communications Equipment—Some communications equipment may define commands that can be included with each message, which specify how to process the message. Such instructions typically differ on a per-outstation basis (see Define any Pre- and Post-Ambles for an Individual Outstation). Each command will consist of a sequence of bytes that precede and/or follow the message—you specify these as a sequence of hexadecimal digits in the Pre-Amble field (for instructions that precede the main message) and/or in the Post-Amble field (for instructions that follow the main message)—see the documentation supplied with your communications equipment for the details of any commands supported by the equipment.
If an advanced driver supports Pre- and Post-Ambles, the Channel Form(s) for the driver include an additional Pre/Post Amble section on the Scan Parameters tab. Use the fields within the Pre/Post Amble section to specify the Pre- and Post-Ambles that need including for any transmissions via that channel.
Should a particular outstation use different Pre- and/or Post-Amble bytes to those specified on the channel (for instance, if a radio communicates with that outstation at a different frequency to the other outstations on the channel), you can override the channel’s default Pre- and Post-Amble settings with outstation-specific settings for that particular outstation (see Define any Pre- and Post-Ambles for an Individual Outstation).
The Pre- and Post-Ambles configured in ClearSCADA are only applied to messages that ClearSCADA’s drivers transmit, rather than receive, via a channel.
ATTENTION: Pre-ambles on messages received via network-connected channels are only supported when ClearSCADA initiates the connection.
The Pre/Post Amble section on the Channel Form contains these fields:
Use to specify any bytes that are required at the start of each message that the driver transmits via this channel.
Leave the field empty if no pre-amble is required.
Use to specify any bytes that are required at the end of each message that the driver transmits via this channel.
Leave the field empty if no post-amble is required.
Where a Pre- and/or Post-Amble is required, specify that pre- or post-amble as a sequence of hexadecimal digits. Each pair of digits forms a byte in the pre- or post-amble. Ensure that the number and type of digits specified are suitable for both the protocol and type of communications media being used. (Hexadecimal format is base 16 and can include the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. Each digit is a nibble (half a byte), therefore you should always specify pairs of digits.)
Refer to the documentation supplied with your communications equipment for the number of bytes (pairs of digits) that you need to specify. The padding will probably be specified as a time—to ascertain the number of bytes that you need to specify to allow for the required padding time, you will need to Calculate the Time that a Channel Takes to Transmit each Byte of Data.
Refer to the driver- or product-specific documentation for information on any protocol-specific limitations or requirements.
ATTENTION: Some protocols require each message to begin with a particular sequence of bytes. Do not use such bytes as Pre- or Post-Amble padding. Refer to the driver- or product-specific documentation for further details.