How to write Modbus/TCP discrete registers from Wonderware InTouch

ryangriggs

Lifetime Supporting Member
Join Date
Jun 2016
Location
USA
Posts
198
Hello, I am attempting to add some IO Discrete tags to a AVEVA InTouch project (version 2020). These tags use the MBTCP driver and attempt to map bits in integer registers, using the : address notation (example: 401234:3 - references bit 3 of modbus address 401234).


This works fine for reading, but when InTouch attempts to write to these locations, it executes a Modbus Function #22 (MaskWriteRegister) which is not supported by the PLC (DirectLogic DL6).


In speaking with the AVEVA support staff, they recommended referencing the individual bits of an IO Integer tag instead, which would bypass the use of Function #22 and write the tag using the standard function #06 (Write Single Register) which is supported.


However, this precludes the ability to create Discrete IO tags and add alarming etc, since the individual bits are referenced within the Animation Links like this: IntegerTag1.00 (references bit #0 of IntegerTag1).


Any ideas how to directly get InTouch to write to individual bits of Modbus registers, allowing me to create discrete read/write tags tied to individual bits of Modbus addresses, instead of creating integer tags and referencing the bits in the Animation Links?


We previously used KepWare to interface between the PLC and InTouch, but I was hoping to eliminate third-party software let the AVEVA OI server take care of everything.


Short of replacing the PLC with one that supports Function #22, is there any other way to map Modbus integer registers to Read/Write Discrete Tags in InTouch?



Thanks and best regards to all.
 
Last edited:
Are you able to modify the PLC program to use 0x registers (coils) for the bit values to be written, instead of using ints? That's Function code 5.

Then you can use discrete tags.

People mainly used the packed bit in an integer tag method to save on Intouch tag numbers so you could do more with a lower license count. But, it has its limitations as you're seeing.
 

Similar Topics

Dear all, glad to be here and I hope that we all can benefit from this great community. I am trying to send and receive data between two Mico850...
Replies
4
Views
2,760
Hello! I am using S7-1200 PLC 1212C AC/DC with configured Modbus TCP Server. I can already read/write Inputs/Outputs (Coils) and Memory Words...
Replies
7
Views
3,015
Which functions are used for reading/writing data on the modbus tcp ip in Premium PLC With IP Address (ETY110ws)?
Replies
0
Views
2,068
Hi everyone, I am working on a project that needs to expose the SV (Set Value) of a temperature controller to a SCADA system. SCADA <-...
Replies
4
Views
162
Back
Top Bottom