LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write Spreadsheet String

If you want your time stamp to be related with the data that you acquire you need to keep this vi at the place where you are getting the data and remove the delay so whatever data you acquire will pass through this for loop and have the time stamp. But still that might not be accurate.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 11 of 22
(1,650 Views)

I posted the code a few back. Any suggestions based on what you see there?

0 Kudos
Message 12 of 22
(1,638 Views)

Convert your DAQmx read to a 1-D waveform datatype instead of a 2-D array of doubles.  Then the correct time information will be saved with the data and passed through your VI.

Message 13 of 22
(1,627 Views)

 

When I split the 1D array of waveform, how do I take a component of the waveform to manipulate it. In my code I subtract out a voltage offset and I don't know how to do that with a waveform without changing the timestamp.

 

Is there an easier (more efficient) way to seperate the data into 4 groups of 6 data channels?

 

Thanks,

~Chris

0 Kudos
Message 14 of 22
(1,618 Views)

You simply initialize the queue with a waveform constant. Right click on the DAQmx output and select 'Create Constant'.

 

You use the Get Waveform Components if you really need to extract the Y array. To subtract a constant from the wavefrom, simply wire the waveform to the subtract function. No different than what you are doing now by wiring a 1D array to the subtract though what you are doing with the array constant and the subtract does not make much sense to me.

 

p.s. It is silly to wire up the N terminal and use auto-indexing of a for loop. Do one or the other. You also have way too many local variables.

Message 15 of 22
(1,614 Views)

Auto indexing the "for loops" is redundant and I removed the wire to the N terminal.

 

I can remove some local variables once I get the program working but it helps me visually see what is going on. Then I condense. I am new remember.  🙂

 

I did get the initiate queue as soon as I sent the last post. Thanks though.

 

Maybe you have an idea for offsetting the data: I want to make all values offset to zero when the user presses the "Tare All" button. That way I read the voltage change from that moment (kind of like taring a weight scale). Then this offset is removed when they press the button again.

 

Any thoughts?

0 Kudos
Message 16 of 22
(1,606 Views)

A simple solution for making everything zero is by multiplying the value with 0 and for getting back the same condition you can multiply with 1.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 17 of 22
(1,601 Views)

A logic similar to this may help you. As long as you click the tare button you will get your analog inputs zero once you release it the tared value will be taken as an offset and subrated from the future values.

 

Tare.png

 

Good luck

-----

The best solution is the one you find it by yourself
Message 18 of 22
(1,598 Views)

That is a great way for offsetting the data. Can I use the same method and subtract out a 1d array of waveform data?

 

If I wanted to be able to offset each group of data seperately (using four seperate "Tare" booleans) could I use this same idea in the consumer loop?

 

I still need to split the data into 4 charts. With a 1D array of waveforms would using "split 1D array" work best?

 

Thanks again,

~Chris

0 Kudos
Message 19 of 22
(1,589 Views)

A simple Index Array will do. You don't even need to wire the index inputs.

0 Kudos
Message 20 of 22
(1,581 Views)