LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

PWM Signal with Labview and Arduino

I am trying to generate a PWM signal with variable frequency using Labview and an Arduino UNO.

When using the PWM write pin VI, I cannot adjust the frequency.

When using a Tone VI, I cannot adjust the duty cycle (set 50%).

When using the Digital Write pin with a signal generator in LabView, it appears that the Arduino cannot read the signal I am generating.

My question is: Is there a way to create a PWM signal with Arduino and Labview where I can control all of these features?

Note: I realize that I can edit the arduino LVIFA code to change the frequency, but that isn't ideal because I cannot change it with a control, right?

Thanks for the help and please have some grace due to the fact that I am new to this stuff.

John

0 Kudos
Message 1 of 13
(18,280 Views)

I'm not really all that familiar with the frequency capability of Arduino but if you can find somewhere on the internet where they do it with pure Arduino code then it is likely that we could do it through LabVIEW.  In my project, we use the servo VIs for our PWM because, from what I understand, it has a lower frequency PWM signal.

0 Kudos
Message 2 of 13
(10,064 Views)

I am using the "PWM Write Pin" vi to control 5 SSRs running large 240V loads via an Uno.  This vi worked perfect out of the box for me.  Sounds like you have an issue with your vi, I would check to make sure that you are using one of the PWM pins (see your board for what pins support PWM) and also check that you are passing what is expected for duty cycle to the PWM Write Pin VI.  It is expecting 0-255 not 0 to 100.

Cheers

0 Kudos
Message 3 of 13
(10,064 Views)

plz tell me how can i edit th LVIFA code to change the frequency?

0 Kudos
Message 4 of 13
(10,064 Views)

You should search Arduino specific documention/forums/communities to see if it is possible.  If it is possible with Arduino at all, then it is more than likely possible to add that to LIFA.

0 Kudos
Message 5 of 13
(10,064 Views)

hello in eta link can locate an arduino indormacion to handle with pulse width modulation in embedded language

http://arduino.cc/en/Reference/Servo

http://arduino.cc/en/Tutorial/Sweep

http://arduino.cc/en/Tutorial/Knob

also enclose a demonstration program to control a servonotor using PWM, I hope it will be useful, luck

Download All
0 Kudos
Message 6 of 13
(10,064 Views)

hi everybody...

i am stucked here please help me to get out of it

thanks in advance ...

my problem is

int led = 13; // LED connected to digital pin 9

void setup() {
pinMode(led, OUTPUT);
// nothing happens in setup
}

void loop()
{
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}

this is my arduino program which sends a PWM signal on pin 13 continuously. can i read the same signal in labview. 

 

refer attached image..for labview code

 

 this is what i have tried so far.. thanks in advance

0 Kudos
Message 7 of 13
(9,613 Views)

No.  LIFA requires you to use the LIFA firmware on the Arduino.  Also, LIFA is old and deprecated, if you want to use a pre-built LabVIEW interface with Arduino, you should use LINX (http://www.labviewmakerhub.com/linx).

0 Kudos
Message 8 of 13
(9,579 Views)

i dont have LINX i have windows 7

0 Kudos
Message 9 of 13
(9,574 Views)

LINX is not an operating system.  It is the evolution of LIFA (i.e. it's the newest version of LIFA, they changed the name and website).  So, if you are using LIFA now then you should upgrade to LINX.

 

Also, what you are asking in your previous post doesn't really make any sense.  There is no reason to 'read' a signal that you are outputting.

Message 10 of 13
(9,569 Views)