Opc Da command line test client for Osl154 specification
OS:
- Windows 10 or newer
Software:
- Python 3.8 x86 (32-bit) or newer: https://www.python.org/downloads/windows
- Graybox Free OPC DA Auto Wrapper: http://gray-box.net/download_daawrapper.php?lang=en
Make sure you install the 32bit version of Python
Open command line and create an empty folder:
> mkdir C:\Projects\Osl154Da > cd /d C:\Projects\Osl154Da
Create an virtual environment for python and install required packages using pip:
> py -3-32 -m venv venv > venv\Scripts\activate > pip install https://github.com/fholmer/Osl154TestClientDa/archive/main.zip
Register the 32bit version of OPC DA Auto Wrapper.
# register as 32bit > %systemroot%\SysWoW64\regsvr32.exe %cd%\lib\x86\gbda_aut.dll
First check that your opc-server is available by running this command:
> osl154da list-servers
The name of your server should appear in this list. This is the name to be used in the next step.
Create some initial BMP-data for your sign. You can use the discover function:
> osl154da discover-sign SERVER.1
Or add it manually:
# NB! Make sure server, tag, width and height match your server and sign
> osl154da add-sign sign1 -server SERVER.1 -tag SSA1_SIGN1 -width 304 -height 104
This command will create a directory signs/default
:
/signs
/default
/sign.json
/1.bmp
/2.bmp
/3.bmp
/4.bmp
BMP-file can be duplicated and edited to make different test images.
sign.json
can also be edited to adjust opc-tag names.
NB! If you run the add-sign
or discover-sign
command again all
changes will be overwritten.
Read the values currently on the sign:
> osl154da read
Send a rgb-on command to the sign:
> osl154da rgb-on -image 1.bmp
Image 1.bmp
will now be loaded in IMAGE_TOSET
. VALUE
is set to 9999
and after a short delay the COMMAND
is set to RGB-ON
.