01-30-2012 05:35 AM
Hello,
I am checking forum posts but could not locate a lead to this problem: I am measuring a distance on Y and the corresponding angle on X. I see it should be done through array bundle and False on Reset property.
Hardware
X sensor is an absolute linear encoder in uA (axis distance) or a LVDT probe,
Y sensor is an incremental rotary encoder, counting pulses (0-360).
I am probably using the wrong DAQ, as USB-6009 does not have a position counter, but just an edge counter through PFI0.
I would appreciate any suggestion on any inexpensive alternative sensor for X.
Display
The graph should look like a 'waveform' chart, where points are accumulating, but referred to the angular 'position' and not to 'time'.
Collecting coordinates (X,Y) in two arrays and display them on a XY-graph happens at the end, this is easier, but not-
real time.
Thank you for any suggestion on
1. the programming method
2. any relevant example for
3. the correct NI hardware setup for absolute length and rotary encoders
Attached: the desired result and a pseudo-block diagram
Thank you
George
01-31-2012
02:02 PM
- last edited on
03-27-2025
11:21 AM
by
Content Cleaner
Hi George,
I understand your desired result, but I am unsure where you are with the development. It seems like you have some sensors available to you and the usb-6009. Thhe 6009 is our lowcost usb device and as such, has limited capabilities. You are right in that you can use PCI0 as an edge counter, but making directional measurements will be difficult. Check out these two developer zone articles, they may give some insight for you about setting up your sensors.
Encoder Measurements: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x1riCAA&l=en-US
Once you have your sensors selected, I would refer to our exampel finder (Help >> Find Examples...) there will be examples about how to make these types of measurements using LabVIEW.
First I would make sure that you are making the correct measurements, then I would move on to plotting them. You will be able to plot your results once you have them, do not worry too much about that. I would focus first on getting the fundamentals working.
Let us know if you have any more questions,
Ryan
01-31-2012
03:04 PM
- last edited on
03-27-2025
11:21 AM
by
Content Cleaner
Hello Ryan, thank you for checking,
is correct, I have already checked those documents and I am studying a nice example here with DAQmx functions http://zone.ni.com/devzone/cda/epd/p/id/1721
DAQ
I purchased the USB 6009 by mistake when I was ordering a myDAQ instead, that's not too bad as I use it for experiments.
I am really missing the ....Position/Linear and ....Position/Angular Dev1/ctr0 and Dev/ctr1 physical channels for my task, but I would need anyway a NI USB device (for a notebook) and not a PCI card.
Sensors
I attach a basic scheme: I get signals from 3 and 1 now. Then I will add a microphone 4. Then the systems will be motorized (where encoder 1 is located, therefore a motor+integrated encider would be best choice). Finally also rotary encoder 2 will be used. Heidenhain and Renishaw are too expensive for testing, and I need a NI USB card that will keep all these options open.
01-31-2012 07:00 PM
Hello Ryan,
I know is not the right way to program (try&fail) but I am totally new using Labview. I understood the basics of signals processed when presented to the function.
I would like to see how to change this attached VI just to simulate the result.
X
I count edges with the 360 P/R incremental encoder, this is my X (0,1,2,3,4,5.....360). Then I will have to reset to 0 when 360 is reached.
Possibly using a strip chart instead of a XY.
Y
As I do not have the linear encoder with me, I get the istantaneous Y (simulated now by the random voltage at AI0, multiplied by 10000 to have a random value between -12 and 12). Y autoscale is OK. Now the point: I do not know how to use Y so that for each X arriving to the graph, a couple of points (X,Y) is plotted.
Feasible? Through an array?
Also timing is an issue, I still have to work on it.
Thank you
02-01-2012
12:45 PM
- last edited on
03-27-2025
11:22 AM
by
Content Cleaner
Hi George,
As far as selecting motors and possible encoders / controllers, that will be up to you. There are so many companies out there to choose from, and you know best your budget and requirements.
As for selecting a card that will support your applications, that will flow down from what encoders you have selected, and other possible requirements. Right now it seems like you will have two encoders, which will require two counters. Because you require a usb solution, I would look at cards like this, https://www.ni.com/en-us/shop/model/usb-6341.html. This card will be able to run the examples you have. It will also allow you to read in a microphone input, as most all of our DAQ cards will.
Again, I would not worry about timing and plotting, we can do that, but getting the hardware set up and funtional is your first concern. This example shows how to continuosly update an x-y chart.
https://forums.ni.com/t5/Example-Code/Continuously-Plot-Data-to-XY-Graph/ta-p/3527138
Let me know if you have any more questions regarding interfacing your sensors or writing software.
Cheers.
Ryan