LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Output signal from an array of excel to servotube

Hi All,

I'm doing a test that the input of the test should be an excel files of 2D array (for example, we can have 1000 point sinusoid here). I want to get analog output from this 2D array and send it to a servotube. The problem is how I can send this sinusoid analog output to the servotube. Two files are attached here, the post-filter and sensor test with servotube. The array analog output comes from the post-filter. What I wanna do is to send this analog output to the servotube which shows in the case of Another VI.

I appreciate everyone's help.

Thank you very much.

 

Best

Yu

0 Kudos
Message 1 of 7
(3,328 Views)

I assume that a servotube is some sort of actuator?  I am not really understanding the question your asking.  If as the sensor VI shows you can output data using DAQmx then you just need to push the filtered data to the servotube using DAQmx in the same way.

Wire Warrior

Behold the power of LabVIEW as my army of Roomba minions streaks across the floor!
0 Kudos
Message 2 of 7
(3,322 Views)

Yes, you are right. The servotube is an actuator. Or I can say like this. In the first VI file post-filter, the data I got is 2D array, or X Y plots. But in another VI file, the data I write into the DAQ is a numerical value which depends on time. right? So my question is how to write this 2D array to the DAQ as an analog output for the servotube.

Also, Thank you very much for your answering.

0 Kudos
Message 3 of 7
(3,320 Views)

Since you did not provide one of the text files, impossible to say what you are using for the x axis. It appears  that for the filters, you are inputing the sample frequency but then you are not saving that. If you want to use a file as an output for a DAQ channel, then you could create a waveform data type and manually enter dt like you are doing now. It would be simpler if you saved the dt in the file and use that directly when you read the file. A 2D array is only used for multiple output channels. If you have multiple channels, you would want to use NSample mode if you want hardware timed output.

0 Kudos
Message 4 of 7
(3,316 Views)

First, Thanks for your answering. Here is the file I used as a sample. It's the angle and the sine value of angles. 

0 Kudos
Message 5 of 7
(3,310 Views)

I'm confused. You have two columns in that file but it appears you are reading three and I think you are also writing 3 columns.

 

In any case, since you don't have any timing information, you would have to provide that manually if you want hardware timed output. You simply wire the 2D array you read into the DAQmx Write set for NChannels NSamples.

0 Kudos
Message 6 of 7
(3,303 Views)

OK, I got it. I will try it tonight. Thank you very much. 

0 Kudos
Message 7 of 7
(3,298 Views)