Overview
The Omron CJ1M PLC combined with the CJ1W-ETN21 (or legacy CJ1W-ETN11) Ethernet Communication Unit exposes a built-in FTP server that maps directly to the CompactFlash (CF) memory card installed in the CPU module. This architecture lets engineers implement CSV data logging without SCADA software, custom VB/.NET host programs, or OPC bridging — operators can simply drag files off the card using Internet Explorer, Windows Explorer, FileZilla, or any RFC 959 FTP client. The CJ1 Series platform supports this backplane-free topology across all CJ1M CPU variants, including the CJ1MCPU11 used in this reference design.
Per the official CJ1 Series product category page on the Omron Industrial Automation site, the CJ1M line scales from compact machine control up to process-control applications with Special I/O Modules for position and motion control (1, 2, 4, 16, or 30 axes), high-speed counters, and analog I/O. The same Special I/O slot that holds those motion cards also accepts the ETN21 communications unit, so FTP file transfer and motion control can coexist on a single CJ1 backplane without an additional CPU rack.
Prerequisites
- CPU: CJ1M-CPU11 (or CJ1M-CPU12/13, CJ1M-CPU21/22/23, CJ1H-CPUxxH, CJ1G-CPUxxH via the same ETN21 unit)
- Ethernet Unit: CJ1W-ETN21 (recommended) or CJ1W-ETN11 (legacy, 10Base-T only)
- Memory: Omron HMC-EF172 CompactFlash card (16 MB, FAT16) installed in the CPU's CF slot
- Analog I/O: CJ1W-AD041 / CJ1W-AD081 / CJ1W-DA041 or third-party analog mix-in
- Programming: CX-Programmer 9.x or later (CX-One v4.x or Sysmac Studio for CJ2M migrations)
- Network: Managed or unmanaged 10/100 Ethernet switch, Cat5e patch cables, dedicated PC or operator workstation
- FTP Client: Internet Explorer 11 (legacy compatibility), Windows Explorer, FileZilla, curl, or WinSCP
/MEMCARD FTP root, but FTP session counts and throughput differ (see specifications below).Hardware Architecture
The CPU holds the CF card and runs the ladder program. Analog values land in D-words (e.g., D2000–D2007 for an 8-channel AD081). The ETN21 unit is allocated as a Communications Unit in the I/O table and presents the CF card to the LAN as an FTP root at /MEMCARD.
Step 1 — Configure the ETN21 IP Address
- Open CX-Programmer and connect online to the CJ1M rack.
- Double-click the ETN21 entry in the I/O Table.
- Set the IP address (e.g.,
192.168.0.81) and subnet mask (255.255.255.0). - Click Transfer [PC to Unit] and cycle power if prompted.
- Set the front-panel rotary UNIT No. switches to match the last octet of the IP address. For
192.168.0.81, set both rotary switches to8(tens) and1(ones) — i.e., unit number 81 in decimal.
Step 2 — Enable the FTP Server
Inside the same ETN21 Unit Setup dialog in CX-Programmer:
| Parameter | Recommended Value | Notes |
|---|---|---|
| FTP Server | Enable | Required for /MEMCARD mapping |
| FTP Port | 21 (default) | Do not change unless firewall policy requires it |
| FTP User Name | e.g., operator
|
Max 12 alphanumeric |
| FTP Password | 8–16 chars | Stored in unit, not in CPU |
| Anonymous Login | Disable | Disable for cell-area security |
| Max Sessions | 16 (ETN21 rev 2+) | 4 on ETN11 legacy |
Transfer the parameters to the unit and cycle power to commit. Refer to the CJ1 Programmable Controllers catalog (PDF) for the Special I/O Module slot rules that determine which rack positions can host the ETN21.
Step 3 — Format and Install the CompactFlash Card
- Use only Omron HMC-EFxxx cards; third-party CF media can cause FWRITE errors.
- Format the card on a PC as FAT16 (not FAT32, not exFAT). The CJ1M CPU boot ROM only recognizes FAT16 volumes.
- Insert the card into the slot on the front of the CPU until it clicks.
- In ladder, confirm
A343.10(CF Card Recognized Flag) is ON before any FWRITE/FWRIT block executes. - Optionally create a
LOGS\directory at the root using the FTPMKDcommand once online.
Step 4 — Ladder Logic for CSV Logging
A minimal data-logging block writes a comma-separated line to a rolling file every N seconds. Use the FWRITE instruction (CJ1M built-in) to append a single record per scan interval.
/* Trigger: 1.0 second clock pulse (P_1s) */
/* Source : D2000..D2007 (8 AI values, 0–4000 BCD) */
/* File : \MEMCARD\LOGS\LOG00001.CSV */
LD P_1s
MOV D2000 -> D3000 /* copy AI[0] to work area */
... (repeat for D2001..D2007)
/* Build ASCII record in DM3000..DM3100 (160 bytes) */
FWRIT #0 /* append mode */
D3000 /* source DM */
D100 /* record length in bytes */
\MEMCARD\LOGS\LOG00001.CSV
D200 /* result code word */
The FWRIT instruction writes a buffer to the file, appending by default. The result word should be monitored for non-zero values (see fault table below). A complete engineering reference for the FWRITE/FWRIT family is in the CX-Programmer Instruction Reference; consult the CJ1M Operation Manual (W473) for the exact operand layout.
Step 5 — Access the Files from a PC
Once the ladder is running and the CF card has at least one log file, open Internet Explorer (or any FTP-aware tool) and enter:
ftp://operator:[email protected]/MEMCARD
The browser renders the CF root as a familiar folder view. Operators can drag LOG00001.CSV to the desktop, double-click to open in Excel, and chart the data without installing any software. For a one-click path to a dedicated directory:
ftp://operator:[email protected]/MEMCARD/LOGS/
explorer.exe ftp://operator:[email protected]/MEMCARD/LOGS/). Operators then have a single-click path to the live logging directory. Microsoft has since deprecated the IE FTP client, so for new deployments consider FileZilla, WinSCP, or a one-line PowerShell script.Step 6 — Scripted / Scheduled Retrieval (Optional)
For unattended polling, use PowerShell or curl against the same FTP root:
# PowerShell one-liner: pull the latest CSV every 5 minutes
while ($true) {
$src = "ftp://operator:[email protected]/MEMCARD/LOGS/LOG00001.CSV"
$dst = "C:\Logs\LOG00001_$(Get-Date -Format yyyyMMdd_HHmmss).CSV"
$wc = New-Object System.Net.WebClient
$wc.Credentials = New-Object System.Net.NetworkCredential("operator","password")
$wc.DownloadFile($src, $dst)
Start-Sleep -Seconds 300
}
# curl equivalent (Linux/Windows)
curl -u operator:password \
-o LOG00001.CSV \
ftp://192.168.0.81/MEMCARD/LOGS/LOG00001.CSV
Specifications — ETN21 vs ETN11
| Feature | CJ1W-ETN21 | CJ1W-ETN11 |
|---|---|---|
| Ethernet Speed | 10/100 Mbps auto-negotiate | 10 Mbps fixed |
| FTP Server | Yes (RFC 959 subset) | Yes (RFC 959 subset) |
| Max FTP Sessions | 16 (unit rev 2.0+) | 4 |
| FTP Root | /MEMCARD | /MEMCARD |
| CF Card Format | FAT16 | FAT16 |
| Web Server (HTTP) | Optional (rev 2.0+) | No |
| FINS/UDP Routing | Yes | Yes |
| Mail (SMTP) Client | Yes (rev 2.0+) | No |
File Operation Reference
| FTP Command | Action | Typical Use |
|---|---|---|
| LIST | List directory entries | Verify log files present |
| RETR <file> | Download a file | Pull LOG00001.CSV to operator PC |
| STOR <file> | Upload a file | Push recipe files to /MEMCARD/RECIPES/ |
| DELE <file> | Delete a file | Archive rollover cleanup |
| MKD <dir> | Create directory | Pre-create /LOGS, /RECIPES |
| RMD <dir> | Remove directory | Maintenance scripts |
| RNFR / RNTO | Rename file | Sequence-based log rollover |
Fault Code Matrix
| Symptom on ETN21 / ETN11 | Likely Cause | Corrective Action |
|---|---|---|
| ERH LED continuously lit | UNIT No. rotary switch ≠ last octet of IP | Re-set switches, power-cycle |
| ERR LED + FWRITE error 0001 hex | CF card not inserted or not recognized | Re-seat card; check A343.10; reformat FAT16 |
| FWRITE error 0002 hex | Write-protect tab engaged | Disable write-protect on CF card |
| FWRITE error 0003 hex | Insufficient free space | Archive and DELE old logs; use larger HMC-EF card |
| FWRITE error 0004 hex | Invalid filename (FAT16 8.3 rule) | Rename per 8.3 format: LOG00001.CSV |
| FTP 530 Login incorrect | Wrong user/password in unit setup | Re-transfer user table from CX-Programmer |
| FTP Connection refused (port 21) | FTP server disabled or firewall block | Enable FTP in unit setup; allow TCP 21 |
| Empty LIST after login | CF card formatted FAT32 or exFAT | Backup, reformat FAT16, restore files |
| Intermittent timeouts > 100 files | Directory entry limit on FAT16 | Use subdirectories; rotate logs daily |
Verification
- From the operator PC, open a Command Prompt and run
ping 192.168.0.81. Expect < 1 ms reply on the cell network. - Open Internet Explorer and enter the FTP URL. Confirm the
LOGSdirectory appears. - Trigger one cycle of FWRITE from the CX-Programmer (set a forcing bit). Refresh the FTP view — the new file should appear within one scan.
- Download the file and open in Excel. Validate the first column against a known reference (e.g., a 4–20 mA loop calibrator).
- Force a power-cycle of the PLC and verify the ERH LED is OFF, FTP responds within 10 seconds, and log files survive the reboot (CF-backed storage).
Security Hardening
- Disable Anonymous FTP in the unit setup; require a user/password.
- Place the cell network on a separate VLAN with no route to the corporate LAN.
- Set a non-default FTP port if the cell router supports firewall rules — update every client script accordingly.
- Disable the ETN21 HTTP/Web server if not required (rev 2.0+).
- Log FTP sessions through the unit's SYSLOG option (ETN21 rev 2.0+) and forward to a central SIEM.
Migration Notes — CJ2M / NJ Controllers
For new deployments, the CJ2M-CPU3x series with an Ethernet port on the CPU itself provides the same /MEMCARD FTP root without a separate ETN21 unit. The CJ2M also accepts a CJ1W-ETN21 in a Special I/O slot for additional ports. NJ-series controllers (NJ101/NJ301/NJ501) use Sysmac Studio and the built-in FTP server on the EtherNet/IP port — refer to the NJ-series CPU Unit Operation Manual (W501) for the equivalent procedure. The architectural pattern — ladder writes a CSV to removable media, FTP exposes that media to LAN clients — is identical across all three platforms.
Field-Commissioning Checklist
- [ ] ETN21 firmware revision verified (rev 2.0 or later recommended for 16 sessions)
- [ ] IP address, mask, gateway set and transferred
- [ ] UNIT No. rotary switches match IP last octet
- [ ] FTP server enabled with non-default credentials
- [ ] CF card formatted FAT16 and recognized (A343.10 = 1)
- [ ] /LOGS directory created via FTP MKD
- [ ] Ladder FWRITE block exercised end-to-end
- [ ] Operator PC tested with IE, Windows Explorer, and one scripted client
- [ ] ERH / ERR LEDs confirmed OFF after reboot
- [ ] Backup of CX-Programmer project stored off-cell
Which CJ1M CPUs support FTP access via the ETN21?
The CJ1MCPU11/12/13 (basic) and CJ1MCPU21/22/23 (with onboard Ethernet on CJ2M-CPU3x) all support the CJ1W-ETN21 as a Special I/O Module. The ETN21 exposes the CPU's CompactFlash card as /MEMCARD over FTP regardless of CPU generation.
Why does the ERH LED stay lit on my ETN11 unit?
The most common cause is a mismatch between the front-panel rotary UNIT No. switch and the last octet of the configured IP address. Set the switches to the decimal value of the last octet (e.g., for 192.168.0.81, set the switches to 8 and 1) and power-cycle the rack. The ERH LED should clear within 5 seconds of boot.
What is the maximum CompactFlash card size supported?
Omron specifies the HMC-EF172 (16 MB, FAT16) as the reference card. Larger FAT16 volumes work in practice but are not officially validated. The card MUST be formatted FAT16 — FAT32 and exFAT are silently ignored by the CJ1M boot ROM and FWRITE will fail.
Can I open and edit the CSV file directly from the FTP folder in Excel?
No. Excel cannot open a file directly from an FTP root that requires authentication in modern Office builds. The correct workflow is to RETR (drag) the file to a local folder, edit, and then STOR (drag back) if needed. Alternatively, use a PowerShell script to mirror the FTP folder to a local directory and open from there.
How many simultaneous FTP clients can the ETN21 serve?
The CJ1W-ETN21 supports up to 16 simultaneous FTP sessions on firmware revision 2.0 or later. The legacy CJ1W-ETN11 supports 4. Each session counts against the unit's TCP socket pool, so concurrent ladder FWRITE activity plus multiple FTP retrievals should be validated under load during commissioning.