05-08-2010 01:30 AM
Solved! Go to Solution.
05-10-2010 11:17 AM - edited 05-10-2010 11:20 AM
Hi Tikoy,
This is assuming that you are using a cDAQ chassis with DAQmx:
You can interpret the sensor output signal by using a counter input on a cDAQ module using DAQmx. However, this will require correlated DIO, which this 9403 module does not support correlated DIO. The modules that do offer Correlated DIO in a cDAQ chassis and will therefore allow you to output the Counter Signal are as follows: 9401, 9402, 9411, 9421, 9422, 9423, 9435, 9472, 9474, 9481, 9485.
With the 9403 module, you can perform software timed acquisition. This is not as reliable as hardware timing because it will use your OS timing engine, but could work if your PWM signal is at a frequency below 500Hz. This is because Windows can iterate a while loop somewhat reliably around 1kHz in optimal settings. Obviously, it will require software logic built into your program to anallyze the Digital Siganl to check if it is High/Low. It is worth a shot, but the recommended solution would be to go with a 9401 and a counter input to measure pulse width or pulse period/frequency.
Are you using a cRIO chassis and NI-RIO drivers?
Best,
05-10-2010 07:49 PM
Hi ,
Sorry i forgot to mention that i am using a NI-Crio9004
05-10-2010 09:06 PM
hi fellows,
Actually the project I am working on goes like this, I need to control and maintain the level/height of the ping pong ball in cylinder. There is a fan below the cylinder which control the height and a ultrasonic sensor (URM37 v3.2) which monitor the height. I can control the speed of the fan by generating a PWM output in ni-9472 module.,actually the crucial part is integrating the output of my sensor in ni-9403 module..did i said it right sir?
regards,
05-11-2010 11:43 AM
Hi Tikoy,
As long as your sensor outputs a digital value, you can bring this signal into your 9403 module. You will just connect the positive digital output to a line, and the negative digital output to the COM port of the module. Do you have any information about the sensor you are using, or perhaps a datasheet?
Best,
05-11-2010 07:43 PM
Hi Sir Adam,
This is the datasheet of the sensor that we are using in our project
http://letsmakerobots.com/files/URM3.2_Mannual_Rev2.pdf
thanks
Regards,
05-12-2010 12:27 PM
Tikoy,
When you say 'measure' the PWM signal, what exactly to you mean?
Are you looking to measure the frequency or duty cycle of the signal? Are you counting rising edges of the PWM output? Are you looking to monitor the waveform?
With reconfigurable FPGA hardware, it is up to the user to define the function of the physical I/O on the FPGA chip. By connecting the signals as Adam suggested your digital pulse will be brought to the cRIO. In your FPGA program, you will define the measurement function. You may want to define a basic counter, or forward the single point digital data to you cRIO host for more complex floating point processing. FPGA example programs may be found at http://www.ni.com/IPnet.
Hope this helps, please post any additional questions.
Patrick Corcoran
Application Engineering Specialist | Control
National Instruments
04-07-2011 07:36 PM
Hi Adam,
I am working on a project which involves srf02 which is connected to NI 9403. i am using a CRIO 9024.When you said " You will just connect the positive digital output to a line, and the negative digital output to the COM port of the module." What do you mean by that. I tried to use the example from the Ni website http://decibel.ni.com/content/docs/DOC-3737. the sensor has 4 nodes 5v supply, signal in, signal out and comp. i connected the signal out from ni9403 to signal in from sensor and signal out from sensor to signal in to the module. i specified the nodes as input or output by right clicking on the module in the project and specifing the property of the node. powered up with 5v supply and grounded the circuit. when i run the vi. i dont get any results. i just get random sequential numbers which keeps repeating. i cant understand why is it happening.
Thank You
Nitin Jagadish
04-08-2011 01:26 PM
Hi Nitin,
It looks like that example you linked to was created for the SRF04/SRF05. You've said you're using the SRF02. From my quick search, it looks like the SRF02 communicates with either serial or I2C, and doesn't directly ouput a PWM signal.
http://www.robot-electronics.co.uk/htm/srf02tech.htm
http://www.robotstorehk.com/srf04tech.pdf
Is this information correct? If it is incorrect, can you post a link to the datasheet of your sensor?
Thanks,
Dave T.