Mitsubishi MELSEC
The Mitsubishi MELSEC connection reads and writes MELSEC PLC devices over MC Protocol: the binary 3E frame (also known as SLMP). Q and L series, iQ-R and iQ-F (FX5) in Q compatibility mode are supported.
Preparing the PLC
Section titled “Preparing the PLC”In GX Works2 or GX Works3, open the settings of the built-in Ethernet port or the Ethernet module and add an open connection for an external device:
| Setting | Value |
|---|---|
| Protocol | TCP |
| Open system | MC Protocol (SLMP on iQ-F) |
| Code | Binary |
| PLC port | For example 5000, and set the same port in Scadora |
To let Scadora write to a running PLC, allow writing in RUN mode: on the built-in Ethernet port this is Enable online change (or a similar “allow write in RUN” option). Download the parameters to the PLC and restart it.
Connection settings
Section titled “Connection settings”| Setting | Default | Meaning |
|---|---|---|
| IP address | — | Address of the CPU or Ethernet module |
| Port | 5000 | Port of the MC Protocol open connection |
| Network number | 0 | Station network number; 0 — own network |
| Station number (PC No) | 255 | 255 — own station (the CPU you connect to) |
| Timeout, ms | 3000 | Wait for a reply |
| Octal X/Y | off | Turn on for iQ-F (FX5), where X and Y are numbered in octal |
| Max. block, words | 480 | Limit of one request. The protocol allows up to 960 words |
| Max. gap, words | 16 | How many extra words may be read to merge requests |
Addresses
Section titled “Addresses”
| Device | What it is | Numbering | Tag type |
|---|---|---|---|
X, Y |
Inputs and outputs | hexadecimal (iQ-F: octal) | Bool |
M, L, F, V |
Internal relays, latch relays, annunciators, edge relays | decimal | Bool |
B |
Link relays | hexadecimal | Bool |
SM, SB |
Special relays, special link relays | decimal, SB hexadecimal |
Bool |
TS, CS |
Timer and counter contacts | decimal | Bool |
D |
Data registers | decimal | numbers |
W |
Link registers | hexadecimal | numbers |
R, ZR |
File registers | decimal | numbers |
SD, SW |
Special registers | decimal, SW hexadecimal |
numbers |
TN, CN |
Timer and counter current values | decimal | numbers |
Examples: X1F, Y10, M100, SM400, D100, W1A, ZR2000.
Value size. A word is 16 bits. Int16 and UInt16 take one word, Int32, UInt32 and Float32 take two (D200 and D201), 64-bit types take four. The next tag after a Float32 at D100 is D102.
Word bit. D100.F is bit 15 of register D100, bit number 0–F. For Bool tags and reading only.
Strings. After a word device address, put the length in characters after a colon: D100:20 is 20 characters in D100 to D109, two characters per word, the first one in the low byte, as in GX Works. If the first character is in the high byte, add H: D100:20H. The string ends at the first zero byte; on writing it is padded with zeros.
Reading and writing
Section titled “Reading and writing”All devices are read as words: bit devices in groups of 16 points, and tags that lie close together are merged into one request. A write is a separate request: a bit goes to a bit device, a number is written as words.
Testing and troubleshooting
Section titled “Testing and troubleshooting”| Symptom | Cause and what to do |
|---|---|
| “No connection”, timeout | Wrong IP or port, the open connection is not configured, or the parameters were not downloaded |
| The connection closes at once | The open connection is not MC Protocol (SLMP), or uses ASCII code instead of binary |
| Reads work, writes are rejected | Writing in RUN mode is not allowed |
| Tag Bad | The device number is outside the range set in the PLC parameters (for example, too few ZR or D) |
| Wrong inputs and outputs on iQ-F | Turn on Octal X/Y |
Wrong Int32 or Float32 numbers |
The tag starts at the wrong word: check the first word address |
Limitations
Section titled “Limitations”- Binary 3E frame only. 1E (older FX and A), 4E frames and ASCII code are not supported.
- Writing a word bit (
D100.5) is not supported: use bit devices (M,B) or write the whole word.