mb2hal/tcp does it work?

More
18 Dec 2018 13:21 #122569 by thang
Did anyone test mb2hal connect to modbus device via tcp?
I want to config my pc as a slave.here is my config file for mb2hal

File Attachment:

File Name: mb2hal_tes...2-18.ini
File Size:1 KB


I just modified
TCP_IP=192.168.1.20 (i found this by ifconfig command)
TCP_PORT=9502

In linuxcnc iniconfig file, i insert a line : loadusr -W mb2hal config=mb2hal_test_04.ini

I cant connect to my device (master device is my phone that is using an app name "tcpmodbus") by mb2hal but classicladder is work ok.

There is a messenger in shell show ip:
mb2hal get_tx_connection ERR: mb_tx_num[1] mb_links[0] cannot connect to link, ret[-1] fd[-1]
I'm dont know what it means.
Attachments:
More
24 Dec 2018 13:07 #122823 by VNR
Replied by VNR on topic mb2hal/tcp does it work?
Hi, mb2hal works OK with TCP/IP.
That error means "cannot conect to device", seems to be a INI file configuration problem or network card miss configuration or device not responding.
If classicladder works, mb2hal should work, use the same parameters.
More
24 Dec 2018 14:16 #122826 by thang
Replied by thang on topic mb2hal/tcp does it work?
mhm, i think this config file is using pc as master, how to change ini config to use my pc as a slave,?
Time to create page: 0.067 seconds
Powered by Kunena Forum