LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

frequency problem compact rio

Solved!
Go to solution

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:

 

pwmingles.JPG

could somebody help mw with this?

thanks

0 Kudos
Message 1 of 36
(4,171 Views)

Hi,

 

Which DO card are you using? Does it require "Pull Down" resistor?

 

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 2 of 36
(4,150 Views)

Ni9401 TTL DIGITAL INPUT/OUTPUT MODULE

 

I don´t know if it requires pull down resistor,where could i see it?

 

thanks

0 Kudos
Message 3 of 36
(4,135 Views)

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

0 Kudos
Message 4 of 36
(4,124 Views)

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.

0 Kudos
Message 5 of 36
(4,122 Views)

the counter are in ms! so it isn´t the problem

any ideas more?

thanks

0 Kudos
Message 6 of 36
(4,113 Views)

maybe should i use a timed loop?

0 Kudos
Message 7 of 36
(4,108 Views)

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.

0 Kudos
Message 8 of 36
(4,101 Views)

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

 

0 Kudos
Message 9 of 36
(4,099 Views)

@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.

0 Kudos
Message 10 of 36
(4,097 Views)