Chart overlays

I have a problem. Lets say i have batch data that tracks the batch time and the batch temp.
Now, in the reporting plugin, i have successfully used the batch time as my x axis. (btw - that seemed to have taken me forever to figure out. lol) so… for one batch, i’m ok. But, if i want to display multiple batches, distinguished by batch number, i get a very odd graph… it creates one graph. I know why it looks funny, but am unsure as to how to fix it. How would i go about fixing this? Attached are two pdfs. one that is a single batch, another that is of multiple batches.

-Chris
single.pdf (156 KB)
multiple.pdf (153 KB)

What you’re going to need to do is put a table on your report, and have the table’s dataset key be your batch info dataset. Then add the batch number to the grouping of the table. Then add a chart component into the batch number details row of the table. Tie the keys of the table to your datapoints, but leave the dataset key for the table blank - that way it’ll use their parent’s dataset, which the table component will provide, already grouped by batch number. This way you should get a chart per batch.

carl,

I must be on crack, because i make out HALF of what you said, but the rest is BEYOND me… lol…

I think i need some hand holding :open_mouth:

Can you call in during business hours? This is the kind of thing that easier to show than to tell. (via GoToMeeting)

Carl, do i need to call inductive? or do you mean some sort of link/software on inductive’s page for assistance on this problem?

Actually, I guess I meant both. Typically you would call into our support number on the phone, and we’d start up a GoToMeeting session.

I do believe that i am in need of a GoToMeeting… lol… UNLESS, someone would be so kind as to SPELL out for me what it is i need to do. here is a sample of the data. the x axis needs to be batch_time, the y axis, for examle, could be batch_temp, and i would like to graph 5 different batches (or block_id’s preferably). also, if i have a SINGLE batch i want to compare to the previous 5, i would like to obviously put that in it’s own dataset and make it a unique pen color, where as the original five would all be the same. attached is a .xls with data
five second bd.xls (60.5 KB)

carl, you say that the instrunctions above that it should give me a chart every batch, do you mean a diff chart every batch? or a new plotted line on the same chart?

Carl, i believe i was able to get it to work, yet with 2 batches, it created 62 pages on report.

page 1 is batch one, and the next 19 pages look the same. on page 20 it shows the next batch.

What I need is a way to show multiple batches on ONE trend. Would this be better accomplished through manipulating the data to produce multiple columns for each “Block_ID” and lets say “Temperature”?

Oh, I thought you wanted a separate chart per batch. Yeah, you hit the nail on the head - you want to manipulate the data so that each batch is a separate column.

Ok Carl, here we go again:
Round 2: LOL
I used a “chart” to do overlays… only one problem…

First, let me explain what i have and what i did.

I have a Temperature reading, taken at 5 sec intervals for each batch. This is all indexed in the plc. then fsql gets it in a blockgroup.

Now, I have my block_id, GREAT, i can now tell which data belongs to which batch. I also capture BATCH time in seconds.

Now, i used just a REGULAR Chart and i have a dataset with the batch_time, batch_temp and block_id.

I use the batch_time as my x axis, therefore i get all of my data for each batch ontop of one another, hence an overlay. now, i am doing NOTHING with my block_id, but i think there MUST be something i need to do because as you can imagine… if i chart just ONE batch, the graph looks great, but if it’s more than one batch, then at the end of the first, it draws a line going back to the BEGINING, LOL, and repeats till it is at the LAST batch in the series.

SO, my first question, do i need to do some sort of WEIRD manipulation with the data, and put EACH batch in it’s OWN column first? if so, how do i do that i with my batch_time, it will NOT always have the same TIME for say… the FIRST or SECOND or so on data points for temp. and second, if that will work, HOW do i accompish putting it in individual columns?

Second question, do you have a SMOOTH graph function? like excel does? so i’m not just CONNECTED a to b to c and getting HARSH points in my graph?

Thanks again :smiley:

Well, if your times don't align, you'll actually need to put each batch in its own dataset. The awkward thing about that is that you can't dynamically add more datasets to a Classic Chart - how many batches might you be displaying at once? If you can convert the integer times into actual datetimes, then you could add each batch programmatically as a pen to an Easy Chart, this would be more elegant.

Sorry, no, we don't have any sort of smoothing function.

Carl,

We might display one or 20, or MORE, lol. The batch time that we capture is in seconds. So i could do a query maybe? Say, for ID 20, batch_time=38 (seconds), and t_stamp = 2009-01-01 13:00:00… so i know the BASIC query

SELECT BATCH_TIME, (MIX_TEMP/10) AS TEMP, t_stamp + INTERVAL (BATCH_TIME/10) SECOND FROM l11_five_sec_batch_data WHERE block_id >= '3499' AND block_id <= '3500' AND MIX_TEMP != '0'

