Go to Post By the end of week six, I'm sick of looking at the robot enough that stuffing it in a bag is rather cathartic...:rolleyes: - 2544HCRC [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 19-01-2015, 20:01
tcjinaz tcjinaz is offline
Tim
FRC #3853
Team Role: Mentor
 
Join Date: May 2011
Rookie Year: 2011
Location: Arizona
Posts: 206
tcjinaz has a spectacular aura abouttcjinaz has a spectacular aura about
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
Attached Thumbnails
Click image for larger version

Name:	EncoderErrror.PNG
Views:	30
Size:	100.6 KB
ID:	17902  Click image for larger version

Name:	BadEncodder.png
Views:	24
Size:	32.6 KB
ID:	17903  
__________________
Software Mentor
3853 Pridetronics[

Reply With Quote
  #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: 137
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
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:08.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi