Failure to acknowledge TCP message
-
Similar Content
-
By David Akinpelu
I am implementing a TCP connection between MyRio(client) and Python(server). The goal is to send data from the server to the client, perform some calculations, and send the result to the server. I need to keep changing the data being sent to the client. I noticed the first data works fine and the result returned to the server, but the client could not read subsequent data. I debugged and was able to detect that the error is coming from the first read function is the "Reading values subvi" but I don't know how to correct it. How do I go about it?
I have attached the files below.
Reading Unknown Bytes from TCP.vi Second_client.vi SimpleServer.py
-
By Porter
View File Plasmionique Modbus Master
This package contains the Plasmionique Modbus Master library for LabVIEW.
It supports RTU, ASCII and TCP modes with the following function codes:
0x01 - Read Coils
0x02 - Read Discrete Inputs
0x03 - Read Holding Registers
0x04 - Read Input Registers
0x05 - Write Single Coil
0x06 - Write Single Register
0x07 - Read Exception Status
0x0F - Write Multiple Coils
0x10 - Write Multiple Registers
0x16 - Mask Write Register
0x17 - Read/Write Multiple Registers
0x2B/0x0E - Read Device Identification
Other features include:
- Sharing a COM port across multiple Modbus sessions using VISA locks (10 second timeout).
- Sharing a Modbus session across multiple communication loops.
- TCP transaction ID handling to ensure that requests and responses are matched up correctly in case responses are received out of order.
- Modbus Comm Tester, available through the "Tools->Plasmionique" menu, for testing communication with a slave device without writing any code.
- Detailed help document available through the "Help->Plasmionique" menu.
Examples are included in "<LabVIEW>\examples\Plasmionique\MB Master\":
MB_Master Comm Tester.vi: Demonstrates usage of API to open/close connection and communicate with a Modbus slave device. MB_Master Multiple Sessions.vi: Demonstrates usage of API to open concurrent Modbus sessions. MB_Master Simple Serial.vi: Demonstrates polling of a single input register over serial line. Download a copy of the user guide here: MB_Master - User Guide.pdf
Note that Version 1.3.4 of this library has been certified compatible with LabVIEW and has been released on the LabVIEW Tools Network: http://sine.ni.com/nips/cds/view/p/lang/en/nid/214230
The most recent version of this library will always be released on LAVA first before going through NI's certification process.
***This project is now available on GitHub: https://github.com/rfporter/Modbus-Master
Submitter Porter Submitted 04/01/2016 Category LabVIEW Tools Network Certified LabVIEW Version 2012 License Type BSD (Most common)
-
By Porter
This package contains the Plasmionique Modbus Master library for LabVIEW.
It supports RTU, ASCII and TCP modes with the following function codes:
0x01 - Read Coils
0x02 - Read Discrete Inputs
0x03 - Read Holding Registers
0x04 - Read Input Registers
0x05 - Write Single Coil
0x06 - Write Single Register
0x07 - Read Exception Status
0x0F - Write Multiple Coils
0x10 - Write Multiple Registers
0x16 - Mask Write Register
0x17 - Read/Write Multiple Registers
0x2B/0x0E - Read Device Identification
Other features include:
- Sharing a COM port across multiple Modbus sessions using VISA locks (10 second timeout).
- Sharing a Modbus session across multiple communication loops.
- TCP transaction ID handling to ensure that requests and responses are matched up correctly in case responses are received out of order.
- Modbus Comm Tester, available through the "Tools->Plasmionique" menu, for testing communication with a slave device without writing any code.
- Detailed help document available through the "Help->Plasmionique" menu.
Examples are included in "<LabVIEW>\examples\Plasmionique\MB Master\":
MB_Master Comm Tester.vi: Demonstrates usage of API to open/close connection and communicate with a Modbus slave device. MB_Master Multiple Sessions.vi: Demonstrates usage of API to open concurrent Modbus sessions. MB_Master Simple Serial.vi: Demonstrates polling of a single input register over serial line. Download a copy of the user guide here: MB_Master - User Guide.pdf
Note that Version 1.3.4 of this library has been certified compatible with LabVIEW and has been released on the LabVIEW Tools Network: http://sine.ni.com/nips/cds/view/p/lang/en/nid/214230
The most recent version of this library will always be released on LAVA first before going through NI's certification process.
***This project is now available on GitHub: https://github.com/rfporter/Modbus-Master
-
By Diegodemf
Hello, I'm trying to send data from my RPI b+ to labview and store the information in a spreadsheet, right now the data I'm using is just a sawtooth generated in the python code but eventually it will be sensor data adquired via spi, the data comes at =~ 6-7khz but the time it takes to send the data to labview is much greater, I fear the circular buffer I intended to use to store the data before sending it via tcp will get filled pretty fast. I'm not very experienced in either python nor Labview, I was wondering if i could get some advice in the optimization of the code.
I attached the VI of the client and a VI that graphs the data on the spreadsheet, also the python code.
Thanks in advance, sorry for the mess.
Waveform Grapher.vi
Client.vi
serverSerial.py
-
By Porter
NI Labs Modbus API is now on GitHub!
Password protection of VIs has been removed.
https://github.com/NISystemsEngineering/LabVIEW-Modbus-API
-
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.