kpaladiya Posted June 11, 2021 Report Posted June 11, 2021 I would like to build a model using image data and NI-cRIO-9063 and NI 9264 for voltage control. for image, I made a script in python using OpenCV libraries that detecting some points . For voltage control, I use cRIO-9063 with NI 9264 voltage controller. My question is, I am new in LabVIEW and I don't have any idea how can I make a loop for voltage control in python. Is there any library available in python that directly connect cRIO and NI 9264 devices? if not then how can I combine my image data(which is in python) with cRIO device? I need argent help. Quote
Stagg54 Posted June 22, 2021 Report Posted June 22, 2021 Lookup the LabVIEW Python Node for calling Python from LabVIEW. That may not meet your needs on a CRIO. Under the linux-rt the VI runs in a chroot jail and so you have to do some tricks like using SSH to call python. Google and the NI forums should have some information on that. Another option is to pass data via TCP/IP. Also there is a DAQmx driver for Python, if you want to do everything in Python. The latest CRIOs (at least some of them) support DAQmx within LabVIEW. Not sure if that support extends to Python. Hope that helps. Quote
JKSH Posted June 23, 2021 Report Posted June 23, 2021 6 hours ago, Stagg54 said: Lookup the LabVIEW Python Node for calling Python from LabVIEW. That may not meet your needs on a CRIO. Correct, the LabVIEW Python Node currently supports desktop only, not cRIOs. Here is an Idea Exchange post calling for support to be extended to cRIOs: https://forums.ni.com/t5/LabVIEW-Real-Time-Idea-Exchange/Python-Node-support-on-LabVIEW-Realtime-systems/idi-p/3904897?profile.language=en 6 hours ago, Stagg54 said: Under the linux-rt the VI runs in a chroot jail and so you have to do some tricks like using SSH to call python. No, that's wrong. In NI Linux RT, VIs can access the entire system (as long as the lvuser account is given the required permissions). It's the LINX Toolkit (for BeagleBone and Raspberry Pi) that puts LabVIEW in a chroot jail. So, although the Python Node isn't available on cRIOs, you can share data between a LabVIEW application and a Python application via inter-process communication (IPC). Quote
Rolf Kalbermatter Posted June 23, 2021 Report Posted June 23, 2021 8 hours ago, JKSH said: No, that's wrong. In NI Linux RT, VIs can access the entire system (as long as the lvuser account is given the required permissions). It's the LINX Toolkit (for BeagleBone and Raspberry Pi) that puts LabVIEW in a chroot jail. So, although the Python Node isn't available on cRIOs, you can share data between a LabVIEW application and a Python application via inter-process communication (IPC). Correct about the LabVIEW chroot only being an issue on the Linx Targets. But several IPCs will actually work even across chroot jail borders such as good ol TCP/IP (usually my IPC of choice as it works on the same machine, across VMs, on different machines on the same subnet and with some proper setup even across the world). Even shared memory could be made to work across chroot border, but it's complicated, sensitive for correct configuration, and shared memory is difficult to interface to in any case. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.