Skip to content
komali edited this page Nov 12, 2018 · 3 revisions

Microsoft

Oil & Gas

alt text

Table of Contents

1. User Guide

This Document explains how to use the Dyno Card solution, specifically it explains generate data from the Simulator and how to verify the output of the project/solution.

2.Running Modbus Simulator

  1. Go to Resource Group -> Click on dynocardVM.

alt text

  1. Now It will direct to overview page of the dynocardVM.

  2. Copy the public IP address.

alt text

  1. Open Remote Desktop Connection on your local computer and paste the copied dynocardVM Public IP address.

alt text

  1. Use the below Credentials for login to the VM.

    User_ID: adminuser

    Password: Password@1234

  2. Click Ok

alt text

  1. Now Click Yes button to continue.

alt text

  1. It should open the dynocardVM. Open a Windows Explorer window and check to make sure the downloaded software is present.

Note: Path to check the downloaded Softwares is “C:\” (Click on This PC and click C drive)

alt text

Note: Before Running the Modbus Simulator, you need to stop the Windows Firewall.

  1. Go to Control panel -> Network and Internet -> Network and Sharing Center window and then click on Windows Firewall which is located in the left bottom of the pane.

alt text

  1. Click Turn Windows Firewall on or off, which is located in the left side Menu bar.

alt text

  1. When you click Turn Windows Firewall on or off, you will be directed to below page.

alt text

  1. Now select Turn off windows firewall radio button for both public and private network settings then click ok.

alt text

  1. Now you can see, the Windows Firewalls of dynocardVM are stopped.

alt text

  1. Run the 2nd version of ModRSsim2 simulator by double clicking it.

alt text

alt text

  1. Click on Animation setting icon, which is in the right-side menu bar.

alt text

  1. Select the "Training PLC Simulation" option and browse the DynoCard.vbs script in downloaded section of the VM.

alt text

alt text

alt text

  1. Select Analog Inputs 300000.

alt text

alt text

  1. Now Close the Simulator window and then open the version 1 of the Simulator, which should be installed in the C:\Program Files (x86)\EmbeddedIntelligence\Mod_RSsim directory.

alt text

  1. Click on the same Animation setting icon, which is located in right side menu bar to verify the DynoCard.vbs script is selected or not.

  2. if it’s not selected, then Select the "Training PLC Simulation" option and browse the DynoCard.vbs script in downloaded section of the VM.

  3. Now Select Analog Inputs 300000 then you can observe the received/sent data count which is highlighted in below screen. Data from dynoCardVM will be sent to iotedge device's modbus module.

alt text

2.1. Check modbus logs

Login to iotEdge VM:

  1. Go to -> Resource group -> Click on iotEdge VM

alt text

  1. After clicking on iotEdge VM, you will be directed to iotEdge overview page. Here Copy the iotEdge VM Public IP address.

alt text

  1. Now Open Putty and Paste the Public IP addres of iotEdge VM into the Host Name (or IP address) box and then click Open.

alt text

  1. Then click Yes to continue.

alt text

  1. Enter the Login Credentials:

    Username as: adminuser

    Password as: Password@1234

alt text

  1. Once login is successful. Run the below command for root privilege.

sudo -i

alt text

  1. Run the below command to check whether the data is coming from Modbus simulator or not.

docker logs modbus

alt text

  1. Modbus container logs show the data that is coming from modbus simulator and minimize the screen.

alt text

    1. To verify whether all modules on the edge device are running or not, go to Resource group -> Click on iothub26hs3

alt text

  1. Navigate to IoT Edge blade under the Automatic Device Management section.

alt text

  1. Here we created and configured device from the IoT Edge VM. Click on iot-dynocard-demo-device_1 device to see the modules.

alt text

  1. We can see the created modules in device details

alt text

3. Verify Data in Azure SQL Database

3.1. Login to the SQL server to check the data.

  1. Go to Resource group -> Click on db4cards SQL database and copy the server name.

alt text

alt text

alt text

  1. Download and Install the SQL Server Management Studio on your local machine. Open SQL Server Management studio and past the server URL.

Credentials:

Login_ID: adminuser

Password: Password@1234

alt text

alt text

Note: Before login to SQL database you need to add firewall settings.

  1. Go to Resource Group ->click on oilgasserver26hrs3.

alt text

  1. Click Show Firewall Settings from the Firewalls and virtual networks.

