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 | ||||
---|---|---|---|---|
|
...
This protocol provides data reading/writing into Landis&Gyr devices, type PRV 1.xx, and 2.xx.
Kotva | ||||
---|---|---|---|---|
|
...
- Communication line category: Serial.
- Baud rate and transmission parameters are defined according to the parameters of the communication software in PRV.
Kotva | ||||
---|---|---|---|---|
|
...
- 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 wordKeyword | Full name | Meaning | Unit | Default value | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| Retry Count | Number The number of repeated requests if the communication error occurs. | - | 3 | ||||||
| Max Wait Retry | Maximum retries of reading the response until it is completed. | - | 14 | ||||||
| Retry Timeout | Delay between poll repetition The delay between request repetitions in case of a communication error. | s.ms | 1.000 s | ||||||
| Wait Timeout | Delay The delay between reading the response until it is completed. | ms | 300 millisec. | ||||||
| Wait First Timeout | First The first wait state after the request has been sent before reading the response. | ms | 1200 millisec. | ||||||
| Request Delay | Delay before sending the request. | ms | 1000 millisec. | ||||||
| Maximum Buffer Size | Maximum size of request in bytes. | byte | 60 | ||||||
| Date Offset | The 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 | ||||
---|---|---|---|---|
|
...
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.xx | Write in D2000 v.4.x | Example | |
---|---|---|---|
I/O | $xxx.name | $120.HW | |
PLT | PLTx.name | PLT5.PAR1 | |
ZON | ZONx.name | ||
RGB | RGBx.name | ||
VIP | VIPx.name | ||
CVP | CVPx.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 | ||
TTY | TTYx.name | ||
@PBUS | @PBUSx.name | ||
@MBUS | @MBUSx.name | ||
@OS | @OSx.name | ||
@BLN | @BLNx.name | ||
@BPS | @BPSx.name | ||
TSK | [tsknr]name | [10]S2 | |
SYS | name | DATE |
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:
Function | Number | Content of message | Response |
---|---|---|---|
Config Check | 01 | Config ID | ACK/NAK |
New Point Def | 02 | ID:NAME;0:ConfigId; | ACK/NAK(memory) |
Delete Point | 03 | ID;ConfigId; | ACK |
Read All | 04 | --- | ID:VALUE;... |
ReadAllContinue | 05 | INDEX | ID:VALUE;... |
Set Output | 06 | ID=Value; | ACK |
Reset PRV | 07 | --- | ACK |
Clear Config | 08 | --- | 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 | ||||
---|---|---|---|---|
| ||||
.TSK 3 |
...
Blok kódu | ||||
---|---|---|---|---|
| ||||
9999 END |
...
Blok kódu | ||||
---|---|---|---|---|
| ||||
.TSK 4 |
...
Blok kódu | ||||
---|---|---|---|---|
| ||||
500 END |
...
Blok kódu | ||||
---|---|---|---|---|
| ||||
.TSK 253 |
...
Blok kódu | ||||
---|---|---|---|---|
| ||||
EXIT |
...
Blok kódu | ||||
---|---|---|---|---|
| ||||
TSK 254 |
...
Blok kódu | ||||
---|---|---|---|---|
| ||||
EXIT |
Kotva | ||||
---|---|---|---|---|
|
...
-
Kotva | ||||
---|---|---|---|---|
|
...
- May , 2000 - Transferring of protocol into D2000 ver. 4.10
Kotva | ||||
---|---|---|---|---|
|
...
- Ver. 1.0 – May 9, 2000 – Creation of document
...