Author Topic: Modbus RTU  (Read 5777 times)

Dogface

  • Newbie
  • Posts: 33
  • Woof$
    • View Profile
Modbus RTU
« on: February 14, 2007, 04:39:28 AM »
This may be a rookie question.....
I have a Frequency Inverter that I'm trying to control using Modbus RTU.  The Control Functions of the drive use function 06.  I may be wrong, but it looks as if I can only use Writemodbus for functions 03/04?  Setsystem 6,6?

I'm lost without Writemodbus.

Thanks,
Dogface

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:Modbus RTU
« Reply #1 on: February 14, 2007, 07:28:53 AM »
WRITEMODBUS and WRITEMB2 uses function 16 only. They don't support function 06.  

You may be able to use TBASIC INCOMM & OUTCOMM and CRC16 functions to create your own custom MODBUS command that speaks 06 to your inverter. There is an example of how to do it for function 04. You can modify the code and make it speaks 06 instead of 04. While it is not "plug and play", going through it makes you understand MODBUS command/response better and can be quite educational. Please visit the following discussion thread to download the sample program.

http://www.tri-plc.com/yabbse/index.php?board=2;action=display;threadid=298

Email: support@triplc.com
Tel: 1-877-TRI-PLCS