02-23-2013 12:07 PM
We made some last minute changes to our robot program and now, in simulation mode, WPI_MotorControlGetOutput.vi always returns -1 and the error
"Error -63195 occurred at Read/Write Control in
FPGA_DIOReadPWMValue.vi->WPI_DigitalModuleGetPWM.vi-
>WPI_PWMGetValue.vi->WPI_MotorControlGetOutput.vi:1-
>Teleop.vi->Robot Main.vi
Possible reason(s):
NI-RIO: (Hex 0xFFFF0925) The handle for device
communication is invalid or has been closed. Restart
the application."
I created a new robot project and used the most basic code in begin.vi and teleop.vi to check the code and I get the same results.
When I drill down through the sub-vis to FPGA_DIOReadPWMValue.vi I find "FRC FPGA Ref" global variable. The variable has a value of 0 and I can't find where this variable is ever written to.
Should WPI_MotorControlGetOutput.vi work in simulation mode?
Is there a way to correct it?
I'm in panic mode because our program uses WPI_MotorControlGetOutput.vi and if it always returns -1 our robot will run uncontrollably.... in reverse, or spin. Might get a laugh, but not many points.
02-23-2013 07:23 PM
Are you using the exact same device reference that works for setting a motor? Could you post your code?
02-23-2013 07:49 PM
I've created a basic robot project to reproduce my problem. I create the motor reference in Begin.vi and then call that reference in teleop.vi. I get the result and error I mentioned earlier when it runs. Thanks.
02-25-2013 10:45 AM
rdtech wrote:
We made some last minute changes to our robot program and now, in simulation mode, WPI_MotorControlGetOutput.vi always returns -1 and the error
The reason for this is that WPI_MotorControlGetOutput.vi is not supported in simulation. Simulation currently only supports what is minimally needed for the three available simulated robots. But it would make sense to be able to get the output that was previously set. I will make a note to add this for next year. Also, I tested your code on a cRIO and it works without that error.
02-25-2013 01:13 PM
Doug,
Thanks. All I needed was a confirmation. I can start to breath a little.