Contact email: hse-cen-co@cern.ch
-
3.1. To build the driver
3.2. To Install
3.3. Run
-
S7200 Driver Technical Documentation
6.1. Main entry points
6.2. Addressing DPEs with the S7200 driverl
- 6.2.1 Data types
- 6.2.2 Adding a new type
6.4 Activity diagram
This WinCC OA driver enables bidirectional data transfer between S7200 devices and the WinCCOA environment, with support for multiple polling intervals and consolidated write functions.
Additionally, the driver offers compatibility with multiple IP addresses, making it a versatile and reliable tool for data integration.
- C++11 STL
- WinCC OA API libraries
- Snap7
Project has a Makefile. Note that you can also set the PVSS_PROJ_PATH
environment variable beforehand.
make
make install PVSS_PROJ_PATH=<path_to_pvss_project_bin_folder>
It can be run from the WinCCOA Console or from command line and it will require the config.S7200
file:
./WINCCOAS7200Drv -num <driver_number> -proj <project_name> +config config.S7200
The config.S7200
file has to be present under the WinCCOA project folder config
.
When configuring the file, it is necessary to specify the local and remote TSAP ports, as well as the minimum polling interval required for seamless communication between the WinCCOA environment and external devices or systems.
Here is an example config file:
[S7200]
# Define local TSAP port
localTSAP = 0x1401
# Define remote TSAP port
remoteTSAP = 0x1400
# Define polling Interval (Utilized if it exceeds the interval specified in the variable address)
pollingInterval = 3
Under the winccoa folder you will find the following files that you need to copy to your project in the corresponding paths:
- dplist/S7200_driver_config.dpl : it contains
internal driver & CONFIG_S7200 DPs
. Once you've successfully launched the driver in the WinCC project manangement, you can import it via the ASCII Manager(refer to the official WinCC OA Documentation).
Notes:
* This is a specific dump of the REMUS redundant project DPs
* The internal driver number in the dump is 14. If it's unavailable to you, try to modify the dump file directly.
-
dplist/panels/para/address_S7200.pnl : a panel that you can use in para for S7200 addressing. If you install this panel, then you will also need the WinCC OA scripts that go along:
See 6.3 Driver configuration section for a brief descprition of relevant CONFIG_S7200 DPEs.
After the driver startup, the main entry points in the driver are:
-
S7200HwService::writeData() -> WinCC to Driver communication
This is how the variables with IN/OUT or OUT mode are pushed to S7200. Thanks to the addressing
<IP>$<ADDRESS>
, the driver will be able to write at the appropriate memory location. -
S7200HwService::workProc() -> Driver to WinCC communication
This is how we push data to WinCC from S7200. Thanks to the addressing
<IP>$<ADDRESS>
,the driver will be able to map the data ingested from the respective S7200 memory location to the WinCC DPE.
Please refer to the WinCC documentation for more information on the WinCC OA API.
When the S7200 driver pushes a DPE value to WinCC, a transformation takes place. See Transformations folder. We are currently supporting the following data types for the periphery address:
WinCC DataType | Transformation class | Periphery data type value |
---|---|---|
bool | S7200BoolTrans.cxx | 1000 (TransUserType def in WinCC OA API) |
uint8 | S7200Uint8Trans.cxx | 1001 (TransUserType + 1) |
int32 | S7200Int32Trans.cxx | 1002 (TransUserType + 2) |
int64 | S7200Int64Trans.cxx | 1003 (TransUserType + 3) |
float | S7200FloatTrans.cxx | 1004 (TransUserType + 4) |
string | S7200StringTrans.cxx | 1005 (TransUserType + 5) |
To add a new transformation you need to do the following:
-
create a define in
S7200HWMappeer.hxx
#define S7200DrvDoubleTransType (TransUserType + 7)
-
handle the new transformation type in
S7200HWMapper::addDpPa()
-
implement the transformation type class. The important functions here are
::toPeriph(...)
for WinCC OA to S7200 driver transformation::toVar(...)
for S7200 driver to WinCC OA transformation
Available via the WinCC OA CONFIG_S7200
DataPoint, we have the following
Config DPE | Direction | Addressing | Type | Description |
---|---|---|---|---|
DebugLvl | OUT | DEBUGLVL | INT32 | Debug Level for logging. You can use this to debug issues. (default 1) |
Driver Version | IN | VERSION | STRING | The driver version |