LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

speed measurement using NI9401

Hello everyone,

I am trying to measure speed of DC motor using proximity sensor.The chasis used is NI cDAQ9172 and NI 9401 as module for connection.The proximity sensor connection to NI 9401 are 14,16 and 1 pin.We are working in LabVIEW 2009.

The error was 201003 as Unnamed_taskerror.

I guess,the problem maybe proximity sensor is not getting supply while running the labview block diagram.In the test pannel when we click on start sensor's light gets on.But when we run our main program,light disappears.No output in the waveform graph and we get error in DAQ as said above.

Are we doing correctly?or missing some step for the experiment?

 

Thanks,

LabVIEW beginner

 

0 Kudos
Message 1 of 22
(4,508 Views)

Hi Mass0873,

 

Have you tried using a USB DAQ device before? Did you install LabVIEW, NI MAX and its device drivers? Do you have a screenshot of that particular error message? Error 201003 is generally caused due to the following reasons:  

  • DAQmx is not installed properly or has not been updated.  
  • The slot location of the DAQ card has been changed.  
  • The card is damaged.  

There are a few things which you can give a try on: 

  1. When you connect your cDAQ and NI 9401 to your PC, power it on and wait until your PC mentions something like your device has been connected or at least an indication that the cDAQ is detected. Go to NI MAX. Under Devices and Interfaces >> DAQ devices and check if the cDAQ device is detected. If so, you can perform self test to see if it is connected correctly.   
  2. If it is detected, in your LabVIEW code, check your DAQmx Create Channel.vi is looking at the right revice at the "physical channels". If you are using DAQ Assistant, do check if you are pointing at the right device and channels. 
  3. Check if your proximity sensor specifications such as voltage or current did not exceed the range specified in the NI 9041: https://www.ni.com/en-us/shop/model/ni-9401.html

 

Hope that helps

 

 

 

Warmest regards,

Lennard.C

Learning new things everyday...
0 Kudos
Message 2 of 22
(4,470 Views)
The DAQ is detected in NI MAX...our sensor is working fine...the problem is that we are not getting anything on the labview screen...do we need to configure the DAQ? cause looks like its not reading sensor output...
0 Kudos
Message 3 of 22
(4,411 Views)

Hi Mass9873,

 

Okay if the DAQ is detected in NI MAX, can you check if that particular module alias name matches the task name you specify in LabVIEW? For example, from the screenshot below, I want to acquire data from NI 9233. From LabVIEW, I drop down the "physical channels" list and look for cDAQ1Mod3 (since it is detected as cDAQ1Mod3) and followed by that particular pin I want to acquire data from. 
max.JPG

 

What is the DAQmx version that you are using?

 

Additionally, I would like to ask the following:

  1. Have you tried reading the values via NI MAX (there is a test panel function)?
  2. Since the NI 9401 is a digital I/O module, is your proximity sensor giving out digital I/O? 

Can you attach your code? It's pretty hard to see what's going on in your code.

 

Warmest regards,

Lennard.C

Learning new things everyday...
0 Kudos
Message 4 of 22
(4,408 Views)

i have attached the sensor specification and the open loop labview diagram...pls take a look...is anything wrong with the sensor....we cheked the sensor in test panel but still no output in labview...

Download All
0 Kudos
Message 5 of 22
(4,380 Views)

Most likely your sensor generates rise or fall times which are too slow. The NI 9401 has a 500 ns input rise/fall time specification. Open collector transistor devices with a pull up resistor may not meet that specification.

 

What power supply voltage are you using for the sensor? The specification is 6 to 36 V although a comment (which appears to have been added be someone other than the manufacturer) suggests it will work at 5 V. The 9401 has a maximum logic level input of 5.25 V. Running the sensor at a low power supply voltage probably results in slower transitions on the outputs.

 

Also the sensor is described as an obstacle detection device and no speed is specified. Are you sure it is fast enough for speed measurement?

 

Lynn

0 Kudos
Message 6 of 22
(4,367 Views)
I tried giving an external dc supply but still the results were same...I gave 5V dc supply...
0 Kudos
Message 7 of 22
(4,345 Views)

Hi Mass0873,

 

I'm not sure what are you measuring from NI 9401 (Digital or Counter input). If you are measuring Digital input at let's say DIO0, then you should be able to detect the 5VDC supply supplied to that pin (https://www.ni.com/docs/en-US/bundle/ni-9401-getting-started/page/overview.html). You can check the pinouts from NI MAX (right click NI 9401 >> Device Pinouts)

 

Did you receive any error as mentioned in your first post of this thread? Can you provide that VI which you have created so that we can see what are the settings you made? May I know what is your DAQmx version as well?

 

Thanks

 

Warmest regards,

Lennard.C

Learning new things everyday...
0 Kudos
Message 8 of 22
(4,331 Views)

i'll show you the steps i am following.I am reading counter output. I have attached the screenshots for each step. The MAX version is 4.9.

Download All
0 Kudos
Message 9 of 22
(4,299 Views)

These are the rest of the screenshots. The error i am getting is 201003 and 200141.Also i am getting constant output voltage from the sensor...How should i proceed?

 

Download All
0 Kudos
Message 10 of 22
(4,297 Views)