using v. 7.7.4
I need some guidance from you smart people! I guess I can explain what I’m trying to do so it can make sense to whoever that is reading. I’m working with some tags, basically every time a part number is made there is an average time for that part number and cycle time for the part number and color tag and shift tag, shift and color tag are expression tags, color tag is basically:

if({[.]Previous_CycleTime} <= 10
   , 'GREEN'
   , 'RED'

and shift tag:

if({[~]Time/Hour} >= 7 && {[~]Time/Hour} < 15,
   if({[~]Time/Hour} >= 15 && {[~]Time/Hour} < 23
   , 'B'
   , 'C'

what i did was first of all I made a scan class and made it driver by a tag and chose the part number tag and changed the operator to change. my thinking was this way anytime the part number changes to a new one Ignition use that trigger to scan any tag that uses that tag class ( right or wrong I’m not sure, I guess that’s why I’m on here typing all this lol).
OK so i set the part number tag to default and if I’m not mistaken that scans every one second. now I changed the Historical scan class of all the tags to “Evaluate on change” thinking that’s what i want since I don’t want the same data to be stored in the DB over and over right.
Ok next I created a Historical Transaction group and put all those tags in there, set the trigger to the part number tag. I basically wanted to see ok for part number 55, what was the time it took to be done( cycle time) and whether or not it was over or under where the color tag comes in. everything finally looks fine. my issue is if i grab a table and grab the historical tag from my DB ( not the historical transaction group) i still see multiple identical rows for every second, but why? I know I’m scanning my part number tag (current_pp) every second but setting the historical scan class to “evaluate on change” only records the data when the data actually changes? right? or am I misunderstanding this?
Thanks in advance! and sorry for the long message :open_mouth:
I’ll include some picture that way it’s easier to follow.
Also if I’m making an unnecessary that could be avoided I’d love to hear it.

Maybe I made this sound way more confusing that it is, lets try this again.

I guess what like to figure out is what is the best way to grab bunch of data and display them in a row, now when i thought about it some, you don’t necessarily need to enable history for a tag if you are using a historical transaction group since that will backup your tag data to the table.

The only reason I enabled the tag history for one of my tables was to be able to compare my values and see of my transaction group table vs. the values of the individual tags that are stored in the DB separately. has
at this point I’m just doing trial and error to see what method and setting works right.
anyone done anything like this before?

Sorry to let this fall through the cracks in my mind. :open_mouth:

I think you’re overthinking what you are thinking. I think. Let me share my usual method. Feel free to use or ignore. :mrgreen:

On the PLC:
– When a part finishes I copy all pertinent data over to a separate set of PLC tags. This acts as a buffer so that you can start the next cycle without destroying old data. At least until the next cycle is done.
– Start a three second timer. Most of my cycle times are usually in to 18-25 sec range, so this delay gives plenty of time to update the Ignition OPC tags.
– When the timer completes, increment an interger that is used as trigger for the transaction group.

In Ignition, I use the default 1 sec. scan class, unless there’s a lot of data or short cycle times. Then I take it down to .25 sec.

Straight standard group. :wink:

I’ll explain a bit further. The “Evaluate only…” portion is really only for updateing the values used when it executes. It (apparently) does not affect when it stores to the DB

Yeah I definitely agree with you that I was over thinking my thinking lol, here is my main issue, I don’t deal with the PLC side since I don’t know much about lather logic (well just a little) not enough to want to mess with things, my boss is the one that deals with that side and he goes to different plants a lot and when that happens I’m pretty much left to deal with what I have working with. this is probably why I been over thinking this lol.
but one thing that definitely helped my case was creating a scan class based one the put number so when you go from one part to next one the rest of the tags start scanning. Now question about that, so say part 10 is done and part 11 is starting to be made, that triggers the scan class and the other tags start scanning, now does that scanning last till the that part is done? What I mean is do they keep scanning till the end of the part technically ? Thanks for the help :thumb_right:

hey JordanCClark,

So I have a Boolean tag that gets enabled for 30 seconds right before the new shift starts and it grabs a few tag values, such as last part made, last average, total time machine was down and writes them to some tags and the zeros out those tags. for the new shift and same thing again before the beginning of the next shift so those end of the shift tags stay the same during the whole shift till they get written over. I want to grab those values and put them in the DB but only one time, so that way in one day that has 3 shift there will be 3 rows of data 1 row for each shift showing the end of the shift values of those tags.
Now I used a historical transaction group for this and let the trigger value be the Boolean tag and set it to execute only one time while the trigger is active and set the trigger condition to be !=0 since when the Boolean tag gets enabled it has a value of one.
should i use a standard group for this? how would you approach this?

Historical group does the trick. Really, they’re just like standard groups, but they only insert data.

I use standard groups for just about everything, but that’s more a personal preference than anything. :slight_smile:

I guess what I wanted to know was whether or not my method is correct or is there a better way because I keep having issues, the wrong data gets grabbed at times and I just want to make sure I’m doing it correctly.

Hey JordanCClark, Is it bad to have a lot of scan classes? I mean does it hurt the performance of the Ignition software in anyway? this machine I’m working on has 11 operation stations and I have one scanclass for each station and next machine the same so i’ll have another 11… :unamused: