NJ 系列内置的 Ethernet/IP 口的有 FTP( File Transfer Protocol)功能。
这个功能允许 FTP 客户端设备与 SD 内存开之间实现大容量文件的读和写(或者讲上载和下
载)动作,如图 1 所示。
基本规格
NJ 端的设置:
1:设置 FTP 服务
需要设置的有端口号,注册名,密码,如图 2 所示。
2: 双击“ Built-in EtherNet/IP Port Setting”选择’ FTP’
选择“使用”如图 3 所示
3:控制命令列表
下面图 4 为 NJ 系列内建 EIP 所以的 FTP 指令
备注:表格出现的“romote host”是内置 EIP 口的意思。
“ romote file”是指 CPU 模块上插的 SD 卡上的文件。
“ local host”是指上位机电脑。( FTP 客户端)。
“ local file”是指电脑里的文件。
举例:
选择开始里的运行, 如图 5 所示。
输入 cmd 按下回车,如图 6 所示。
输入 ftp 空格加设备 IP 地址,如图 7 所示
使用 NJ 自带的命令。使用到
FTP 192.168.250.1
omron *用户名
omron123 *密码(输入密码时是不显示)
ls *找到 SD 卡有什么目录
cd MEMECARD1 *定义 SD 卡的文件目录
lc d:abc *定义上位机文件目录
get 文件名
put 文件名 *将 SD 卡在 MEMECARD1 的文件名放到 d:abc
*将 d:abc文件名放到 SD 卡的 MEMECARD1下面是把 SD 卡的 Drawings1.dxf 放下载到上位机的 D:abc 文件夹内,将 D:abc 文件夹内
et2t.txt 文件上载打牌 SD 卡的 MEMCARD1 位置内。
传送有两种格式:二进制和 ASCII
FTP File Transfer Mode
FTP has two file transfer modes: ASCII mode and binary mode. Before you start to
transfer files, usethe type command (specifies the data type of transferred files)
to select the required mode.
• To transfer a file in binary format: Select binary mode.
• To transfer a file in ASCII format: Select ASCII mode
支持的文件名是: MEMCARD1
The file system in the Controller that can be accessed by the built-in EtherNet/IP
port includes files in any SD Memory Card mounted in the CPU Unit. The directory
tree is shown below.
A connection is initially made to the root directory.
/: root
MEMCARD1: SD
usr
bin
devUsed by system• The date of the MEMCARD1 directory displayed for ls, dir, or mkdir commands in
the root
directory is the date of the file system volume label.
• The login date is displayed for MEMCARD1 if a volume label has not been created.
SD Memory Card Types:推荐使用下面规格的 SD。
文件名:
Files are distinguished by assigning file names and extensions. The following
characters can be used in file names and extensions: File names are not case sensitive.
(可以使用)
A to Z, a to z, 0 to 9, and the following symbols: $ % ’ - _ @ !
+ ^ [ ] { } , . ;‘ ( ) ~ = # &The following characters cannot be used in files names and extensions:(不可以使用)
Blanks, multi-bytes characters, and the following symbols: / ? * ” : < > etc.
The maximum file name length with the extension is 65 characters. The first period
(.) in a file name is taken as the delimiter between the file name and extension.
Extensions are determined by the file type.
上面使用到的命令有
OPEN:FTP 192.168.250.1
User:omron *用户名
Password:omron123 *密码(输入密码时是不显示)
ls *找到 SD 卡有什么目录
cd MEMECARD1 *定义 SD 卡的文件目录
lc d:abc *定义上位机文件目录
get 文件名 *将 SD 卡在 MEMECARD1 的文件名放到 d:abc
put 文件名 *将 d:abc文件名放到 SD 卡的 MEMECARD1
也可以借助 FTP 客服端软件
设置:主机 用户名 密码 端口
可以看到本地站点和远程站点。
直接将本地站点和远程站点进行文件交换。