07-02-2013 02:25 PM
Hi,
I'm new to LabView, and I'm having problems setting up a VI for frequency measurement. Any tips would be greatly appreciated!
Task: I am using a cRIO with a digital I/O module (NI 9403). My goal is to connect the sensor that I am using (a MAXIM 6576 temperature sensor with period/frequency output in the form of a square wave) to the cRIO and have a VI measure and output its current frequency or period.
I've tried working with the Count and Period.vi, but when I tried to compile I found out the 9403 module does not support SCTL. I also looked at a thread that was posted in 2009 (http://forums.ni.com/t5/Counter-Timer/beginner-stuff-cRIO-digital-frequency-measurement/td-p/826656/... that discussed a similar problem, but when I tried using the Host VI I got the multiple error messages saying "Function not supported in current target". This happened even when I tried using the original Count and Period (Host).vi with no modifications (but the original Count and Period (FPGA).vi works just fine).
I don't know how to approach this problem - should I be using FPGA or Scan Interface mode? Are there any basic examples of frequency measurement or digital counters that do not involve NI data acquisition devices? For a basic counter, how would you set up the VI so that it could measure the period or frequency based on the counter values?
Thanks a lot for your help!
Andrea
07-03-2013 03:50 PM
Hello,
A great place to get started when using a cRIO is the NI CompactRIO Developer's Guide. It will explain both Scan Mode and FPGA. The difference between them comes down to the functionality and what you would like to complete in the program. The simpler of the two is Scan Mode but you have more functionality with FPGA.
We offer a lot of good examples in our NI Example Finder by going to Help >> Find Examples. In here you can narrow the examples by hardware or just browse to different categories. We do have a counter example that will work with the NI 9403 you can get to the example by going to Hardware Input and Output >> NI Scan Engine >> Module Specific >> Digital Input >> “Digital Line Input – cRIO.lvproj.”