D-MAX DMC-20SEC Manual de usuario Pagina 16

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 28
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 15
16
Macro Sensors Tel. (856) 662-8000
11 May, 2006 DMC-A2 Series (ALD-00029)
www.macrosensors.com
Serial Communications (cont.)
ignored by the receiving device. The user sets the parity bit of
incoming data and sets the parity bit to odd, even or none (mark
parity) for outgoing data.
The parity bit is set in the Calibration Mode.
Stop Bit
The stop bit is the last character to be transmitted. The stop bit
provides a single bit period pause to allow the receiver to
prepare to re-synchronize to the start of a new transmission
(start bit of next byte). The receiver then continuously looks for
the occurrence of the start bit.
Note: DMC-A2 Series
meters use only one stop bit.
Command Response Time
The meter uses half-duplex operation to send and receive data.
This means that it can only send or receive data at any given
time. It cannot do both simultaneously. The meter ignores
commands while transmitting data, using RXD as a busy signal.
When the meter receives commands and data, after the first
command string has been received, timing restrictions are
imposed on subsequent commands. This allows enough time
for the meter to process the command and prepare for the next
command.
See Figure 6. At the start of the time interval t
1
, the sending
device (PC) prints or writes the string to the com port, thus
initiating a transmission. During t
1
the command characters are
under transmission and at the end of this period the command
terminating character is received by the meter. The time
duration of time interval t
1
is dependent on the number of
characters and baud rate of the channel:
t
1
= (10 * # of characters) / baud rate
At the start of time interval t
2
, the meter starts to interpret the
command, and when complete performs the command
function.
After receiving a valid command string, the meter always
indicates to the sending device when it is ready to accept a new
command. After a read command, the meter responds with the
requested data followed by a carriage return (øDH) and a line
feed (øAH) character. After receiving a write command, the
meter executes the write command and then responds with a
carriage return/line feed.
The sending device should wait for the carriage return/line feed
characters before sending the next command to the meter.
If the meter is to reply with data, time interval t
2
is controlled by
using the command terminating character: $ or *. The $
terminating character results in a response time window of 50
ms minimum and 100 ms maximum.This allows enough time to
release the sending driver on the RS-485 bus. Terminating the
command line with the * symbol, results in a response time
window (t
2
) of 2 ms minimum and 50 ms maximum. The faster
response time of this terminating character requires that
sending drivers release within 2 ms after the terminating
character is received.
At the start of time interval t
3
, the meter responds with the first
character of the reply. As with t
1
, the time duration of t
3
is
dependent on the number of characters and baud rate of the
channel:
t
3
= (10 * # of characters) / baud rate
At the end of t
3
the meter is ready to receive the next command.
The maximum throughput of the meter is limited to the sum of
the times: t
1
, t
2
, t
3
.
Ready
t
1
Response From The Meter
Command
Terminator
Received
t
2
First
Character
of Reply
Ready
t
3
Reply
Transmission
Time
Figure 6 – Timing Diagram
ASCII Serial Mode Read/ Write
Information
ASCII Command Character Descriptions
Table 3 describes the functions of the command string
characters.Table 4 shows examples of how the command string
is constructed.
Command String Construction
When sending commands to the meter using a Terminal
emulation program, a string containing at least one command
character must be constructed. A command string consists of
the following characters and must be constructed in the order
shown:
1) A start character.
2) The meter (node) address (optional).
3) The read/write command.
4) The register address.
5) A separator character.
6) The data value.
7) The message terminator.
Figure 7 shows an example of a command string.
Start
Character
Meter
Address
Read/Write
Command
Register
Address
Separator
Character
Data
Value
Message
Terminator
Sr130*
Figure 7 – Example of a Command String
Vista de pagina 15
1 2 ... 11 12 13 14 15 16 17 18 19 20 21 ... 27 28

Comentarios a estos manuales

Sin comentarios