Go to Post Read the rules. And then read the rules again. Then, get together as a group and read the rules together. - Knufire [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Spotlight this post!  
Unread 11-03-2013, 02:38
nekojess nekojess is offline
Controls Surgeon and Diagnostician
AKA: Jessica C
no team
 
Join Date: Mar 2013
Rookie Year: 2001
Location: Michigan
Posts: 15
nekojess is an unknown quantity at this point
Re: Detecting connection to FMS

You can detect attachment to the FMS by checking the RawControlByte output of the driver station Get Mode vi. It's called in Robot Main and the control byte is discarded. It'd probably be most efficient to have it set to a global variable in Robot Main, rather than calling Get Mode just for the control byte.

The Get Mode vi itself uses the 1st, 4th, and 5th bits in order to determine the current mode, and outputs the appropriate enum value.

The relevant bits of the RawControlByte are as follows:
Code:
 Bit | Contents
-----+----------
   0 | 
   1 | Test Mode
   2 |
   3 | FMS Attached
   4 | Telop(0) / Autonomous(1)
   5 | Enabled
   6 | Emergency Stopped(0) / Okay(1)
   7 |
I've tested all of those except for FMS Attached, but I'm extremely confident it'll work properly. Also, WPIlib (C++ at least) has supposed definitions for the other bits... but it also has Test Mode called cRIOChkSum, so I don't think it's really up to date... Nothing actually uses FMS Attached and the other ones anywhere, except for the firmware.
Reply With Quote
 


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 22:50.

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