LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Closing CVI -> "the index passed is out of range"

Test in debug mode, then close cvi.The message will appear.

0 Kudos
Message 11 of 15
(988 Views)

Lan4,

 

Unfortunately, I wasn't able to reproduce the issue on my end--this could be because I'm not using the same hardware as you, or it may also mean that the issue is with your CVI installation. I would recommend trying a reinstall of CVI to resolve the issue.

 

Also, I noticed that you open the COM port, but never close it. You might try putting in the CloseCom function to close the COM port before terminating execution in your program. It's possible that the issue you're seeing is occurring as a result of leaving that port open, so it'd be a good step to try closing that.

 

I hope one of these suggestions work for you--if not, let me know and I'll keep looking into possibilities.

0 Kudos
Message 12 of 15
(971 Views)

The CVI what I use is NILWCVIFDS90.exe.And the problem will happen if only the programe executes source_off().And it is no Com command.

0 Kudos
Message 13 of 15
(962 Views)

Thank you for help me,although we hadn't found the reason.

0 Kudos
Message 14 of 15
(959 Views)

Lan4,

 

I notice in your code that you initialize the "device" variable in Main, but source_off is the first time you use it. It's also the only place in your code where you use the gpib_write() function. I would recommend checking into that and verifying that you are, in fact, opening the device reference correctly. It's possible that there's a problem with that reference that's causing the error.

0 Kudos
Message 15 of 15
(945 Views)