encoder works, and then it doesn't.

I was testing out the encoder a few days ago using the encoder vi example provided by ni, and it worked perfectly. The next day, i ran the same exact code, no changes. And it would not work. The electrical person checked the electrical, and the program wasn’t changed at all. Any ideas?:confused:

Check the pink devref input that goes into the get encoder vi

Encoders are fairly fragile. Have you checked it with an oscilloscope?

Check the pink devref input that goes into the get encoder vi

thanks i’ll see if we can try both.

WELLl i am having the same problem with the encoders not working one day that not working.

Electrical checked them and they are working
The code is not sending errors and the defref is fine

I have 5 NEW encoder and none of them are working.

The encoders do work via voltmeter

Again, try the encoder VI with no changes and all by itself. If it works, it’s your code.

Maybe the encoder example will help- it will remove any doubt of code issues.
You should also check that it’s being initialized right:
We had a problem when we accidentally deleted the wiring between the begin VI to the sequence that calls the vision VI and the periodic VI. So the encoders devref did not show an error, but on the other hand it also did not show the right channels or mode (it’s supposed to be on 4X).

thanks for all the help. The encoder’s didn’t work because of a bad digital sidecar, but now something wierder is happening. When I run the raw encoder get program, i get different values (distance) it each time i run the program.