Article - CS379578

Addressing a Bit within a Word in Modbus Drivers for PTC Kepware Products

Modified: 18-Sep-2024   


Applies To

  • Kepware Server (formerly KEPServerEX) 5.20.396.0 to 6.16
  • ThingWorx Kepware Server (legacy) 8.0 to 6.16
  • Modbus ASCII
  • Modbus Ethernet
  • Modbus Plus
  • Modbus Serial
  • Modbus Unsolicited Serial

Description

  • How to address a Modbus bit in a word
  • How to read just one bit with Modbus driver
  • I am having trouble configuring kepware properly to allow me to read a modbus word as a 16 bit integer.
    • I am trying to communicate from a schneider zelio PLC using modbus over to our FactoryTalk View 13 application.
    • The word I need to use is 4020, I need to write the values from this word to a tag that can be split up into a bit integer. How I can achieve it ? 
  • We are working on a project that will have multiple Modbus TCP Channels defined.
    • We have them configured but since we don't currently have access to the equipment we have set each Device as Simulated.
    • We have several tags defined as Modbus registers as "short" which contain 16 individual bits (of course).
    • But we also wanted to be able to address individual bits within these words.
    • So we defined 16 tags that referred to the same register but using the bit notation for the tag address.
    • We are receiving the information for the entire word just fine but the tags defined as bits within that same word are always 0.
    • Is this not a supported configuration?
    • Or is this behavior due to having the device set to Simulated?
This is a printer-friendly version of Article 379578 and may be out of date. For the latest version click CS379578