LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get the 1121 card to read the switch and make it a 1 or 0 to count pulses?

Hello,

I am developing a test stand to test tires. We have LabView 7.1 and the SCXI chassis with an 1121 transducer card. I am trying to count the rate and total number of revolutions made by the tire. The signal is acquired from a 12V-proximity switch that is actuated once per RPM. The tire turns at 1,000 RPM or a little more.

The signal will have to go through a 100-foot cable to get to the LabView chassis, will this be a problem?

How do I get the 1121 card to read the switch and make it a 1 or 0 to count pulses?

Will LabView be able to read this many pulses per second?

How do I get MPH and a RPM reading out of it?

Thank you,
James Happe
0 Kudos
Message 1 of 5
(2,877 Views)
Hi James,

Since the signal you are trying to measure is essentially a square wave and you want to measure the frequency, it would be best to use the counter/timer functionality of your board for frequency measurement. Given the hardware you have, I would suggest doing a regular analog input acqusition. You can get the same results as a hardware frequency measurement. However, you will measure the analog signal from your transducer and then extract the frequency in software.

In LabVIEW there are plenty of analog input shipping examples found under Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Analog Measurements >> Voltage

Check out one of the continuous analog input examples (no triggers, internal clock).

Once you can measure the square wave signal from your transducer, then you can do waveform analysis to get the frequency. These analysis VIs are located in LabVIEW under All Functions >> Analysis >> Waveform Measurements. In there you will find frequency measurements and pulse period measurement VIs that can tell you the RPM of the signal.

-Sal
0 Kudos
Message 2 of 5
(2,868 Views)
Thank you for your help so far. I am still confused on the analog input.

[quote] I would suggest doing a regular analog input acqusition.[/quote] Where would this physical connection be? We have the PCI-MIO-16E-4 DAQ card. The only connection from this card goes to the SCXI chassis.
0 Kudos
Message 3 of 5
(2,853 Views)
I still haven't figured out how to use the counter function on the card.
0 Kudos
Message 4 of 5
(2,818 Views)
Hi James,

Since you are cabling your DAQ board to an SCXI chassis with an 1121, you will not be able to use your counters without additional hardware.

The 1121 is an analog input signal conditioning module. It performs filtering and attenuation to help measure analog signals. What it does not have is access to your board's counter pins.

In order to use your counter pins you will need to get the necessary hardware. You have two options:

1) Buy and SCB-68. This is a breakout box that will cable directly to your DAQ board replacing your SCXI chassis. You can connect your signals directly to your counter with this. However, I would advise against this because your application has a 12 volt signal. This will overload the 5v maximum voltage for your counter pins.

2) Buy a 1180 feedthrough panel. This will allow you to use all of your DAQ board's functions with the SCXI chassis. Withouth the 1180 feedthrough panel, the SCXI-1121 is the only thing connected to your DAQ board. Since the 1121 only performs conditioning on the analog inputs, that is all you can access. The other pins cannot be used (no access). With the 1180 feedthrough panel, you can put a connector block on and access all of your other pins (including the counter pins). Again, I would advise against this since your 12 volt signal will overload your counter pins.

My suggestion would be to perform an analog input task. Set up your 1121 in MAX and use a LabVIEW shipping example. In the shipping example select an analog input channel from your SCXI-1121 module. Set the appropriate voltage range and take some measurements. Once your signal is connected and you can read it using an analog input example you are half way there.

Take the analog input shipping example and modify it to perform frequency analysis on the voltage readings. You can simply wire the data from the DAQmxRead VI into one of the frequency analysis VI's (noted in my first post). The output if that VI will give you the frequency of your signal.

-Sal
0 Kudos
Message 5 of 5
(2,811 Views)