Author Topic: force a single bit through Modbus  (Read 12469 times)

Christian Ziedins

  • Guest
force a single bit through Modbus
« on: October 29, 2003, 09:29:17 PM »
I'm currently testting the T100MD with the Matrikon OPC server for Modbus.
I can't find a way to force one single output bit without forcing the whole row (the 16 bits)
The manual (page 5-3) seems to suggest that modbus function code 05 (force single coil) is supported.
A possible workaround would be: read the whole row --> do an OR calculation --> send the result back......if no better solution I will stick to this one but I don't like the idea of overwriting the 16bits each time..
Any suggestions ?

Cheers,
    Christian
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re: force a single bit through Modbus
« Reply #1 on: October 30, 2003, 07:00:32 AM »
The M-series PLCs do support MODBUS function 05 which is to force set/clear a single output bit. However, your OPC server must support function 05 in order to do so. The bit address in this case can be found in the following link:

http://www.tri-plc.com/appnotes/modbus-map.pdf

This is an updated document of Chapter 5 of the user manual which now include the document on the Bit addressing. To turn ON output 1, execute a Function 05 at address 257.  
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS