02-12-2021 06:20 AM
Hello,
I have the following question: I am acquiring data with a DAQ (NI USB) through LabVIEW. Then I want to pass/read those acquired data in real-time in Python or Matlab. So as the data is acquired in real-time, I want to pass/read those data in Python or Matlab. Would that be possible? Is there a specific way to save those data and update them in real-time and read them in Python or Matlab?
Thank you!
Solved! Go to Solution.
02-12-2021 06:55 AM
Hi Alexis,
@Alexis_Koul wrote:
I want to pass/read those acquired data in real-time in Python or Matlab. So as the data is acquired in real-time, I want to pass/read those data in Python or Matlab. Would that be possible?
Yes. Use network communication between your tools…
(Be aware the meaning of "realtime", which probably has a different meaning to what you want to express in your message.)
02-12-2021 07:06 AM
Hello GerdW,
As always thank you for your reply. Would it be better to use Python or Matlab regarding the network communication? Also regarding Python, the Python toolkit by Enthough is it different from OpenG?
Regarding Matlab, I have read the data exchange with TCP/IP. Do I need to install any specific package in Labview for Matlab?
Thanks again!
02-12-2021 07:12 AM - edited 02-12-2021 07:16 AM
Hi Alexis,
@Alexis_Koul wrote:
Would it be better to use Python or Matlab regarding the network communication?
I don't think it matters, both can do TCP or UDP…
@Alexis_Koul wrote:
Also regarding Python, the Python toolkit by Enthough is it different from OpenG?
Never used any of them.
LabVIEW comes with its own Python node, so why do you want to install anything else at all?
@Alexis_Koul wrote:
Regarding Matlab, I have read the data exchange with TCP/IP. Do I need to install any specific package in Labview for Matlab?
You don't need any special package for network communication in LabVIEW, it already brings TCP/UDP functions.
(You might use the Matlab script node in LabVIEW when you have licenses for both IDEs to allow its usage.)
02-12-2021 08:09 AM
Dear GerdW,
Thank you so much for your answers. Very helpful! Last question: So I create communication between Labview and Matlab, but also Matlab needs to recognize the TCP/IP communication protocol with labview, so I would need to download this or something similar?
Or could you please some information what I need to do from Matlab point of view?
Thanks again GerdW! Really appreciated!!
02-12-2021 11:09 AM
What exactly are you trying to do in Python/MatLab? Why are you passing the data? Can whatever you are trying to do be done in LabVIEW itself? I am getting th eimpression that you don't have any existing code in either Python or MatLab. If that is case, why not do everything in LabVIEW itself.
In terms of communication, the link you posted is a simple example of passing data via TCP. I haven't looked at it closely but it is probably a very basic protocol. To pass data between components each component needs to know the protocol.