How will changing tag names in Kepware affect FSQL?

I am adding more production lines to the system and now want to change the tag naming scheme I am using.

I will add a prefix to all tags indicating the production line. This will eliminate duplicate tag names. I also will be changing the field names in the database since I am using this in my charting.

Can you give a recommendation about changes to be made to the FSQL system tables; SQL tags, etc.

Thanks,

That sounds like quite a bit of work. First up, changing the tag names will change their addresses in OPC, so each tag path in FactorySQL or SQLTags will need to be modified. In both cases the easiest way may be with CSV export/import. In FactorySQL, you’ll be changing the Item Path property of each item, in SQLTags it’s the OPC Item Path property in the meta props table. Using CSV will hide all of that, but I just wanted to point it out.

Changing the database column names… sounds like a bad idea. First off, you if have sets of data that are the same for each line, I would just add a “line number” column and query off that. If not, and you’re only trying to change your column names for display purposes, I would just add “as” aliases to the queries. Basically, I would do whatever I could to not change the column names, because it’s going to be a lot of work, and probably going to break lots of things for a while until you get everything sorted out.

That said, if you really want to, you just need to change the “field names” in your groups, and then use some DB Administration tool to actually change the columns in the db. Unfortunately FactorySQL can’t do this for you. SQLTags won’t be affected, because no columns are actual named off of the tag names.

Regards,

I have been doing this to the queries I am in control of. There are two areas of concern:

The alarm screen is right from the demo. If I have multiple machines with the same tag names then there is confusion becasue the alarm names are the same. I haven’t really looked that much into this. For now I disabled all alarms until I have time to look at it.

The other area is the easy chart. I am using a modified “click to chart” goodie so the pens are defined in the pens table. The problem is having more than one pen with the same name. If I change the contents of the ‘name’ column and leave the point_id column alone then what will be displayed in the chart? Will the chart care about the point_id being the same?

I believe the point_id must be a unique identifier for the pen, otherwise you would be unable to specify a specific pen to relate to a component.

The pen name is also used internally by the chart to differentiate the pens, so it should be unique as well.