|
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.
|