/TcHmiMongoDBCoreServiceSample

Sample HMI project for the MongoDBCoreService extension

Primary LanguageHTMLMIT LicenseMIT

Disclaimer

This is a personal guide not a peer reviewed journal or a sponsored publication. We make no representations as to accuracy, completeness, correctness, suitability, or validity of any information and will not be liable for any errors, omissions, or delays in this information or any losses injuries, or damages arising from its display or use. All information is provided on an as is basis. It is the reader’s responsibility to verify their own facts.

The views and opinions expressed in this guide are those of the authors and do not necessarily reflect the official policy or position of any other agency, organization, employer or company. Assumptions made in the analysis are not reflective of the position of any entity other than the author(s) and, since we are critically thinking human beings, these views are always subject to change, revision, and rethinking at any time. Please do not hold us to them in perpetuity.

TcHmiMongoDBCoreServiceSample

This is a sample TwinCAT HMI project that uses the MongoDBCoreService extension. The sample shows how to use the extension in different ways.

For the source code for MongoDBCoreService check this repo

Prerequisites

MongoDB Server (sample tested with Community Server v6.0.5)

License: TF2200 is needed in the HMI-Server to be able to use this C# Server Extension.

(No license is needed when testing this in the LiveView)

Get Started

This sample is used with the MongoDB Community Server (tested with v6.0.5)

Download: https://www.mongodb.com/try/download/community

To mimic the sample, open MongoDB Compass and connect to your MongoDB. Once connected create a new database with the name "test" and then add a new collection named "carData".

enter image description here

Once the "carData" is created select it and import JSON file and add the dummy data that is included in the project "carDataOutput.json"

enter image description here

When you open the sample project make sure the MongoDBCoreService has the correct configuration.

enter image description here

Screenshots

The MongoDBCoreService extension has some symbols and methods built in that this sample project uses.

enter image description here

enter image description here

enter image description here