I’m mentoring several VEX IQ teams this year and I’m trying to help them code an H-drive. However, they can’t download any code onto their brains from the VEX IQ codeblocks interface. The cortex is connected to the computer with the USB cord, the controller is connected to the cortex with the Ethernet cord, the cortex is on. The computer can see the cortex and can tell which cortex it’s connected to. But everytime they try to download, it says: “Your program has failed to download. Please try again.” It doesn’t give any error code or any indication of what’s going wrong. I can attach images of the code and of the error message if necessary. Thank you
I suggest you try the following in roughly this order:
- The controller doesn’t need to be connected to the brain via ethernet to download code, just to update the firmware on the controller and its radio. It shouldn’t cause any problems to download code with the controller connected, but try unplugging it anyway just in case there’s something weird going on there.
- Make sure the brain is running the latest firmware (using the VEXos utility).
- Try a different USB cable
- If feasible, try uploading the same program to the same brain over a known-good cable from a different computer.
- If feasible, try uploading the same program to a different brain over a known-good cable.
- Write the simplest program you can think of (e.g., just print something to the screen or play a sound) and try uploading that. If that works, but your original program still doesn’t, please post a screenshot of your code and/or the project file itself so we can further help you.
The problem persisted over multiple computers, brains, and USB cords, even without the remote plugged in. Firmware is up to date.
This is the code we were trying to download
This was the error message.
Your variable can’t have a slash in it.
@tfriez Might need some error handling on variable names.
Or even, for now, just have a very generic error message instead of “failed to download.” This is really a catch-all error message.
Agreed, “failed to download” implies a problem in robot-to-computer communication, which this wasn’t. At a minimum “failed to compile” and “failed to download” should be separate errors IMO.
This works just fine for me - we do variable renaming behind the scenes to prevent “illegal” variable names.
The bug that we’re aware of… if you have the same variable name declared as two types (i.e. broadcast message, variable, boolean, list, 2d list) then you’ll get a somewhat cryptic “failed to download” error. We’re improving that handling (to prevent duplicate names) in the next update.
The screenshot above will generate the “failed to download” error.
So the problem isn’t with the code itself? Firmware has been updated and the problem exists on every brain that’s been tried. We’re using laptops provided by the school and they all have a built-in firewall and protection system. Nobody but the IT guys have admin access. Could this be a problem?
Can you upload the .iqblocks file and we’ll take a look?
The next meeting is on Thursday. I won’t have access to it until then
No worries - upload it when you get a chance and we’ll dig in to figure out the issue.
We get that error frequently if we edit the code but save the code under the same name. First download erases the existing code in the slot, 2nd download works. Seems to only happen with minor tweaks… small changes in numbers or drop downs rather than an addition of new blocks.
Prototype.iqblocks (4.5 KB)
Here’s the IQ blocks file
Everything download and ran fine for me on a Mac… what kind of computers are you using to program?
Also, do you have any other VEX IQ software packages open? Having the VEXos Update Utility or another programming software that talks to the VEX IQ hardware will prevent downloads.
So I was able to get it to download from my personal laptop. I guess it’s something with the school district laptops. Thank you everyone for your help!
My computer is an ASUS running Win10, the district computer was an HP also running Win10. In both cases, VEX IQ Codeblocks was the only application running.
So it’s downloading now but the motor isn’t responding to the control loop. I should probably start a new thread for that but anyone have any suggestions? We tested the motors and the cord so all of the hardware was fine. This code is supposed to run the strafe motor on an H-Drive. The rest of the drive train–the part that isn’t in the blocks but was setup with the Controller–is working. It’s just the strafing motor that won’t respond to control inputs.