LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

phase angle control using 9403 digital output

Hello

As part of my phase angle controller for a heating control. I am using 9205 (analog input) to receive voltage values (from 230AC sinewave) in order to detect the zero crossing of the voltage so I can fire an "on" pulse through a 9403 (digital output)  to a relay after a time delay between 0 and 10 ms (half power frequency period) and heating will be controlled according to the time delay.

 

Of course I use a resistive divider for the 9205 and the voltage wave input is from -10 to 10.

There is however a lag of 32ms. 

Using DAQ Assistant, the 9205 can receive each sample (1 sample on demand) every 2ms which is not bad. But in my program I send this "on" pulse and it is sent after 32 ms. So I cannot cut the wave immediately.

I am using a light bulb to see this "dimmer" effect but it looks like a disco light. It does the dimmer but it jumps one and half cycle.

Here is my vi, I am not sure if its the 9403 module or my program.

Download All
0 Kudos
Message 1 of 5
(2,720 Views)

Hello andrea11hr!

 

I've had a look at your VI and I've have found some things I'd do differently.

 

You can achieve sequential execution of your code by connecting the error output of your first DAQmx task with error input of the timed loop. Then you could remove the outer flat sequence structure. I don't understand the purpose of the wait function in the inner flat sequence structure. Could you elaborate on that?

 

If you need time crucial execution you should also avoid using the express VI such as the DAQ assistant since it might have alot of overhead. Instead, use the low level DAQmx functions and program the data aquisition to your needs.

 

Also, you should pay attention to the representation of your numerical values. I can see several red coercion dots at the input of functions/VI's. Those dots represent the numeric type conversion which takes up computation time.

 

Best regards
AndGar

Andreas Gareis
Senior Applications Engineer, NI
Certified LabVIEW Developer & TestStand Architect
0 Kudos
Message 2 of 5
(2,665 Views)

Hello AndGar!

thanks for replying 🙂 

The wait function is for the time delay of the relay controller, after this time period, the relay will start conducting. So more or less waiting time implies more or less time of voltage across the heater (relay1.png)

I changed the timed loop for a simple while loop and I still do not have perfect control. So far I have only have this wave (20131212.jpg), I alway have this control over "one and a half cycle" instead of "half cycle" 😞

Another thing, when I record the data ussing "enable logging" in the DAQ Assistant, I see that each sample is taken between 1 or 30 ms, that is A LOT , since there is no buffering, it all depends on this while loop and probably the DAQ Assistant. I tried doing my own programming using DAQxFunctions but the result is worse, I am not doing it well.

 

I know for a heater is not so important because it takes time, but my boss asked me to do it and I want to know if its possible to have this perfect phase cutting using DAQ modules

I will keep on changing the DAQx function arrangement and check the numeric type 🙂 if you have any more ideas let me know.

Best regards

Download All
0 Kudos
Message 3 of 5
(2,655 Views)

Hello andrea11hr,

 

you can find help concerning continuous data aquisition in the LabVIEW example finder under the DAQmx category. There, look for "Voltage - Continuous Input". 

 

The removal of the timed loop is a good idea, too. As far as I could see you had the timing set to 1 ms (frequency 1kHz).

 

With regards

AndGar

Andreas Gareis
Senior Applications Engineer, NI
Certified LabVIEW Developer & TestStand Architect
0 Kudos
Message 4 of 5
(2,644 Views)

Hello AndGar,

I did a simple while loop just sending digital signals through the 9403 Module using DAQmx functions and the minimum time is every 26ms, apparently it won´t work with half of power frequency 😞

Thanks for the ideas anyway 🙂

0 Kudos
Message 5 of 5
(2,619 Views)