LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write to spreadsheet problem

Hi Crashdx,

 

I think you may want to be using the 2D input of the Write to Spreadsheet File.vi.  On the Build Array in the consumer loop you can right click and select deselect the concatenate inputs option.  At this point you'll have to fix the other 1D arrays going to the shift register so you don't have any broken run arrows.  You'll also need to add an index array function after the array size to pull off the 0th element of the 1D array for the size.  Wire this to the case selector.

 

I didn't have the Hardware you have so wasn't able to test your exact VI, but I replaced the DAQmx read with a random number generator to populate the array.

 

I was able to get two columns of data, the first being the timestamp and the second being the random number.

 

I hope this is helpful, I've attached a screenshot of the revised consumer loop for reference.

 

Regards,

Dave C.

Applications Engineer
National Instruments
0 Kudos
Message 21 of 23
(460 Views)

Thanks Dave, it did make my data go into a column but the timestamp data disappeared when I ran it for some reason. This isn't too big of an issue, but I went ahead and ran a sample set so I could see if this resolved my data issue and I'm still getting these random stalls in data. The times they do stall though seem to be for shorter periods of time. I was curious if this is something that is happening because of the counter input port and the way it reads data or if it could possibly be my optical encoder that is stalling out?

 

Once again, thank you for your time and assistance.

0 Kudos
Message 22 of 23
(435 Views)

Hi Crashdx,

 

You could generate a square wave with the Elvis board and read it into your counter input.  That would help identify if the problem was with the encoder, or how you were reading the pulses.

 

Give that a try and see if it identifies anything.

 

Regards,

Dave C.

Applications Engineer
National Instruments
0 Kudos
Message 23 of 23
(409 Views)