[英]How to communicate Java and Labview through TCP/IP, and send data buffers of float point?
I am working on a university project, where I require communicating Java with Labview, bidirectional, and send and receive data in floating point, in data buffers, because the application in Labview generates data at high speed, but I temporarily store and send when the array has a size of 100. 我正在从事一个大学项目,在该项目中,我需要与Labview双向进行Java通信,并在数据缓冲区中以浮点形式发送和接收数据,因为Labview中的应用程序会高速生成数据,但是当数组的大小为100。
One of my difucultades is to convert data sent from Labview to Java format and viceversa. 我的难题之一是将Labview发送的数据转换为Java格式,反之亦然。
Thanks!! 谢谢!!
As far as I can see, you have two options: 据我所知,您有两个选择:
TCP Read
VI TCP Read
VI上的文档 You can also mix both approaches: extract the bytes from the float, treat each byte as a character and assemble them as a string, which you put into your text based protocol. 您还可以混合使用两种方法:从浮点数中提取字节,将每个字节视为一个字符,然后将它们组装为字符串,然后将其放入基于文本的协议中。
考虑使用Labview标准的tcp-ip lib或websocket。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.