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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

AMU (FSU) readily available API deatils

javed_a
4-Participant

AMU (FSU) readily available API deatils

Hello,
I am building a PoC, for Manufacturing plant, on top of AMU where we need readily available API documentation (Service and Thing details) to get the data, for example

  • How many machines have active alarms
  • What is the total downtime/Part Produced in a plant/Area
  • Downtime by Category in a plant/area etc.

 

Note: I have already seen below links and there is not much technical details available:

https://support.ptc.com/help/thingworx_applications/r9.5/en/index.html#page/thingworx_applications/welcome.html#
https://support.ptc.com/help/thingworx_applications/r1.0/en/index.html#

1 ACCEPTED SOLUTION

Accepted Solutions
mstarnaud
13-Aquamarine
(To:javed_a)

Hi Javed

 

First stuff : the documentations you linked are essentially the same, but the 1st link is for version 9.5 and the 2nd link is for the older versions (2.0.4 and before).

 

For your questions, I'll assume you already have some experience calling services and such.

 

> How many machines have active alarms

 

I don't think this is in the documentation, but Property ActiveAttributeAlarmCount_MCC is the one shown in the AMU dashboard screen. So you can just get this Property's value.

 

> What is the total downtime/Part Produced in a plant/Area

 

We can access this for 1 machine easily, but for a group (plant/area) it's more complicated, see below for that.

 

For 1 machine, both of these informations (downtime/uptime and produced quantity) are part of RTPPM, not AMU. And assuming you do have RTPPM, there's no out-of-the-box way to collect this information, but I can think of 2 ways to reach it.

- You can make a custom SQL service that queries the DowntimeEvent table (Where EquipmentUid = ...) and the AttributeValue table (Where AttributeUid = ...). You can add this SQL service on your SQL Thing, the default name for it is PTCFSU.CoreSQLThing but it can be changed during installation, if you can't find it look at the Configuration tab of Thing PTC.FSU.CORE.LaunchPoint.LaunchPoint_TG.

- This information is in the KPI Dashboard. It calls service GetKPIValues_KEN on Thing PTC.SCA.SCO.KPIEngineUtilsThing. You would need to give it the appropriate filter (usually : EquipmentUid and QuicktimeIntervalUid) and parse the results.

 

> Downtime by Category in a plant/area etc.

 

See previous answer. You would need to do extra filtering & grouping for the categories of the DowntimeEvent table with the ReasonCategorys. Or you can check the various KPIs given by the KPI Dashboard's service, it gives downtime amounts based on certain categories.

 

---

 

However, I need to mention that we don't yet have fully functional roll-up KPIs. Meaning that if you have a downtime on one machine, I don't think it brings it to the total of the area. The only way to do this would be to write custom SQL queries that do a total the way you want. You have to think about your calculations carefully, for example if 6 machines are in downtime at the same time during lunch, how do you report this for your area's total, did you have 6 hours of lunch downtime today?

View solution in original post

2 REPLIES 2
mstarnaud
13-Aquamarine
(To:javed_a)

Hi Javed

 

First stuff : the documentations you linked are essentially the same, but the 1st link is for version 9.5 and the 2nd link is for the older versions (2.0.4 and before).

 

For your questions, I'll assume you already have some experience calling services and such.

 

> How many machines have active alarms

 

I don't think this is in the documentation, but Property ActiveAttributeAlarmCount_MCC is the one shown in the AMU dashboard screen. So you can just get this Property's value.

 

> What is the total downtime/Part Produced in a plant/Area

 

We can access this for 1 machine easily, but for a group (plant/area) it's more complicated, see below for that.

 

For 1 machine, both of these informations (downtime/uptime and produced quantity) are part of RTPPM, not AMU. And assuming you do have RTPPM, there's no out-of-the-box way to collect this information, but I can think of 2 ways to reach it.

- You can make a custom SQL service that queries the DowntimeEvent table (Where EquipmentUid = ...) and the AttributeValue table (Where AttributeUid = ...). You can add this SQL service on your SQL Thing, the default name for it is PTCFSU.CoreSQLThing but it can be changed during installation, if you can't find it look at the Configuration tab of Thing PTC.FSU.CORE.LaunchPoint.LaunchPoint_TG.

- This information is in the KPI Dashboard. It calls service GetKPIValues_KEN on Thing PTC.SCA.SCO.KPIEngineUtilsThing. You would need to give it the appropriate filter (usually : EquipmentUid and QuicktimeIntervalUid) and parse the results.

 

> Downtime by Category in a plant/area etc.

 

See previous answer. You would need to do extra filtering & grouping for the categories of the DowntimeEvent table with the ReasonCategorys. Or you can check the various KPIs given by the KPI Dashboard's service, it gives downtime amounts based on certain categories.

 

---

 

However, I need to mention that we don't yet have fully functional roll-up KPIs. Meaning that if you have a downtime on one machine, I don't think it brings it to the total of the area. The only way to do this would be to write custom SQL queries that do a total the way you want. You have to think about your calculations carefully, for example if 6 machines are in downtime at the same time during lunch, how do you report this for your area's total, did you have 6 hours of lunch downtime today?

javed_a
4-Participant
(To:mstarnaud)

Thank you @mstarnaud  for the detailed explanation.

As you rightly mentioned these information are not in documentation and I was looking for that only. Yes, we can figure out the things but that take some time and I wanted to save that.

 

Thanks again!

Top Tags