Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
I need to log and show case the STRING attributes in AMU. I'm having a following queries,
Solved! Go to Solution.
Hi Satishkumar
#1 : Yes, you can use string values in AMU, but you might have some limitations if you try to use it as the status or if you want to use special values for alarming, also I never tried them in Troubleshooter (the trending/graph tool). For logging all the tag values, yes this part works as expected. The way it works in AMU is the values will be in Valuestream for a few moments and then AMU will transfer them to the AttributeValue table of the other database.
#2 : Same as with other tags : go in the Configuration -> Equipment -> Attributes screen, create an attribute, select your tag.
#3 : Like I said in #1 I don't remember how it works in the Troubleshooter/trend. But in the Asset Card (the card with the 9 attributes), it should display the values automatically, without you needing to do anything else. There may be a limit to the number of characters shown in the screen.
Here is an example I made recently (look at StringTag1) :
To accomplish this, I simply created an equipment in the Configuration -> Equipment screen and created 2 attributes : one for my string tag and one for my integer tag. And then in the Asset Card tab I selected them both and also selected the status.
#4 : I actually was debugging this a few days ago, and it's not working the way it's supposed to because of a limitation (as mentioned in point #1). The problem is it uses the status' tag, but forces to convert it into boolean. So this conversion recognizes the words "true" and "false", but all other texts are converted to False. Similarly, numbers only work with 0 (false) and not-0 (true). So using different words (like "Active" and "Issue") would require a workaround. I haven't tested this, but here is my suggestion :
- In the configuration screen, link your tag as the Status tag.
- In Composer remove its tag binding (on RunningStaus_MCC).
- Create an extra property on the Thing that receives the same tag
- Create a Subscription for this new extra property (input = DataChange) and in the code of the subscription transform it into "true" or "false" based on your rule (Active vs Issue) and in the code save the true/false result into RunningStatus_MCC.
#5 : I see 3 ways of doing this, but nothing easy with AMU :
- Use the RTPPM software (or DPM). This is a feature that's part of RTPPM. You should be able to find multiple statistics based on this in RTPPM.
- (Using only AMU) use the Troubleshooter trending tool, you can also export its data to Excel. However I don't think it gives you the total. You can also configure an alarm and check the alarms in Troubleshooter, but again I suspect it won't give you the total uptime & downtime. I suggest you set up a test equipment and try the Troubleshooter to see how you can use it best.
- (Using only AMU) you could make a custom service that gets your wanted time range and equipment, and query the data from the SQL tables. You could either query AttributeValue (raw tag values) and do some calculations, or the sum of times in the AlarmEvent table if you configure it as an Alarm. If you want, you can even create a custom Mashup and add it to the main menu.
Hi Satishkumar
#1 : Yes, you can use string values in AMU, but you might have some limitations if you try to use it as the status or if you want to use special values for alarming, also I never tried them in Troubleshooter (the trending/graph tool). For logging all the tag values, yes this part works as expected. The way it works in AMU is the values will be in Valuestream for a few moments and then AMU will transfer them to the AttributeValue table of the other database.
#2 : Same as with other tags : go in the Configuration -> Equipment -> Attributes screen, create an attribute, select your tag.
#3 : Like I said in #1 I don't remember how it works in the Troubleshooter/trend. But in the Asset Card (the card with the 9 attributes), it should display the values automatically, without you needing to do anything else. There may be a limit to the number of characters shown in the screen.
Here is an example I made recently (look at StringTag1) :
To accomplish this, I simply created an equipment in the Configuration -> Equipment screen and created 2 attributes : one for my string tag and one for my integer tag. And then in the Asset Card tab I selected them both and also selected the status.
#4 : I actually was debugging this a few days ago, and it's not working the way it's supposed to because of a limitation (as mentioned in point #1). The problem is it uses the status' tag, but forces to convert it into boolean. So this conversion recognizes the words "true" and "false", but all other texts are converted to False. Similarly, numbers only work with 0 (false) and not-0 (true). So using different words (like "Active" and "Issue") would require a workaround. I haven't tested this, but here is my suggestion :
- In the configuration screen, link your tag as the Status tag.
- In Composer remove its tag binding (on RunningStaus_MCC).
- Create an extra property on the Thing that receives the same tag
- Create a Subscription for this new extra property (input = DataChange) and in the code of the subscription transform it into "true" or "false" based on your rule (Active vs Issue) and in the code save the true/false result into RunningStatus_MCC.
#5 : I see 3 ways of doing this, but nothing easy with AMU :
- Use the RTPPM software (or DPM). This is a feature that's part of RTPPM. You should be able to find multiple statistics based on this in RTPPM.
- (Using only AMU) use the Troubleshooter trending tool, you can also export its data to Excel. However I don't think it gives you the total. You can also configure an alarm and check the alarms in Troubleshooter, but again I suspect it won't give you the total uptime & downtime. I suggest you set up a test equipment and try the Troubleshooter to see how you can use it best.
- (Using only AMU) you could make a custom service that gets your wanted time range and equipment, and query the data from the SQL tables. You could either query AttributeValue (raw tag values) and do some calculations, or the sum of times in the AlarmEvent table if you configure it as an Alarm. If you want, you can even create a custom Mashup and add it to the main menu.
Thanks for the detailed explanation.
I agree with you and explore the options suggested.
Regarding #4: RunningStatus_MCC property is BOOLEAN and Remote Property. Is possible to update the remote property from subscription or service without binding with kepware tag?
Hi Satishkumar
2 stuffs to know about this :
- RunningStatus_MCC will need to be "correctly configured". The easy way to do this is by using the Configuration -> Equipment -> Asset Card screen and selecting an attribute to be Status. You can try to do the changes manually in Composer instead, but it's not supported and I really don't suggest doing it, I encourage you to use the official configuration screen.
- This point here is not officially supported, but I think can be a good custom workaround : once RunningStatus_MCC is "correctly configured", you can remove its tag binding in Composer and then have some piece of code to push values into it. This is the workaround I suggested if you want your status to be string-based, since strings don't work well for the status. If you leave the tag binding on, I think it will not let you update the value using code. I believe in your code it should look like this :
me.RunningStatus_MCC = true;
Note that the Asset Card does read the RunningStatus_MCC property to show you the current running/down status. However it doesn't keep track of the old values & times, so you can't make a report on this. This is why for question #5 we need extra steps, to save this data elsewhere and do our own running/down conversion in custom code.
Yes, I correctly configured the asset status property.
In composer, I removed the tag binding. But, not able edit the "Binding" and it's still remote property. So unable to update the from the service.
I'll admit I suggested this without trying it first. I'll try to do this soon, but it could take some days before I have time. If you manage to do it, please let us know how you did it.
For removing the tag, have you tried to use the "Manage Bindings" button over the list of properties, and in the popup, go to RunningStatus_MCC and click on the "Clear" button to the left?
Yes, I tried as you suggested.
I got a below error,
Error in: Test Asset.test javascript service. Message ::Error sending a write request for property [RunningStatus_MCC] of Thing [Test Asset]
Hi Satishkumar
Sorry for the delay. I ran into unexpected issues when trying the workaround (often the same issue as you). I discussed this with the Support team and ended up opening requests to the software team (PSPT-77885 and PSPT-77953) for them to fix the issues and see if there's an easier workaround.
But I did find a way to make a workaround work!
- In the Equipment configuration screen, create an attribute that will receive the status tag, for example let's call it RawStatus. Then in the Asset Card configuration screen, select it as the status.
- In Kepware, create a "manual tag", a tag with a "fake address", for example let's call it DummyTag. This tag must have Type=Boolean and be Read-Write. To create a tag with a boolean fake address, in the Address field write B0050, or if this number is already used by another tag then increase the number until you find one that's unused (for example B0052). Each equipment will require its own tag, so if you have 10 machines you will need 10 tags..
- Go in Composer, on the equipment's Thing. In the properties screen, use the Manage Bindings button. In the left panel select the manual tag (DummyTag). and drag to the right panel on RunningStatus_MCC.
- Create a subscription. For the input, select Event=Datachange and select the attribute (RawStatus). In the code, write this :
if(events["Me_DataChange_RawStatus"].eventData.newValue.value == "ON")
{
me.RunningStatus_MCC = true;
}
if(events["Me_DataChange_RawStatus"].eventData.newValue.value == "OFF")
{
me.RunningStatus_MCC = false;
}
- In the code, change the name of the attribute if needed (in my code it's called RawStatus). And also, you can change the conditions for true & false, in my code example I'm expecting that my raw status will be "ON" or "OFF", you can change those words, they are the words that your RawStatus tag will send you.
I was able to make it work like this. Let me know how it goes for you.
I appreciate it.
It worked. But it's very lengthy work around. We need to depend on kepware and it's taf addresses. Is this only way to do it? What do you think?
Well, at least it worked. I know it's not ideal, I would prefer if the string tag worked on its own or if the workaround didn't require a tag. As mentioned in my previous message, I did open requests to the other teams to look into it, but so far there hasn't been any progress on them. I'll do my best to update you if it changes, in the requests I left a note that the request comes from here.