|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Encoder Problems
Wiring:
5v -> power on dio 4 gnd -> gnd on dio 4 A - signal on dio 4 B -> signal on dio 5 Programming in the pictures I have DIOs set to 4 for A and 5 for B |
|
#2
|
||||||
|
||||||
|
Re: Encoder Problems
don't call the encoder config timer and start in telop. It will get called 50 times a second. Put them in begin, instead.
|
|
#3
|
|||||
|
|||||
|
Re: Encoder Problems
Using controls instead of constants for the channel numbers will work if you're going to run Robot Main. Make sure to use the popup menu to set the current value as the default before you build the project. But I think it's simpler to use constants instead.
|
|
#4
|
||||
|
||||
|
Re: Encoder Problems
We changed the controls to constants and moved the timer configure to the begin VI, but it still doesn't work.
|
|
#5
|
||||||
|
||||||
|
Re: Encoder Problems
On the dashboard, when you spin the encoder, do you see the DIO change states?
|
|
#6
|
||||
|
||||
|
Re: Encoder Problems
We see nothing change on the dashboard, but we are using the dashboard on my personal computer, not the classmate
|
|
#7
|
|||||
|
|||||
|
Re: Encoder Problems
Does your code now resemble this example?
|
|
#8
|
||||
|
||||
|
Re: Encoder Problems
Take a look and get the encoder example working first. Then integrate that code into your robot code. Here are a few steps:
1. From the LabVIEW Getting Started Window, click on "Find FRC Examples". 2. in the Sensors folder of the Example Finder, open the encoder example and get that to work. 3. Back at the Getting Started Window (View>>Getting Started Window if you have VIs open), check out Tutorial 7 - Integrating Examples into Robot Code. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|