LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ USB 6351

Hi Expeert 

I am using a NI DAQ USB 6351 to create an analoge out put voltage in the renge of 0-10, I used the DAQ assistat and set the generation mosde to N samples ( to create a analog output), but I encountered with buffer error size. Does any one who to increase the buffer size. I read several articles. but I couldn`t solve it. I appreciate if you could provide me with a sample VI

 

Thanks

Mori

0 Kudos
Message 1 of 10
(4,828 Views)

There are numerous examples included with LabVIEW.  Have you tried those?  Instead of asking us to give you code, why don't you show us what you've done and where it is not working.

 

These cards don't have unlimited buffers.  How big a buffer are you trying to use?

0 Kudos
Message 2 of 10
(4,827 Views)

Actually I couldn`t find such this type of examples, I want to control a motor which according to it manual required a 0-10 V analog input. So I decided to use a DAQ to control this pulse. When I used a DAQ assistant I set the generation mode to the 1 sample. the  DAQ generate output but my device didn`t work. So I think it is because of the output pulse which is 1 sample, so changed it to N sample to create a wave form, and I set the samples to write to 1000 and Rate to 1k. but it didn`t work. I used the following VI but it doesn`t work too. can you explain me what I must do.   

thanks

0 Kudos
Message 3 of 10
(4,821 Views)

First, you need to figure out what your motor needs.  Using a single sample AO is basically using DC.  If you send 4.25V to it, it will set to 4.25V and stay there.  What kind of motor is it?  Are you actually trying to supply the motor power from this AO?  The AO has very limited current and would not be able to drive the power of a motor.  If the motor uses the AO to contol the motor speed, but gets its power elsewhere, then you should be able to use the AO.

 

Have you taken a meter and meausured the voltage on the AO with and without the motor connected?  Disconnect the motor and verify your code is working.  Reconnect the mottor and see if the output is still there.

0 Kudos
Message 4 of 10
(4,814 Views)

motor has 2 input, 

one from is 24 volt for starting 

and second is for controling the speed which is between 0-10V and between 4-20 mA, 

I disconnected the motor but yet I incontered with buffer error, I changed my program to the folloving VI, I dont know what is the problem

Download All
0 Kudos
Message 5 of 10
(4,811 Views)

You don't need to try to set the buffer in this case.  So, get rid of that.

 

The way you have it set up, it will generate 1 period of a 1 kHz sine wave and stop generation, so it will end at 0 and stay there.  If you have a scope, you should see the sine wave.  If you change to 250 samples, it should stay at 10V.

 

I would imagine you do not want this, that you want single point generation and set the voltage.  I would imagine 0-10V corresponds to 0-100% speed.

 

You stated the motor requires 0-10V and 4-20mA.  Are you sure it is both, and not either/or, or one of the two?  Typically these controllers are either 0-10V or 4-20mA.  They may have two inputs, one for each type.  The AO does not generate current, it suppplies it.  So, if you require 4-20mA, you'll need ot add a current sink (resistor) to draw current.

 

Is the manual for this motor online?

0 Kudos
Message 6 of 10
(4,799 Views)

at each time I need only one of them, and I used voltage.

you mean I need to create 1 sample, but one sample mean digital but I need analog.

attached is the interface which I scaned for your information

0 Kudos
Message 7 of 10
(4,793 Views)

So you should be using A1, not A2.

 

You can do one sample with AO.  In the VI you posted, just change N samples to One Sample (On Demand).  When you do the write, you'll provide a single value which is what the AO will be set to.

0 Kudos
Message 8 of 10
(4,788 Views)

As I said earlier, LabVIEW includes numerous examples for this.   There is an example of a DC output in examples\DAQmx\Analog Out\Generate Voltage.llb\Gen Voltage Update.vi.  The examples folder can be found in your LabVIEW install folder.

0 Kudos
Message 9 of 10
(4,785 Views)

Matthew

Thanks for your help, I will go through the following address to see the examples

0 Kudos
Message 10 of 10
(4,780 Views)