LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to switch between two values at a given frequency.

Hi

I am new to LabView, so this is probably a pretty easy task for you guys. 

 

I want to switch between two specified values at an given frequency in a while loop. 

 

I am using LabView to construct a PWM-signal, and I wanna switch the PWM signal between two values at say 10khz. 

 

Besides; is it possibly to change value this rapidly? Is there a limit, regarding either Labview software or the communitation between PC and hardware? 

0 Kudos
Message 1 of 4
(2,566 Views)

@Ketelsen11 wrote:

Hi

I am new to LabView, so this is probably a pretty easy task for you guys. 

 

I want to switch between two specified values at an given frequency in a while loop. 

 

I am using LabView to construct a PWM-signal, and I wanna switch the PWM signal between two values at say 10khz. 

 

Besides; is it possibly to change value this rapidly? Is there a limit, regarding either Labview software or the communitation between PC and hardware? 


To answer your questions first: Yes, sure. There has to be a limit somewhere, but it depends primarily on your hardware, at least at this speed.

 

Then to answer your non-questions: Good, it should be entirely possible, but you'll have to know something about LabVIEW (notice the spelling). I'd suggest you start by working through the free tutorials I stole the links for and put in my signature. Now, I've suggested to many people to go there, but haven't really gotten any feedback. If/when you finish them, please let me know if they were helpful. Thanks.

 

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 2 of 4
(2,561 Views)

If you have a NiDAQ with a counter output it's really simple, just look at Help -> Find examples for Generate counter signals.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 4
(2,557 Views)

Hi Ketelsen11

 

 

Welcome to the forum 🐵

 

I'm not sure if you have any hardware, or if you are just trying to achieve something in the software. If you are using DAQmx to generate a PWM signal, and you have a counter module, then it is as easy as just following this guide:

Pulse Width Modulation (PWM) Using NI-DAQmx and LabVIEW

 

If you want to do a pure software solution, you can add a wait function in your loop to control the loop rate:

Software Timed Loops using Wait (ms) and Wait Until Next ms Multiple

 

 

Let me know if you have any further questions.

 

Best Regards

Alex E. Munkhaus
Certified LabVIEW Developer (CLD)
System Engineer
0 Kudos
Message 4 of 4
(2,528 Views)