Omega A2400 User Manual

Page 41

Advertising
background image

SetUp Command 5-2

A typical SetUp command would look like: $1SU31070102

Notice that each byte is represented by its two-character ASCII equivalent.
In this example, byte 1 is described by the ASCII characters ‘31’ which is the
equivalent of binary 0011 0001 (31 hex). The operand of a SU command
must contain exactly 8 hex (0-F) characters. Any deviation from this format
will result in a SYNTAX ERROR.

For the purposes of describing the SetUp command, ‘bit 7’ refers to the
highest-order bit of a byte of data. ‘Bit 0’ refers to lowest-order bit

‘bit number’:

7

6

5

4

3

2

1

0

binary data:

0

0

1

1

0

0

0

1 = $31 (hex)

The SU command is write protected to guard against erroneous changes in
the setup data; therefore each SU command must be preceded by a Write
Enable (WE) command. To abort an SU command in progress, simply send
a non-hex character (an ‘X’ for example) to generate a SYNTAX ERROR,
and try again.

Caution: Care must be exercised in using the SU command. Improper use
may result in changing communications parameters (address, baud rate,
parity) which will result in a loss of communications between the host and
the module. In some cases the user may have to resort to using Default
Mode to restore the proper setups. The recommended procedure is to first
use the Read Setup (RS) command to examine the existing setup data
before proceeding with the SU command.

Byte 1
Byte 1 contains the A2400 address. The address is stored as the ASCII code
for the string character used to address the module. In our example
command $1SU31070102 , the first byte ‘31’ is the ASCII code for the
character ‘1’. If our sample command is sent to a module, the EEPROM will
be loaded with the address ‘1’, which in this particular case remains
unchanged. To change the module address to ‘2’ , byte 1 of the SetUp
command becomes ‘32’, which is the ASCII code for the character ‘2’. Now
the command will look like this: $1SU32070102. When this command is
sent, the module address is changed from ‘1’ to ‘2’.

The module will no longer respond to address ‘1’.

When using the SU command to change the address of a module, be sure
to record the new address in a place that is easily retrievable. The only way

Advertising