ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use absolute encoder to get positioning

HI,

i am actually refering to the  vi attached. which i missout in my previous post. 

And the error can be found by compare the datasheet of the encoder and the output of the vi. 

i actually found that number in the text file changed randomly instead of followed the pattern on the data sheet. 

Therefore i am quite unsure if i program the encoder wrongly or the encoder is spoiled. 

can you suggest why it happens?

 

Thank you very much !  

 

Best regards, 

Melvin 

 

0 Kudos
Message 11 of 17
(1,189 Views)

 Thanks for your reply. 

 The DAQ set i am actually using is NI USB-6218 BNC, there are 8 digital input channels. 

And the encoder has 8 output pins, therefore i connect the 8 output pins to 8 digital input channels. Then i convert the input boolean array to number and output to the text fie, which i need the continuous data. 

However, i actually found that the output of the data does not follow the pattern in the datasheet, could you suggest why it happens?

Thanks a lot! 

 

Best regards, 

Melvin 

  

 

0 Kudos
Message 12 of 17
(1,187 Views)

Hi, 

Yes it is GrayCode, but i actually treat GrayCode as a form of boolean array, and convert it to the decimal numbers, which i plan to do a one-to one map to the datasheet in the next stage.

is this wrong?

Thanks a lot for your reply 

 

Best regards, 

Melvin 

0 Kudos
Message 13 of 17
(1,186 Views)

Your latest VI still has 8 DAQ VIs. The problem with this is that they will not run at the same time! You are still sampling each input one at a time. 

You need to take a look at apok's reply and change the way that you are sampling the DAQ. You need to have ONE DAQ VI that samples all 8 inputs at the same time. 

0 Kudos
Message 14 of 17
(1,168 Views)

Hi Apok, 

 I am currently using an old version labview 10.0. 

Is it possible for you to help me to convert the vi to labview 10.0 compatible? I am refering to the digital_SW_timed inut.vi attached. 

Thank you very much! 

 

Best regrards, 

Melvin 

 

0 Kudos
Message 15 of 17
(1,155 Views)

Hi, 

Thanks for your reply. 

 I am currently using an old version labview 10.0. 

Is it possible for you to help me to convert the vi to labview 10.0 compatible? I am refering to the digital_SW_timed inut.vi attached. 

Thank you very much! 

 

Best regrards, 

Melvin 

0 Kudos
Message 16 of 17
(1,152 Views)

you could always goto the version conversion forum...did you look through your NI shipped Examples?

0 Kudos
Message 17 of 17
(1,142 Views)