Skip to content

Latest commit

 

History

History
146 lines (99 loc) · 5.96 KB

Visualization_example_value.md

File metadata and controls

146 lines (99 loc) · 5.96 KB

Visualization of an example sinus in Node-RED

Description

This example is intended to show you how to use this application using a sinus variable.

You will create a tag in the Simulation UI, connect the tag with IIH Essentials, display the tag via browser and finally visualize the tag via Node-RED.

If you are interested in how the application example works in the implementation guide you can find more details.

To follow this application example, you must carry out the following steps:

Start Docker Container

To start the Docker container, follow these steps:

NOTE: Linux is used for this application example

  1. Go to your Linux system.
  2. Open the console in the directory in which the application should be stored
  3. Clone the application example using the following command and then change the working directory:
git clone https://github.com/industrial-edge/iih-essentials-development-kit-getting-started.git
 
cd ./iih-essentials-development-kit-getting-started

This downloaded GitHub-Repository contains:

  1. Start the containers by executing:
docker-compose up

All service images are downloaded from Docker Hub and launched as defined in the docker-compose.yml file.

Create new Tag in Simulation UI

To create a tag, follow these steps:

  1. Open a browser.

  2. To access the Simulation UI, enter the following address: http://localhost:4519

  3. Add a simulation group with following configuration and create it

    • Period: 1 minute
    • Cycle: 1 second

deploy VFC

deploy VFC

  1. Add a new simulation variable to the created group
    • set the name to "Sinus"
    • type should be "Int"
    • add a simulation with following configuration
      • choose "sinus"
      • Period: 1 minute
      • Amplitude: 20
      • Zeropoint: 0
      • click on "Save"
    • click on "Create"

deploy VFC

deploy VFC

deploy VFC

Transfer Tag to IIH Essentials

To connect the tag to the IIH Essentials, follow these steps:

  1. Open a browser.
  2. To access the IIH Essentials UI, enter the following address: http://localhost:4203
  3. Go to connectors and configure the connector to get the data from the simulation

deploy VFC

deploy VFC

If configured correctly, it should look like this:

deploy VFC

  1. Create a new asset with following configuration and add it
    • Name: Example Asset

deploy VFC

  1. Create a Variable with following configuration and add it
    • Connector: Simulation Connector
    • Choose the created Tag "New Simulation Group/Sinus"

deploy VFC

deploy VFC

If the simulation variable has been successfully connected to the IIH Essentials, you can see the current value of the variable.

deploy VFC

Use Node-RED to access data and save it in .csv file

  1. Create a folder in the same path where your docker compose file is located and run the following command to make sure you have the right permission.

    mkdir export
    sudo chown -R 1000:1000 ./export
  2. Open a browser.

  3. Access Node-RED To start Node-RED, enter the following address: http://localhost:1880

  4. Install the node-red-dashboard if it's not installed yet

    To install the node-red-dashboard, open "Manage palette" in the menu. In the tab "Install" search for node-red-dashboard and install it deploy VFC

  5. If the flow is missing import the Flow

    To do so, open "Import" in the menu. Select the file, that should be imported, and click on "Import" deploy VFC The Flow contains following nodes:

    deploy VFC

  6. Deploy the flow and access the dashboard by accessing http://localhost:1880/ui

  7. Adjust the From and To variables based on your needs or leave it as it is for current date.

  8. Go back to your flow and double click on the IIH Essentials Read Variables sub-flow. Make sure the "Variable names" match your variable inside of IIH Essentials. deploy VFC

NOTE: If you multiple variables, you can write them all in the "Variable names" setting sparated by commas without spaces.

  1. Activate the inject buttons as described in the picture below.

    deploy VFC

  2. Go back to the dashboard. You shoul be able to see your data visualized.

deploy VFC 11. The .csv file is stored inside ./export folder.