LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Date and time stamp in array

Solved!
Go to solution

Thanks TBob for the quick reply.  I was unable to open the version 9 VI.  Could you repost it as a version 8.0?  Thanks again for all of your help.

 

Dave

0 Kudos
Message 11 of 19
(1,394 Views)

I don't have 8.0.  Just look at the picture and re-create the vi in your version.  Or just make modifications to the vi you already have.  I only added two functions, one to convert numerics to strings, and one to convert timestamp to HH:MM:SS

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 12 of 19
(1,374 Views)

The picture was easy to follow except I couldn't figure out what was connected to the left shift register.  Originally I had an initialize array there.  I went through the menus but couldn't find the matching icon.  See attachment.

 

 

 

0 Kudos
Message 13 of 19
(1,365 Views)

It's a 2D array of strings.  You originally had a 2D array of DBL.  All I did was right click inside the array and selected Replace - String palette, string constant.

You have to delete all the wires to the shift registers, then change the array from DBL to string constant, then add the Numeric to String function, then you can wire the shift register back up.  You will also have to change your indicator from numerics to strings.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 14 of 19
(1,361 Views)

I am still having a difficult time trying to connect the shift registers outside of the loop.  Could someone convert TBobs help VI from 9.0 to 8.0 so that I can try to figure out where my mistake is?  Thanks TBob for your help. You got me most of the way there with your diagram.  See attachment.

 

Dave

0 Kudos
Message 15 of 19
(1,326 Views)

When I open your attached vi, everything looks right.  I don't see what your problem is.  The shift registers are connected properly.

 

If you want the vi converted, save my LV2009 vi and search for a subject called Downconvert VI (or something like that).  Post the vi there and ask someone to convert it to 8.0.  You will get better responses there than here.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 16 of 19
(1,307 Views)

Thanks Tbob - I got the file converted to 8.0.  I am not able to connect the pink wire to the "Write To Spreadsheet File" like shown in your example.  It will only let me connect orange wires.  I have version 8.2 on another computer so I will see if it lets me connect in that version.  I will post my result here if that works.  Thanks again for all of your comments over the last few days.

 

Dave 

0 Kudos
Message 17 of 19
(1,300 Views)

Somewhere you must have a DBL wired in.  Delete all wires going to and from the shift registers on both sides, and from inside the loop.  Then wire in the blank string array on the left side.  Then wire in the string array indicator on the right side.  These should all be pink wires.  Then wire in items from the loop.  When you try to wire in an orange wire, it will break all the other wires going to the shift register.

 

What probably happened is that you forgot to convert the DBL numerical array to a string before concatenating the array.  Look again at my vi drawing.  Where you build an array with the numerical values for Hot, Cold, Temp Diff, Voltage, you will see that I put a Fractional Number to String function.  This changes the orange wire to a pink one.  All shift register wires must be pink.  You cannot mix data types.

 

Also, there is a mistake in the format string for the Format Date/Time String function on the bottom left.  The correct string should be "%I:%M:%S: %p".  %H gives you 24 hour military time.  %I gives 12 hour time and %p at the end gives AM or PM.  Notice the space before %p to make the output more readable.

 

Message Edited by tbob on 05-25-2010 02:20 PM
- tbob

Inventor of the WORM Global
Message 18 of 19
(1,291 Views)

TBob - Thank you so much for helping me debug this program.  It finally works!

 

Dave

0 Kudos
Message 19 of 19
(1,267 Views)