I actually found the way to do this yesterday. NI System configuration has a property node called "System Hardware" with a property called "cRIO Module Programming Mode". This can be set to Scan Engine or FPGA mode.
It would be nice if the help documentation for the dialog window in the project mentioned this property. It caused me quite a bit of headache to find it!
We added that property in CompactRIO 17.6 with the release of CompactRIO with DAQmx (e.g. the cRIO-904x models). It will only work on those models and should error on others (e.g. 903x). There's a few other caveats about it, which all fall under the idea of 'you can switch modes, but the backend for the mode you're switching to must be ready' - for example, to switch a module slot into FPGA mode dynamically you'd need to have a bitfile pre-compiled with code for that module, in that slot.
Edit: here's documentation on the three programming modes for the cRIO-904x models. These are similar to "FPGA Interface Mode" and "Scan Interface Mode" used on other controllers, but are controlled by a different backplane architecture.
Andrew T. "His job is to shed light, and not to master" - Robert Hunter