but that doesn’t help me when trying to get them to overlay. So, what do i do? i’m kinda frustrated and locked up, LOL

Any help would be great :slight_smile:

I think that you almost had it. Turn something like this into View:

SELECT t_stamp + INTERVAL BATCH_TIME SECOND as RecordTime, (MIX_TEMP/10) AS TEMP block_id FROM mytable

And then use the EasyChart, adding pens using “RecordTime” as the X value and TEMP as the Y value, and each pen using its where clause snippet of “block_id=123” to sort out what batch to look at. I’m still not clear how you correlate block ids to batches.

Please don’t bang your head against the wall - don’t be afraid to just call us up…

ok, in the PLC, we have 60 integers to store data, PER data point, IE:

batch_time N40:0 to N40:59, that would be ordered from first capture to the last capture, might end at N40:35, but that doesnt matter, the next, say batch_temp would start at N40:60, and so on… so at the end of a batch, i have a FSQL block group get the data in blocks, that way, i have each data point, IE: batch_temp, and batch_time, in it’s own column.
Since that ONE batch got captured on one Poll, they all have the same block_id :smiley:

We just dont wanna poll ALL the mixing lines at 5 sec intervals :wink:

With that being said, I have not tried what you posted for me, but it appears from the code, that i would still only be displaying one batch at a time, not 5 or whatever on top of each other. It would be preferrable to use batch_time as X axis for two reasons, ONE, that is how our Chem. Engin.'s look at the data, more than ONE batch on a graph, all with the same x axis, batch time, hence the overlay. What i’m unsure as to HOW to code, is how to use my query and specify for EACH block_id, create a NEW column… so i would have block_id_1 with batch 1’s Temperature with 60 rows of data, block_id_2, batch2, and so on.

I’m attaching an excel file with what i have and a trend of how it looks, but i STILL want to get rid of that annoying crap at the bottom of the graph. LOL

the red line is from another query, but i’m not concerned with that.
by they way, the graph is not from the data i’m sending. but i get it the same way

Thanks again.
five sec data.xls (22.4 KB)


i’m a pain in the YOU KNOW WHAT, but i am FULL of questions. I also can’t seem to put this stuff down, it just too exciting :smiley: know what i mean? LOL

Ok, on the ctg, if i have that 5 sec data, and i already know how to get my extrapilated t_stamp, how could i go about using that for my x axis but only on the pens that are from _five_sec_data, there would be FOUR tables with that as part of its name “L11 to L14_five_sec_data” ? It appears that ctg by default uses t_stamp.

Maybe we shouldn’t complicate matters with CTG just yet… (the answer is: the x-axis column name is a pen attribute)

First question, is: do you have good reason for doing this in such a hard way? You say you don’t want to poll all of your mixing lines every 5 seconds. How many mixing lines do you have? 5 second polling interval isn’t very fast…

Ok, if you want to use the classic chart so that your X-axis can be a number rather than a date range, you’re going to have to manipulate the data. The best way would be to create a new column for each batch, but you said that the batch times won’t align. I’m having trouble seeing how the batch times won’t align, since they get logged in PLC registers every 5 seconds - aren’t they always just simple increasing integer sequences?

We TRIED to poll ALL 4 mixing lines 5 sec data at five sec intervals; it resulted in t_stamp differences of MORE than 5 sec. Sometimes as much as an 8 or 9 sec difference can occur. We have at times 7000 active tags in KepServer or MORE. We already pull our alarms through SQL tags in pmi and the 5 sec data that the plc captures is based off a TON.acc in the logic. Due to timing and scanning issues, this normally results in slight variation in the batch_time from batch to batch. I guess if it’s not THAT big of a difference, then i could just create a DEFAULT column with time that ranges in seconds 0 - 600, just to CYA, then the batch times would all be correlated.

I’m not sure as to what statements to use for my query to create separate columns for each block_id.

If your time values don’t naturaly align, I wouldn’t force it.

Your most direct option is to use the classic chart, and to put 20+ datasets on it, each driven by a query that selects a single batch’s data, and then use scripting to enable/disable the datasets as batches are added/removed from the chart.

I am still unclear as to how you correlate between batch and block-id, but somehow you’re going to let users pick batches, and for each batch they pick, have the query for one of the datasets on the chart select time/value for the correlating batch-id, and programmatically disable the datasets that aren’t in use.

Is there anyway that i could talk you into looking at it? the interface that is or looking at it in designer??? it wouldn’t be the software at the plant, but it would be the one i’m working with at home on my server. that might clear some things up. lol maybe gotomeeting or just chatting on msn would be better than posting back and forth too :stuck_out_tongue: