cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.

Re: Manufacturing Apps reading data from MQTT

SaranKarthick
16-Pearl

Re: Manufacturing Apps reading data from MQTT

Hi @SebB ,

 

Per this topic:

 

We're currently using KepServerEX for the MQTT connection. 

 

In Kepware we have data tag in which one string item is in the format as shown below.

 

{
  "customer": "ABC",
  "site": "ABC",
  "department": "ABC",
  "assettype": "A",
  "asset": "A01",
  "description": "Make or Model",
  "tags": [
  
    {
      "component": "PLC",
      "tag": "MachineOn",
      "value": 1,
      "unit": "1/0-Running/Stopped"
    },
    {
      "component": "PLC",
      "tag": "Length",
      "value": 11.99,
      "unit": "km"
    },
    {
      "component": "PLC",
      "tag": "Temperature",
      "value": 45,
      "unit": "C"
    }
     
  ]
}

Since its in this json format i'm unable to use the OOTB Configuration App to directly map Machine status and other properties to the Asset. I've written a Subscription service to parse and map the corresponding properties.

 

Is there any better workaround for this. Can this heavy lifting part done at kepware side itself.

 

Regards,

saran 

ACCEPTED SOLUTION

Accepted Solutions
SebB
12-Amethyst
(To:SaranKarthick)

Hey @SaranKarthick 

 

you should be able to get the values out to the JSON string by using the Tag addresses in Kepware.

I never tried it by my self but in the documentation of the MQTT client for Kepware is a example that looks similar what you try to do. https://www.kepware.com/getattachment/b44c89ac-0b3b-4a22-bdd2-fa7873b38f31/mqtt-client-manual.pdf

On page 17, 18 and 19 are examples.

 

Seb

Seb
Principal Solution Experience Architect
PTC

View solution in original post

2 REPLIES 2
SebB
12-Amethyst
(To:SaranKarthick)

Hey @SaranKarthick 

 

you should be able to get the values out to the JSON string by using the Tag addresses in Kepware.

I never tried it by my self but in the documentation of the MQTT client for Kepware is a example that looks similar what you try to do. https://www.kepware.com/getattachment/b44c89ac-0b3b-4a22-bdd2-fa7873b38f31/mqtt-client-manual.pdf

On page 17, 18 and 19 are examples.

 

Seb

Seb
Principal Solution Experience Architect
PTC

Hi @SebB ,

 

I'm now able to get the values out of json as expected. The guide was very useful. 

 

Thanks and Regards,

Saran

 

Announcements


Top Tags