|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Program not seeing sensor.
We have a hall effect sensor on a mechanism. The program doesn't always see the sensor (so my programmers tell me) so the mechanism doesn't stop. Knowing nothing about programming, I have been told the API isn't fast enough and not seeing it. We program in JAVA. I know the sensor is working, I have filmed it.
Are they correct or blowing smoke? What do you think? |
|
#2
|
||||
|
||||
|
Re: Program not seeing sensor.
Quote:
However, the FPGA has an interrupt mechanism that you can use to be notified of state changes for signals. See the InterruptableSignalBase of DigitalInput for more details -- in particular, the asynchronous version of requestInterrupts. |
|
#3
|
|||||
|
|||||
|
Re: Program not seeing sensor.
There is another option for detecting a momentary sensor switch that might be too fast for a polling solution. Instead of opening it as a switch, open it as a counter. That way the FPGA will notice the switch event for you even when you're not looking, and you can watch for a change in the count at whatever rate makes sense.
|
|
#4
|
||||
|
||||
|
Re: Program not seeing sensor.
The 2016 FPGA samples I/O at 40MHz. That's every 25ns. That should be fast enough for just about anything in FRC, However, if you have the Hall sensor mounted near the circumference of a large diameter wheel, I suppose it's possible that the pickup is whizzing by so fast that the electronics in the sensor don't respond to it. What model encoder are you using, how do you have it mounted, and what is it detecting? |
|
#5
|
|||||
|
|||||
|
Re: Program not seeing sensor.
Quote:
Last edited by IndySam : 29-02-2016 at 21:56. |
|
#6
|
||||
|
||||
|
Re: Program not seeing sensor.
Quote:
Could I persuade you to post a picture, showing the sensor and the magnet? |
|
#7
|
|||||
|
|||||
|
Re: Program not seeing sensor.
Quote:
I don't have any picks and won't be near the robot for a couple days. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|