IPY Crash..Please help..

A forum for general discussion of the Python programming language.

IPY Crash..Please help..

Postby alabview » Wed Oct 16, 2013 12:50 pm

Hi there,

I am new to Python scripting language. I hope you all can help me.

I am running a python script in IronPython 2.7 for a few times continuously with same variable and same DLL and it reported as CRASH after finished 3rd execution. There is no issue if I run once. But, it never happen on Python 2.7 and 3.3. Please help me...


I have attached the screenshot and Python code for your reference.

Code: Select all
# First execution
from ctypes import *
from sys import exit
CLOSEDLOOP="CLOSEDLOOP{SOURCE|VOLTAGE|CH2|0.5|0|10|1000}"
CLOSEDLOOPSTATUS=""
INPUT2=c_char_p(CLOSEDLOOP.encode())
OUTPUT2=c_char_p(CLOSEDLOOPSTATUS.encode())
Y2 = c_int(100)
Ypoint2 = pointer(Y2)
CallDLL2 = cdll.LoadLibrary("C:\INSTRDLL\RAMP.dll")
Output2 = CallDLL2.LINEARRAMP
Output2.argtype = [c_char_p,c_char_p,c_int]
Output2(INPUT2,OUTPUT2,Ypoint2)
CLOSEDLOOPERRSTATUS = OUTPUT2.value.decode("utf-8")
print(CLOSEDLOOPERRSTATUS)

#2nd execution
from ctypes import *
from sys import exit
CLOSEDLOOP="CLOSEDLOOP{SOURCE|VOLTAGE|CH2|0.5|0|10|1000}"
CLOSEDLOOPSTATUS=""
INPUT2=c_char_p(CLOSEDLOOP.encode())
OUTPUT2=c_char_p(CLOSEDLOOPSTATUS.encode())
Y2 = c_int(100)
Ypoint2 = pointer(Y2)
CallDLL2 = cdll.LoadLibrary("C:\INSTRDLL\RAMP.dll")
Output2 = CallDLL2.LINEARRAMP
Output2.argtype = [c_char_p,c_char_p,c_int]
Output2(INPUT2,OUTPUT2,Ypoint2)
CLOSEDLOOPERRSTATUS = OUTPUT2.value.decode("utf-8")
print(CLOSEDLOOPERRSTATUS)

#3rd execution
from ctypes import *
from sys import exit
CLOSEDLOOP="CLOSEDLOOP{SOURCE|VOLTAGE|CH2|0.5|0|10|1000}"
CLOSEDLOOPSTATUS=""
INPUT2=c_char_p(CLOSEDLOOP.encode())
OUTPUT2=c_char_p(CLOSEDLOOPSTATUS.encode())
Y2 = c_int(100)
Ypoint2 = pointer(Y2)
CallDLL2 = cdll.LoadLibrary("C:\INSTRDLL\RAMP.dll")
Output2 = CallDLL2.LINEARRAMP
Output2.argtype = [c_char_p,c_char_p,c_int]
Output2(INPUT2,OUTPUT2,Ypoint2)
CLOSEDLOOPERRSTATUS = OUTPUT2.value.decode("utf-8")
print(CLOSEDLOOPERRSTATUS)


Basically, I am sending a command "CLOSEDLOOP{SOURCE|VOLTAGE|CH2|0.5|0|10|1000}" to the DLL and DLL is controling a power supply via GPIB. The power supply starts to perform Linearity Ramp from 0V to 10V with step size 0.5 with settling time is 1000ms. Every execution it will reporting STATUS of the Power Supply from
Code: Select all
print(CLOSEDLOOPERRSTATUS)


Kindly refer to CRASH message as attached.
Attachments
ipyCrash.jpg
ipyCrash.jpg (51.34 KiB) Viewed 250 times
alabview
 
Posts: 22
Joined: Mon Sep 16, 2013 1:48 pm

Re: IPY Crash..Please help..

Postby hansn » Wed Oct 16, 2013 3:30 pm

Did you read the error report?
hansn
 
Posts: 87
Joined: Thu Feb 21, 2013 8:46 pm

Re: IPY Crash..Please help..

Postby alabview » Thu Oct 17, 2013 6:59 am

Hi hansn,

Yes, I did and not related issue as reported by National Instrument technical support.

What I suspect is,

Possible, I need to unload the DLL but I have no idea how to implement it so would you mind to help me?

Many Thanks.
Walter/
alabview
 
Posts: 22
Joined: Mon Sep 16, 2013 1:48 pm


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 2 guests