LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO 9047 & NI 9375 to Acquire Hall Effect Sensor Data

Hi!

 

I am working on my senior design project and I have the NI 9375 available to me. I have been trying to use the example code Digital - Continuous Input.vi, but I am having a hard time to get the data to show up. I only have been working on getting this data pulled for a few hours, but posting on here helped a lot last time. 

As of now I have the communication line connected to the DI0 port, the supply line connected to the V sup line, and the ground I have connected to the ground on the cRIO. I don't know if this is correct, but that is how I have it at the moment. I have the module plugged into the second port on the cRIO, so when I go to run the example code I put in Mod2/port0/line0 in the line settings, but I get a time out error when I run the code, clearly I have something hooked up incorrectly, or I am using the wrong code to try and learn more about how to program this to get the data. 

If anyone has anything to share or can push me in the right direction, I would greatly appreciate it! 


The end goal of our project will be to read torque and rotational speed to get horsepower (We are building an engine dynamometer), then also control the load using a proportional valve and also control the speed of the engine while it's running.

Thank you to anyone can help! 

0 Kudos
Message 1 of 10
(200 Views)

Can you provide a wiring diagram to better illustrate your setup?

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
0 Kudos
Message 2 of 10
(174 Views)

gkorn_1-1758852408824.png

 

This isn't the greatest wiring diagram, but I think it helps. Please let me know if you have any questions for more clarification.

gkorn_2-1758852465566.png

This is an image of the specs for the hall effect sensor

 

0 Kudos
Message 3 of 10
(153 Views)

The Black Ground wire should be connected to DI COM (pin 9).

Reference: page 12 of NI-9375 User Manual

ZYOng_0-1758853975373.png

 

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
0 Kudos
Message 4 of 10
(143 Views)

Okay, I switched it now, but when I run the sample code I still get this error:

gkorn_0-1758854183919.png
Is it possible that the hall effect sensor is not drawing enough power?

 

0 Kudos
Message 5 of 10
(136 Views)

@gkorn wrote:

Okay, I switched it now, but when I run the sample code I still get this error:

gkorn_0-1758854183919.png
Is it possible that the hall effect sensor is not drawing enough power?

 


This error has nothing to do with the wiring, but programming. See Error -200284: Samples Have Not Been Acquired

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
0 Kudos
Message 6 of 10
(111 Views)

That fixed the error, but I still am not getting any readings from the sensor. When I run the example code (Attached), I just get a straight line, and when I bring a magnet in front of the encoder it does nothing.

0 Kudos
Message 7 of 10
(106 Views)

Hi gkorn,

 


@gkorn wrote:

gkorn_2-1758852465566.png

This is an image of the specs for the hall effect sensor


  • Do you know what it means when an output is described as "open drain"? (You may find the term "open collector" too.)
  • Are there any electricians in your lab (or some other people working with electronics regularly)?

When you want to work with electronic sensors (within a "Senior project"!) then you should know about the basics of handling electrical measurements…

 

ZhiYang posted an image from the NI9375 spec which CLEARLY mentions a "sourcing device": your sensor does NOT belong to that group of devices!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 10
(98 Views)

Thank you for sharing this, I am new to LabView and choosing the modules to use has been the hardest part of this for me. We only have around 8 modules to choose from in our lab, so I'll try and do it another way then.

0 Kudos
Message 9 of 10
(67 Views)

Hi gkorn,

 


@gkorn wrote:

Thank you for sharing this, I am new to LabView and choosing the modules to use has been the hardest part of this for me. We only have around 8 modules to choose from in our lab, so I'll try and do it another way then.


You don't need to change the module, you need to change the wiring!

Ask a electrician/electronics guy to help you! (Or do some reading about "open collector" outputs…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 10
(62 Views)