FactorySQL killing PLC processor

I have yet to hear a good answer to this question so I’ll ask it again and give more examples. I’m an RsSQL convert. There were so many things wrong with that program, when I found FSQL I made the switch very quickly. But RsSQL had something that I really liked, and FSQL does not appear to have the same functionality.

In FSQL, if you put 50 tags in a group, FSQL asks the PLC for the values for those tags at the rate of the groups refresh rate. The way RsSQL does it is, if you set a transaction to be triggered off a tag, it only monitors that one tag for changes. If it changes, then it requests the PLC for the values for all the other tags. This is much nicer on the PLC. Right now I’m bogging down a SLC 5/05 with FactorySQL and I’m not really even looking at that many tags. There may be a more scientific approach to this test, but if I have RsLogix online, the picture of ladder code spins around veeeeerrrrryyyy slowly. If I stop all the group looking at this PLC, it starts spinning around like a jack rabbit. Yeah, I could do a little more looking with some diagnostic programs, but to me it seems pretty definitive that FSQL is killing this PLC. If we need to make any programming changes to this PLC, we have to open FSQL and stop all groups associated with it. This is less than convenient.

I’m using RsLinx as my OPC server. Should I be using a different one? Would that really make a difference? RsSQL never slowed down the communications like this. Are there any plans to include this kind of functionality in future versions?

I guess my big question is, how does FSQL communicate with the PLC? The answer I always get is it requests information from the OPC server. Ok, so how does the OPC server communicate with the PLC?

There is a feature to do this, but it’s somewhat hidden, because most of the time it’s better to stick to the subscription model.

First, go to Settings->Frontend Settings and enable “Show advanced group settings”, in the “Group/Item Display Settings” group.

Now, on each group, you’ll have an “advanced” tab with the option to “Use polled reads instead of subscriptions”, which will do exactly what you’re requesting. NOTE: I’d recommend upgrading to FSQL 4.2.10 first, because there was a change as to how this works for OPC 2 servers like RSLinx.

Probably. RSLinx has proven itself time and time again to be inefficient, unreliable and generally not worth using. That said, there are lots of people using it, with what I assume to be higher tag counts than what you’re trying to do, so I think you should be able to get it to work as-is.

You’d have to ask the company who wrote the opc server.

It seems to me there could be a number of things going on:

  1. FactorySQL is subscribing to the data at a rate that is higher than needed/expected. You check this by going into RSLinx and going to “DDE/OPC”->“OPC Group Diagnostics” and checking the subscription rates.
  2. There’s some interaction between RSLogix, RSLinx, and the subscriptions going on. Nobody’s mentioned a problem before, but it could be that RSLogix creates a lot of load, and the subscribed data is just enhancing the problem.
  3. Something off the wall’s going on (I’m not a plc programmer, so this is may or may not be applicable): the communication cycle on the plc is set to too short of a time period- and the added communication cause by adding Logix in the mix causes the comm requirements to go beyond the allotted cycle, causing a slow down.

Hope this helps a bit, feel free to post back with any new findings…

I tried turning on the Advanced tab like you said. I called your support number a couple weeks ago and someone walked me through it. Initially when I turned the groups on it didn’t slow down comm, but after a few seconds it went back to being very slow. But I am running 4.2.9, so I should upgrade the next chance I get. I’ll have to do it on the weekend because this machine is too critical right now to shut down.

So you’re saying using the polled reads instead of subscriptions should give me the exact functionality I’m looking for? So it should only monitor the group trigger and when it changes, trigger the group?

I do remember one of our users, Kyle Chase, mentioning great performance upgrades by going from RSLinx to KepServer. He focused more on server CPU utilization, though.

post 1

post 2

Yeah, it will subscribe only to the trigger, and then read the rest of the items only when the trigger is active.

I’d definitely try upgrading and trying again- version 4.2.10 fixed a problem that we uncovered at the opc interop that would actually cause all of the items to be subscribed on OPC 2 servers, thereby defeating the purpose. Many opc servers are OPC 3, which is why we didn’t detect the problem for so long.

Regards,

How would I go about finding out if I’m running OPC 2 or 3?

