03-20-2023 10:05 AM
I am trying to write a code that will count the amount of times something runs through a set of sensors. I have a set of sensors that will be counting the times that things run through it, connected to a usb-6001 DAQ, and would like some help.
03-20-2023 11:15 AM
Its always better to share the exact issue what you are facing and sharing the module which you developed also will be beneficial.
Also be specific in your queries to expect precise response.
03-20-2023 11:44 AM
There will be a blade running through these 2 pnp sensors. I am trying to write a labview program that will be able to record the ammount of times the blade passes through the sensors. I first cannot get the DAQ to read the sensors even though the sensors are clearly picking up movement through them. Then I have absolutely no idea how to run the DAQ assistant and get it to read them.
03-20-2023 12:21 PM
Hi collin,
@collin_g_10 wrote:
I first cannot get the DAQ to read the sensors even though the sensors are clearly picking up movement through them.
I would start with using some Wago clamps (or similar) to provide a good electrical connection for all those wires…
Then you should read the manual of your sensors to make sure you correctly connect all the wires! ("pnp" sounds familiar and related to "open collector", so you may need some additional resistors.)
In the next step you use a simple handheld DMM to verify the output signal of your sensor.
And in the 3rd step you connect the signals to your USB DAQ device and start a testpanel in MAX to check the signals…
@collin_g_10 wrote:
Then I have absolutely no idea how to run the DAQ assistant and get it to read them.
Why do you think you need the DAQAssistent?
Did you try to follow the example VIs found in the example finder explaining all the DAQmx features?
03-22-2023 11:18 AM
I have figured out how to get the sensors running and reading. In the top picture, you can see that on Labview Daq Assist, it is showing that there is a sine wave that is being produced. When I pass my hand through it, the sine wave just jumps from 0 to 1.5 like the picture is showing, whereas the sine wave is not getting bigger and is staying the same. In the bottom picture, you can see how when using the NI device monitor application, I am able to get some sort of signal, right where the highlighted spot is, is where I swiped my hand through the sensors. Am I not doing something right in the labview DAQ assist?
.
03-22-2023 01:39 PM
Hi collin,
ohh, what noise do you measure here?
3 sine waves in 50ms gives 60 Hz: are your wires next to some power supply/cords?
Why don't you try to avoid (power supply) noise by shielding to yield better measurements?
Can you provide a manual/datasheet for your sensors?
03-22-2023 03:11 PM
This website provided is the sensors that we are using. I was able to shield the power cord, which did help and allow for labview to actually pick up the signal. When I put my hand through the sensors the amplitude jumps to around 10.6, the gradually regresses. Since I will be measuring a drone motor pass through it and try to count its RPMs. Is there a way that I would be able to count the amount of times that the DAQ/sensors hit that 10.6amps? or am I still doing something wrong?
This picture shows the sensor when my hand is between them.
This is what it looks like immediately after removing my hand. Then after I take my hand out it takes several seconds to get back to 0.
03-22-2023 03:19 PM
Based on the slow response it sounds like you may need a load resistor.
-AK2DM
03-22-2023 03:24 PM - edited 03-22-2023 03:26 PM
Hi collin,
@collin_g_10 wrote:
When I put my hand through the sensors the amplitude jumps to around 10.6, the gradually regresses.
This doesn't sound right.
@collin_g_10 wrote:
Then after I take my hand out it takes several seconds to get back to 0.
Because of missing shunt resistor. After all its a PNP output!!!
Is there anybody in your lab you can ask about basic electrics/electronics issues?
04-03-2023 11:16 AM
So when the sensors read at the top at 10.6 volts. I am okay with. But what it the best way to count the ammount of times that the blade will pass through. Because I am trying to make a program allowing it to count the blades and calculate the rpms. But I have no idea how to do that.