From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Agilent 34970a Error -1073807246 when run in exe file

Hello all,

 

I have come across an error i am unable to figure out at the moment.

I made some SW code to read mA, code works perfectly in "development" mode, but once i compile to *.exe file i get -1073807246 on my 34970a.

Using rs-232. Same computer, same settings, i cannot see any reason this should not work.

i have also done the same in several different *.exe applications and they work. I have tried different methods of connecting, visa-open etc, but no luck.

Can anyone guide me in the right direction?

I am using LV 2017 32bit, NI-Visa installed (and re-installed). RS-232 settings are correct in "dev" mode, should be correct after compilation. 

 

Any input will be appreciated as i am stuck in my tracks here.

Thanks,

 

 

0 Kudos
Message 1 of 3
(2,174 Views)

Hi Torb,

 

did you read the error reason? "The resource is valid, but not available to VISA."

 

Did you close the COM port in LabVIEW?

Do you use any other tool accessing the COM port?

Does the same error appear after a clean boot of your computer?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(2,159 Views)

thanks for your reply,

Read error reason, Com-port closed, nothing else accessing Com port, error appears after re-boot.

 

However, after some more digging, it appears that NI-VISA had installed an additional driver in the device manager. 

i had NI-VISA device there as well as the com port i am using (MOXA-uport 1110).

 

Removed that and rebooted as suggjested, fixed it.

 

Thanks for the input

 

 

 

 

0 Kudos
Message 3 of 3
(2,150 Views)