View Single Post
  #2   Spotlight this post!  
Unread 20-01-2015, 14:00
Doug Norman's Avatar
Doug Norman Doug Norman is offline
Registered User
no team (National Instruments)
Team Role: Engineer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Austin, TX
Posts: 135
Doug Norman will become famous soon enoughDoug Norman will become famous soon enough
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
__________________
Doug Norman
National Instruments
Reply With Quote