LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to creat a lookup table

Hi

I have been looking and trying to figure this out for a few days and after awhile you just head no where.

What I need to do is use a lookup table and change gray code to an angular reading.

I have an 11 bit encoder I am also using LabVIEW 7.1 with a USB-6259. I can read the decimal and the Hex values but just can not seem to figure out how to get the angular measurements that I need. I have attached a simple .vi to get the hex and decimals as well as a .txt file with the gray code any help will be appreciated.

Thanks

Gerald

Download All
0 Kudos
Message 1 of 4
(3,394 Views)
Quite easy when you know how to handle array and read from file functions ; and quite hard if you don't 😉

Feel free to ask question if something is not clear !


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 4
(3,389 Views)

Well I need to learn a lot about the array and all of it for that matter. But with a little changing and studying and trial and error on my part I got it to work. I have attached what I came up with and seem to work very well. I took your .vi and removed what I did not need (after I figured it out) to be displayed and added a few things. I can now see the angle, degrees per second of movement. The only thing I will need to figure out is how to put in a zero button so that it can zero the dial at any point while taking measurements. Thanks for your help I could not have done it with it. Any ideas on the zero button would be appreciated as well.

Thanks you very much!

Gerald

Download All
0 Kudos
Message 3 of 4
(3,371 Views)

New problem.  Have duplicated the VI and hooked up the second sensor. Sensor 1 still works fine sensor 2 does not. I think the problem is that it is reading 22bit and I only need 11 bit. I have both sensors wired into port0 sensor 1 is wired to port0/line0:10 sensor 2 is wired port0/line11:21.  Is there a way to ignore the fist 11bits (line 0:10) or a way that would work. It shows up as 1100111110100000000000 and a dec. as 3401728. Please see attached.

 

Thanks in advance

Gerald

Download All
0 Kudos
Message 4 of 4
(3,342 Views)