Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Project runs Ok in debug mode but not in release mode

I have an application developed with VC++ 6.0 and measurement studio. The application controls SCXI-1161/1166 relay boards to connect the UUT. The application runs ok in debug mode, but in release mode the application can't drive the relay boards. I have tried to change optimizations mode, it didn't work. Who can tell me how to solve the problem? Thanks!
0 Kudos
Message 1 of 5
(4,069 Views)

Hello,

When you say it can't drive the relay boards what happens? Are you closing/opening multiple relays and nothing happens? How fast are you trying to switch them? Are they being allowed to debounce? Are you making calls to the NI-SWITCH driver directly or are you using CW IVI? Any more info on the system would be helpful.

Thanks!

Brian Spears

0 Kudos
Message 2 of 5
(4,045 Views)
Thank you, Brian.
I have steped into the project in release mode and found some  information. The function of niSwitch_error_message() tells "Failure loading driver module". With NI SPY, I found the niSwitch_initWithOptions("SC1Mod1", VI_TRUE, VI_TRUE, "DriverSetup=topology:1161/8...",SC1Mod1) failed and SPY printed out error code "IVI_ERROR_LOADING_DRIVER" . But in debug mode, the niSwitch_initWithOptions("SC1Mod1", VI_TRUE, VI_TRUE, "DriverSetup=topology:1161/8...",SC1Mod1) successes and the projcet runs OK! Why ?
There are still one question. I found the niswitch soft panel use the same function niSwitch_initWithOptions("SC1Mod1", VI_TRUE, VI_TRUE, "DriverSetup=topology:1161/8...",SC1Mod1) and failed too. Howerver, I found that  in MAX the test panels of SCXI1161 always works well but the function it uses can't be captured by SPY. Can you tell me the information of this function ?
Thanks !
0 Kudos
Message 3 of 5
(4,039 Views)
It sounds like you have an older version of our SWITCH driver which relies on our DAQ driver. I would recommend uninstalling the Traditional DAQ, DAQmx, and SWITCH drivers and then installing the newest version. At this point you have 2 options:
1) You can download Traditional DAQ 7.4, DAQmx 7.4, and NI-SWITCH 2.4 drivers bundled together here: https://download.ni.com/#support/daq/pc/ni-daq/7.4/
 
2) You can install the latest version: NI-DAQmx here: https://www.ni.com/en/support/downloads/drivers/download.ni-daq-mx.html This has support for all of our USB DAQ devices (if you're not using them then you may not want to worry about installing this now) and then install Traditional DAQ 7.4 and NI-SWITCH 2.4 here: https://www.ni.com/en/support/downloads/drivers/download.ni-switch.html#324288
 
This should solve your problem.
Message 4 of 5
(3,998 Views)
Yes! I have solved the problem by install the new version of drivers. Thanks a lot !
0 Kudos
Message 5 of 5
(3,981 Views)