Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

CR850 Modbus TCP Master


Asulv Sep 25, 2012 05:29 PM

Hello!
Does the the CR850 Datalogger suport a Modbus Master TCPIP connection to a Modbus Slave using the NL200 ethernet interface?

I've looked in the help file and in the ModbusSlave instruction there is an option using Comport 502 for Modbus TCP/IP communication, but this is no option in the modbus Master instruction.


jtrauntvein Sep 25, 2012 05:46 PM

The ModBusMaster() instruction has an instruction that specifies the port to use. This parameter can be specified as one of the fixed ports such as ComRS232 but it can also be the value returned by TCPOpen instruction. This not is in the CRBasic help for the ComPort parameter.

By the way, in order for this to work with the NL200, the NL200 will need to be configured in "Bridge Mode".


Sam Sep 26, 2012 01:24 AM

One example:
Public Handle As Long
Public MBVar(10) As Long
Public Result
BeginProg
Scan (30,Sec,0,0)
Handle = TCPOpen("192.168.100.100",502,300,20)
ModBusMaster (Result,Handle,-9600,1,3,MBVar,1,10,3,200,0)
NextScan
EndProg

Log in or register to post/reply in the forum.