B&R PVI Interface (Bernecker & Rainer Process Visualisation Interface)
Protocol description
Communication line configuration
Station configuration
I/O tag configuration
Literature
Changes and modifications
Document revisions
Protocol description
...
Parameter | Meaning | Unit | Default value |
---|
--- PVI Parameters --- |
| Parameter for the PviXInitialize function (PVI interface initialization). Communication timeout for the client/server communication in seconds The value specified with this parameter serves as the default setting of the initialization parameter COMT. If no particular presetting is desired, the default value 0 should be entered. | sec | 0 |
| Parameter for the PviXInitialize function (PVI interface initialization). Retry time for PVICOM user messages in seconds. The value specified with this parameter serves as the default setting of the initialization parameter RETR. If no particular presetting is desired, the default value 0 should be entered. | sec | 0 |
Initialization parameter string | Parameter for the PviXInitialize function (PVI interface initialization). String with initialization parameters. According to the PVI documentation, the following parameters are supported: Parameter | Description |
---|
COMT | Communication timeout for the client/server (application/PVI Manager) communication in seconds The timeout also defines the time for the life sign monitor. An additional period is needed to detect a disruption in the client/server connection. To determine the total time where a communication disruption would be detected (at the latest), the timeout value specified here has to be doubled. If the timeout is 5, then an interruption in the connection can be detected as early as 5 seconds and as late as 10 seconds. Connection interrupts are not recognized as such by the PVICOM interface if they occur within the timeout period. Data transfer simply continues once the connection is reestablished. Often used values are 3 - 10 seconds for local communication and 5 - 30 seconds for remote communication. Value: 1 - 3600, = 0 ... Default value of 30 s used. The value specified in the function argument "Timeout" serves as a presetting for this parameter. | RETR | Retry time for PVICOM user messages is seconds. The default setting ("RetryTime=0") should normally be used for this parameter. See the User Message Operations section for more information about this parameter. Value: 1 - 3600, <= 0 ... no repetition. The value specified in the function argument "RetryTime" serves as a presetting for this parameter. | LM | Limit on user messages. Default: "LM=1". PVICOM applications basically do not need to change the default setting of this parameter. However, if an application is able to respond quickly to PVICOM user messages, then a higher limit value ("LM=100", "LM=500") can speed up user message execution. See the User Message Operations section for more information about this parameter. Value: 1 - 65535, <= 0 -> No limiting. | PT | Process timeout in seconds. Default: "PT=0". This timeout can be used to monitor the time between requests and responses. This parameter is only intended for PVICOM applications that carry out particular tasks. Standard applications do not need to be monitored and should use the default setting (no timeout monitoring). Value: 1 - 3600, <=0 -> No timeout monitoring | IP | TCP/IP address or hostname. If the IP initialization parameter is specified, then the Remote communication type is used for PVICOM communication. Either the TCP/IP address (e.g. "IP=10.43.50.62") or the hostname ("IP=SystemPC1") of the server (PVI Manager) is specified with this parameter. If the hostname is given, then the IP address assigned to the name is determined by the system | PN | TCP/IP port number. Default: "PN=20000". This parameter is only required in conjunction with the IP parameter. The port number assigned to the PVI Manager needs to be specified here (PVI Manager Properties). Value: 1024 - 32767. | AS | Auto-Start (only for the local communication type). 1 ... PVI Manager is started (default). 0 ... PVI Manager is not started automatically and must be started already when the function is called. More information about the startup procedure can be found in the PVI Manager section. |
| - | - |
| ObjectDescriptor parameter for the PviXCreate function when creating a Line object. The parameter specifies the line description. The default value CD=LnIna2 creates an INA2000 line, which is used for communication with B&R SG3, SGC, and SG4 controllers via INA2000 protocol (Industrial Network Architecture).
| - | CD=LnIna2 |
| ObjectDescriptor parameter for the PviXCreate function when creating a Device object. The parameter gives a description of the device. The default value CD="/IF=tcpip /SA=1" creates a connection using TCP/ IP (UDP), the source address (the D2000 KOM address) will be 1. The PVI documentation describes the parameters for individual device types (Serial, Ethernet UDP, Modem, CAN device, Profibus FDL device). | sec | 30 |
--- Other Parameters --- |
| The parameter affects the scope of browsing used to configure the I/O tags. If the parameter is set to YES, when browsing I/O tag, global variables, all Task variables defined within the CPU, as well as all local variables defined in all tasks will be searched. If the parameter is set to NO, the global variables and local variables of the task defined by the Task object definition protocol parameter are searched. Note: this feature is disabled for two reasons. First, for reasons not yet identified, the use of this functionality will cause the D2000 KOM process to crash after several browsing refreshes. Second, on a station, it only makes sense to configure global variables and local variables of the task defined by the Task object definition protocol parameter. Local variables of other tasks will not work. | YES/NO | NO |
| This parameter allows the batch file to be started at the (re)start of communication. This batch file can e.g. restart the PVI Manager process (PviMan.exe) - e.g. using the pskill.exe utility or using the Windows utility "sc" if PVI Manager is running as a service. The symbolic constant #APPDIR# may be used in the command name, which will be substituted by the application directory name, e.g. #APPDIR#cleanup.bat | - | - |
| The time limit in seconds for the batch file specified by the Cleanup command parameter to finish execution. After this time elapses, the command will be terminated. | sec | 10 |
| Logging of values being read and written, together with names of /O tags. | YES/NO | NO |
| Logging of additional debug information about communication. | YES/NO | NO |
...
Parameter | Meaning | Unit | Default value |
---|
Station object definition | Definition of an object of Station type. It is not necessary to configure for the INA2000 line (the parameter is used on NET2000, DCAN, MODBUS, and SNMP lines). | - | - |
| Definition of an object of CPU CPU type. The default value CD="/DAIP=127.0.0.1 /REPO=11160 /RT=1000" creates a connection to the locally running (/DAIP=127.0.0.1) virtual PLC on port 11160 (/REPO=11160), with a response timeout of 1000 ms (/RT=1000). According to the PVI documentation, there are the following usable parameters for UDP communication: Parameter | Values | Setting | Description |
---|
/DA | 1-255 | 7 | Station number of the target station. Automatic identification of the target station from the station number. The station number must be unique within the INA2000 network. The highest station number is 99 for SG3 and SGC with AR Version < 2.00, or 255 for SG4 and SGC with AR Version >= 2.00. Example: "/DA=56". | /DAIP | IP address, Host name | None | The IP address of the target station. Manual identification of the target station from the IP address or identification from the hostname (DNS, only possible for SG4). Examples: "/DAIP=68.10.10.27" ... IP address, "/DAIP=CP340su" ... Hostname.Specifying the parameter /DA depends on whether the parameter /DAIP is specified: If the parameter /DAIP is not specified, then the parameter /DA must always be specified. If the parameter /DAIP is specified as an IP address, the parameter /DA is optional. If /DA is specified, however, the defined station number must be correct. If the /DAIP parameter is specified as a hostname, the /DA parameter is ignored. | /RT | 0 - 65535 | 275 | Response timeout in ms. If a response to a sent frame is not received with this time, then the frame is transferred again. After the third retry, the connection is deemed canceled. The time in which an interrupted connection is detected is a result of ResponseTimeout * 4. Setting /RT=0 uses the INA2000 default value (275 ms). Example: "/RT=400".
Recommended values: 20 - 250 | ... | For simple point-point connections, or connections via a local network with pure variable communication on SG4 controllers with sufficient idle time, with AR 3.00 and higher. | 250 - 500 | ... | For connections via a local network with pure variable communication to any target systems / AR versions. | 500 - 750 | ... | For connections via a local network with PLC services running (e.g. Automation Studio project transfer). | 750 - 1500 | ... | For connections via an in-house network. | 1500 - 5000 | ... | For connections via Intranet/Internet. |
| REPO | 1025 - 32767 | 11159 | IP port number of the target station. If the value is specified in Hexadecimal, then "0x" must be used to introduce the value (e.g. "/LOPO=0x2b97"). The port number must match the setting on the target station (PLC). Example: "/REPO=11159". | /CKDA | 0 / 1 | 1 | Enables or disables the check to see if the target station number (parameter /DA) is unique. The parameter /CKDA is irrelevant if used together with the parameter /DAIP (check is always disabled). Example: "/CKDA=0" ... Checking is disabled. | /ANSL | 0 / 1 | *) | Turn on/off fast TCP download/upload via ANSL. Example: "/ANSL=0" ... Download/upload via ANSL is turned off. | /APN | 1025 - 32767 | 11169 | ANSL IP port number of the target station (peer station) for fast TCP download/upload. Example: "/APN=11169". |
| - | CD="/DAIP=127.0.0.1 /REPO=11160 /RT=1000" |
| Definition of object of Module type. The parameter allows the creation of a connection to the module within the PLC. Syntax of CD parameter: /RO=[<Name of application module>::]<Module name> or [<Name of application module>::]<Module name> Examples: - CD="/RO=Module1"
- CD="/RO=Generator::Module1"
- CD=Module2
- CD=Generator::Module2
| - | - |
| Definition of an object of Task Task type. The parameter allows the creation of a connection to a task (program) within the PLC. The I/O tags that are children of the station represent global variables of the PLC and local variables of the task specified by this parameter. It is, therefore, necessary to configure a separate station for each task within the PLC. If no parameter is specified, only global PLC variables are available. | - | - |
...
- CD=gByte VT=u8 RF=10 - 1-byte unsigned variable gByte, 10 ms refresh rate
- CD=gMyInt VT=i16 HY=5 - 2-byte signed variable gMyInt, with hysteresis 5 (a change less than 5 will not be reported)
- CD=gDate RF=250 AT=rw VT=date - variable gDate of date type, access for reading and writing, 250 ms refresh rate
- CD=gmArrInt VT=i16 VN=6 - variable gmArrInt is array of 16-bit signed integers, first 6 array items will be read
Note: For reading of more than one array item to make sense, the Destination column must be configure configured for the I-O tag.
Note: Variable with "VN=number_of_items" parameter is for reading only. If a writing is required, each array item must be configured as a separate I-O tag (see next example).
CD=gmArrInt[0] VT=i16 - the item zero of an array of 16-bit signed integers gmArrInt (arrays in B&R PLC by default start with a zero entry similar to C) - CD=string_arr RF=250 AT=rw VT=string VL=6 VN=5 - variable string_arr is an array of 6-byte strings, first 5 array items will be read, 250 ms refresh rate
Note: If a string has 6 bytes, it will only fit 5 characters (the last byte is a trailing zero). - CD=wstring_arr VT=wstring VL=42 VN=4 - variable wstring_arr is an array of 6-byte wide strings (2-bytes per character) reťazcov, first 4 array items will be read
Note: If a wstring has 42 bytes, it will only fit 20 2-byte characters (the last 2 bytes is a trailing zero). - CD=Controll.cmd.SetPoint VT=f32 VL=4 VN=1 - item SetPoint of substructure cmd of structured variable Controll is a 32-bit floating-point number
Browse
For the I/O tags, it is possible to find a list of objects of Variable type and their data types and other details, as long as the KOM process is running and communication with the station is established.
Clicking the Browse button opens the B&R PVI Item Browser window and displays a list of objects.
Figure - B&R PVI Item Browser window
The window displays the following information:
Task: the name of the task (if it is a local variable), or an empty string (if it is a global variable). By default, only local variables belonging to the task specified as the Task object definition parameter are read. If the Browse task parameter is enabled, the local variables of all tasks are read.
...
Parameters: other parameters of the variable (see the configuration of the I/O tag)
Point: the name of the I/O tag that is configured for this object
Filtering in the list of objects: the browse window allows you to filter by the values displayed in each column. The values don't have to be entered completely. The notation *FILTERED EXPRESSION* is sufficient, where the asterisks represent any text before the start and end of the expression (e.g., *put* covers both input or output).
The total number of objects: the total number of objects in all object groups is displayed at the bottom left of the window.
Meaning of individual options and buttons:
Copy all to clipboard
Copies all displayed objects and details to the Windows Clipboard.
Refresh
The Refresh button can be used to force the object list to be re-read from the device. By default, the KOM process reads the list of objects and their data types only for the first request and stores it in memory. Depending on the number of objects and the speed of the device, this reading may take a longer time. It then sends this stored list to the CNF process(es), so that the next reading of the list in the DNP3 Item Browser window is fast.
Cancel
D2000 Cnf has the recycling of browser windows implemented. If the window is closed by the Cancel button or after selecting an object, it is actually only hidden and is available for browsing for another I/O tag within the same station, so that the list of objects being viewed is preserved. Clicking on the cross at the top right corner will cause the window to actually close.
Literature
...
- Ver. 1.0 - April 1st, 2021 - a document created.
...