From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

When I replace once control with another why does DAQmx Create channel complain about a wrong argument?

Solved!
Go to solution

I have attempted to replace the Frequency control with another in the Complete PWM example found here:

 

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

 

However, I get the following error message:

 

Possible reason(s):

Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.

Property: CO.Pulse.Freq
Requested Value:  0.000000
Valid Values Begin with:  22.300000e-309
Valid Values End with:  20.0e6

Channel Name: Dev1/ctr0

Task Name: _unnamedTask<10>

 

My wiring diagram looks like this:

complete_pwm7.JPG

 

if I undo my change (i.e. I remove the knob frequency control and return it to the control from the example it works perfectly.  I get the waveforms to show up in the oscilloscope.

 

My goal is to simply use a knob control for duty cycle and frequency.  How can I achieve this?

 

 

0 Kudos
Message 1 of 8
(2,451 Views)

Does that error only happen when the frequency is set to zero? If so when you replace it with a knob, set the minimum knob value to something above zero.

0 Kudos
Message 2 of 8
(2,446 Views)

The minimum value is set to 50Hz and maximum is 300Hz.  I do it by right clicking on the knob marked "F" and going to properties.  

 

Is there another way to set these values?

 

 

0 Kudos
Message 3 of 8
(2,439 Views)

Could you save a copy for version 8.6 and I'll have a look at the VI

0 Kudos
Message 4 of 8
(2,435 Views)

@invasion2121 wrote:

The minimum value is set to 50Hz and maximum is 300Hz.  I do it by right clicking on the knob marked "F" and going to properties.  

 

Is there another way to set these values?

 

 


The file you have attached, does not have any minimum value set for the knob.

So if you just run your vi, the F confrol will be 0, and the DAQmx will complain.

The minimum input frequency has to be above 0.

0 Kudos
Message 5 of 8
(2,418 Views)

Can somebody point me to either a link or PDF documents get defines exactly how to change the minimum and maximum values of the knob?

 

Maybe I'm doing this wrong but when I right click on knob in the front panel and goto properties, there is a section that says "Minimum" and "maximum".  When I define them to be 50 and 300 respectively I can clearly see the knob updates with different values ranging from 50 - 300. 

 

 

0 Kudos
Message 6 of 8
(2,402 Views)
Solution
Accepted by topic author invasion2121

There are two things to do.

What I think you have done by now is changing the Scale of the knob.

You also need to change what values are allowed to enter. You'll do that in the Data Entry tab in the properti dialog box of the knob.


Unclick the "Use Default Limits", set the Minimum and Maximum to the same as in your scale.

Set "Response to value outside limits" to Coerce for both Minimum and Maximum.

 

I hope this helps.
Let me know if you have any more problems.

Message 7 of 8
(2,396 Views)

Thanks dkfire.  I think there is a good chance you are correct.  Unfortuantely I cannot test this until Monday when I get into the lab and get access to the daq board and oscope.  I will surely make another post and let you guys know if your suggestion worked.

0 Kudos
Message 8 of 8
(2,388 Views)