Skip to content
majid aminian edited this page Jul 29, 2019 · 27 revisions

Welcome to the Met4FoF-SmartUpUnit wiki!

1- Create an account in: http://www.openstm32.org/HomePage

2- Install related software in: http://www.openstm32.org/Downloading%2Bthe%2BSystem%2BWorkbench%2Bfor%2BSTM32%2Binstaller

3- Clone Met4FoF-SmartUpUnit in System Workbench for STM32 and firsly compile it and secondly debug it and lastly just run it.

4- Set your static ip address in your network settings on your local machine ip in this example is : 192.168.0.1

5- Open your browser and enter below address: http://192.168.0.10/index.html

6- Training stm32 in: https://www.st.com/content/st_com/en/support/learning/stm32-education/stm32-online-training/stm32f7-online-training.html

Next steps we will install some libraries in python:

1- installing protobuf in anaconda:

conda install -c anaconda protobuf

2-A LGPL Python OPC-UA Python Client and Server library, written entirely in python, available at: https://github.com/FreeOpcUa/python-opcua (install using pip install opcua)

2-1- for anaconda enviroment OPC-UA Python Client installation is:

conda install -c conda-forge opcua

3-A GUI client https://github.com/FreeOpcUa/opcua-client-gui (install using pip install freeopcua-client) and run opcua-client.exe for watching data streaming

4-run a code for getting data from sensors in python: https://github.com/Met4FoF/Met4FoF-SmartUpUnit/blob/relativetime-devel/tools/protoBuff_UDP_encoder/proto_UDP_reader.py

5-Test ocpua-client is working with below code: https://github.com/FreeOpcUa/python-opcua/blob/master/examples/server-minimal.py

Note: change ip code to below ip: server.set_endpoint("opc.tcp://192.168.0.1:48400")

Additional: there is a useful opcua-client application that shows data from python, you can download it on below link: https://www.prosysopc.com/products/opc-ua-simulation-server/

Running python code for streaming, receiving data and sending data to opcua-client:

1- run file opcua_test1.ipython.

2- open opcua-client application.

Note: you can download a free opcua-client application in:

https://www.prosysopc.com/products/opc-ua-client-pro-beta/

3- enter address server that mention in python file for example: opc.tcp://192.168.0.1:7000 in address bar opcua-client application.

Note: there is specific web address names 'uri' that has name space of data, in this name space mentions a web Address file that inside of that there is a XML file that has information model, structure and metadata of our data. there is helpful tutorial for explaining what is namespace file and how to create that in below address:

https://opcua.rocks/custom-information-models/

plotting stream data in python:

1- install python libraries: streamz, holoviews, hvplot, pyqtgraph

Note: you can see python plot codes in file OPCUA_test1.ipynb