ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

IronPython script error code 0xfffb4e36

Solved!
Go to solution

 

 

import time
import NIVeriStand
from NIVeriStand import NIVeriStandException

wks = NIVeriStand.Workspace2("localhost")
SYSDEF = r"C:\Users\Public\Documents\National Instruments\NI VeriStand 2013\Projects\Pump\Pump.nivssdf"
print 30*"+"
wks.ConnectToSystem(SYSDEF, 1, 60000)
print 30*"*"
time.sleep(5)

 

The screenshot was attached.IronPythonScriptError.png

 

I couldn't find out what this error code is from the NI web or help file.

 

Any idea?

0 Kudos
Message 1 of 5
(6,478 Views)
Solution
Accepted by topic author xhuang2

Hi,

 

It seems as though there is already a SDF deployed.

 

Before you call ConnectToSystem you could check for a deployed SDF and disconnect it:

 

	state = wks.GetSystemState()
	if (state['state'] != 0):
		print 'Error! System state not expected!'
		print "Undeploying SDF: " + state['systemdefinition_file']
		wks.DisconnectFromSystem('',1)

 

0 Kudos
Message 2 of 5
(6,463 Views)

Hi UKCraig,

 

I did as you suggested.  The weird thing is GetSystemState returned a non-zero value, which I could still read out the correct channel value Smiley Sad

 

IronPythonScriptError2.png

0 Kudos
Message 3 of 5
(6,451 Views)

Did you try disconnecting as I suggested above?

0 Kudos
Message 4 of 5
(6,428 Views)

Hi UKCraig,

 

You're right.  When I used disconnecting, it worked!  It will first disconnect the system and deploy it again.   If I'd like only to read some channel values out from the running workspace GUI, I don't need to use the connectToSystem methon in python script.

 

Thanks a lot!

 

0 Kudos
Message 5 of 5
(6,410 Views)