<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Setting Waveform Graph X-axis for 24 hours in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Setting-Waveform-Graph-X-axis-for-24-hours/m-p/4253039#M1237656</link>
    <description>&lt;P&gt;Well, I'm a little embarrassed.&amp;nbsp; I just wrote a little VI to generate a 5-cycle-a-day waveform for 24 hours, 1000 points, and when I wired it into my "constructed" Waveform Graph (oh -- it's a Graph, dummy, you are not familiar with Graphs, just Charts, maybe that's the mistake), it gave me a 5-cycle sinusoid, as expected, but but X axis was not showing Time (it did show seconds, however ...).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Back to the drawing board.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bob "Close, but No Cigar" Schor&lt;/P&gt;</description>
    <pubDate>Thu, 01 Sep 2022 18:15:57 GMT</pubDate>
    <dc:creator>Bob_Schor</dc:creator>
    <dc:date>2022-09-01T18:15:57Z</dc:date>
    <item>
      <title>Setting Waveform Graph X-axis for 24 hours</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Setting-Waveform-Graph-X-axis-for-24-hours/m-p/4252955#M1237633</link>
      <description>&lt;P&gt;I'm sure this is simple for anyone with more LabVIEW knowhow than me (which is probably most of you!)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to track production output over a 24 hour period. I have a vi that updates the result graph once per hour. My problem is the x-axis needs to run from 6am to 6am. I can see how I use an offset to create a 6 am start, but if I set it to cover 24 hours the graph wants to display hour 30 as the x-axis max.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone share a tip for how to get the x axis to go from 06:00 to 23:00 and than on to 0:00 and 06:00? (Appending a picture of the loop I'm using for testing.)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="another_novice_0-1662043423497.png" style="width: 400px;"&gt;&lt;img src="https://ip1.i.lithium.com/d7192befaba929779fe426ed907e37bd70bd0275/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f33303735333769433236333538323041433033333834432f696d6167652d73697a652f6d656469756d3f763d76322670783d343030" role="button" title="another_novice_0-1662043423497.png" alt="another_novice_0-1662043423497.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 14:44:56 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Setting-Waveform-Graph-X-axis-for-24-hours/m-p/4252955#M1237633</guid>
      <dc:creator>another_novice</dc:creator>
      <dc:date>2022-09-01T14:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Waveform Graph X-axis for 24 hours</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Setting-Waveform-Graph-X-axis-for-24-hours/m-p/4252989#M1237644</link>
      <description>&lt;P&gt;An intriguing problem you posed -- how to design a Waveform Graph that has the following Properties:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The X Axis is labeled in "Time Units" as "HH:MM" (presumably relative to the day that the data were acquired), with the appropriate ?AM/PM" suffix..&lt;/LI&gt;
