From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

variable frequency driver control by analog voltage output

I need to drive a variable frequency inverter to drive a compressor and I am too newbie in this kind of works. The inverter can be controlled by analog voltage input and I have NI9188 and NI9263. I have never used analog output modules before and I have some doubts about them.

 

1. how could I drive the motor continuously?

2. do I have to use device internal clock or software clock?

3. in some examples, a waveform is generated and sent to the write daqmx vi to generate analog output. do I need to do it? (By the way, I prepared a control subVI to send the required input voltage data to the write daqmx.)

4. It is talked about pulse with modulation sth like that. What is it exactly? Do I need to concern about it?

 

I need to drive the compressor with two temperature feedback so I prepared a huge program by master/slave design pattern. I attached it. Does this program work? I do not want to harm the motor so I could not test it.

 

 

Egemen
0 Kudos
Message 1 of 21
(4,832 Views)

Hi newbieeng,

 

I hope you are doing well today!  I can help answer questions, but I can't debug a program and say whether it will work or not.

 

A lot of these question depend on your specific application and can't be answered in general.  I would take a look at the specifications document for the NI 9263 and also the specifications for your motor.  I'm including a link below to the specifications document for the NI 9263.  I would highly recommend looking at the current draw of the motor.  The most the NI 9263 can drive is 1 mA per channel.  

 

OPERATING INSTRUCTIONS AND SPECIFICATIONS
NI 9263

http://www.ni.com/pdf/manuals/373781e.pdf

 

As far as hardware timing vs. software timing, it really depends on what you want to do.  Hardware timing provides most more precise control over the timing of the output.

 

From one of the subVIs you provided, there seems to be a mention of a relationship between frequency and RPM.  Is this representative of a control signal the motor expects?  Is this the pulse width modulation (PWM) you were talking about?  If your motor requires PWM, then you will need to send it the appropriate signals.  I'm attaching a link below to an example regarding PWM.

 

Pulse Width Modulation

https://decibel.ni.com/content/docs/DOC-17537

 

Hopefully some of this is helpful!

 

 

Josh B
Applications Engineer
National Instruments
0 Kudos
Message 2 of 21
(4,797 Views)

Thank you Joshua-B for your suggestions and help.

 

I sent the program just to be checked for the control scheme, not for debugging. Of course I can want nobody to do this.

 

As I described briefly in the previous thread, I need to control a 3-phase AC compressor via a frequency driver. I want to control the frequency driver with NI9263 by means of analog voltage input and NI 9263 is sufficient for me because the signal that I will send is a control signal.

 

The subVI you mentioned is responsible for converting desired rpm demand to the control voltage to generate required frequency with regarding to the frequency and rpm relation for the motor and the voltage and frequency relation for the variable frequency converter. It is not relevant to PWM.

 

I will look the links you sent up.

Egemen
0 Kudos
Message 3 of 21
(4,786 Views)

Hi Egeman,

 

Right now, you are writing 1 sample per loop iteration.  This is what we call software timing and the timing information that you have used to configure the timing engine of the device is not being used at all.  This means that the time between each point of data that you write to the device will be determined by the VI as well as by the operating system you are using.  There is now guarantee that Windows won't decide to take priority and say start running a virus scan when your VI wants to write a data point.  To get around this, you should write an array of data to the device and then let the timing engine that you have configured handle the output of that data.  I'm attaching a link below to an example I found on the code exchange at ni.com/community.

 

 

Update Multiple Channels of Analog Output On-The-Fly

https://decibel.ni.com/content/docs/DOC-7692

 

Hopefully this gets you going in the right direction!

Josh B
Applications Engineer
National Instruments
0 Kudos
Message 4 of 21
(4,770 Views)

Thank you Joshua-B again. I just control one device by use of one channel of NI 9263 not N channel. I will test the program on the system on this Saturday. I will inform you about it.

About timing, I use hardware timing for the first two loops, the second one acquires data and the first one write the control parameters to the frequency converter. Both of them is used hardware time. And, as far as I remembered, NI 9188 has 4 timing clock in itself. I only use software timing for analyses.

Egemen
0 Kudos
Message 5 of 21
(4,760 Views)

Hi Egemen,

 

You are correct that you are using hardware timing for your acquisition, however, I believe you are using software timing for your generation.  Whenever we write a single point of data as you are, we are not using the hardware buffer on the device and the timing is entirely dependent on the software loop.  You may be attempting to use hardware-timed single point generation, but I don't believe your device is capable of this.  I'm providing some links to a few resources below regarding hardware-timed single point tasks.  Hopefully this is helpfule!  Have a great weekend!

 

NI-DAQmx Hardware-Timed Single Point Lateness Checking

http://www.ni.com/white-paper/3215/en

 

 

(Hardware-Timed) Single Point Multiple Channel Data Acquisition (DAQmx)

https://decibel.ni.com/content/docs/DOC-3849

 

 

Does My DAQ Device Support Hardware-Timed Single Point Sampling Mode?

http://digital.ni.com/public.nsf/allkb/B4E831774F29FB038625754C0081C050

Josh B
Applications Engineer
National Instruments
0 Kudos
Message 6 of 21
(4,745 Views)

Hi Joshua-B.

 

Yesterday, I implemented the code on the system and as your said I ecountered some problems about hardware timing. The hardware tiiming works good for acquisition loop but for control loop (voltage generation) does not. When I stopped the vi, I encountered a buffer error in write daqmx function in the control loop. It said me to expand the buffer size. After I cancelled the hardware timing for control loop to the software one. It works without pop-out any error but some synchronization problems I met. One of them is associated with the analyzer loop at the bottom. It did not analyze the system for desired rate. I want it to analyze one in 6 seconds but it analyzed different rates and they were all different for each analyses. For instance, it analyzed in 8 secs and after it analyzed 10 secs after 7 secs etc. I need to synchronize all the loops.

 

What could I do? Do I need to use hardware timing for each loop? If it was, how could I adjust rate of the analyze loop (loer loop) according to the hardware timing?

 

I searched the links that you sent, it seems that for controlling loop I need to generate a waveform for hardware timing, I am studying on it. But the others especially for analyze loop I really do not know what to do...

Egemen
0 Kudos
Message 7 of 21
(4,728 Views)

Hi Egemen,

 

By looking at your code, I wouldn’t know why would the analyzer loop have so much jitter, but what you could do is use the DAQmx Configure Buffer Output.vi to manually set 2 or more samples in the buffer.

 

AO single point.png

 

Just so you know, as long as you have the Timing (Sample Clock) VI on your code, you are doing Hardware Timed acquisition, regardless of the samples you write / read. Let me know if this helps.

Regards,
Daniel REDS
RF Systems Engineer

Help us grow.
If a post solves your question, mark it as The Solution.
If a post helps, give Kudos to it.
Message 8 of 21
(4,680 Views)

hi i am working on the sam project .kindly send me ur fina vi and project related data at sobansair@mail.com

thanks

0 Kudos
Message 9 of 21
(3,165 Views)

hi i want to control motor speed by vfd. kindly send me your vi to generate analogue output voltage signal to run vfd at certain speed. sobansair@gmail.com

0 Kudos
Message 10 of 21
(3,166 Views)