Go to Post remember kids, never listen to Big Mike.... - Mike Schroeder [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 Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 10-01-2013, 08:56
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 332
fovea1959 will become famous soon enough
Training Simulator for Motor/Encoder pair

We have many more programmers than cRIOs and robot chassis, and I was running through some state machine training last night, using LV running on the PC. The student exercise was to create a state machine that would switch states based on a knob position and a switch setting (knob simulated an encoder position, switch emulated a proximity sensor), the students simulated the motor driving the shaft by manually moving the knob. It seems hokey, but they *did* all end up with accurate state machines (and got good experience in debugging the state transitions).

The problem is that you code a little differently when you have the use of encoder and motor references; without them, you need to poll the encoder position. It hard to implement code like the lovely code in the sensor fusion paper if you have to pass sensor state into the state machine, instead of passing in sensor references so it can determine sensor state whenever it wants.

Has anyone already written a VI set that provides a visual simulation of a motor controller pair (VI to set the "motor" speed, VI to read the "encoder" position)? Having this to write and debug the logic for state machines on LV on a PC before we had real robot hardware available would make training easier. I haven't looked at the robot simulator much yet (don't know if you can simulate encoders there), but it seems like overkill for what I want to do here.

Last edited by fovea1959 : 10-01-2013 at 09:02.
Reply With Quote
  #2   Spotlight this post!  
Unread 10-01-2013, 11:24
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Training Simulator for Motor/Encoder pair

The LabVIEW robot simulator indeed provides simulated encoders for the left and right drive wheels.
Reply With Quote
  #3   Spotlight this post!  
Unread 10-01-2013, 14:05
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,579
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Training Simulator for Motor/Encoder pair

You may find this whitepaper worthwhile: http://www.chiefdelphi.com/media/papers/2494
Reply With Quote
  #4   Spotlight this post!  
Unread 10-01-2013, 14:31
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 332
fovea1959 will become famous soon enough
Re: Training Simulator for Motor/Encoder pair

thanks!
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 21:47.

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