09-24-2019 04:05 AM
many many thanks to all of you. now my problem is almost solved
09-27-2019 09:44 AM
hi dear irPaul,
i am facing some problem to get data from displacement sensor, as you said i did, i am giving the range of my sensor at 0-5 v, when my sensor is in idle position it gives the reading 0, but when i am pulling the rod of displacement sensor (as it should give 5 v at its maximum range), the maximum reading is in minus (-), so how i set this scale, could you please guide me some more, thanks
@irPaul wrote:
Okay, that's at least sufficient documentation to start.
For reference here also a link to the USB-6009 manual: http://www.ni.com/pdf/manuals/371303n.pdf
Let's start with one sensor first, to see that it works. The displacement sensor needs a voltage input ("Operating Voltage") of 5, 10 or 24V. The operating current is <2 mA according to specs, and the USB-6009 can supply 200 mA. That means this sensor can be directly connected to the USB-6009 🙂
Wire the input + and - of your sensor to the +5V (pin 31) and GND (pin 32) on the USB-6009, and the output to for example Analog In 0 (pin 2 & 3).
Next, use the DAQmx examples I posted earlier to at least get the voltage read-out from this channel. Or try it first with the NI-MAX.
The specs show that the output should be 0-5V, corresponding to the 0-350 mm range (0V = 0 mm, 5V = 350 mm, so displacement in mm = voltage * 70).
That should be enough to get you started. If it does not work, please attach a photo of the wiring and the VI used for read-out.
09-28-2019 12:49 PM
I'm going to make some assumptions based on what we've told you, what you have not shown us, some assumptions about the device you are using, and some assumption about your understanding of basic electronics.
These are just my best guess based on the above assumptions, any (or all) of which may be wrong.
Why don't you help us to help you by attaching the VI (or VIs) that you have written to do this?
Also, have you tried starting MAX and using some Test Panels to "look at" your sensors and verify that you have things connected to the correct pins, and you have set up the Analog Input configuration so that it makes sense?
Bob Schor
09-29-2019 02:07 AM
thanks dear sir bob for your kind response,
you are right, i checked my sensor's wiring internally it was reversed means +ve was on -ve, so now i set it, now its working fine. and your asumption is right i really dont know about "differential" and "sigle ended"
dear sir if you dont mind can i ask you two more questions, i know i am bothering you and sorry for that,
now my first question is, after getting this data and export it excel, now how to analyze this is there any need of any statictical equation (regression), (i mean the data in voltage and i need mm thats why i am asking).
and my second question is, i want to run 3 sensors (2 displacement and 1 load cell) at same time, so please guide me about this, how i will get these 3 at same time and how i seperate data for each different sensor
thanks
09-29-2019 10:42 AM
now my first question is, after getting this data and export it excel, now how to analyze this is there any need of any statictical equation (regression), (i mean the data in voltage and i need mm thats why i am asking).
The documentation you showed is for a linear displacement sensor. That simply means that 0V = 0 mm, 5V = 35 mm and in that range it scales linearly (y = a*x + b with b=0 in this case, that should look familiar).
If you want to calibrate this, you can of course export the data to Excel and do a linear regression on it. There's a wealth of information on this online, it's out of the scope of this forum.
and my second question is, i want to run 3 sensors (2 displacement and 1 load cell) at same time, so please guide me about this, how i will get these 3 at same time and how i seperate data for each different sensor
As said before, post the VI that you have so we can help you based on that. To read the sensors at the same time, simply put 3 DaqMX Read actions in your program. This will give you a value for each sensor.
09-29-2019 11:10 AM
Sher786,
I deeply regret that you did not have any instruction in LabVIEW, particularly one that emphasized the LabVIEW was designed as a LABoratory Virtual Instrument Engineering Workbench (look at the initial letters) and is especially well-suited to take measurements with devices such as the USB-6009. I used to give a single 2-hour "Introduction to LabVIEW" lecture + a 2-hour lab with USB-6009's (we made a Touch Sensor using nothing more than a 1 Mohm resistor).
You need to "do the work"! Take one of your devices, hook it up properly to the USB-6009, plug it into your PC, then open MAX, the Measurement and Automation eXplorer (look at capital letters, again). Play around with Differential vs Single Ended. Learn about Sampling modes (single sample, finite, continuous). Look at Scaling (you probably don't want to do this, but should be aware of it!).
Many measuring devices output Volts (some output Amps), but they correspond to Temperature, Displacement, Acceleration, Pressure, etc. You need to know how Volts and "Real Units" are related. Sometimes you "know" this (the manufacturer guarantees it for you), but, if you are a (good) engineer, you calibrate your instrument by taking measurements of known quantities and verifying the output you get.
Once you are familiar with your Device (using MAX), become more familiar with DAQmx. Do a Web Search for "Learn 10 Functions in NI-DAQmx and Handle 80 Percent of your Data Acquisition Applications" (or a title close to that). Learn about Tasks, which can let you take multiple channels of data (like two displacements and a load cell) at the same time (provided they are at the same rate). When you take multi-channel data, DAQmx will allow you to export it as a 2D Array of data or a 1D Array of Waveforms (which is what I usually use) -- if you don't know about Waveforms, they're a useful Data Structure for sampled data (where the time between samples is a constant, e.g. 1 msec when sampling at 1 kHz).
Bob Schor