alt text

  1. Click + Add client IP to add the client IP address.

alt text

  1. As shown below added the client ip address form the Firewall and virtual networks and click Save.

alt text

  1. Go back to SQL Server Management Studio and click on connect.

  2. After connecting to the server, expand the tables and views inside the db4cards database as shown below.

alt text

  1. Check the data in each table by running the following SQL Commands.

select * From [ACTIVE].[CARD_DETAIL]

alt text

select * From [ACTIVE].[CARD_HEADER]

alt text

select * From [ACTIVE].[DYNO_CARD]

alt text

select * From [ACTIVE].[EVENT]

alt text

select * From [ACTIVE].[EVENT_DETAIL]

alt text

select * From [ACTIVE].[PUMP]

select * From [STAGE].[PUMP_DATA]

select * From [STAGE].[SURFACE_DATA]

alt text

  1. Select data from [ACTIVE].[DYNO_CARD_ANOMALY_VIEW]

To check the data in ACTIVE.DYNO_CARD_ANOMALY View follow the steps below.

Right click on [ACTIVE].[DYNO_CARD_ANOMALY_VIEW] --> script view as -->select to -->New Query Editor window.

alt text

alt text

3.2. Login to Edge sql container server to check the data

  1. Login to edge sql Container using SQL Server Management Studio.

  2. Copy the Edge VM IP Address:[104.42.121.3] and give port 1401.

Credentials:

EX: 104.42.121.3,1401

User_ID: sa

Password: Strong!Passw0rd

alt text

alt text

  1. Check the data in tables.

select * From [ACTIVE].[CARD_DETAIL]

alt text

select * from [ACTIVE].[CARD_HEADER]

alt text

select * from [ACTIVE].[DYNO_CARD]

alt text

select * from [ACTIVE].[EVENT]

alt text

select * from [ACTIVE].[EVENT_DETAIL]

select * from [ACTIVE].[PUMP]

select * from [STAGE].[PUMP_DATA]

select * from [STAGE].[SURFACE_DATA]

alt text

  1. Select data from [ACTIVE].[DYNO_CARD_ANOMALY_VIEW]

Right click on [ACTIVE].[DYNO_CARD_ANOMALY_VIEW] --> script view as -->select to -->New Query Editor window.

alt text

alt text

4.Configuring Power BI

Before configuring Power BI, you need to download and install the power BI Desktop application.

You can perform the below steps in Power BI Desktop:

4.1. Download Power Bi Desktop App

Download Power Bi desktop from below link.

https://www.microsoft.com/en-us/download/details.aspx?id=45331

4.2. Download dynoCardVisuals.pbiviz

Download dynoCardVisuals.pbiviz file from the below link

https://github.com/BlueMetal/iot-edge-dynocard/tree/master/dynoCardVisuals/dist

4.3. Import DynoCard custom from visuals

  1. Open Power BI Desktop and select the ellipses from the bottom of the Visualizations pane.

alt text

  1. From the drop-down, select Import from file.

alt text

  1. Caution: Import Custom visual --> dialog box will appear. Click Import to confirm.

alt text

  1. From the Open file menu navigate to dynoCardVisuals.pbiviz file and then select Open. The icon for Dyno Card custom visual will be added to the bottom of Visualizations pane and it's now available for use.

alt text

alt text

4.4. Generating and publishing Power BI reports

  1. In the top left-hand side of Power BI Desktop, select 'Get Data' -> 'SQL Server database' and click on Connect.

alt text

  1. Fill in the database server information and click 'OK'.

To get the database information, go to Resource group.

alt text

Click on db4cards database

alt text

Copy the server name and database name

alt text

• Server: xxxx.database.windows.net

• Database: db4cards

• Database Connectivity Mode: Import

alt text

  1. Select 'Database' on the left-hand side of the connection window, fill in the database connection information and click 'Connect'.

    • Username: <> • Password: <>

alt text

  1. Select 'ACTIVE.DYNO_CARD_ANOMALY_VIEW' from the navigation list and Click load.

alt text

  1. Add the Dynocard Visualization to the report by clicking on the icon and then map the imported fields accordingly.

alt text

  1. Drag and drop all the fields respectively.

alt text

4.5. Power BI report

Now reports can be observed like below.

alt text

********************************* END OF DOCUMENT ***************************************