pvbrowser manual
Back Content Forward

OPC XML-DA

For OPC XML-DA there is a daemon that will read OPC values and write them to shared memory. Also the daemon will allow you to output values. (See "pvbrowser principle"). opcxmlda.tar.gz must be downloded additional to pvbrowser. The archive contains the sources + the binaries for Linux 64Bit and Windows. For other environments you will have to recompile.

First you should test if the OPC XML-DA server is running.


Example:
./opcxmlda_client http://192.168.1.13/opcxmlda/isopc.simopcserver.3 GetStatus

You should verify that the server is running. Now browse the server to create an itemlist.

Example:
./opcxmlda_client http://192.168.1.13/opcxmlda/isopc.simopcserver.3 Browse > opcxmlda.itemlist

You can edit opcxmlda.itemlist and comment the variables you do not want to read. By default all available items will be read. Now you can start opcxmlda_client in Run mode.

Example:
./opcxmlda_client http://192.168.1.13/opcxmlda/isopc.simopcserver.3 Run

You can see what the client is reading by adding the -debug switch.

Example:
./opcxmlda_client http://192.168.1.13/opcxmlda/isopc.simopcserver.3 Run -debug

When in Run mode opcxmlda_client will poll the OPC XML-DA server forever. The variables will be written to the shared memory. Your pvserver can read this shared memory using rlOpcXmlDa class from rllib. The opcxmlda_client has a second thread, that will be waiting on the mailbox. Your pvserver may send variables to this mailbox using rlOpcXmlDa from rllib. opcxmlda_client will read the mailbox and send the Write command to the OPC XML- DA server.

Usage: ./opcxmlda_client [URL] [METHOD] <-itemlist=filename> <-shm=filename> <-mbx=filename> <-sleep=milliseconds> <-max_name_length=char> <-shmsize=bytes> <-debug>

[URL] is the url of the OPC XML-DA server.
[METHOD] is the method to call. [METHOD] := GetStatus | Browse | Run
[URL] and [METHOD] are mandatory and must be the first 2 parameters.

Defaults:
-itemlist=opcxmlda.itemlist                                                        # may be created by Browse
-shm=/srv/automation/shm/opcxmlda.shm OR c:\automation\shm\opcxmlda.shm on windows # location of the shared memory
-mbx=/srv/automation/mbx/opcxmlda.mbx OR c:\automation\mbx\opcxmlda.mbx on windows # location of the mailbox
-sleep=1000                                                                        # time between read calls in milliseconds
-max_name_length=31                                                                # max length of result name
-shmsize=65536                                                                     # total size of the shared memory

Example for creating opcxmlda.itemlist:
./opcxmlda_client http://server/opcxmlda/xmldaserver Browse > opcxmlda.itemlist

From within pvserver you use rlOpcXmlDa from rllib.

For this also see the

.


Back Content Forward