Dataset type for DB Tags

This is already possible using client tags. How hard would it be to add dataset DB tags?

Hard. Very hard.

Ha, ok, maybe not so bad. Some issues come up when you think of internal vs. external SQLTags, and then there’s the whole issue about subscriptions and efficiency, but I suppose anything’s possible.

For 7.4, we’ll be introducing UDTs into SQLTags. Initially these will only be supported by internal providers, so I suppose it might make sense to piggyback dataset types in as well. We’re hoping to get this release out rather rapidly compared to our normal schedule, currently aiming for early January. I’ll discuss this with some other people here and see what they think.


Hi Colby

Just wondering if the UDT’s will have the ability to link directly to a UDT structure in the AB Logix platform . I use UDT’s for my Ignition PLC code as it keeps everything structured and it would be nice feature if it could map to one SQL tag in Ignition



Hi Aidan,

We haven’t worked out the details yet about how we’ll integrate the UDTs with the drivers/OPC server, but if nothing else, you would definitely be able to create them in SQLTags and quickly map them. The UDTs will have a variety of options for indirectly mapping sub fields, so I don’t think it would take much time.

We’re definitely going to look at what we can do to import them, though.


I realize this would be really difficult from a historian perspective, but maybe something for a realtime tag might be easier?

For example, I have a takt time histogram table (why they don’t want a graph is beyond me, but there you go :unamused: ). So from a tall SQL Table to make this in pretty colors:

I need a query like this:

Select CONCAT('<HTML><FONT COLOR=#FFFFFF>Sta. ',StationID) as Station, CONCAT('<HTML><FONT COLOR=#FFFFFF>',ROUND(AVG(Takt_Time),1)) as Average, CONCAT('<HTML><FONT COLOR=#FFFFFF>',ROUND(STDDEV_POP(Takt_Time),1)) as SDev, CONCAT('<HTML><FONT COLOR=#00FF00>',SUM(IF(Rounded_Takt<='10',1,0))) as Takt10, CONCAT('<HTML><FONT COLOR=#00FF00>',SUM(IF(Rounded_Takt='11',1,0))) as Takt11, CONCAT('<HTML><FONT COLOR=#00FF00>',SUM(IF(Rounded_Takt='12',1,0))) as Takt12, CONCAT('<HTML><FONT COLOR=#00FF00>',SUM(IF(Rounded_Takt='13',1,0))) as Takt13, CONCAT('<HTML><FONT COLOR=#00FF00>',SUM(IF(Rounded_Takt='14',1,0))) as Takt14, CONCAT('<HTML><FONT COLOR=#00FF00>',SUM(IF(Rounded_Takt='15',1,0))) as Takt15, CONCAT('<HTML><FONT COLOR=#00FF00>',SUM(IF(Rounded_Takt='16',1,0))) as Takt16, CONCAT('<HTML><FONT COLOR=#00FF00>',SUM(IF(Rounded_Takt='17',1,0))) as Takt17, CONCAT('<HTML><FONT COLOR=#99FF00>',SUM(IF(Rounded_Takt='18',1,0))) as Takt18, CONCAT('<HTML><FONT COLOR=#99FF00>',SUM(IF(Rounded_Takt='19',1,0))) as Takt19, CONCAT('<HTML><FONT COLOR=#CCFF00>',SUM(IF(Rounded_Takt='20',1,0))) as Takt20, CONCAT('<HTML><FONT COLOR=#CCFF00>',SUM(IF(Rounded_Takt='21',1,0))) as Takt21, CONCAT('<HTML><FONT COLOR=#CCFF00>',SUM(IF(Rounded_Takt='22',1,0))) as Takt22, CONCAT('<HTML><FONT COLOR=#FFFF00>',SUM(IF(Rounded_Takt='23',1,0))) as Takt23, CONCAT('<HTML><SPAN style="BACKGROUND-COLOR:#3333FF"><FONT COLOR=#FFFFFF>&nbsp;&nbsp;',SUM(IF(Rounded_Takt='24',1,0)),'&nbsp;&nbsp;') as Takt24, CONCAT('<HTML><FONT COLOR=#FFCC00>',SUM(IF(Rounded_Takt='25',1,0))) as Takt25, CONCAT('<HTML><FONT COLOR=#FF9900>',SUM(IF(Rounded_Takt='26',1,0))) as Takt26, CONCAT('<HTML><FONT COLOR=#FF6600>',SUM(IF(Rounded_Takt='27',1,0))) as Takt27, CONCAT('<HTML><FONT COLOR=#FF3300>',SUM(IF(Rounded_Takt='28',1,0))) as Takt28, CONCAT('<HTML><FONT COLOR=#FF0000>',SUM(IF(Rounded_Takt='29',1,0))) as Takt29, CONCAT('<HTML><FONT COLOR=#FF0000>',SUM(IF(Rounded_Takt='30',1,0))) as Takt30, CONCAT('<HTML><FONT COLOR=#FF0000>',SUM(IF(Rounded_Takt='31',1,0))) as Takt31, CONCAT('<HTML><FONT COLOR=#FF0000>',SUM(IF(Rounded_Takt='32',1,0))) as Takt32, CONCAT('<HTML><FONT COLOR=#FF0000>',SUM(IF(Rounded_Takt='33',1,0))) as Takt33, CONCAT('<HTML><FONT COLOR=#FF0000>',SUM(IF(Rounded_Takt='34',1,0))) as Takt34, CONCAT('<HTML><FONT COLOR=#FF0000>',SUM(IF(Rounded_Takt='35',1,0))) as Takt35, CONCAT('<HTML><FONT COLOR=#FF0000>',SUM(IF(Rounded_Takt='36',1,0))) as Takt36, CONCAT('<HTML><FONT COLOR=#FF0000>',SUM(IF(Rounded_Takt>'36',1,0))) as Takt37 from DS_3425_takt Where t_stamp>="{[.]Raw_1st_Start}" and t_stamp<"{[.]Raw_1st_End}" group by stationID
So, doing this across the board (currently 6 lines, but expanding) plus a black-and-white version for printing makes-- multiply by x and carry the y-- well, a lot of big queries.

Would a sharable dataset tag help streamline things? I think it would to the DB connection, but would it then be an increase in server/client traffic to make up for it? Kind of like a conservation of energy thing. :laughing: