OT: Charting Logged Data

jedft

Member
Join Date
Jul 2004
Posts
145
I have what may be an easy question. When you log bit data by exception, what is the best way to chart it in Excel? For example, say I am logging a bit and it goes from 0 to 1 at 12:00:00. At 12:15:00 it goes back to zero. So now I have two data points, with no data in between 12:00 and 12:15. If I just dump those into Excel and creat a chart I will get a value of 1 at 12:00 with a downward sloped line to 0 at 12:15. What I want to do is have more of a "square wave" look to it where I have a straight line on the 1 value of the y-axis from 12:00 to 12:15, then at 12:15 it goes straight back down to zero. To complicate things, I also need to have other, more varable data on the same chart, but for now I would be happy with the square wave chart.
 
It takes a little spreadsheet magic, but it can be done. I attached a spreadsheet I created in OpenOffice, but saved in Excel format. I don't know if it will make the transition, but it is fairly straight forward.

Sheet one contains three columns and the chart itself. Column one is a minute increment; use whatever increments your logging requires for your variable data (which I assume is logged on a regular basis rather than on updates). Column two is your variable data. Column three is a lookup instruction for the spreadsheet. It tells it to find the appropriate value from sheet 2, which is where the periodic update log is located. It is important that this data be sorted in the same order as the data on sheet one. Built into the lookup function is ability to always return a number even if an exact match to the lookup is not found. In this case, there is no entry for 12:01, so it returns the value for 12:00. It will continue doing this until it finds another entry, at which point, it will start returning that value.

Brian
 
Amazing, that's all I can say. I would have never come up with that, but it does exactly what I need it to do. Thanks Brian, I can only hope to one day return the favor. 🍺
 

Similar Topics

I recently started working on this charting software because the previous system was developed in vb6 and used client tools to dig into old HTR...
Replies
7
Views
2,404
Hello everybody!! Since my last post, I've started a new job as a manufacturing controls engineer (plant job). I spent the previous four years...
Replies
10
Views
12,516
I have an installation with a Compact GuardLogix 5380 CPU [5069-L306ERS2] that is experiencing a strange issue I have never encountered before...
Replies
15
Views
2,803
Ever since I changed to an iphone-13 I cannot stay logged in here on this site, even with marking the checkbox to stay logged in. Am I doing...
Replies
6
Views
1,923
We had an enclosure unfortunately fill up entirely with water. We had a different components in there, a Dynamix 1444 Module and terminal base...
Replies
10
Views
4,133
Back
Top Bottom