LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating PWM with DAQ Assistant and NI-USB 6210

Solved!
Go to solution

Greetings friends,

 

I am using LabView2020 and wanted to create a PWM for an LED-related project that I was working on. I followed this tutorial: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000001DcFsSAK&l=en-SG and did as was suggested.

 

However, I am continually getting this error message:
"Error -200077 occurred at DAQmx Timing (Sample Clock).vi:4730002"
"Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property."

Have spent hours on this but am still clueless as to how to solve this.
I am using the NI USB-6210 as my DAQ and have attached screenshots from my VI.

Download All
0 Kudos
Message 1 of 4
(1,629 Views)

I'd recommend that:

 

1. You forget about relying on the DAQ Assistant.  It's frequently Fool's Gold, letting you easily do *something*, but often not the right thing.

 

2. You generate your PWM signal with a Counter task, which is MUCH better suited to it than a DO task.

 

3. You start with one of the shipping examples for counter pulse train generation.  You can specify frequency and duty cycle once, start the task, then the hardware keeps pulsing for you without further interaction.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 4
(1,588 Views)
Solution
Accepted by topic author Shanz

Hello,

 

getting rid of the DAQ Assistant will not help in this case (although this really is a very good suggestion by Kevin).

 

A USB-6210 is only able to read or set Digital-IOs with software-timing, trying to set a hardware-controlled digital-out stream will never work with that DAQ-card.

 

I too suggest that you try to create that PWM signal with the counter of your DAQ-card. After a quick look at a simulated 6210 in my NI-MAX, I think that this should work.

 

Regards, Jens

 

 

Kudos are welcome...
Message 3 of 4
(1,559 Views)

Thank you for your reply Jens,

 

I had figured out the part on the hardware limitation of the NI-6210 and decided to try and create a VI to work with Arduino instead, using LINX.

May I have a look at the VI you created for the simulation (using the counters)? This would enable me to refer to it for future purposes.

Thank you for your time.

0 Kudos
Message 4 of 4
(1,553 Views)