4204
FLOW METER
TECHNICAL MANUAL P/N XXX-0000 Rev. 5 Ver. 3.4
43
In the download session opening:
If REQ_CODE = 0 the current position won’t be edited, if REQ_CODE = 1 the current position will
become the start of the archive (in this case, the entire archive will be downloaded)
In the records request:
The first requested record must have PACK_NUM = 1, the second
PACK_NUM = 0, the third PACK_NUM = 1, and so on ... that is: to ask for the next record, the value of
PACK_NUM must change; if you send the query without changing the
value of PACK_NUM the device will transmit the same record.
Esempio di sessione di scarico dati
device master
<--------- subfun=0xF0 REQ_CODE=0 --------- [1]
--------------- subfun=0xF0 --------------> OK
<--------- subfun=0xF1 PACK_NUM=1 --------- request of first block of records [2]
---------- subfun=0xF1 RECCOUNT=9 --------> OK: 9 record received
<--------- subfun=0xF1 PACK_NUM=0 --------- request of following block of records
---------- subfun=0xF1 RECCOUNT=9 --------> OK: 9 record received
<--------- subfun=0xF1 PACK_NUM=1 --------- request of following block of records
---------- subfun=0xF1 RECCOUNT=9 --------> OK: 9 record received
<--------- subfun=0xF1 PACK_NUM=0 --------- request of following block of records
-------------------- ??? -----------------> ERR [3]
<--------- subfun=0xF1 PACK_NUM=0 --------- request of block retransmission [4]
---------- subfun=0xF1 RECCOUNT=9 --------> OK: 9 record received
<--------- subfun=0xF1 PACK_NUM=1 --------- richiesta blocco di records successivo
---------- subfun=0xF1 RECCOUNT=9 --------> OK: 9 record received
<--------- subfun=0xF1 PACK_NUM=0 --------- richiesta blocco di records successivo
---------- subfun=0xF1 RECCOUNT=7 --------> OK: 7 record received (end) [5]
Commenti:
[1] The session opens with REQ_CODE = 0, so the transfer starts
from the current position.
[2] The first requested block (after the session opening) must have PACK_NUM = 1
[3] No response received (timeout) or the response is faulted
[4] Since it was not received a valid response, a retransmission of the block is requested
by sending the query with the same value of PACK_NUM
[5] 7 records were received; these are the last records, because
RECCOUNT = 7 all the records have been transferred
and the session can be completed (the session could be ended when You receive a block with
RECCOUNT < 9).
In the given example, 5*9+7 = 52 records were transferred.