08-07-2012 03:48 PM
Short version:
Is it possible to use the Digital IO portion of a PCI 7340 to take frequency measurements from a digital sensor?
I was able to power up the sensor and read from it in LabVIEW for slow transitions (maybe a couple hundred transitions per minute), and have it display to a simple monitor VI as a sanity check to see if it works. The digital line is polled as an 8-bit DIO port and I separate the bit that I have connected. Once it gets up to speed, it appears to stop working.
I can't use MAX as a shortcut to getting this to work, since there is no Counter Input hardware (such as the NI 6624) installed.
Long version:
I'm working on revisions to a semi-automated test rig that involves taking measurements of saw cuts. The rig already has a NI cDAQ-9174 populated with a 9237 and 2201 modules for data acquisition, and a PCI 7430 with UMI-7764 for motion control Only one axis of the motion control is currently being used. I'd love to post the current .vi but the machine is offsite and about an hour away.
I need to make a frequency measurement in the range of 0-85 Hz (rough estimate) with a digital proximity sensor. The sensor is a 103SR hall effect sensor that I have connected to one of the DIO pins on the motion controller (Port 4: bit 7 if it helps). It's mounted on a saw motor and I need to see the reduction in saw speed as the rig moves. Rotation of the saw motor triggers the sensor (there's a magnet mounted on the saw motor pulley) and I need to record the frequency of the motor in time with other data. The rig already controls motion just fine, and I can math out motor speed from frequency easily, but I've run into trouble getting the motor input into the .vi. I've already been able to do a sanity check to determine that yes, the sensor and connections work, but I can't seem to grasp how to make the transition from digital input to frequency measurement. The motion controller should be able to use the input as a GPIO pin, correct? Or does the sensor really need to be connected to hardware with a dedicated counter/timer like the 6624?
Should I explore connecting the sensor to an unused axis' encoder input?
Is my proposed method of measurement too rough and I should go about installing a rotary encoder on the motor?
The main point of trying to collect motor speed from within labview is simplifying the user interface for the guy running the tests on the machine. So far, I've been able to collect the functionality of several old VIs into one and make running tests easeir for our techs. The rig has a digital laser tach on it, but it's USB and controlled with another program and relies on a line painted on the saw blades. If I could eliminate the external program it would end up saving a bunch of time in the end because of all the errors that currently occur from having to constantly switch between programs, rename files, etc.
08-08-2012 02:29 PM
Hi Heywood,
The digital input and output lines on the 7340 do not include a counter. This means that any frequency measurement type task would be completely software timed. The behavior that you are seeing with being able to monitor it, but then when it gets up to speed, it stops working is a limitation to software frequency measurements.
You could try to use one of the encoder inputs on an unused axis for the measurement, and then in LabVIEW you could use the Read Encoder Position VI. Another option is to use and input module like the 6624 with a counter to read the encoder counts. Please let me know if this helps you to get going with the hardware that you already have. If it does not provide you the accuracy that you are looking for, then I would suggest moving to including an encoder with your motor.
Regards,
Kira T