&lt;LI&gt;The X-Axis is 24 hours in leng so that the right-most Label matches the left-most (e.g. both are, say, 6:00 AM).&lt;/LI&gt;
&lt;LI&gt;The dacreta being plotted span no more than 24 Hours.&lt;/LI&gt;
&lt;LI&gt;You have a specified "Time Start/Stop" for the Graph (e.g. "6:00 AM").&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I don't use Graphs much (my data works better with Charts), and I don't remember (and am too lazy to look up) how to specify the width of a Graph.&amp;nbsp; But I created a Waveform Graph and "by inspection", found that it contained 1000 points, so I'm going to take this as "fixed", for the time being.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's what I did, and my reasoning:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Dropped a Waveform Graph on a blank VI.&amp;nbsp; Inspection shows the number of points on the Graph is 1000.&lt;/LI&gt;
&lt;LI&gt;You want the X Axis to plot "Actual Time" values, not "Relative Time" (so if the first point is 6:00 AM, the last point won't be 30:00 AM, but 6 AM).&lt;/LI&gt;
&lt;LI&gt;I'm assuming that the first&amp;nbsp;&lt;U&gt;data point&lt;/U&gt; is at 6 AM, possibly because that's the value of t0 on a Wave:%M%form being plotted.&lt;/LI&gt;
&lt;LI&gt;Go to the Display Format property of the Graph.&amp;nbsp; You need "Absolute Time" (since you want "actual", not "relative", time).&amp;nbsp; Choose HH:MM, with AM/PM and set Date as "Unused".&lt;/LI&gt;
&lt;LI&gt;You need a "Custom Time Format", so check "Advanced Editing Mode".&amp;nbsp; In the Format String, remove the part that shows the Date (on a second line).&amp;nbsp; The Format should be %&amp;lt;%I:%M %p&amp;gt;T which means 12-hour Hour, colon, Minute, space, AM/PM in Absolute Time format.&lt;/LI&gt;
&lt;LI&gt;Go look at your Graph.&amp;nbsp; You should now see time starting as some "number of hours" (mine shows 7 P.M., because I'm on the Eastern part of the US)(extra points for figuring out why 7 PM), and ends just after 7:16 PM.&lt;/LI&gt;
&lt;LI&gt;So we got the Time Labels right, but it only shows 16+ minutes, or a few more than 960 seconds.&amp;nbsp; I made a "Leap of Faith" that the default number of points in the Graph was 1000, and said (to myself) "If there are 86,400 seconds in a day, I bet if I choose an offset of 864, I'll get a 24-hour plot".&amp;nbsp; Try it and see for yourself.&lt;/LI&gt;
&lt;LI&gt;So now, all you have to do is fix the Offset.&amp;nbsp; I'm going to leave that as an "Exercise for the Reader"&amp;nbsp; (Hmm, I should probably generate some "Fake Data" and try to plot it, using one of the Waveform functions that can generate, say, a Sinusoid having 1000 points, a frequency of 5 cycles/day, and a period of 24 hours).&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;One of the things I really like about LabVIEW is how much fun it is to put together a (self-)teaching example, where you make up "known data" and then try to analyze (or plot) it to learn about analysis (or plotting).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try out what I just described (and did for myself to be sure it would work).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bob Schor&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 15:58:38 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Setting-Waveform-Graph-X-axis-for-24-hours/m-p/4252989#M1237644</guid>
      <dc:creator>Bob_Schor</dc:creator>
      <dc:date>2022-09-01T15:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Waveform Graph X-axis for 24 hours</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Setting-Waveform-Graph-X-axis-for-24-hours/m-p/4253027#M1237652</link>
      <description>&lt;P&gt;Excellent info Bob, thank you very much. I'd never looked at those time settings before so thank you for showing me how to reach and use them.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll tinker around a bit and when I get my routine running I'll be back to mark your answer as 'Accepted'. Or ask more questions. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 17:32:15 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Setting-Waveform-Graph-X-axis-for-24-hours/m-p/4253027#M1237652</guid>
      <dc:creator>another_novice</dc:creator>
      <dc:date>2022-09-01T17:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Waveform Graph X-axis for 24 hours</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Setting-Waveform-Graph-X-axis-for-24-hours/m-p/4253039#M1237656</link>
      <description>&lt;P&gt;Well, I'm a little embarrassed.&amp;nbsp; I just wrote a little VI to generate a 5-cycle-a-day waveform for 24 hours, 1000 points, and when I wired it into my "constructed" Waveform Graph (oh -- it's a Graph, dummy, you are not familiar with Graphs, just Charts, maybe that's the mistake), it gave me a 5-cycle sinusoid, as expected, but but X axis was not showing Time (it did show seconds, however ...).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Back to the drawing board.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bob "Close, but No Cigar" Schor&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 18:15:57 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Setting-Waveform-Graph-X-axis-for-24-hours/m-p/4253039#M1237656</guid>
      <dc:creator>Bob_Schor</dc:creator>
      <dc:date>2022-09-01T18:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Waveform Graph X-axis for 24 hours</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Setting-Waveform-Graph-X-axis-for-24-hours/m-p/4253095#M1237674</link>
      <description>&lt;P&gt;Arrrggghhh!&amp;nbsp; It was really easy to drop a Graph and get the X (time) labels to be 7:00 PM, 9:00 PM, 11:00 PM, 1:00 AM, ... 7:00 pm, and I hinted at why it stopped and started at 7 PM (you really don't want to know), but the "easy fix" I envisioned to let you set the starting and stopping time, and the easy of plotting Graph data showed how simple-minded my "clever" approach really was.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Graphs and Charts are really old (meaning not very "flexible" due to 30+ years of "history" and "compatibility"), and (accordingly) have somewhat limited "flexibility" in making the kind to "nice-looking" visual images that you are interested in seeing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That does&amp;nbsp;&lt;U&gt;not&lt;/U&gt; mean that it can't be done, but (at least from my feeble attempts to do it "simply") it may take a bit of extra work to make "attractive".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd suggest several approaches:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Check out the LabVIEW Tools Network -- I'll bet there's a Plotting Package that works with LabVIEW that has the Bells and Whistles you desire.&lt;/LI&gt;
&lt;LI&gt;"Roll your own".&amp;nbsp; Create a String Indicator that you lay down&amp;nbsp;&lt;U&gt;on top of&lt;/U&gt; the X Axis label and populate it (with appropriate spacing) with the text that you want (6:00 AM, etc.).&amp;nbsp; Have it "cover up" the existing X labels.&amp;nbsp; [I've done something similar for "run-time-populated Data Tables", writing the data as a 2D Array of Floats, and a "header" a 1D Array of Strings].&lt;/LI&gt;
&lt;LI&gt;???&amp;nbsp; Maybe someone else on the Forum has learned how to get more out of Graphs ...&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Bob Schor&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 20:58:53 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Setting-Waveform-Graph-X-axis-for-24-hours/m-p/4253095#M1237674</guid>
      <dc:creator>Bob_Schor</dc:creator>
      <dc:date>2022-09-01T20:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Waveform Graph X-axis for 24 hours</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Setting-Waveform-Graph-X-axis-for-24-hours/m-p/4253280#M1237735</link>
      <description>&lt;P&gt;Bob,&lt;/P&gt;
&lt;P&gt;Thanks for the suggestion to check the Idea Exchange. I found a discussion there that seems like it should help:&amp;nbsp;&lt;A href="https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Simple-chart-with-time-as-X-Axis/idi-p/1252436#comments" target="_blank"&gt;https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Simple-chart-with-time-as-X-Axis/idi-p/1252436#comments&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 15:50:21 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Setting-Waveform-Graph-X-axis-for-24-hours/m-p/4253280#M1237735</guid>
      <dc:creator>another_novice</dc:creator>
      <dc:date>2022-09-02T15:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Waveform Graph X-axis for 24 hours</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Setting-Waveform-Graph-X-axis-for-24-hours/m-p/4253317#M1237744</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/51208"&gt;@another_novice&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I'm sure this is simple for anyone with more LabVIEW knowhow than me (which is probably most of you!)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to track production output over a 24 hour period. I have a vi that updates the result graph once per hour. My problem is the x-axis needs to run from 6am to 6am. I can see how I use an offset to create a 6 am start, but if I set it to cover 24 hours the graph wants to display hour 30 as the x-axis max.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone share a tip for how to get the x axis to go from 06:00 to 23:00 and than on to 0:00 and 06:00? (Appending a picture of the loop I'm using for testing.)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="another_novice_0-1662043423497.png" style="width: 400px;"&gt;&lt;img src="https://ip1.i.lithium.com/d7192befaba929779fe426ed907e37bd70bd0275/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f33303735333769433236333538323041433033333834432f696d6167652d73697a652f6d656469756d3f763d76322670783d343030" role="button" title="another_novice_0-1662043423497.png" alt="another_novice_0-1662043423497.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Here is what I did for tracking daily solar production:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I set my X- axis properties like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Z0-4Capture.PNG" style="width: 509px;"&gt;&lt;img src="https://ip1.i.lithium.com/844c8570023f5a67ce0002ec9e5ad8fb2c2d6904/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f33303736323869443945424631423344303636384645412f696d6167652d73697a652f6c617267653f763d76322670783d393939" role="button" title="Z0-4Capture.PNG" alt="Z0-4Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Z0-3Capture.PNG" style="width: 504px;"&gt;&lt;img src="https://ip1.i.lithium.com/fc9df577ab6244521465cb1a44919f5e6a8e3232/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f33303736323969373036444132354436383731464339442f696d6167652d73697a652f6c617267653f763d76322670783d393939" role="button" title="Z0-3Capture.PNG" alt="Z0-3Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;86400 is the number of seconds in one day&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I launch my program and every night at Midnight I clear the graphs and set their X axis min and max to 12:00AM to 12:00AM with the attached ZeroHour vi.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Z0-2Capture.PNG" style="width: 438px;"&gt;&lt;img src="https://ip1.i.lithium.com/5fc76815461f00252a100ece9bab5fcfac8b08b3/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f33303736333169453834363433313037434430454644332f696d6167652d73697a652f6c617267653f763d76322670783d393939" role="button" title="Z0-2Capture.PNG" alt="Z0-2Capture.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Z0-1Capture.PNG" style="width: 344px;"&gt;&lt;img src="https://ip1.i.lithium.com/582833812a241298a407944dc08c9a79323bb2ff/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f33303736333269343839383630323931324234334537342f696d6167652d73697a652f6c617267653f763d76322670783d393939" role="button" title="Z0-1Capture.PNG" alt="Z0-1Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I also set the X axis increment to 1 hour (3600 seconds)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 18:04:53 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Setting-Waveform-Graph-X-axis-for-24-hours/m-p/4253317#M1237744</guid>
      <dc:creator>RTSLVU</dc:creator>
      <dc:date>2022-09-02T18:04:53Z</dc:date>
    </item>
  </channel>
</rss>

