LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling a RT VI/application through Python

Hi....
I am working on a 'ECU test system design' project, which uses a LabVIEW RT (Desktop PC as RT). This RT is equipped with NI PCI-CAN/2, Analog, and digital interface boards. I have Programmed RT to perform some basic data acquisition operations and it works fine through development system (another PC). We wish to control this RT VI/ application through python. I'm new to python and when I searched for this in discussion forums, I got python code which controls VI on a normal PC (not on RT), if and only, if this VI is not inside any LV project. When I tried to control a VI, which is inside a LV project (not a LV RT project), there is no error in python editor but this python code is not controlling VI. And same thing happens with a VI inside a LV RT project. I tried to open LV project, before referring to VI, in python but this doesn't works (I am getting error in python editor). Controlling a RT application through python is very important to me, bcoz we have all test sequences written in python. I tried to work through ActiveX control but I came know that ActiveX control doesn't works with LV RT systems. Anybody knows about control of RT projects through python....pls help me.

Thanks in advance.

Ravinder
0 Kudos
Message 1 of 6
(3,420 Views)
Hi......
Finally, we got solution for this problem. It's not an exact solution what we thought of...! but an alternative communication from python to LV RT Target......

Thank you,

Ravinder
0 Kudos
Message 2 of 6
(3,395 Views)
Hi Ravinder,

I am interested to hear how you were able to control LVRT thru python. Did you just end up doing simple TCP communication?  I figure python can do that right? I would appreciate the follow up.
"If you want to succeed... Architect" - The Specialist
0 Kudos
Message 3 of 6
(3,370 Views)
Hi The Specialist.....

Sorry for the late reply.....I was busy with some other work .....Yahaa.....ur right .....I endup with TCP/IP communication.....Data flow is "Python" ---> "LabVIEW App." ---> "LV RT App.". I'am first transfering data to LabVIEW App. and then to LV RT via TCP/IP. If you have any idea to communicate directly Python to LV RT App. help me. My LV RT Target is a desktop PC. I have one doubt regarding CAN. Using CAN "Get Property" node we can read all the information of Cnannel or Message from a .DBC file..... As I see, there is no way to get the (sender/receiver) ECU names from .DBC file. Is there really any way to read ECU names....?? If yes...pls tell me. It will really help me a lot. Bcoz we want to select the messages/channels from .DBC file with "ECU name" filter.

Thank you,

Ravinder
0 Kudos
Message 4 of 6
(3,342 Views)
Hi Ravinder,

I am not sure about the CAN problem your talking about.  If you want to talk between Python and LVRT, then all you need to do is send the exact same TCP commands in LV as you would in Python.  I assume there is some way in Python to send TCP right?
"If you want to succeed... Architect" - The Specialist
0 Kudos
Message 5 of 6
(3,320 Views)
Hi The Specialist.....

I have no idea about TCP in Python....Now I'm working with "Python-->LabVIEW-->LV RT Target". After completing my work I'll try "TCP in Python" (after 3 or 4 months).

Thank you...

Ravinder
0 Kudos
Message 6 of 6
(3,301 Views)