You’d have to look at the documentation for the opc server. It refers to which version of the specification the server supports - it’s a definition, not like a library that can be upgraded. So, some servers support only 2, and almost all that support 3 also support 2 for backwards compatibility.

There was also a version 1, but FactorySQL doesn’t support it because it really shouldn’t be used any more (and you rarely come across it).

Version 3 mostly offers performance improvements over 2. In how it relates to FactorySQL, there are a variety of small benefits. Two examples:

  1. Browsing is much better, returning important properties such as the data type in-line. In 2, the OPC client has to make a secondary call to get the item id and any properties, so this can slow down browsing a LOT (if you want to get that info for all tags). FactorySQL takes a 2 stage approach and goes back to get that data when you drag the tags into a group. It doesn’t have to do this for OPC 3 servers.
  2. Clients can read from items without being subscribed. Not used much, but in the case of your polled reads, with a 2.0 server FactorySQL actually has to subscribe, read, unsubscribe each time it wants to get data. In a 3.0 server it can just call read.

So ultimately, servers that support the 3.0 interface are preferable, but I’ve never actually told anyone to not use a server just based on the interface it supports.

Regards,

I’m looking at the literature for RsLinx and it says “RsLinx is an OPC compliant data server supporting the OPC Data Access 2.05 specifications.” Is that the right thing? Does that mean it’s 2?

Yeah, 2.05 is the common sub-revision in the field.

You get a prize if you find the easter egg in that document that says that RSLinx doesn’t actually support browsing… (well, the only prize is knowing that even they know their browsing is really buggy)

I just checked and the groups with the large number of tags are already set to “polled reads instead of subscriptions”. The interesting thing about that is if I turned on “Show live values”, I see the values of the tags changing. Shouldn’t FSQL not know what the values of the tags are? According to what my understanding of this option is, it should only be monitoring the value of the trigger tag.

If the groups are running, it will show the values from the last time it read them. If the group has never been triggered, it should show you a message like “waiting for update” or “unknown”.

Have you upgraded to 4.2.10 yet? If not, there’s a very high possibility that the groups could be subscribing to the tags, and at a rate higher than you would want. You can confirm this by looking at “Group diagnostics” under RSLinx’s DDE/OPC menu. That table will show you the current subscriptions (the names won’t match the groups, it’s not necessarily 1-to-1), and their rates. If you double click a subscription, it will show you the items that it contains.

Regards,

I haven’t upgraded to 4.2.10 yet, I’m planning on doing that over the weekend. I’m really hoping that’s the solution. It does not show “waiting for update” or “unknown”, it shows the values, and I can see them changing at the group’s refresh rate.

Did you check the “group diagnostics” window in RSLinx? Because that would have the answer as to whether they’re actually being subscribed or not…

Regards,

Sonic,

I was also a big RSSQL user and I switch to FSQL and I am super happy. I don’t use RSLinx super $$$ and lots of overhead I use kepware and so far no problems. My app are using SLC 5/05 and CompactLogix. Download a copy of KepserverEX from kepware.com it has a 2 hr demo.

Good Luck

Julio

@ Colby, I looked at the diagnostics in Linx but I don’t know what I’m looking at. I’d need someone to explain what all of it means, then it would give me some meaningful information.

@ jdelgado, I’m glad I’m not the only person here who switched from RsSQL to FSQL. I’ve been meaning to check out kepware, I just haven’t had time with developing programs and working on projects. For right now I need to try making what I currently have work for me. I believe a trial of kepware came on the FSQL install disc, didn’t it?

Hi-

When you look at the group diagnostics, you’ll have a list of all of the subscriptions on the server. If all of the FactorySQL groups are using polled reads, and everything’s working correctly, you won’t see anything in the list- or maybe they’ll flash in and out.

Otherwise, each item in the list will be a subscription, each of which contains the items that are being watched. I’m mostly interested in how many line items you have, and what the “Update Rate” shows. Also, the “item count” column might be useful.

Regards,

I just upgraded to the latest version and it appears to be working correctly now. When I turned on “Show live values”, all the tags except the group trigger say “Not Connected”. My PLC guys should be happy now :slight_smile: