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

ThingWorx Navigate is now Windchill Navigate Learn More

Translate the entire conversation x

AMU - How to configure alarm on derived property

javed_a
12-Amethyst

AMU - How to configure alarm on derived property

Hello All,

How to configure alarm on derived property as in AMU, as only properties displayed while alarm configuration, is the property configured during AMU configuration?

 

For example, I have created a new property in ThingShape which is added in Asset Thing Template, and I am setting value in it using subscription and want to create Alarm on that value, is there any OOTB solution in AMU.

 

 

Regards,
Javed Akhtar
ACCEPTED SOLUTION

Accepted Solutions

Hi Javed

 

It's important to understand the alarming process. First, we have to configure the alarm in the Configuration -> Alarms screen. This forces us to select an attribute. And, as a reminder, attributes have corresponding properties of the same name in Composer : if there's an attribute called Temperature, you should also have a property called Temperature on that Thing in Composer. Second, the alarm service checks all values received in the Valuestream for the properties and checks those values' corresponding attributes' alarm conditions.

 

The official way to configure the attributes is to either :

- Create the attribute in the Configuration -> Equipment screen, in the Attributes tab. It forces you to select a tag.

- Import the attributes via the Excel import, then go in Composer to set the tag on the corresponding property.

 

The way it works in the supported method is : because the property has the Log setting, all its tag values are automatically saved into the Valuestream. But because we won't be using tags here, we can't use this method. Although it's not 100% out of the box and requires a bit of customization, there's an easy workaround to use values that come from elsewhere than a tag. You can create the attribute in either of the 2 methods described above, but remove (or don't set) the tag in Composer. After that, you will need to find a way to push values in the Valuestream of the property. If the value is coming from another property, I think just changing the property to be locally bound (instead of remotely bound) and selecting a property will work in most situations. If the value comes from elsewhere, like code inside a service or subscription, then you need to write code to send the value in the Valuestream. Here is an example taken from the RTPPM model documentation (subscriptions) : 

 

 

me.AddStringValueStreamEntry({
    timestamp: new Date(),
    propertyName: 'Temperature',
    value: ENTER_VALUE_HERE
});

 

 

 

Note that this will work for the alarm system. But if you want to also see the value in the asset card (Asset Monitoring Dashboard), this piece works differently. The values you see in the screen are simply the current values of properties AMUAttributeXValue_MCC, where X is the number in the card (1 to 9). So you would need to find a way to set the current value of those properties, in most cases it should be as simple as doing

 

me.AMUAttribute1Value_MCC = ENTER_VALUE_HERE;

 

 

View solution in original post

3 REPLIES 3
VladimirN
24-Ruby III
(To:javed_a)
javed_a
12-Amethyst
(To:VladimirN)

Hello @VladimirN ,

 

The above-mentioned guide talks about the timestamp scenario for value received.

In my case I am looking to configure an Alarm on a derived property.

 

Regards,
Javed Akhtar

Hi Javed

 

It's important to understand the alarming process. First, we have to configure the alarm in the Configuration -> Alarms screen. This forces us to select an attribute. And, as a reminder, attributes have corresponding properties of the same name in Composer : if there's an attribute called Temperature, you should also have a property called Temperature on that Thing in Composer. Second, the alarm service checks all values received in the Valuestream for the properties and checks those values' corresponding attributes' alarm conditions.

 

The official way to configure the attributes is to either :

- Create the attribute in the Configuration -> Equipment screen, in the Attributes tab. It forces you to select a tag.

- Import the attributes via the Excel import, then go in Composer to set the tag on the corresponding property.

 

The way it works in the supported method is : because the property has the Log setting, all its tag values are automatically saved into the Valuestream. But because we won't be using tags here, we can't use this method. Although it's not 100% out of the box and requires a bit of customization, there's an easy workaround to use values that come from elsewhere than a tag. You can create the attribute in either of the 2 methods described above, but remove (or don't set) the tag in Composer. After that, you will need to find a way to push values in the Valuestream of the property. If the value is coming from another property, I think just changing the property to be locally bound (instead of remotely bound) and selecting a property will work in most situations. If the value comes from elsewhere, like code inside a service or subscription, then you need to write code to send the value in the Valuestream. Here is an example taken from the RTPPM model documentation (subscriptions) : 

 

 

me.AddStringValueStreamEntry({
    timestamp: new Date(),
    propertyName: 'Temperature',
    value: ENTER_VALUE_HERE
});

 

 

 

Note that this will work for the alarm system. But if you want to also see the value in the asset card (Asset Monitoring Dashboard), this piece works differently. The values you see in the screen are simply the current values of properties AMUAttributeXValue_MCC, where X is the number in the card (1 to 9). So you would need to find a way to set the current value of those properties, in most cases it should be as simple as doing

 

me.AMUAttribute1Value_MCC = ENTER_VALUE_HERE;

 

 

Announcements


Top Tags