Online DCA-10 Manual
Menu

Serial Communication Detail

Calibration via the RS485 serial point
 
The communication with the amplifier is done via the RS 485 serial link with the following described protocols.
 
Parameter of the serial link:
9600 Baud, 8 data bits, No Parity, 1 stop bit  (9600 8-N-1)
 
The module DCA - 10 / DCA - 20 is to receive data.
 
Addressing the module :
Starting sign
Module address
Module address
Number of data bytes
Type of data
Data byte 1
Data byte 2
Data byte n
End of sign
Block Check
STX
ADR
ADR
LEN
TYP
DAT
DAT
DAT
ETX
BCC
 
 
·     When the module DCA-10 / DCA-20 recognises an incorrect build up of the data frame or an incorrect BCC it will answer with the sign NAK.
·     If the data frame has been received correctly, the DCA-10 / DCA-20 will show the sign ACK and will wait for the sign ENQ in order to confirm with the sign EOT if the receipt is correct.
·     This finishes the communication and the amplifier carries out the required function.
 
Example of a data frame:
 
To zero channel A and B at module address 04h:
Starting sign
Module address
Module Address
Number of data bytes
Type of data
Data byte 1
Data byte 2
Data byte 3
End of sign
Block Check
STX (02h)
ADR (04h)
ADR (04h)
LEN (03h)
TYP (00h)
DAT (01h)
DAT (01h)
DAT (01h)
ETX
(03h)
BCC
(01h)
 
The sent data bytes will carry out the following functions:
Data byte
Function
Possible selection
Data byte 1
Selects the calibration via RS 485
Always High
Data byte 2
Selects the channel to be calibrated
0 = no selection
1 = channel A and B
2 = only channel A
3 = only channel B
Data byte 3
Selects the range to be calibrated
0 = no selection
1 = zero point (TARE)
2 = amplification
3 = proportional calibration
Data byte 4
Low byte percentage value
00 hex – 99 hex
Data byte 5
High byte percentage value
00 hex – 99 hex
 
* The information for the 4th and 5th data byte is only required for the proportional calibration.
 
Example:
 
If you want to calibrate 25,00% of the required load the following data has to be sent:
 
Low byte = 00 High byte = 25
 
Notes
 
·     The master always sends the module address twice, so that an interruption in the supply will not be responsible for addressing the wrong module.
·     The calculation of the BCC- bytes on all the transmitted data except STX and BCC are linked by an EXCLUSIVE OR.
·     No more than 10 byte data can be transferred as one block.
·     If address 0 is sent then all modules that are connected to the bus are addressed
 
The module DCA - 10 / DCA - 20 is to return data
 
Request to the module :
Starting sign
Module address
Module address
Number of data bytes
Type of data
Request to send
STX
ADR
ADR
LEN
TYP
ENQ
 
Enter 0 in LEN.
 
Example of a data frame :
 
To receive a measured value on channel A at address 04h:
Starting sign
Module address
Module address
Number of data bytes
Type of data
Request to send
STX (02h)
ADR (04h)
ADR (04h)
LEN (00h)
TYP (01h)
ENQ
(05h)
 
 
The module replies with the following data :
Start sign
Module address
Number of data bytes
Type of data
Data byte 1
Data byte 2
Data byte n
End sign
Block Check
STX
ADR
LEN
TYP
DAT
DAT
DAT
ETX
BCC
 
 
Note :
 
·     If the receiving device sees the wrong construction of a data frame or a wrong BCC, it will answer with the sign NAK.  The DCA-10 / DCA-20 is requested to send a new data frame.  This has to be repeated 3 times at most.
·     If the data frame was received correctly the receiving device will send the message ACK and waits for the sign EOT from the module DCA-10 or DCA-20. 
·     The communication is now finished.
 
The request for sending will enable the following function:
Type Byte
Function
Possible Selection
Type
Selects the data to be sent
0 = send all analogue values
1 = send value of channel A
2 = send value of channel B
3 = send status report
 
The status message can have the following meaning:
 
Data byte = 0 calibration successful or Data byte = 1     calibration unsuccessful
 
If you request the analogue values the values received will always consist of two data bytes.  The first representing the low-byte and the second the high-byte of the measured tension.  Together these bytes form a 12Bit value, which has to be scaled to a maximum tension of 10V.
 
Meaning of symbols :
 
STX     =     starting sign                    = 02 hex
ADR     =     adjusted address on DCA-20          = 00 hex – FF hex
LEN     =     number of data bytes to be transferred     = 00 hex – FF hex
TYP     =     not used, hence always               = 00 hex
DAT     =     usable data                    = 00 hex – FF hex
ETX     =     end sign                         = 03 hex
BCC     =     block check                     = 00 hex – FF hex
NAK     =     negative receipt                    = 15 hex
ACK     =     positive receipt                    = 06 hex
ENQ     =     request to send                    = 05 hex
EOT     =     end of transfer                    = 04 hex