LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I add a time column on my tabular data

The image I attached is a VI Snippet. There's a post about them at the top of the forum board (https://forums.ni.com/t5/LabVIEW/Notice-Attach-VI-Snippets-to-post-rather-than-upload/td-p/3660471) which lists ways to download them in links to that post. Basically, if you download the image, you can drag it from explorer to the block diagram and it will recreate the code.

 

If it pastes an image, you didn't get it quite right. For me, clicking on the image, the choosing the Download icon to the bottom right edge of the image, then dragging (from Explorer, not the browser toolbar) into the block diagram of a new VI works (it doesn't have to be a new VI either - you can drag snippets into existing code if you want to).


GCentral
Message 41 of 59
(887 Views)

@Zaqf wrote:

Would be great if you could attach as vi. 

 


It would be nicer if you did just a tiny bit of your own work yourself.  It should take you less than 10 minutes to duplicate the code on your own PC, and as you do it, you could think "Why am I using a For loop?", "What does this Build Array function do for me?", "How does this Write Delimited Spreadsheet function work?", and "What do the inputs in Write Delimited Spreadsheet mean?".  For some of the answers, you may need to right-click the function and choose "Help" from the Drop Down menu, then read the Detailed Help.  This is part of Learning LabVIEW, which requires some work on your part ...

 

Bob Schor

Message 42 of 59
(886 Views)

Thank you so much.  Unfortunately , I'm not in the place to work on labview so I'm trying to find answers to all the problems I might find , when I work on it tomorrow .  So I could attach a waveform chart to the connection to the array , yeah ? 

 Thank you so much. Would be great if I could get your email. I'm so debted to your service for my case. 🙏

0 Kudos
Message 43 of 59
(875 Views)

I deeply respect your concern for my growth and I thank you. But for now I'm in a position to complete the project I've been assigned. Definitely, I ll try to do this from scratch. 

Expecting your faithful service .

 Thank you. 

0 Kudos
Message 44 of 59
(874 Views)

@Zaqf wrote:

Thank you so much.  Unfortunately , I'm not in the place to work on labview so I'm trying to find answers to all the problems I might find , when I work on it tomorrow .  So I could attach a waveform chart to the connection to the array , yeah ? 

 Thank you so much. Would be great if I could get your email. I'm so debted to your service for my case. 🙏


Re the first point (LabVIEW availability) you should check with your IT department / licence holder - I think since 2017 the Academic Site Licence (which you may or may not have) covers use on personal computers owned by researchers. Looking at the link here: http://www.ni.com/en-gb/shop/academic-site-license.html suggests that benefit extends also to students.

 

Re the waveform chart - yes, it's possible. In the case of my snippet, you don't want to tick the Transpose Array (right click on the chart), but you should note that in my example the time resets to 0->0.1s every time, so the time array is odd. Typically you'd just add the values for a waveform chart (so a 1D, not 2D array) and then change the X-axis scaling (under properties, you can also use a Property Node, but that's a bit beyond this topic). Google can probably help you find those if you're wanting to do that. Your input may be significantly different to mine (depending on how you're generating it) so you may have a slightly different experience.

 

If the final point was addressed to me, I don't typically (or indeed, ever, as far as I'm aware) give out my personal email address on public websites, but it's possible to message forum users by their usernames.


GCentral
Message 45 of 59
(869 Views)

It's getting pasted as an image.  And which is the function to tabulate the array ?

0 Kudos
Message 46 of 59
(855 Views)

@Zaqf wrote:

It's getting pasted as an image.


Probably need some more details, but if you follow the instructions I gave a couple of posts ago it should work. Make sure you download the image - dragging it from the website won't work.

 


@Zaqf wrote:

And which is the function to tabulate the array ?


I think you're talking about the Write Delimited Spreadsheet function. If not, then perhaps you can describe what you're looking for in more detail. The VIs/Nodes used were just:

  • Random Number, Multiply
  • Build Array
  • Write Delimited Spreadsheet

GCentral
0 Kudos
Message 47 of 59
(851 Views)

I started it from scratch. I've got two data values , so should I make it a 3d array?  The write to spreadsheet is not working , as in I tried to copy the data to excel as well as .dat file(notepad). Both aren't working for me.   Could you please attach as vi 

0 Kudos
Message 48 of 59
(848 Views)

I expect you want a 2D array, where each row is a 1D array of either times or values.

 

You might want a time array for each value array, or they might share a time array.

 

Be careful if they don't have the same sampling rate - you'd need to use clusters in that case (because you can't have different length rows in a 2D array).

 

If you attach a new copy of your VI (that can be opened in 2017) I can take a look at it.


GCentral
0 Kudos
Message 49 of 59
(846 Views)

1 sample hw timed with 4hz. Actually with two data . Tried to build array , then tried to build matrix , but could save the data in both cases. After figuring this issue , I need to add a waveform graph as well.  Filepatg I've tried in .dat file as well as xlsx. , Not saving the data in both

 

0 Kudos
Message 50 of 59
(843 Views)