Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

L&G Fugga PRV

...

communication protocol

Supported device types and versions
Communication line configuration
Communication station configuration
I/O tag configuration
Literature
Changes and modifications
Document revisions

Kotva
typy_verzie
typy_verzie
Supported device types and versions

...

This protocol provides data reading/writing into Landis&Gyr devices, type PRV 1.xx, and 2.xx.

Kotva
komunikacna_linka
komunikacna_linka
Communication line configuration

...

  • Communication line category: Serial.
  • Baud rate and transmission parameters are defined according to the parameters of the communication software in PRV.

Kotva
komunikacna_stanica
komunikacna_stanica
Communication station configuration

...

  • Communication protocol: L&G FUGGA PRV
  • Station The station address is in the range of 0 up to 255. It is in decimal format according to the station number in the communication software in PRV (see below).


Station protocol parameters

You can define the following parameters:

Table 1

Key wordKeywordFull nameMeaningUnitDefault value
Kotva
rc
rc
MR
Retry CountNumber The number of repeated requests if the communication error occurs.-3
Kotva
mwr
mwr
MWR
Max Wait RetryMaximum retries of reading the response until it is completed.-14
Kotva
rt
rt
RT
Retry TimeoutDelay between poll repetition The delay between request repetitions in case of a communication error.s.ms1.000 s
Kotva
wt
wt
WT
Wait TimeoutDelay The delay between reading the response until it is completed.ms300 millisec.
Kotva
wft
wft
WFT
Wait First TimeoutFirst The first wait state after the request has been sent before reading the response.ms1200 millisec.
Kotva
rd
rd
RD
Request DelayDelay before sending the request.ms1000 millisec.
Kotva
mbs
mbs
MBS
Maximum Buffer SizeMaximum size of request in bytes.byte60
Kotva
doff
doff
DOFF
Date OffsetThe correction of the date offset in PRV and D2000 System. D2000 System interprets the date as a number of days from 1-1-1972. To test PRV 1.64 (SW ver. 4.04) we had to set the value 20089 , because PRV implements the date from 1-1-1917.-4806

String A string containing the protocol parameters is defined as follows:

...

If there is used a keyword with an invalid value in the initialization string, there will be used corresponding default value according to the table 1.

Kotva
merany_bod
merany_bod
I/O tag configuration

...

I/O tags: AI, AO, CI, CO, DI, DO, TIR, TOR, TIA, TOA

The address must be in text format for configuration. In comparison with the implementation in D2000 ver.3.xx, the range of types is not limited. The table shows the writing format of some types:

Type in D2000 v.3.xxWrite in D2000 v.4.xExample
I/O$xxx.name$120.HW
PLTPLTx.namePLT5.PAR1
ZONZONx.name 
RGBRGBx.name 
VIPVIPx.name 
CVPCVPx.name 
@MGR@MGRx.name 
@MGG@MGGx.name
@SEZ@SEZx.name 
@AI@AIx.name 
@AO@AOx.name 
@DI@DIx.name 
@DO@DOx.name 
@CI@CIx.name 
@PHON@PHONx.name 
@RING@RINGx.name 
TTYTTYx.name 
@PBUS@PBUSx.name 
@MBUS@MBUSx.name 
@OS@OSx.name 
@BLN@BLNx.name
@BPS@BPSx.name 
TSK[tsknr]name[10]S2
SYSnameDATE


PRV (Fugga) protocol

Format of the message:

<STX><ADDRESS><FUNCTION><SEQ><CONTENT OF MESSAGE><ETX/ETB><CRC>

...

CONTENT OF MESSAGE - a message in ASCII format - the parts of the message are separated by “;”.

ETX - end of message

ETB - end of the block

CRC - checksum  CRC-CCITT Cyclic Redundancy Check according to IBM

  • to PRV - 6 bytes ASCII
  • from PRV - 2 bytes binary

AcknowledgementAcknowledgment:

ACK - O.K. - content of the message contains the ACK character

NAK - error - content of the message contains the NAK character

Functions:

FunctionNumberContent of messageResponse
Config Check01Config IDACK/NAK
New Point Def02ID:NAME;0:ConfigId;ACK/NAK(memory)
Delete Point03ID;ConfigId;ACK
Read All04---ID:VALUE;...
ReadAllContinue05INDEXID:VALUE;...
Set Output06ID=Value;ACK
Reset PRV07---ACK
Clear Config08---ACK


Solution of problematic situations

On the D2000 System side:

1. PRV does not respond in a defined limit.

2. Wrong checksum.

The message repeats is repeated N-times - all necessary parameters can be set by the station protocol parameters.

On the PRV side:

Wrong checksum - PRV does not respond.

Changes in PRV (Fugga) protocol ver. 1.02

DefinitionUsage: The communication with PRV1/PRV2 via the serial lines and a radio modem with OnLine configuration of transmitted values.

New features in comparison with ver. 1.01:

  • time I/O tags were implemented
  • optimization of communication - only the value changes are transmitted

Number The number of transmitted tags from one station is max. 255.

Communication parameters on the PRV side:

Task 3:

Communication port number in PRV: PRT variable PRT <1..3>

Station address: variable AD$ - the address always consists of two digits, e.g. “01” - address 1.

Communication task number - 3 is the default. If it needs to be changed, modify the tasks 254 and 253 - a restart after power failure and WatchDog Error. Task 4 must be modified - the references to the local variables of task 3.

Watch Dog WatchDog number - 7 is the default. If it needs to be changed, modify the task 253 and set a new Watch Dogu WatchDog number in the calling of WADO function WADO on the line 305.

Maximum The maximum size of the transmitted message to PC - BLK variable - the limit is 160.

Baud rate: The parameter TTYPRT.BD on the line 60.

Task number for data acquisition: Task 4 is used. If it needs to be changed, the task number on the line 48 must be modified - the start of Task 4.

Task 4:

Parameter TSKFRM$ - defines an output format of the task. Actually, it defines an accuracy of transmitted float numbers.

Parameter WAIT DURING 5 on the line 70 defines a value acquisition period in seconds.


Task listing for ver. 1.02

Blok kódu
languageesl
themeConfluence
.TSK 3

...

Blok kódu
languageesl
themeConfluence
9999 END

...


Blok kódu
languageesl
themeConfluence
.TSK 4

...

Blok kódu
languageesl
themeConfluence
500 END

...


Blok kódu
languageesl
themeConfluence
.TSK 253

...

Blok kódu
languageesl
themeConfluence
EXIT

...


Blok kódu
languageesl
themeConfluence
TSK 254

...

Blok kódu
languageesl
themeConfluence
EXIT

Kotva
literatura
literatura
Literature

...

-

Kotva
zmeny_upravy
zmeny_upravy
Changes and modifications

...

  • May , 2000 - Transferring of protocol into D2000 ver. 4.10

Kotva
revizie
revizie
Document revisions

...

  • Ver. 1.0 – May 9, 2000 – Creation of document

...