02-02-2012 04:03 AM
Hello,i am developing the next code in labview to control a pwm signal, but when i try to check it in the oscilloscope,the frequency which i am using isn´t the same that the frequency which i am checking in the oscilloscope,that´s why i can´t see the signal in the oscilloscope,i just can see a flash signal.it is like a pwm signal but it flashes,i would like to see it well
i think that the problem isn´t the oscilloscope because when i use the module opcion pwm in my I/O Ni 9401,i can see the pwm signal and its frequency in the oscilloscope
the code in labview is the next:
could somebody help mw with this?
thanks
Solved! Go to Solution.
02-06-2012 05:50 AM
Hi,
Which DO card are you using? Does it require "Pull Down" resistor?
02-06-2012 08:41 AM
Ni9401 TTL DIGITAL INPUT/OUTPUT MODULE
I don´t know if it requires pull down resistor,where could i see it?
thanks
02-07-2012 12:06 PM
for example,inputs :
duty cycle=50%
frequency=500Hz
the code in labview calculate the outputs:
ms high=0,001seg
ms low=0,001 seg
so if i select at the oscilloscope a scale= 1ms/div,i should see the pwm signal
but it doesn´t happen
after 2 weeks thinking about it,i don´t know what i can do
02-07-2012 12:44 PM
Which time units are you using for the Wait function? Make sure it's set to ms; the default is "ticks" which means it will run much faster than you intended.
02-08-2012 02:56 AM
the counter are in ms! so it isn´t the problem
any ideas more?
thanks
02-08-2012 04:42 AM - edited 02-08-2012 04:43 AM
maybe should i use a timed loop?
02-08-2012 11:31 AM
What operating system are you running this on? If you're on Windows, you can't get millisecond accuracy in timing, so this will never work accurately.
Other things I'd check:
1) Probe the error wire. Maybe there's an error in the DO configuration and it's not writing the value to the output.
2) Make sure that the wires go where you think they do; I've occasionally seen cases where the wire looks like it's connected but it actually runs behind a function, so the sequencing doesn't work.
02-08-2012 11:57 AM
errow wire and wires are conect well
i changed the digital output DO0,to DO1 and i had the same problem
i used the pwm configurations which have ni9401, it generated the pwm signal weel, and i could see the same frequency on the oscilloscope that i wrote in labview, so i donñt know which could be the problem.
my operating system is windowsxp version 2002
02-08-2012 12:00 PM
@mariomoskis wrote:
i used the pwm configurations which have ni9401, it generated the pwm signal weel, and i could see the same frequency on the oscilloscope that i wrote in labview, so i donñt know which could be the problem.
my operating system is windowsxp version 2002
I'm sorry, I can't understand what you mean. You were able to generate a PWM signal properly with this hardware, just not with your existing code?
Is the loop that you show in your screenshot running on Windows, or on the cRIO? Again, if that loop runs on Windows, you will never get good results because Windows does not provide millisecond clock accuracy. Ideally the FPGA on the cRIO should generate the PWM signal, which will give you very accurate timing.