I did make a post on PLC.net about the clock. And in some respect this does pertain to that post. Lets first get some of the formalities out of the way. 1. This is the first time I have done any kind of project like this. 2. I have not had a lot of formal training on this type of application. Which is why I ask alot of questions.
So now here is the scenario. We currently have 4 machines wired up and this is what we are using for our testing, designing and debugging steps. When this project takes off we will have upto 100 machines. From what I can understand Ethernet is a parallel type of scheme. I also know how to get into the diagnostics and such of KepServer thanks in most part to David Garris from KepWare. If what I see and can translate from my limited knowledge is correct it takes about .5 to .6 seconds to read thru my 248 tags which I currently have. Although not all are active at the same time. What I have done is looked at the diagnostics and went from TX to TX which contained the same data string and took the difference of the time. So with that in mind and the fact I am told the scheme is parallel, how will the difference of 100 machines be vs what we are seeing when we are only running 4?
I am told that running 100 vs 4 will not cause a significant increase. Which by this statement means that an increase will occur. So how can one be sure that this increase will not cause problems as the system grows?
As for the time issue I know how I can do what I want but it would add more tags to my usage and if that is the case that would also possibly affect my scan time. Or at least I think it will. Also if I am going to sync up the clocks on the PLC’s with the system clock how can I take into account this slight lag time so that each and every clock is set identical?
I ask this because out data processing staff is building a VB program to take data which I putting there by IA software and they will run this application every hour on the hour. So anything from say 1:00:00 to 1:59:59 will be in the hourly production report. If my clocks are off by a few seconds this might affect their application. Also since a lot of our production equipment is fast paced this time might make a slight difference in the employees performance. These are all things I have to take into consideration.
Now onto what you said.
You said if you have a group which uses a triggered event that that group will only be active when that trigger presents a true statement. Does this mean that even though your software has not requested any data from these tags that the OPC server (KepServer) is still monitoring these tags? Or does KepServer only peek out the information from these tags when it has been told to do so by your software?
As for blocks, yes I am doing blocks. However I am not quite clear on them. It has always been my training and knowledge that when I write a program in a PLC I always have things that are going to be IO grouped together. So for my PLC program all registers that report back to the software are in sequential order (R376 - R430) Some are strings some are just DINT and they are also grouped by that respect as well. Likewise I did the same with the %I inputs, %Q Outputs, and %T temp bits. In the KepWare program I have the block data groups turned on. Now I have asked KepServer if it makes a difference using this blocked data groups check box and using an array. They seem, to me at least, to say that it would make no difference on scan time because both do the same thing. Just one is easier to work with which is why it was added.
I am just wanting to make sure I understand as much as possible about how things work and interact with each other this way should something arrise, from the dear ole MURPHY’S LAW, I can work around it and not get my butt bit off.
Thanks again for responding so promptly. Have a great day.
[quote=“nathan”]1. Having the same OPC item in several FSQL groups isn’t a problem. There are several layers of abstraction between the read request and polling the PLC. In fact, most OPC servers keep track of this sort of thing and act as a cache. FactorySQL works similarly.
A FactorySQL group that is set to use a trigger will only evaluate the items after the trigger is evaluated AND condition is true. You can use an Action Item that is a DB query that triggers on certain times. Similarly, you could really slow the group down so that it only runs every so many hours. Are you also saying that you want the user to be able to force a data update?
There are several ways of sharing data that vary depending on what you’re trying to accomplish. I’ll comment on each of your ideas.
a. Virtual tag - I think this would refer to using a field in the SQL database without mapping an OPC tag. This is an “Action Item” in FactorySQL talk. There are many applications where this makes sense.
b. Put the tag in each folder and don’t worry - hard to say yes or no to this. In many cases you’re perfectly fine doing that.
c. Make two folders into one - That really depends how well your data templates. Your only constraint is that a group all writes to the same database table. Nothing stops you from using one folder with 2 groups that are each machines that write to their own table. Better yet (in many cases), have 2 groups that write to different rows in the same table for both machines.
It’s pretty hard to generalize how to be efficient without the discussion getting more specific. A few things to consider:
- What’s your bottleneck when discussing “wire usage”? Is it expensive whenever you’re up (dialup) or constantly slow (satellite/leased line)? Is network traffic to/from the SQL database expensive?
- Can you consolidate your traffic? Using block data groups to do array reads can make a huge difference, for example.
This is typically a matter of taking a big step back and noting your architecture. Does it make sense for the computer to talk to one PLC or a PLC at each machine? What points are communications slow and what are fast? How does my system work in terms of fault tolerance?
You can monitor the Kepware bit for status. You might consider using Alerting to send an email (text message) and log it to the database. You can also monitor the FSQL status table.[/quote]