|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Simulator Encoder problems
I'm baack!
We're trying to hook up the encoders on the robot simulator. Just getting in the code in Begin, then trying it, results in this error in a popup on the DS (see EncoderErrror.PNG). Code is in BadEncodder.PNG. Code was copied from the ecoder exaple, with the controls converted to constants. Sim runs OK with with this code diabled. I tried these combinations of DIO's 3,4; 5,6; 0,1; 1,2. Same error every time. Any ideas? We're having an awful time putting a program onto a 4slot cRIO that has been constructed similarly. Keep getting the dreaded waiting for robot to respond. TIA, Tim |
|
#2
|
||||
|
||||
|
Re: Simulator Encoder problems
Hi Tim,
I just tested this and it worked. I configured an encoder in Begin, and then read it in Teleop. A few suggestions: 1. In the project, expand My Computer and then open Robot Simulation Readme.html. It has the channels of all the actuators and sensors for the simulated robot. 2. In Begin.vi, drop the Open from the Encoder palette - it will give you the code needed. You'll just need to change the A and B Channels to 3 and 4 or whatever. Then drop the RefNum Registry Set. You don't need the Config Timer VI, and that may be one source of your trouble. 3. In Teleop (or wherever you want to read it) drop the RefNum Registry Get followed by the Encoder Get to read the distance. 4. You might also take a look at the Robot Simulation tutorial on the Tutorials tab of the LabVIEW Getting Started Window. Cheers, Doug |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|