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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Skipping "disabled" kepware devices

jensc
17-Peridot

Skipping "disabled" kepware devices

Hello community.

 

I am facing some issues due to service timeout of my service that copies and builds a user usable mashup for connecting kepware tags to things.

 

The service reads each root tag from an industrial connection and then calls a recursive function to go deeper in the tree.

 

The issue we have for one of our sites though is that they have an older PLC where they apparently can't decide on which tags should be imported, so they have to import all of them (100k+).

 

Now, we could increase the timeout from 500 seconds, but I don't see it as a viable solution as what if we get 200k+ tags at some point?

 

The thing is, they have used some disable setting in Kepware for these tags. So they had thought that they would not end up in Thingworx.

 

Is there anyway to prevent this? Either in Kepware or in Thingworx?

 

I tried running the BrowseGroups service on my industrial connection, but there doesn't seem to be anything in the result that we can use to dismiss this.

 

 I thought I should ask here before opening a ticket with PTC. So any ideas are highly appreciated.

 

Regards,

Jens C

ACCEPTED SOLUTION

Accepted Solutions
jensc
17-Peridot
(To:jensc)

Hello Community,

 

I think PTC found a good answer to this by using the following  code:

 

// result: INFOTABLE dataShape: "IndustrialDiagnosticDigest"
let it = Things["YourIndustrialConnectionThing"].GetDiagnosticDigest({
          fullyQualifiedTagAddress: "YourFullPath" /* STRING */,
});

if (it.getFirstRow().getStringValue("CurrentValue") === "false") {
   // disabled device and should not be included in tag tree.
   return;
}

 

 

This code checks the tag (using the full tag address) and gets the current value (and some other properties) in an infotable.

You can then do a check on the value.

 

Thanks,

Jens C

View solution in original post

4 REPLIES 4
slangley
23-Emerald II
(To:jensc)

Hi @jensc.

 

We're not totally clear on the scenario.  You stated "can't decide on which tags should be imported, so they have to import all of them (100k+)."  Are you saying that each device has 100K tags?  I would imagine a lot of performance issues if trying to manipulate these devices in Composer or another mashup.  You have the ability to limit which tags are being pulled into ThingWorx.  You might also be able to break the data into multiple devices.

 

Here's a community post that may be helpful, but there are others available as well.

 

Please provide more details and we'll try to assist further.

 

Regards.

 

--Sharon

jensc
17-Peridot
(To:slangley)

Hello @slangley,

 

I do not have access to that Kepware instance unfortunately to take some screenshots. But yes, basically they have a channel with two devices, one is, lets call it device#1 imported from the PLC in some way (but not using opc-ua). And because they can't choose which of the tags from device#1, they get everything in it. Which is about 100k+ tags.

 

The other device under this channel, lets call it device#2, is the device that they want to bring into Thingworx. So they have moved some of the tags from device#1 to it. They do this because almost all of the tags from device#1 are no longer used but they don't want to manually enter them in Kepware.

 

So they used some sort of disable function in Kepware for device#1 to disable it. And they let device#2 be active.

But we still get device#1 tags in the industrial connection:

jensc_0-1700214027714.png

 

PLC offline is device#1 and PLC online is device#2.

 

We would like to not have device#1 in this list as fetching and building the structure from this industrial connection gets a time out in our service due to being 100k+ tags.

 

Why do we build this structure you might ask? It is so that users can connect tags from a mashup rather than from the composer.

 

Hope this information helps. I have also created a case for this issue: C17118588 if you want to have a look on it.

 

Regards,

Jens C

 

jonasf
12-Amethyst
(To:jensc)

To clarify, here is the setup in referenced Kepware by @jensc above.

Project "CL01" is a Siemens TCP/IP Ethernet driver.

"PLC Offline" is a device  driver: Siemens TCP/IP Ethernet driver and Model: S7-300 over 100 000 tags. Data collection is Disabled (greyed out in picture below).

The tags are generated from an imported S7-project.

"PLC online" is device  driver: Siemens TCP/IP Ethernet driver and Model: S7-300 with selected tags (under 1000). Data collection is enabled (colored in picture below).

 

Our wish is for TW to ignore the Device that is Disabled. "PLC Offline" in our case.

@slangley 

jonasf_2-1700484945738.png

 

 

 

jensc
17-Peridot
(To:jensc)

Hello Community,

 

I think PTC found a good answer to this by using the following  code:

 

// result: INFOTABLE dataShape: "IndustrialDiagnosticDigest"
let it = Things["YourIndustrialConnectionThing"].GetDiagnosticDigest({
          fullyQualifiedTagAddress: "YourFullPath" /* STRING */,
});

if (it.getFirstRow().getStringValue("CurrentValue") === "false") {
   // disabled device and should not be included in tag tree.
   return;
}

 

 

This code checks the tag (using the full tag address) and gets the current value (and some other properties) in an infotable.

You can then do a check on the value.

 

Thanks,

Jens C

Announcements


Top Tags