FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

DIO in Robot Framework with Game Code

Solved!
Go to solution

In the Robot Framework with Game Code, I could not find where the DIO for the line sensors are opened. I found where they are used in autonomous independent, but that only have a refnum registry get. I couldn't find the open or set anywere. I would have expected them to be in begin.vi.

Did I miss them, or are they missing. I was having trouble getting the software to work, and this seems to be the reason.

Message 1 of 5
(7,123 Views)
Solution
Accepted by topic author sciencewhiz

Hey sciencewhiz,

The piece of code to open the DIO connections was accidentally left out of the Robot Framework with Game Code.  The issue has been recognized and will be fixed in the next update.

You can add the appropriate DIO Open and RefNum VIs to the Begin VI yourself.  It should look something like this:

Capture_2.bmp

-Barron

Barron
Applications Engineering
National Instruments
Message 2 of 5
(3,159 Views)

It's also worth noting that the sample FRC Autonomous code is written assuming Normally Closed outputs from the Line sensors.

The FIRST KOP sensors have two outputs N/C and N/O.  You want to use the N/C (White) output so that when the sensor sees the line the switch opens which lets the input voltage pull up to +V and be seen as a "True" logic level.

Get a life? This IS my life!
Message 3 of 5
(3,159 Views)

Here's a question:   Why did the deploy arrow remain unbroken IE no errors with the above error or bad coding?   TNX for your support.

0 Kudos
Message 4 of 5
(3,159 Views)

It's the difference between a program error and a syntax/wiring error.

There were no "syntax" errors because all the connections were valid.  Unfortunately, the references had not been initialized (program error).

This can only be determined at runtime.

The real question is to whether any runtime errors were reported on the Dashboard diagnostic screen.

Certainly if you had probed the refnum coming out of the GetRefnum VI it would have held an error condrion.

Phil.

Get a life? This IS my life!
Message 5 of 5
(3,159 Views)