Back

Topic

[KB63]Communicating with a TWIDO device via Modbus TCP/IP

Tags: Cimway, Modbus TCP/IP

14 years ago
By RM
Options
Print
Applies to:

PcVue all versions.


Summary:

This article gives some tips for communicating with a TWIDO programmable controller from Schneider Electric via the Modbus TCP/IP protocol.

The tips are as follows:

  • How to allow for an increase in the number of bits used in TWIDO.
  • How to deal with error code 2.
  • How to work around a bug in TwidoSoft.

Solution:

Allowing for added bits in TWIDO

If the bit frame declared in PcVue is configured to read bits outside of the used zone in the TWIDO device, it returns an error to PcVue (code 701).

Here are alternative solutions:

  • Create a frame equal to the number of bits used in the TWIDO (but that would mean modifying the frame if you wanted to add more bits.).
  • Set a bit beyond the used zone to 1 (e.g. if bits 0 to 23 are used, you could set bit 31 to 1) and configure a bit frame to read all the bits up to it (bits 0 to 31 in the example).

If the frame is developed further in Twido so as to use more bits, the Supervisors’s bit frame need not be redesigned since new data can be put in bits 24 to 31.

Dealing with error code 2

This arises when the Supervisor is communicating with a TWIDO device via Modbus TCP/IP. When a word or bit frame is read, the protocol returns an error code 2 (complementary code).

You can fix the problem by decreasing the frame size.

Bug in TwidoSoft

There appears to be a bug in the TWIDO programming tool, TwidoSoft from Schneider Electric.

To work around it:

  • In the menu Automate/TwidoSoft, in the line Internal storage word %MW, change the number of words to a value greater than that required.

Note

Do not enable the option Auto Configure, since that will limit the number of readable words to the number of words assigned).

The Available Memory display does not show the internal variables of type %M. This number appears to be equal to 16x the number of words of type %MW.

Reference Software

A Schneider tool (Modbus Client TCP/IP NOETS) enables you to substitute for PcVue and could serve as reference software to diagnose a problem of communication. However it may not be publicly available.


Created on: 15 Oct 2010 Last update: 13 May 2024