Use PIC18F252 as Modbus


Recommended Posts


For the past two days, I tried to control the input and output of this hardware (PIC18F252) by using DAQ..

The hardware I already programmed with a slave id = 3 and the addresses for input and output as below:

1 - Input addresses (40001 - 40008)

2 - Output addresses (40009 - 40014)

Is it possible daq able to control the hardware as Modbus (Master Mode) .. yesterday I have tried to force output through the hardware..but timed out...hope you can give me some comments


Link to comment
Share on other sites

DAQFactory can work both as the modbus master and slave, though master is more typically. To start, try using QuickMod and see if you can get any communication. If you can't please post a screen shot, or text copy of the serial monitor so I can see the traffic.

Link to comment
Share on other sites

In QuickMod, I used Modbus RTU Serial and insert an ID = 3 because the PIC I programmed as a slave with an id = 3..i used comm port 2 with baud = 9600, byte = 8, parity = none, stopbit = 1bit and flowcontrol = none..i used function = input status with tag# = 40001 and pts = 8..

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.