Thread: DO write speed
View Single Post
  #3   Spotlight this post!  
Unread 19-12-2009, 02:39
daltore's Avatar
daltore daltore is offline
Electronics/programming/design
AKA: Aaron Osmer
FRC #3529 (ausTIN CANs)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2007
Location: San Antonio, TX
Posts: 272
daltore has a spectacular aura aboutdaltore has a spectacular aura aboutdaltore has a spectacular aura about
Send a message via AIM to daltore Send a message via MSN to daltore Send a message via Yahoo to daltore
Re: DO write speed

Basically, there are just a lot of layers in the FRC control setup. LabView is an interpreted language running on firmware on the cRio itself. The firmware (an interpreter) reads the compiled LabView code and figures out what it wants the cRio to do. That interpretation takes time. Also, if you're using the FRC digital output VI's, they have other things in them that run every time you call them that slow things down, like port addressing, and some checks to make sure things are still working. These checks are quite nice in a competition setting with high schoolers forgetting to plug things in correctly, or something getting damaged in a match, but they take time.

Probably the fastest way to switch the output pin is to use a register call. There is a similar circumstance on the older PIC-based FRC controllers. There's that nice little setup using WPILib where you have the function SetDigitalOutput(PIN, VALUE); and it does it for you, to save you having to write things like PORTA = 0xFE; and such. However, the second method is still much faster, because you're working with the raw register values.

I don't know how to do this in LabView, or even if it's possible in this setup, because they've shielded us from a lot of the really lower level stuff in LabView, especially in FRC to keep people from tampering with the disable code, they've locked us out of the FPGA for now. You may possibly be able to do something lower level in C++, but I don't know.

Best of luck, though.
Reply With Quote