LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time and date stamp

Solved!
Go to solution

I'm beginning to understand why Bob Schor lost his temper a little bit.

 

ceilingwalker, if you're stumbling your way through this you need to learn some more LabVIEW basics. When you have a broken run arrow, you click the arrow and it tells you what's wrong. Plus, just telling us that you have a broken run arrow doesn't tell us at all why it's broken. You should look in to Core 1 and Core 2 training. I personally used the SixClear videos to learn the basics.

 

AND, like I said above, you will need to convert your data to a string in order to write the timestamps and the data at the same time to the spreadsheet. I assume this is your problem.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 11 of 21
(1,507 Views)

Here is what I mean: the moment I press "start" button, it starts a loop that reads capacitance, Dissipation Factor, and an analog input of voltage, triggered every 3-seconds. It puts all three values on the spreadsheet exactly how I want it. What I want it to do is, each time those three variables are put in their own column, on the final column I would like the real time  those samples were taken put in the last column.

0 Kudos
Message 12 of 21
(1,502 Views)

Yes, I've understood what you mean for a bit now and I've been telling you what to use, even linking to VIs.

 

Here is a step-by-step list of what you need to do to get your data to be in the same format as your timestamp:

  1. Open the Timing palette, click Get Date/Time in Seconds, place it inside your loop.
  2. Open the Timing palette, click Get Date/Time String, place it inside your loop.
  3. Wire the output of Get Date/Time in Seconds to Get Date/Time String.
  4. Concatenate the outputs of Get Date/Time String
  5. Place Number to Fractional String inside your loop.
  6. Wire array of data (capacitance, dissipation factor, voltage) to the Number to Fractional String VI
  7. You now have all of your data and timestamps in the form of strings. Build an array of all of these strings and write to spreadsheet. If you want the timestamp as the last column, then build the array with the timestamp after the data. Surely you can figure that part out now.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 13 of 21
(1,498 Views)
Solution
Accepted by ceilingwalker
You should really learn this sort of basic task. It sounds like the values you have now are numeric. If you want a strng as the time, then all values in an array must be strings. Convert your dbl/sgl values to strings so that you can add a string timestamp.

Describing your current program is just not nearly as clear as posting the actual VI.
Message 14 of 21
(1,494 Views)

Cheers, James.  I didn't "lose my temper", but I did "lose my patience".  Have you noticed how readily our requests to "Show your code" are ignored?  I do look, now and then, to see "what's next" in the "do my work for me" requests, but I'm (sadly) resigned to "You can lead a horse to water, but you can't make him (or her) drink".

 

BS

Message 15 of 21
(1,468 Views)
Oh, yeah "patience" is more accurate.

I've just recently decided to get more involved in the forums here. I started with the /r/LabVIEW subreddit a while ago, but it's just so dead it's hard to keep motivated to help out. I'm still learning the best way to help people without enabling too much.

I try not to give full solutions here for that "do my work for me" reason, though I have gone a bit too far a few times. It's a fine balance.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message