11-09-2020 12:02 PM
Hi Everybody
I am creating a labview program to read some registers of a module via modbus tcp/ip.
the configuration of that module is:
ip:192.168.0.10
id:0
Port:502
I wrote program like below:
but i receive Error 56.
I really need your help in order to finish this program.Labview version is 2018.
Sincerely yours,
Ahmad
11-09-2020 12:52 PM
Error 56 is the error you get when there's no reply at all from your device. As in, it might be turned off or unplugged or just dead.
Check to see if you can ping your device from the command line. Make sure the device isn't off or locked up (turn it off and back on again, maybe). If you have 3rd party software that can communicate with the device, try that.
11-09-2020 09:33 PM
Thanks a lot my friend for your guide.
There is no dis-connectivity in the system or cables.
I have another software in my computer which is named modbuspoll.
When i run it with below specification it connects and receive data from module immediately.
So i am surprised what would be the problem.
I will be so happy to help me.
Regards
11-09-2020 10:52 PM
Please check read coil subvi. It seems coil start address is different caused. Subvi add 630000 as start address. Try to use holding regiester or other function vi to test.
11-10-2020 01:46 AM
Hi,
The Unit ID is set to '0' This is the slave address. Set to '0' indicates a Broadcast. No slave will answer to that.
Better set it to '1'
Kees
11-10-2020 01:31 PM
Hi my friend,
The ID of module is fixed at "0".
I can not change it.
by the way i can connect it by modbus poll software without any problem.
11-10-2020 01:55 PM
Hello
Thanks a lot my friend.I double clicked subvi but address is as an input for that which will be fed through my main vi program.
So i really dont know from where this 630000 is coming.
11-10-2020 02:17 PM
When i am trying to read register value of a module via Ethernet by labview,should i use modbus master or modbus slave in my program?
11-10-2020 02:37 PM
Exactly whenever i enable Highlight execution bulb i can see that the modbus master initializes and "no error" passes to the next stage.But error will be generated when modbus master reading coils activates.
but i don't know ehere is the problem.
Even i was in doubt about my eset internet security program but even by disabling that program nothing changed.
Please guide me how can i solve this problem.
best regards
11-11-2020 01:37 AM
Did you try it with unit ID set to '1' ??