ni.com is currently undergoing scheduled maintenance.

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

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pyhon script

Hello everyone,

I started to use labpython with labview. I am aiming to use a large piece or code in python but I wanted to start with a simple that refuse to work for me.

When I put in the script a very simple thing like

a=2

b=3

c=a+b

it works but when I put

def C2F():
    print ('enter in C');
    cel = 20;
    feh=cel+20;
    print cel,'celcius =', feh, 'fehrenheit';

it does  not work(even it works fine in python shell).!!!

Can anyone help me to understand where is the error.

Cheers,

 

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

Hello Again,

could anyone help me please.

Smiley Sad

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

@ziedhosni wrote:

Hello Again,

could anyone help me please.

Smiley Sad


Probably not unfortunately.  I love Python too and wish I could integrate it with LabVIEW but it looks like Rolf K. (the original developer) has moved on to other things and hasn't touched it for a long time.  You may get it to work with 32-bit python 2.5 but unless OpenG or JKI has taken over active development you may be out of luck.  You can try some of the suggestions here:

 

http://forums.ni.com/t5/LabVIEW/Trouble-with-LabPython-Setting-up-the-Python-Server/td-p/1444082

 

Especially the one where you run the server VI alone, with no other LabPython VIs even open.

 


Good Luck!

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 3 of 3
(2,721 Views)