MelsecQnA - Hints and Tips
- Last UpdatedJul 23, 2025
- 2 minute read
-
To initialize the ports, the Melsec-QnA driver will open an Ethernet channel on an AJ71QE71 interface module by using the IP addresses you specify on the Ports Form. You may specify up to 8 TCP/IP ports for one AJ71QE71; this limit is set by the amount of fixed buffers on the Ethernet interface module. Throughput of this driver may be improved by specifying different ports for different remote I/O modules (ie. spread the traffic across several TCP/IP connections, as the driver only supports on pending message per TCP/IP connection).This limit of one pending message per TCP/IP connection finds its roots in the simple request/response protocol used to communicate with PLCs.
-
To initialize the I/O Device, Plant SCADA will call CTDRV_INIT_UNIT with information from the driver database. This is also the appropriate place to set the data exchange mode (Binary Mode, ASCII Mode) for the IO Device.
-
Concerning data exchange, the driver will support both Binary Mode (SW2 on front panel of AJ71QE71 OFF) and ASCII Mode (SW2 on front panel of AJ71QE71 ON).
Normally SW1 and SW8 will be OFF, while SW3 and SW& will be ON. SW4 - 6 are not used.
SW1 - OFF
SW2 - OFF (ON)
SW3 - OFF
SW7 - ON
SW8 - OFF
Mode = 0SW1 is TCP Timeout control
SW2 is Communications Type.
Mitsubishi Programming Software MMPlus needs this to be set to ASCII Mode (ON).
Plant SCADA normally uses Binary Mode (OFF), but a parameter allows the selection of ASCII Mode (ON).
SW3 is Self-start enabling/disabling of PLC. OFF = Self-start disabled, ON = Self-start enabled.
SW7 is write protecting the PLC. OFF - Writing prohibited, ON = writing approved.
SW8 is Initial timing setting of PLC. OFF = Quick start, ON = Normal start (start after a delay of 20 seconds). -
If the MELSECQ driver writes a string value to a PLC, it will use a null terminated ASCII value. If a third party driver or application does not correctly read the null character, buffered values may appear as additional junk characters. If this occurs, you may need to use Cicode to pad the values being written to a string tag.
For an example of how to do this, search the Knowledge Base page of the AVEVA™ Knowledge & Support Center (located at https://softwaresupport.aveva.com/) for article 000029195 MELSECQ driver writes 'junk' characters at the end of string tags.