With the release of WinCC OA 3.17, one of the newest and biggest changes is the addition of the NextGen Archiver. The NextGen Archiver runs on an InfluxDB database and is a great way to store your data. InfluxDB is one of the fastest-growing time-series databases in the market, which means there are already some fantastic tools that can be used to visualize your data coming out of WinCC OA. The tool we are going to show today is Chronograf. Chronograf is the user interface for stand-alone instances of InfluxDB, but can also be used inside of OA.
This tutorial is being done on a Windows machine, if you are using a Mac or Linux the steps may be a bit different.
- Create a new project inside of WinCC OA. Choose any type of project you want, I used “Legacy”, but make sure you choose the Use NextGenArchiver checkbox.
- Go to https://portal.influxdata.com/downloads/ and download the latest stable build of Chronograf, currently v1.7.17.
- Take the two .exe files that get downloaded, place them in a drive that is easy to find and remember, I use C:\Chronograf. The chronograf.exe will need to be used to start up the server. Double click the chronograf.exe file to start up the server or you can use the script: DebugN(system(“C:\\Chronograf\\chronograf.exe”)); on an Initialize function, or where you would like to launch the server inside of OA. The inside of OA option only works if you run the project as an Administrator.
- Once the Chronograf server is running you can open up a web browser and navigate to http://localhost:8888.
- Click get started to get to this screen
- Enter in a Connection URL of http://localhost:8086 (this is the default if you changed it update this field).
- Enter username is “etm” with a password of “etm#123” (again this is the default). Enter a Telegraf DB if you would like.
- You can press the Skip button on the next two screens. If everything worked, you should have something like the below image. You can now use Chronograf to explore your data from inside WinCC OA to visualize it in any way you can think of.
Chronograf is a web-based tool we can directly embed it into WinCC OA using a WebView object.
- If Chronograf server is embedded into OA:
- Point the URL to the http://localhost:8888/sources/new?redirectPath=/ endpoint. This endpoint is needed because OA will sometimes not auto-redirect to the make a connection page which will cause a lock. Also, keep in mind that the server is running in the background.
- If Chronograf server is running by just clicking the chronograf.exe