07-03-2024 01:14 AM
For this device with python I just request to read the register 0 and then I get back whatever is there. With labview I only get error. It connects but does not write neither read. I might be missing something very basic. By the way, I have been using Labview for 5 days till now, so I am sure the solution will come 😉.
On the windows firewall I allowed everything regarding labview, etc.
07-03-2024 04:17 AM
I have found a quick/temporary solution for my problem. Now just need some implementation. Since the Python code was working well, I just call the script inside Labview and get my numbers.
Still bothered by Labview Modbus library not working but for the moment it's fine.
07-03-2024 09:33 AM
Hi,
Like Stockhouse said the ModBus address issue can be really a problem.
Does your device starts at address 0 or 1
In the VI you used a loop. A read every 200msec. Can you device handle this ?
And you should use the 'ModBus master out' (right top output) of the read VI
Kees
07-03-2024 12:29 PM
Hi Kess,
With the python code, I just read the registers (e.g 60, 61) and I get the value I need in hexadecimal.
In Labview I have tried different numbers for the quantity and initial address, but it did not work. I will try different configurations to see how it works. I am quite new to Labview (Started last Friday 😊) so I suppose I still have to figure out plenty of stuffs. Thankfully the community here is quite active and supportive.
Regarding the scan time of my device, I am not sure if it can handle the 200 ms. I will try longer time and post here the results.
Best,
Henrique
07-03-2024 12:47 PM
Post your Python code as well, perhaps that will help us help you debug.
07-04-2024 01:26 AM
Sure. Here is the python code for connecting to a modbus device.
"
07-04-2024 02:14 AM
I finally managed to connect to two other different devices with Labview !!! 😍
Still do not understand why two devices work with Labview (and python) and the other only with Python.