• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 

nrModbus TCP - HOW TO USE

Started by carsten, January 21, 2019, 06:25:53 am

Previous topic - Next topic

carsten

How do I use the TCP feature of nrModbus. I have tried to use it, but no data are moved to nrModbus from nrSocket.... I have used wireshark and my Modbus device are answering the Modbus request, the nrModbus1ModbusReply is fired, but no data in Registers variable.
Hope you are able to help me.

Best regards
Carsten

Roman Novgorodov

Hello

Did you try ModbusDemo.dpr?
Does it work correctly with your device?

Please post here log file from ModbusDemo.

Roman Novgorodov
DeepSoftware llc
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

carsten

I have tried ModbusDemo.dpr and all works!!

My bad...

Thank you for the fast answer ;-)

Best regards
Carsten

sxbug

Hi:
I just use ModBus DEMO to connect my plc and tested it again , found that there is something wrong with the DEMO you provided. I read PLC X0-X7 ,total 8 inputs, and I can read X6 =True (address = 6 )by poll mode. But I can NOT read it in 'read 'mode, all coils= false. Other parameters remain unchanged.

other test:

first input =0   count of inputs=7       X6=true
first input =1   count of inputs=6      X6=true
first input =2   count of inputs=5       X6=true
first input =3   count of inputs=4       X6=true
first input =4   count of inputs=3       X6=False
first input =5   count of inputs=2       X6=False

Why?

Can not find nrcommlib.log, NOT Creat ?

Thanks

sxbug

I am Sorry for I sent the wrong message, mainly because the NEXT Button in the lower right corner I thought it was the next page, not the next one post.