08-20-2012 02:18 PM
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
08-20-2012 02:58 PM
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.
08-20-2012 03:13 PM
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.
08-20-2012 03:38 PM - edited 08-20-2012 03:40 PM
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.
08-20-2012 03:49 PM
First, Thanks for your answering. Here is the file I used as a sample. It's the angle and the sine value of angles.
08-20-2012 03:57 PM
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.
08-20-2012 04:36 PM
OK, I got it. I will try it tonight. Thank you very much.