解决方案

EtherCAT IGH 命令行介绍

seo靠我 2023-09-23 22:54:17

EtherCAT IGH 命令行介绍

文章目录

EtherCAT IGH 命令行介绍1、测试环境说明2、ethercat 命令行说明2.1 ethercat --help2.2 ethercat aliaSEO靠我s2.3 ethercat master2.4 ethercat slaves2.5 ethercat states2.6 ethercat graph2.7 ethercat xml2.8 etheSEO靠我rcat debug2.9 ethercat version2.10 ethercat sdos2.11 ethercat pdos2.12 ethercat upload2.13 ethercat SEO靠我download2.14 ethercat soe_read2.15 ethercat soe_write2.16 ethercat foe_read2.17 ethercat foe_write2.SEO靠我18 ethercat reg_read2.19 ethercat reg_write2.20 ethercat sii_read2.21 ethercat sii_write2.22 ethercaSEO靠我t data2.23 ethercat config2.24 ethercat domains2.25 ethercat crc2.26 ethercat rescan2.27 ethercat csSEO靠我truct2.28 ethercat eoe2.29 ethercat ip

在一开始学习 EtherCAT 的时候,可以直接编译 IGH,不需要一上来就去安装实时内核。因为编译 IGH 和安不安装实时SEO靠我内核没有什么关系,而且安装实时内核还比较麻烦。当我们只是有一两个电机或者IO模块来学习的时候,可以先不用去安装实时内核。

如果是在虚拟机中安装了IGH,那么为了能够扫描到从站,那么就需要在虚拟机中配置网SEO靠我络,利用桥接网络进行设置。这是因为虚拟机的网络地址是虚拟的IP,iP地址和实际PC上的是不一样的,所以必须固定和实际的PC的IP地址保持在同一个网段。

如果是使用的实体机,那么只要把PC 和 EtherSEO靠我CAT 从站用网线连接在一起就可以了,不需要单独设置IP地址,直接用DHCP也可以直接连接上。

1、测试环境说明

因为我购买的电机是没有带编码器和刹车的,因此就不需要接步进驱动器上面的刹车信号。

如果要跑回SEO靠我零模式的话,那么就需要接步进驱动器上面的限位信号。

另外步进驱动器上面的IO接口都是已经固定好了作用的,用来接限位和原点传感器的。

2、ethercat 命令行说明

EtherCAT 命令行在 《EtherSEO靠我CAT IGH 1.52.pdf》中的 <7.1 Command-line Tool> 也有很详细的一个介绍。在编译和安装IGH的时候,如果不修改默认的编译参数,那么就是会提供 EtherCAT 命令SEO靠我行工具的。

每个主站的实例都有生成一个字符设备,名字为:/dev/EtherCATx, 其中 x ∈ {0 . . . n}为主站实例的索引。

下面具体的介绍了一下各参数及命令的使用,其中 [ ] 中为必选SEO靠我数,< >可选参数。

2.1 ethercat --help

该命令行会告诉用户当前支持哪些命令行指令参数,当前总共提供了 28 个命令行指令。

@:~$ ethercat --helpalias WriSEO靠我te alias addresses.config Show slave configurations.crc CRC error register diagnosis.cstruct GeneratSEO靠我e slave PDO information in C language.data Output binary domain process data.debug Set the masters dSEO靠我ebug level.domains Show configured domains.download Write an SDO entry to a slave.eoe Display EthernSEO靠我et over EtherCAT statictics.foe_read Read a file from a slave via FoE.foe_write Store a file on a slSEO靠我ave via FoE.graph Output the bus topology as a graph.ip Set EoE IP parameters.master Show master andSEO靠我 Ethernet device information.pdos List Sync managers, PDO assignment and mapping.reg_read Output a sSEO靠我laves register contents.reg_write Write data to a slaves registers.rescan Rescan the bus.sdos List SSEO靠我DO dictionaries.sii_read Output a slaves SII contents.sii_write Write SII contents to a slave.slavesSEO靠我 Display slaves on the bus.soe_read Read an SoE IDN from a slave.soe_write Write an SoE IDN to a slaSEO靠我ve.states Request application-layer states.upload Read an SDO entry from a slave.version Show versioSEO靠我n information.xml Generate slave information XML.Global options:--master -m <master> Comma separatedSEO靠我 list of mastersto select, ranges are allowed.Examples: 1,3, 5-7,9, -3.Default: - (all).--force -f FSEO靠我orce a command.--quiet -q Output less information.--verbose -v Output more information.--help -h ShoSEO靠我w this help.Numerical values can be specified either with decimal (no prefix), octal (prefixSEO靠我 0) or hexadecimal (prefix 0x) base.Call ethercat <COMMAND> --help for command-specific help.

2.2 ethSEO靠我ercat alias

该命令行主要是用来创建 EtherCAT 从站的别名的。

ethercat alias [OPTIONS] <ALIAS>Write alias addresses.ArgumenSEO靠我ts:ALIAS must be an unsigned 16 bit number. Zero meansremoving an alias address.If multiple slaves aSEO靠我re selected, the --force option is required.Command-specific options:--alias -a <alias>--posSEO靠我ition -p <pos> Slave selection. See the help ofthe slaves command.--force -f Acknowledge writing aliSEO靠我ases ofmultiple slaves.Numerical values can be specified either with decimal (no prefix), ocSEO靠我tal (prefix 0) or hexadecimal (prefix 0x) base.

可选参数介绍

–alias -a <alias>:匹配从站的别名;–position -p <pos>:匹SEO靠我配从站的绝对位置;–force -f:确认写入多个从站别名;

上面的-a 和 -p 参数后面很多的命令行都会用到。

例子

sudo ethercat alias --position 0 0x3000

解析SEO靠我:将在bus总线上对应的从站0的别名(默认为0)为0x3000;

注意:必须有从站连接才能使用此命令,不运行应用程序也可以使用。

2.3 ethercat master

该命令行用来显示主站和以太网设备信息SEO靠我

ethercat master --help ethercat master [OPTIONS]Show master and Ethernet device informationSEO靠我.Command-specific options:--master -m <indices> Master indices. A comma-separatedlist with ranges isSEO靠我 supported.Example: 1,4,5,7-9. Default: - (all).Numerical values can be specified either with decimaSEO靠我l (no prefix), octal (prefix 0) or hexadecimal (prefix 0x) base.

可选参数

–master -m :indices为主站的SEO靠我索引。默认显示所有的设备信息;

例子

@:~$ ethercat master Master0Phase: IdleActive: noSlaves: 1Ethernet devicesSEO靠我:Main: 98:29:a6:56:57:ce (attached)Link: UPTx frames: 5847Tx bytes: 534212Rx frames: 5846Rx bytes: 5SEO靠我34152Tx errors: 0Tx frame rate [1/s]: 125 307 87Tx rate [KByte/s]: 7.3 27.4 7.8Rx frame rate [1/s]: SEO靠我125 307 87Rx rate [KByte/s]: 7.3 27.4 7.8Common:Tx frames: 12089Tx bytes: 915900Rx frames: 6797Rx bySEO靠我tes: 598380Lost frames: 5292Tx frame rate [1/s]: 125 353 149Tx rate [KByte/s]: 7.3 30.3 11.5Rx frameSEO靠我 rate [1/s]: 125 327 99Rx rate [KByte/s]: 7.3 28.7 8.6Loss rate [1/s]: 0 27 50Frame loss [%]: 0.0 7.SEO靠我5 33.4Distributed clocks:Reference clock: Slave 0DC reference time: 0Application time: 02000-01-01 0SEO靠我0:00:00.000000000

显示所有主机的设备信息(发送帧、接收帧、参考时钟、应用时间)。

后面的 Distributed clocks 只有在启动应用程序之后才会有相应的参数值。

当给定的主站参数SEO靠我无效的时候,会输处如下报错信息。

@:~$ ethercat master -m 1 Failed to open master device /dev/EtherCAT1: No suSEO靠我ch file or directory

注意:必须有从站连接才能使用此命令,不运行应用程序也可以使用。

2.4 ethercat slaves

@:~$ ethercat slaves --help SEO靠我 ethercat slaves [OPTIONS]Display slaves on the bus.If the --verbose option is not given, the sSEO靠我laves are displayed one-per-line. Example:1 5555:0 PREOP + EL3162 2C. Ana. Input 0-10V SEO靠我 | | | | | | | | | | | \- Name from the SII if available, | | | | | otherwise vendSEO靠我or ID and product | | | | | code (both hexadecimal). | | | | \- Error flag. + means SEO靠我no error, | | | | E means that scan or | | | | configuration failed. | | | \SEO靠我- Current application-layer state. | | \- Decimal relative position to the last | | SEO靠我slave with an alias address set. | \- Decimal alias address of this slave (if set), SEO靠我| otherwise of the last slave with an alias set, | or zero, if no alias was encountered up tSEO靠我o this | position. \- Absolute ring position in the bus.If the --verbose option is gSEO靠我iven, a detailed (multi-line) description is output for each slave.Slave selection:Slaves foSEO靠我r this and other commands can be selected withthe --alias and --position parameters as follows:1) IfSEO靠我 neither the --alias nor the --position optionis given, all slaves are selected.2) If only the --posSEO靠我ition option is given, it isinterpreted as an absolute ring position anda slave with this position iSEO靠我s matched.3) If only the --alias option is given, all slaveswith the given alias address and subsequSEO靠我entslaves before a slave with a different aliasaddress match (use -p0 if only the slaveswith the givSEO靠我en alias are desired, see 4)).4) If both the --alias and the --position option aregiven, the latter SEO靠我is interpreted as relativeposition behind any slave with the given alias.Command-specific options:--SEO靠我alias -a <alias> Slave alias (see above).--position -p <pos> Slave position (see above).--verbose -vSEO靠我 Show detailed slave information.Numerical values can be specified either with decimal (no pSEO靠我refix), octal (prefix 0) or hexadecimal (prefix 0x) base. 如果最后的 -v 参数没有设置,显示的参数含义如下: SEO靠我 1 5555:0 PREOP + EL3162 2C. Ana. Input 0-10V | | | | | | | | | | | \- 从SII 上面读取到的从SEO靠我站名字(如果有设置的话)。或者 | | | | | 是 vendor ID and product code ,两个参数都是用 | | | | | 十进制表示的。 SEO靠我 | | | | | | | | | \- 错误标志。 + 意味着是没有错误, | | | | E 意味着存在配置方面的错误或者其他错误。 |SEO靠我 | | | | | | \- 当前从站的状态。 | | | | | \- 十进制表示的与最后一个设置了别名地址的从站设备的相对位置。 SEO靠我| | | \- 用十进制表示的一个从站别名地址(如果有进行设置的话), | 否则为设置的最后一个从机别名的地址。 | 如果在此位置之前未遇到设置了别名SEO靠我的从站设备,则为零。 | \- 代表在总线上的绝对位置.

如果设置了最后的 -v 参数,则为每一个从站输出相应的描述。

该命令行中从站的选择是通过参数 -a 和 -p 来选SEO靠我择的。

1、如果没有设置 --alias 和 --position 这两个选项参数,则会选择所有的从站设备。2、如果只给出 --position 选项参数,那么总线上绝对位置为该值的从站设备会被选中。3SEO靠我、如果只给出了–alias 选项参数,则具有给定别名地址的所有从属设备和具有不同别名地址的从属设备之前的后续从属设备都会匹配。(如果只需要具有给定别名的从机,请使用-p0,请参见4):4、如果 --aSEO靠我lias 和 --position 这个两个参数同时给定,后者被解释为相对

位于具有给定别名的任何从属设备后面。

这边关于从站的别名配置以及匹配的方法介绍,可以参照 《EtherCAT IGH 1.52.SEO靠我pdf》中的 < 3.1.1 Slave Configuration > 介绍。

或者阅读下面这两个文章,这两个文章介绍的也是很详细的。

Ethercat解析(十)之从站配置

IgH Master 1.5.SEO靠我2 Documentation 中文版 2.1从站的配置

可选参数介绍

–alias -a <alias>:匹配从站的别名;–position -p <pos>:匹配从站的绝对位置;–verbose -SEO靠我v :显示从站的详细信息。

例子

@:~$ ethercat slaves 0 0:0 PREOP + 2DM522-EC

此时表示从站已经进入了 PEROP 状态了。

@:~$ etherSEO靠我cat slaves 0 0:0 SAFEOP+ERROR E 2DM522-EC

此时可以看到当前的从站已经进入了 SAFEOP 的状态了。但是后面还有一个 + ERROR。这个根据 SEO靠我ethercat states --help 可以看到这个表示 ethercat 从站出现错误,可能是扫描错误,也有可能是配置出错了。

下面这个例子采用 -v 参数显示从站的具体信息。在打印出来的具体参SEO靠我数中可以看到Vendor IdProduct code,这个两个参数在后面我们编写主站应用程序的时候需要用到。另外还可以看到邮箱服务中该驱动器只支持 COE 服务, 不支持 FOE、SOE、EOE等SEO靠我服务。

@:~$ ethercat slaves -a 0 -p 0 -v === Master 0, Slave 0 === Device: Main SEO靠我State: OP Flag: + Identity:Vendor Id: 0x66668888Product code: 0x20190303Revision numSEO靠我ber: 0x20190620Serial number: 0x00000000 DL information:FMMU bit operation: noDistributed clSEO靠我ocks: yes, 64 bitDC system time transmission delay: 0 ns Port Type Link Loop Signal NextSlavSEO靠我e RxTime [ns] Diff [ns] NextDc [ns]0 MII up open yes - 3810966012 0 01 MII down closed no - - - -2 NSEO靠我/A down closed no - - - -3 N/A down closed no - - - - Mailboxes:Bootstrap RX: 0x0000/0, TX: SEO靠我0x0000/0Standard RX: 0x1000/128, TX: 0x1200/256Supported protocols: CoE General:Group: 2DM SSEO靠我laveImage name: Order number: 2DM522-ECDevice name: 2DM522-ECCoE details:Enable SDO: yesEnable SDO ISEO靠我nfo: yesEnable PDO Assign: yesEnable PDO Configuration: yesEnable Upload at startup: noEnable SDO coSEO靠我mplete access: yesFlags:Enable SafeOp: noEnable notLRW: noCurrent consumption: 0 mA

注意:必须有从站连接才能使用此命令SEO靠我,不运行应用程序也可以使用。

2.5 ethercat states

该命令行用来请求从站转换状态。

@:~$ ethercat states --help ethercat states SEO靠我[OPTIONS] <STATE>Request application-layer states.Arguments:STATE can be INIT, PREOP, BOOT, SAFEOP, SEO靠我or OP.Command-specific options:--alias -a <alias>--position -p <pos> Slave selection. See the help oSEO靠我fthe slaves command.Numerical values can be specified either with decimal (no prefix), octalSEO靠我 (prefix 0) or hexadecimal (prefix 0x) base.

必选参数介绍

STATE:可选的参数有INIT、PREOP、BOOT、SAFEOP、OP;

可选参数介绍

–aliSEO靠我as -a <alias>:匹配从站的别名;–position -p <pos>:匹配从站的绝对位置;

例子

sudo ethercat states -p 0 OP

用于将从站0的状态切换为OP;

注意:SEO靠我必须有从站连接才能使用此命令,不运行应用程序也可以使用。

2.6 ethercat graph

该命令行用来输出总线上连接的所有从站设备的总线拓扑图。

ethercat graph [OPTIONS] SEO靠我 ethercat graph [OPTIONS] <INFO>Output the bus topology as a graph.The bus is output in DOT lanSEO靠我guage (see http://www.graphviz.org/doc/info/lang.html), which can be processed with SEO靠我the tools from the Graphviz package. Example:ethercat graph | dot -Tsvg > bus.svgSee man dotSEO靠我 for more information.Additional information at edges and nodes is selected via the first arSEO靠我gument:DC - DC timingCRC - CRC error register information

例子

以文本的信息输出从站连接拓扑图。

@:~$ ethercat graph SEO靠我 /* EtherCAT bus graph. Generated by ethercat graph. */strict graph bus {rankdir="LR"ranksep=0.8nSEO靠我odesep=0.8node [fontname="Helvetica"]edge [fontname="Helvetica",fontsize="10"]master [label="EtherCASEO靠我T\nMaster"]master -- slave0[label="MII"]slave0 [shape="box",label="0 / 0:0\n2DM522-EC"]}

将总线拓扑图输出到桌面,SEO靠我保存成 svg 格式的图片。

sudo ethercat graph | dot -Tsvg > ~/Desktop/bus.svg

注意:必须有从站连接才能使用此命令,不运行应用程序也可以使用。

2.7 SEO靠我ethercat xml

@:~$ ethercat xml --help ethercat xml [OPTIONS]Generate slave information XML.NoSEO靠我te that the PDO information can either originate from the SII or from the CoE communication SEO靠我area. For slaves, that support configuring PDO assignment and mapping, the output deSEO靠我pends on the last configuration.Command-specific options:--alias -a <alias>--position -p <pos> SlaveSEO靠我 selection. See the help ofthe slaves command.Numerical values can be specified either with decimal SEO靠我(no prefix), octal (prefix 0) or hexadecimal (prefix 0x) base.

可选参数介绍

–alias -a <alias>:匹配从站的SEO靠我别名;–position -p <pos>:匹配从站的绝对位置;

例子

@:~$ ethercat xml <?xml version="1.0" ?> <EtherCASEO靠我TInfo><!-- Slave 0 --><Vendor><Id>1717995656</Id></Vendor><Descriptions><Devices><Device><Type ProduSEO靠我ctCode="#x20190303" RevisionNo="#x20190620">2DM522-EC</Type><Name><![CDATA[2DM522-EC]]></Name><Sm EnSEO靠我able="1" StartAddress="#x1000" ControlByte="#x26" DefaultSize="128" /><Sm Enable="1" StartAddress="#SEO靠我x1200" ControlByte="#x22" DefaultSize="256" /><Sm Enable="1" StartAddress="#x1400" ControlByte="#x64SEO靠我" DefaultSize="17" /><Sm Enable="1" StartAddress="#x1600" ControlByte="#x20" DefaultSize="31" /><RxPSEO靠我do Sm="2" Fixed="1" Mandatory="1"><Index>#x1600</Index><Name>RxPdoMapping</Name><Entry><Index>#x6040SEO靠我</Index><SubIndex>0</SubIndex><BitLen>16</BitLen><Name>controlword</Name><DataType>UINT16</DataType>SEO靠我</Entry><Entry><Index>#x6060</Index><SubIndex>0</SubIndex><BitLen>8</BitLen><Name>op_mode</Name><DatSEO靠我aType>UINT8</DataType></Entry><Entry><Index>#x607a</Index><SubIndex>0</SubIndex><BitLen>32</BitLen><SEO靠我Name>target_position</Name><DataType>UINT32</DataType></Entry><Entry><Index>#x60b8</Index><SubIndex>SEO靠我0</SubIndex><BitLen>16</BitLen><Name>Touch_probe_function</Name><DataType>UINT16</DataType></Entry><SEO靠我Entry><Index>#x60fe</Index><SubIndex>1</SubIndex><BitLen>32</BitLen><Name>physical_outputs</Name><DaSEO靠我taType>UINT32</DataType></Entry><Entry><Index>#x60fe</Index><SubIndex>2</SubIndex><BitLen>32</BitLenSEO靠我><Name>bit_mask</Name><DataType>UINT32</DataType></Entry></RxPdo><TxPdo Sm="3" Fixed="1" Mandatory="SEO靠我1"><Index>#x1a00</Index><Name>TxPdoMapping</Name><Entry><Index>#x603f</Index><SubIndex>0</SubIndex><SEO靠我BitLen>16</BitLen><Name>errorcode</Name><DataType>UINT16</DataType></Entry><Entry><Index>#x6041</IndSEO靠我ex><SubIndex>0</SubIndex><BitLen>16</BitLen><Name>statusword</Name><DataType>UINT16</DataType></EntrSEO靠我y><Entry><Index>#x6061</Index><SubIndex>0</SubIndex><BitLen>8</BitLen><Name>op_mode_display</Name><DSEO靠我ataType>UINT8</DataType></Entry><Entry><Index>#x6064</Index><SubIndex>0</SubIndex><BitLen>32</BitLenSEO靠我><Name>actual_position</Name><DataType>UINT32</DataType></Entry><Entry><Index>#x60b9</Index><SubIndeSEO靠我x>0</SubIndex><BitLen>16</BitLen><Name>Touch_probe_status</Name><DataType>UINT16</DataType></Entry><SEO靠我Entry><Index>#x60ba</Index><SubIndex>0</SubIndex><BitLen>32</BitLen><Name>Touch_probe_pos1_pos_valueSEO靠我</Name><DataType>UINT32</DataType></Entry><Entry><Index>#x60bb</Index><SubIndex>0</SubIndex><BitLen>SEO靠我32</BitLen><Name>Touch_probe_pos1_neg_value</Name><DataType>UINT32</DataType></Entry><Entry><Index>#SEO靠我x60bc</Index><SubIndex>0</SubIndex><BitLen>32</BitLen><Name>Touch_probe_pos2_pos_value</Name><DataTySEO靠我pe>UINT32</DataType></Entry><Entry><Index>#x60bd</Index><SubIndex>0</SubIndex><BitLen>32</BitLen><NaSEO靠我me>Touch_probe_pos2_neg_value</Name><DataType>UINT32</DataType></Entry><Entry><Index>#x60fd</Index><SEO靠我SubIndex>0</SubIndex><BitLen>32</BitLen><Name>digtal_inputs</Name><DataType>UINT32</DataType></EntrySEO靠我></TxPdo></Device></Devices></Descriptions> </EtherCATInfo>

注意:必须有从站连接才能使用此命令,不运行应用程序也可以使用。

2.SEO靠我8 ethercat debug

该命令用来设置主站的调试级别。

@:~$ ethercat debug --helpethercat debug <LEVEL>Set the masters debugSEO靠我 level.Debug messages are printed to syslog.Arguments:LEVEL can have one of the following values:0 fSEO靠我or no debugging output,1 for some debug messages, or2 for printing all frame contents (use with cautSEO靠我ion!).Numerical values can be specified either with decimal (no prefix), octal (prefix 0) orSEO靠我 hexadecimal (prefix 0x) base.

在实际的调试过程中的时候,一般会和sudo dmesg -w这个命令一起配合使用。

该命令后终端不会有任何的信息输出,但是当你在另外一个终端输SEO靠我sudo dmesg -w,你就会发现在这个终端这边输出了一些 ethercat 的 debug 信息,前提是你设置的参数是 1 或者 2。

参数介绍

–LEVEL :设置调试等级 0 : 无任何调试SEO靠我信息输出1 : 输出部分调试信息2 : 输出所有的帧的内容(由于输出信息较多,请谨慎使用)

例子

sudo ethercat debug 1

注意:必须有从站连接才能使用此命令,不运行应用程序也可以使用。SEO靠我

2.9 ethercat version

该命令行用来输出当前主站的版本的。

@:~$ ethercat version --help ethercat version [OPTIONS]SEO靠我Show version information.

例子

@:~$ sudo ethercat version IGH EtherCAT master 1.6.0-rc1 unknow

SEO靠我意:不连接从站也能使用此命令,不运行应用程序也可以使用。

2.10 ethercat sdos

该命令行用来输出当前驱动器支持的所有的SDO信息。

@:~$ ethercat sdos --helpetheSEO靠我rcat sdos [OPTIONS]List SDO dictionaries.SDO dictionary information is displayed in two layers, SEO靠我 which are indented accordingly:1) SDOs - Hexadecimal SDO index and the name. Example:SDO 0x1018,SEO靠我 "Identity object"2) SDO entries - SDO index and SDO entry subindex (bothhexadecimal) followed by thSEO靠我e access rights (seebelow), the data type, the length in bit, and thedescription. Example:0x1018:01,SEO靠我 rwrwrw, uint32, 32 bit, "Vendor id"The access rights are specified for the AL states PREOP, SEO靠我 SAFEOP and OP. An r means, that the entry is readable in the corresponding state, an w meanSEO靠我s writable, respectively. If a right is not granted, a dash - is shown.If the --quieSEO靠我t option is given, only the SDOs are output.Command-specific options:--alias -a <alias>--position -pSEO靠我 <pos> Slave selection. See the help ofthe slaves command.--quiet -q Only output SDOs (without theSDSEO靠我O entries).Numerical values can be specified either with decimal (no prefix), octal (prefix SEO靠我0) or hexadecimal (prefix 0x) base.

该命令行中如果采用采用的默认的参数,那么会输出一下两层信息:

1、SDO 的索引和名字信息

SDO 0x6040, “controlwSEO靠我ord”

0x6040:SDO 索引值;“controlword”:SDO的名字,表示这是一个控制字;

2、显示 SDO 的内容,包括各个子索引的参数含义、访问权限等

0x6040:00, rwrwrw, SEO靠我uint16, 16 bit, “controlword”"

0x6040:00:代表子索引的地址为 0x0000;rwrwrw:代表着这个 SDO 的访问权限; 这个访问权限分别是针对应用层在预运行状SEO靠我态(PREOP)、安全运行状态(SAFEOP)和运行状态(OP)。r’表示该条目可读,‘w’表示该条目可写。假如对访问权限不太确切,则使用’-代替;uint16:代表这个子索引保存的数据类型,无符号整SEO靠我数数据, 16 bit;16 bit:代表这个子索引数据的大小是 16 bit;“controlword”:用来描述这个子索引的含义;

可选参数介绍

–alias -a <alias>:匹配从站的别名;SEO靠我–position -p <pos>:匹配从站的绝对位置;–quiet -q :只用来输出 PDOs,不输出 PDO 条目信息。

例子

@:~$ ethercat sdos SDO 0xSEO靠我1000, "Device type"0x1000:00, r-r-r-, uint32, 32 bit, "Device type" SDO 0x1001, "Error regisSEO靠我ter"0x1001:00, r-r-r-, uint8, 8 bit, "Error register" SDO 0x1008, "Device name"0x1008:00, r-SEO靠我r-r-, string, 72 bit, "Device name" SDO 0x1009, "Hardware version"0x1009:00, r-r-r-, string,SEO靠我 24 bit, "Hardware version" SDO 0x100a, "Software version"0x100a:00, r-r-r-, string, 32 bit,SEO靠我 "Software version" SDO 0x1010, "store parameters"0x1010:00, r-r-r-, uint8, 8 bit, "SubIndexSEO靠我 000"0x1010:01, rwrwrw, uint32, 32 bit, "save all parameters"0x1010:02, rwrwrw, uint32, 32 bit, "savSEO靠我e communication parameters"0x1010:03, rwrwrw, uint32, 32 bit, "save application parameters"0x1010:04SEO靠我, rwrwrw, uint32, 32 bit, "save manufacturer defined parameters" .............. SDO SEO靠我0x6007, "Abort_connection_option_code"0x6007:00, rwrwrw, int16, 16 bit, "Abort_connection_option_codSEO靠我e" SDO 0x603f, "errorcode"0x603f:00, r-r-r-, uint16, 16 bit, "errorcode" SDO 0x6040,SEO靠我 "controlword"0x6040:00, rwrwrw, uint16, 16 bit, "controlword" SDO 0x6041, "statusword"0x604SEO靠我1:00, r-r-r-, uint16, 16 bit, "statusword" ..............

添加 -q 参数,只用来输出 PDOs,不输出 PDO 条目信息。

@:SEO靠我~$ ethercat sdos -a 0 -p 0 -q SDO 0x1000, "Device type" SDO 0x1001, "Error register"SEO靠我 SDO 0x1008, "Device name" SDO 0x1009, "Hardware version" SDO 0x100a, "SoftwSEO靠我are version" SDO 0x1010, "store parameters" .............. SDO 0x6007, "AborSEO靠我t_connection_option_code" SDO 0x603f, "errorcode" SDO 0x6040, "controlword" SEO靠我SDO 0x6041, "statusword" ..............

2.11 ethercat pdos

该命令行用来显示出同步管理器的参数和PDO分配和映射信息。

@:~$ eSEO靠我thercat pdos --helpethercat pdos [OPTIONS]List Sync managers, PDO assignment and mapping.For the defSEO靠我ault skin (see --skin option) the information is displayed in three layers, which are SEO靠我 indented accordingly:1) Sync managers - Contains the sync manager informationfrom the SII: Index, SEO靠我physical start address, defaultsize, control register and enable word. Example:SM3: PhysAddr 0x1100,SEO靠我 DefaultSize 0, ControlRegister 0x20, Enable 12) Assigned PDOs - PDO direction, hexadecimal index anSEO靠我dthe PDO name, if available. Note that a Tx and Rxare seen from the slaves point of view. Example:TxSEO靠我PDO 0x1a00 "Channel1"3) Mapped PDO entries - PDO entry index and subindex (bothhexadecimal), the lenSEO靠我gth in bit and the description, ifavailable. Example:PDO entry 0x3101:01, 8 bit, "Status"Note, that SEO靠我the displayed PDO assignment and PDO mapping information can either originate from the SII oSEO靠我r from the CoE communication area.The "etherlab" skin outputs a template configuration SEO靠我 for EtherLabs generic EtherCAT slave block.Command-specific options:--alias -a <alias>--position SEO靠我-p <pos> Slave selection. See the help ofthe slaves command.--skin -s <skin> Choose output skin. PosSEO靠我sible values are"default" and "etherlab".Numerical values can be specified either with decimal (no SEO靠我 prefix), octal (prefix 0) or hexadecimal (prefix 0x) base.

该命令行中如果采用采用的默认的参数,那么会输出一下三层信息:

1、同步管SEO靠我理器信息

SM3: PhysAddr 0x1600, DefaultSize 31, ControlRegister 0x20, Enable 1

SM3:同步管理器3;PhysAddr:物理地址开始地址SEO靠我 0x1600;DefaultSize:默认数据大小 31;ControlRegister:控制寄存器 0x20;Enable:使能字 1;

2、显示PDO方向(TX 或者 RX),索引值,PDO名字

TSEO靠我xPDO 0x1a00 “TxPdoMapping”

TxPDO:代表从站发送数据的方向(从站发送数据);0x1a00:PDO的索引值;“TxPdoMapping”:PDO的名字;

3、显示PDO条目的索SEO靠我引和子索引(都是以16进制的形式现实的),显示位宽和描述

PDO entry 0x6041:00, 16 bit, “statusword”

* 0x6041:00 : 表示PDO的索引和子索引,当前表示SEO靠我为 状态字 的索引和子索引地址; * 16bit:表示该条目的位宽,是一个 16 bit 的数据; * "statusword":表示该位的描述,表示这个PDO 描述的SEO靠我是状态字;

可选参数介绍

–alias -a <alias>:匹配从站的别名;–position -p <pos>:匹配从站的绝对位置;–skin -s <skin> :用以设置输出的形式

例子

@:~$SEO靠我 ethercat pdos SM0: PhysAddr 0x1000, DefaultSize 128, ControlRegister 0x26, Enable 1 SEO靠我 SM1: PhysAddr 0x1200, DefaultSize 256, ControlRegister 0x22, Enable 1 SM2: PhysAddr 0x1400,SEO靠我 DefaultSize 17, ControlRegister 0x64, Enable 1RxPDO 0x1600 "RxPdoMapping"PDO entry 0x6040:00, 16 biSEO靠我t, "controlword"PDO entry 0x6060:00, 8 bit, "op_mode"PDO entry 0x607a:00, 32 bit, "target_position"PSEO靠我DO entry 0x60b8:00, 16 bit, "Touch_probe_function"PDO entry 0x60fe:01, 32 bit, "physical_outputs"PDOSEO靠我 entry 0x60fe:02, 32 bit, "bit_mask" SM3: PhysAddr 0x1600, DefaultSize 31, ControlRegister 0SEO靠我x20, Enable 1TxPDO 0x1a00 "TxPdoMapping"PDO entry 0x603f:00, 16 bit, "errorcode"PDO entry 0x6041:00,SEO靠我 16 bit, "statusword"PDO entry 0x6061:00, 8 bit, "op_mode_display"PDO entry 0x6064:00, 32 bit, "actuSEO靠我al_position"PDO entry 0x60b9:00, 16 bit, "Touch_probe_status"PDO entry 0x60ba:00, 32 bit, "Touch_proSEO靠我be_pos1_pos_value"PDO entry 0x60bb:00, 32 bit, "Touch_probe_pos1_neg_value"PDO entry 0x60bc:00, 32 bSEO靠我it, "Touch_probe_pos2_pos_value"PDO entry 0x60bd:00, 32 bit, "Touch_probe_pos2_neg_value"PDO entry 0SEO靠我x60fd:00, 32 bit, "digtal_inputs"

设置 etherlab 的输出形式。

@:~$ ethercat pdos -a 0 -p 0 -s "etherlab" SEO靠我 % % Master 0, Slave 0, "2DM522-EC" % function rv = slave0()% Slave configuSEO靠我rationrv.SlaveConfig.vendor = 1717995656; rv.SlaveConfig.product = hex2dec(20190303); SEO靠我 rv.SlaveConfig.description = 2DM522-EC; rv.SlaveConfig.sm = { ...{0, 0, {}}, ...{1, 1, {}}SEO靠我, ...{2, 0, {{hex2dec(1600), [hex2dec(6040), hex2dec(00), 16; ...hex2dec(6060), hex2dec(00), 8; .SEO靠我..hex2dec(607a), hex2dec(00), 32; ...hex2dec(60b8), hex2dec(00), 16; ...hex2dec(60fe), hex2dec(01)SEO靠我, 32; ...hex2dec(60fe), hex2dec(02), 32; ...]}, ...}}, ...{3, 1, {{hex2dec(1a00), [hex2dec(603f), SEO靠我hex2dec(00), 16; ...hex2dec(6041), hex2dec(00), 16; ...hex2dec(6061), hex2dec(00), 8; ...hex2decSEO靠我(6064), hex2dec(00), 32; ...hex2dec(60b9), hex2dec(00), 16; ...hex2dec(60ba), hex2dec(00), 32; ..SEO靠我.hex2dec(60bb), hex2dec(00), 32; ...hex2dec(60bc), hex2dec(00), 32; ...hex2dec(60bd), hex2dec(00),SEO靠我 32; ...hex2dec(60fd), hex2dec(00), 32; ...]}, ...}}, ...};% Port configurationrv.PortConfig.inputSEO靠我(1).pdo = [2, 0, 0, 0]; rv.PortConfig.input(1).pdo_data_type = 1016;rv.PortConfig.input(2).pSEO靠我do = [2, 0, 1, 0]; rv.PortConfig.input(2).pdo_data_type = 1008;rv.PortConfig.input(3).pdo = SEO靠我[2, 0, 2, 0]; rv.PortConfig.input(3).pdo_data_type = 1032;rv.PortConfig.input(4).pdo = [2, 0SEO靠我, 3, 0]; rv.PortConfig.input(4).pdo_data_type = 1016;rv.PortConfig.input(5).pdo = [2, 0, 4, SEO靠我0]; rv.PortConfig.input(5).pdo_data_type = 1032;rv.PortConfig.input(6).pdo = [2, 0, 5, 0]; SEO靠我 rv.PortConfig.input(6).pdo_data_type = 1032;rv.PortConfig.output(1).pdo = [3, 0, 0, 0]; SEO靠我 rv.PortConfig.output(1).pdo_data_type = 1016;rv.PortConfig.output(2).pdo = [3, 0, 1, 0]; SEO靠我rv.PortConfig.output(2).pdo_data_type = 1016;rv.PortConfig.output(3).pdo = [3, 0, 2, 0]; rv.SEO靠我PortConfig.output(3).pdo_data_type = 1008;rv.PortConfig.output(4).pdo = [3, 0, 3, 0]; rv.PorSEO靠我tConfig.output(4).pdo_data_type = 1032;rv.PortConfig.output(5).pdo = [3, 0, 4, 0]; rv.PortCoSEO靠我nfig.output(5).pdo_data_type = 1016;rv.PortConfig.output(6).pdo = [3, 0, 5, 0]; rv.PortConfiSEO靠我g.output(6).pdo_data_type = 1032;rv.PortConfig.output(7).pdo = [3, 0, 6, 0]; rv.PortConfig.oSEO靠我utput(7).pdo_data_type = 1032;rv.PortConfig.output(8).pdo = [3, 0, 7, 0]; rv.PortConfig.outpSEO靠我ut(8).pdo_data_type = 1032;rv.PortConfig.output(9).pdo = [3, 0, 8, 0]; rv.PortConfig.output(SEO靠我9).pdo_data_type = 1032;rv.PortConfig.output(10).pdo = [3, 0, 9, 0]; rv.PortConfig.output(10SEO靠我).pdo_data_type = 1032;end

注意:必须有从站连接才能使用此命令,不运行应用程序也可以使用。

2.12 ethercat upload

该命令行用以读取指定从站相应PDO设定的参数值SEO靠我

@:~$ ethercat upload ethercat upload [OPTIONS] <INDEX> <SUBINDEX>Read an SDO entry from a sSEO靠我lave.This command requires a single slave to be selected.The data type of the SDO entry is taken froSEO靠我m the SDO dictionary by default. It can be overridden with the --type option. If theSEO靠我 slave does not support the SDO information service or the SDO is not in the dictionary, SEO靠我 the --type option is mandatory.These are valid data types to use with the --type optionSEO靠我:bool,int8, int16, int32, int64,uint8, uint16, uint32, uint64,float, double,string, octet_string, unSEO靠我icode_string. For sign-and-magnitude coding, use the following types:sm8, sm16, sm32, sm64ArSEO靠我guments:INDEX is the SDO index and must be an unsigned16 bit number.SUBINDEX is the SDO entry subindSEO靠我ex and must be anunsigned 8 bit number.Command-specific options:--alias -a <alias>--position -p <posSEO靠我> Slave selection. See the help ofthe slaves command.--type -t <type> SDO entry data type (see aboveSEO靠我).Numerical values can be specified either with decimal (no prefix), octal (prefix 0) or hexSEO靠我adecimal (prefix 0x) base.

必选参数介绍

INDEX:16位无符整型的SDO索引;SUBINDEX:8位无符整型的SDO子索引;

可选参数介绍

–alias -a <alias>SEO靠我:匹配从站的别名;–position -p <pos>:匹配从站的绝对位置; –type -t <type> : SDO 子索引中的参数数据类型;

例子

@:~$ ethercat upSEO靠我load 0x2001 0x0000 0x03e8 1000

解析:读取从站0中索引号为 0x2001(16位),子索引号为00(8位)的SDO条目。返回的参数值为 1000。

注意:必须SEO靠我有从站连接才能使用此命令,不运行应用程序也可以使用。

2.13 ethercat download

该命令行用以向指定的从站 SDO 中的子索引中写入相应的参数值。

@:~$ ethercat uploadSEO靠我 ethercat download [OPTIONS] <INDEX> <SUBINDEX> <VALUE>[OPTIONS] <INDEX> <VALUE>Write an SDOSEO靠我 entry to a slave.This command requires a single slave to be selected.The data type of the SDO entrySEO靠我 is taken from the SDO dictionary by default. It can be overridden with the --type oSEO靠我ption. If the slave does not support the SDO information service or the SDO is not in the diSEO靠我ctionary, the --type option is mandatory.The second call (without <SUBINDEX>) uses the complSEO靠我ete access method.These are valid data types to use with the --type option:bool,int8SEO靠我, int16, int32, int64,uint8, uint16, uint32, uint64,float, double,string, octet_string, unicode_striSEO靠我ng. For sign-and-magnitude coding, use the following types:sm8, sm16, sm32, sm64Arguments:INSEO靠我DEX is the SDO index and must be an unsigned16 bit number.SUBINDEX is the SDO entry subindex and musSEO靠我t be anunsigned 8 bit number.VALUE is the value to download and must correspondto the SDO entry dataSEO靠我type (see above). Use- to read from standard input.Command-specific options:--alias -a <alias>--posiSEO靠我tion -p <pos> Slave selection. See the help ofthe slaves command.--type -t <type> SDO entry data typSEO靠我e (see above).Numerical values can be specified either with decimal (no prefix), octal (prefSEO靠我ix 0) or hexadecimal (prefix 0x) base.

必选参数介绍

INDEX:16位无符整型的SDO索引;SUBINDEX:8位无符整型的SDO子索引;VALUE: 要设定的参SEO靠我数,必须符合该SDO子索引要求的数据类型参数;

可选参数介绍

–alias -a <alias>:匹配从站的别名;–position -p <pos>:匹配从站的绝对位置; –type SEO靠我-t <type> : SDO 子索引中的参数数据类型;

例子:

向从站0的索引号为0x6060(16位),子索引号为00(8位)的地址写入参数值"0x08"。

@:~$ sudo ethercat dowSEO靠我nload -t int16 -p 0 0x6060 00 08

有的SDO 可能是由于厂家的限制,不能写入参数。

@:~$ sudo ethercat download -t uint16 0x2008SEO靠我 0x0000 0x000f SDO transfer aborted with code 0x08000021: Data cannot be transferred or storSEO靠我ed to the application because of local control

注意:必须有从站连接才能使用此命令,不运行应用程序也可以使用。

2.14 ethercat soe_read

SEO靠我命令行用以读取从站的 IDN 参数值。

@:~$ ethercat soe_read --help ethercat soe_read [OPTIONS] <IDN> eSEO靠我thercat soe_read [OPTIONS] <DRIVE> <IDN>Read an SoE IDN from a slave.This command requires a single SEO靠我slave to be selected.Arguments:DRIVE is the drive number (0 - 7). If omitted, 0 is assumed.IDN is thSEO靠我e IDN and must be either an unsigned16 bit number acc. to IEC 61800-7-204:Bit 15: (0) Standard data,SEO靠我 (1) Product dataBit 14 - 12: Parameter set (0 - 7)Bit 11 - 0: Data block numberor a string like P-0SEO靠我-150.Data of the given IDN are read and displayed according to the given datatype, or as rawSEO靠我 hex bytes.These are valid data types to use with the --type option:bool,int8, int16, int32,SEO靠我 int64,uint8, uint16, uint32, uint64,float, double,string, octet_string, unicode_string. ForSEO靠我 sign-and-magnitude coding, use the following types:sm8, sm16, sm32, sm64Command-specific options:--SEO靠我alias -a <alias>--position -p <pos> Slave selection. See the help ofthe slaves command.--type -t <tySEO靠我pe> Data type (see above).Numerical values can be specified either with decimal (no prefix),SEO靠我 octal (prefix 0) or hexadecimal (prefix 0x) base.

此命令要求必须指定单个从属设备

必选参数介绍

DRIVE: 是驱动器编号(0-7)。如果省略,则假定SEO靠我为0。IDN:必须是无符号的符合IEC 61800-7-2004的16位数字。 位15:(0)标准数据,(1)产品数据位14-12:参数集(0-7)位11-0:数据块编号或类似于“P-0-150”的字SEO靠我符串。

可选参数介绍

–alias -a <alias>:匹配从站的别名;–position -p <pos>:匹配从站的绝对位置; –type -t <type> : 参数数据类型;

SEO靠我意:必须有从站连接才能使用此命令,不运行应用程序也可以使用。

2.15 ethercat soe_write

该命令行用以向指定从站 SOE IDN 写入一个参数值。

@:~$ ethercat soe_wSEO靠我rite --help ethercat soe_write [OPTIONS] <IDN> <VALUE> ethercat soe_write [OPTIONS] SEO靠我<DRIVE> <IDN> <VALUE>Write an SoE IDN to a slave.This command requires a single slave to be selectedSEO靠我.Arguments:DRIVE is the drive number (0 - 7). If omitted, 0 is assumed.IDN is the IDN and must be eiSEO靠我ther an unsigned16 bit number acc. to IEC 61800-7-204:Bit 15: (0) Standard data, (1) Product dataBitSEO靠我 14 - 12: Parameter set (0 - 7)Bit 11 - 0: Data block numberor a string like P-0-150.VALUE is the vaSEO靠我lue to write (see below).The VALUE argument is interpreted as the given data type (--type isSEO靠我 mandatory) and written to the selected slave.These are valid data types to use with the --tSEO靠我ype option:bool,int8, int16, int32, int64,uint8, uint16, uint32, uint64,float, double,string, octet_SEO靠我string, unicode_string. For sign-and-magnitude coding, use the following types:sm8, sm16, smSEO靠我32, sm64Command-specific options:--alias -a <alias>--position -p <pos> Slave selection. See the helpSEO靠我 ofthe slaves command.--type -t <type> Data type (see above).Numerical values can be specified eitheSEO靠我r with decimal (no prefix), octal (prefix 0) or hexadecimal (prefix 0x) base.

此命令要求必须指定单个从属设备SEO靠我

必选参数介绍

DRIVE: 是驱动器编号(0-7)。如果省略,则假定为0。IDN:必须是无符号的符合IEC 61800-7-2004的16位数字。 位15:(0)标准数据,(1)产品数据位14-12SEO靠我:参数集(0-7)位11-0:数据块编号或类似于“P-0-150”的字符串。 VALUE:要写入的数据。

可选参数介绍

–alias -a <alias>:匹配从站的别名;–position -p <pSEO靠我os>:匹配从站的绝对位置; –type -t <type> : 参数数据类型;

注意:必须有从站连接才能使用此命令,不运行应用程序也可以使用。

2.16 ethercat foe_reaSEO靠我d

通过FOE读取从站的文件。

@:~$ ethercat foe_read --help ethercat foe_read [OPTIONS] <SOURCEFILE> [<PASSWSEO靠我ORD>]Read a file from a slave via FoE.This command requires a single slave to be selected.Arguments:SEO靠我SOURCEFILE is the name of the source file on the slave.PASSWORD is the numeric password defined by tSEO靠我he vendor.Command-specific options:--output-file -o <file> Local target filename. If- (default), datSEO靠我a areprinted to stdout.--alias -a <alias> --position -p <pos> Slave selection. See the helpof the slSEO靠我aves command.Numerical values can be specified either with decimal (no prefix), octal (prefiSEO靠我x 0) or hexadecimal (prefix 0x) base.

此命令要求必须指定单个从属设备

必选参数介绍

SOURCEFILE:为从站中的源文件名字;PASSWORD:厂家定义的数字密码SEO靠我

可选参数介绍

–output -file -o :为读取数据的存储文件,缺省的话数据将会输出到终端;–alias:匹配从站的别名;–position:匹配从站的绝对位置;

2.17 ethercat SEO靠我foe_write

@:~$ ethercat foe_write --help ethercat foe_write [OPTIONS] <FILENAME> [<PASSWORD>]SEO靠我Store a file on a slave via FoE.This command requires a single slave to be selected.Arguments:FILENASEO靠我ME can either be a path to a file, or -. Inthe latter case, data are read from stdin andthe --outputSEO靠我-file option has to be specified.PASSWORD is the numeric password defined by the vendor.Command-specSEO靠我ific options:--output-file -o <file> Target filename on the slave.If the FILENAME argument is-, thisSEO靠我 is mandatory.Otherwise, the basename() ofFILENAME is used by default.--alias -a <alias>--position -SEO靠我p <pos> Slave selection. See the helpof the slaves command.Numerical values can be specified either SEO靠我with decimal (no prefix), octal (prefix 0) or hexadecimal (prefix 0x) base.

此命令要求必须指定单个从属设备

SEO靠我选参数介绍

FILENAME:为要发送的文件(指定路径+文件名),也可以为"-",表示从标准输入中读取文件;PASSWORD:厂家定义的数字密码;

可选参数介绍

–output -file -o :为从SEO靠我站存储的目标文件名,假如不指定名字,则为主站发送 FILENAME 的去掉路径的名字;–alias:匹配从站的别名;–position:匹配从站的绝对位置;

2.18 ethercat reg_readSEO靠我

获取对应从站寄存器的内容。

《工业以太网现场总线 EtherCAT 驱动程序设计及应用》里面的<3.1.2 ESC 存储空间> 提到 ESC 芯片具有 64KB 的DPRAM 地址空间,前 4kB (0SEO靠我x0000 ~ 0x0FFFF) 的空间为寄存器空间。0x1000~0xFFFF 的地址空间为过程数据存储空间。@:~$ ethercat reg_read --help ethercSEO靠我at reg_read [OPTIONS] <ADDRESS> [SIZE]Output a slaves register contents.This command requires a singSEO靠我le slave to be selected.Arguments:ADDRESS is the register address. Mustbe an unsigned 16 bit number.SEO靠我SIZE is the number of bytes to read and must also bean unsigned 16 bit number. ADDRESS plus SIZEmay SEO靠我not exceed 64k. The size is ignored (andcan be omitted), if a selected data typeimplies a size.TheseSEO靠我 are valid data types to use with the --type option:bool,int8, int16, int32, int64,uint8, uiSEO靠我nt16, uint32, uint64,float, double,string, octet_string, unicode_string. For sign-and-magnitSEO靠我ude coding, use the following types:sm8, sm16, sm32, sm64Command-specific options:--alias -a <alias>SEO靠我--position -p <pos> Slave selection. See the help ofthe slaves command.--type -t <type> Data type (sSEO靠我ee above).Numerical values can be specified either with decimal (no prefix), octal (prefix 0SEO靠我) or hexadecimal (prefix 0x) base.

此命令要求必须指定单个从属设备

必选参数介绍

ADDRESS:16位无符整型的寄存器地址;SIZE:要读取的对应寄存器字节数(16位SEO靠我无符号值);[SIZE] + ADDRESS不能超过64K,假如type参数隐含要读取的字节数,则可以忽略掉[SIZE]参数;

可选参数介绍

–alias -a <alias>:匹配从站的别名;–posSEO靠我ition -p <pos>:匹配从站的绝对位置; –type -t <type> : 要读取的参数数据类型;

例子

读取从站的 SM 通道数目。

@:~$ ethercat reg_reSEO靠我ad -a 0 -p 0 -t uint8 0x0005 0x08 8

读取从站的 RAM 容量,过程数据存储区容量,以 KByte 为单位。当前驱动器的容量为 8 KB。

@:~$ etSEO靠我hercat reg_read -a 0 -p 0 -t uint8 0x0006 0x08 8

读取从站的端口配置,当前值为 0f,表示支持 MII 的 Port0 和 Port1 两SEO靠我个端口。

@:~$ ethercat reg_read -a 0 -p 0 -t uint8 0x0007 0x0f 15

注意:必须有从站连接才能使用此命令,不运行应用程序也可以使用。

2SEO靠我.19 ethercat reg_write

设定对应从站寄存器的内容。

@:~$ ethercat reg_write --help ethercat reg_write [OPTIONSEO靠我S] <OFFSET> <DATA>Write data to a slaves registers.This command requires a single slave to be selectSEO靠我ed.Arguments:ADDRESS is the register address to write to.DATA depends on whether a datatype was specSEO靠我ifiedwith the --type option: If not, DATA must beeither a path to a file with data to write,or -, whSEO靠我ich means, that data are read fromstdin. If a datatype was specified, VALUE isinterpreted respectiveSEO靠我 to the given type.These are valid data types to use with the --type option:bool,int8, int16SEO靠我, int32, int64,uint8, uint16, uint32, uint64,float, double,string, octet_string, unicode_string. SEO靠我 For sign-and-magnitude coding, use the following types:sm8, sm16, sm32, sm64Command-specific opSEO靠我tions:--alias -a <alias>--position -p <pos> Slave selection. See the help ofthe slaves command.--typSEO靠我e -t <type> Data type (see above).--emergency -e Send as emergency request.Numerical values can be sSEO靠我pecified either with decimal (no prefix), octal (prefix 0) or hexadecimal (prefix 0x) base.

SEO靠我命令要求必须指定单个从属设备

必选参数介绍

ADDRESS:16位无符整型的寄存器地址;DATA:要写入寄存器的数据;假如制定了"ype"数据类型,那么"DATA"根据指定的数据类型对数据进行解析;假SEO靠我如未指定"type"数据类型,则"DATA"可以为指定的文件或将"DATA"设置为"-",表示从标准输入中获得数据;

可选参数介绍

–alias -a <alias>:匹配从站的别名;–positionSEO靠我 -p <pos>:匹配从站的绝对位置; –type -t <type> : 要设置的参数数据类型;–emergency -e:以紧急的方式请求写入文件;

例子

向从站5的寄存器0x09SEO靠我2c(代表系统时间偏移)写入数据200。

sudo ethercat reg_write -p 5 -t sm32 0x092c 200

注意:必须有从站连接才能使用此命令,不运行应用程序也可以使用。

2.SEO靠我20 ethercat sii_read

该命令行用以读取从站的SII内容。

@:~$ ethercat sii_read --help ethercat sii_read [OPTIONSEO靠我S]Output a slaves SII contents.This command requires a single slave to be selected.Without the --verSEO靠我bose option, binary SII contents are output.With the --verbose option given, a textual repreSEO靠我sentation of the data is output, that is separated by SII category names.Command-speSEO靠我cific options:--alias -a <alias>--position -p <pos> Slave selection. See the help ofthe slaves commaSEO靠我nd.--verbose -v Output textual data withcategory names.Numerical values can be specified either withSEO靠我 decimal (no prefix), octal (prefix 0) or hexadecimal (prefix 0x) base.

此命令要求必须指定单个从属设备

可选参数介SEO靠我

–alias -a <alias>:匹配从站的别名;–position -p <pos>:匹配从站的绝对位置; –verbose -v : 分类显示数据文本内容;

例子:

显示从站siSEO靠我i的内容。

@:~$ ethercat sii_read -a 0 -p 0 <d���ff � $ 2DM522-EC 2DM Slave 2DM SlSEO靠我avesDSynchronTxPdoMapping errorcode digtal_inputsactual_velocityfollow_err_actualTorque_actuSEO靠我al_value_probe_pos1_pos_value�Touch_probe_pos1_neg_value�Touch_probe_pos2_pos_value�Touch_probe_pos2SEO靠我_neg_valueRxPdoMapping target_torqueprofile_velocityprofile_accelerationprofile_decelerationSEO靠我 controlwordop_modetarget_positionTouch_probe_functionphysical_outputbit_masktargrt_velocityhome_offSEO靠我sethome_methodhome_switch_velocityhome_zero_velocityhome_acceleration/(�)�&"d 2L� ?`Aa` d`�`SEO靠我�`�` �` �` ��a` l` �` ��?`w`��3l@``z` �`�` �`� �@``�``�` �`� �q`�` �` �` �` �`� �|` �`�`" �`# �`$ <�SEO靠我�@:~$

以分类数据文本形式显示sii的内容。

@:~$ ethercat sii_read -a 0 -p 0 -v SII Area:00 3c 00 00 64 00 00 00 SEO靠我00 00 00 00 00 00 91 0088 88 66 66 03 03 19 20 20 06 19 20 00 00 00 0000 00 00 00 00 00 00 00 00 00 SEO靠我00 00 00 00 00 0000 10 80 00 00 12 00 01 04 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 SEO靠我00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 SEO靠我00 0000 00 00 00 00 00 00 00 00 00 00 00 0f 00 01 00 SII Category 0x000a (STRINGS), 286 wordSEO靠我s24 09 32 44 4d 35 32 32 2d 45 43 09 32 44 4d 2053 6c 61 76 65 0a 32 44 4d 20 53 6c 61 76 65 7302 44SEO靠我 43 08 53 79 6e 63 68 72 6f 6e 0c 54 78 5064 6f 4d 61 70 70 69 6e 67 09 65 72 72 6f 72 636f 64 65 0aSEO靠我 73 74 61 74 75 73 77 6f 72 64 0f 6f70 5f 6d 6f 64 65 5f 64 69 73 70 6c 61 79 0f 6163 74 75 61 6c 5fSEO靠我 70 6f 73 69 74 69 6f 6e 12 546f 75 63 68 5f 70 72 6f 62 65 5f 73 74 61 74 7573 1a 54 6f 75 63 68 5fSEO靠我 70 72 6f 62 65 5f 70 6f73 31 5f 70 6f 73 5f 76 61 6c 75 65 1a 54 6f 7563 68 5f 70 72 6f 62 65 5f 70SEO靠我 6f 73 31 5f 6e 6567 5f 76 61 6c 75 65 1a 54 6f 75 63 68 5f 70 726f 62 65 5f 70 6f 73 32 5f 70 6f 73SEO靠我 5f 76 61 6c75 65 1a 54 6f 75 63 68 5f 70 72 6f 62 65 5f 706f 73 32 5f 6e 65 67 5f 76 61 6c 75 65 0dSEO靠我 64 6967 74 61 6c 5f 69 6e 70 75 74 73 0f 61 63 74 7561 6c 5f 76 65 6c 6f 63 69 74 79 11 66 6f 6c 6cSEO靠我6f 77 5f 65 72 72 5f 61 63 74 75 61 6c 13 54 6f72 71 75 65 5f 61 63 74 75 61 6c 5f 76 61 6c 7565 0c SEO靠我52 78 50 64 6f 4d 61 70 70 69 6e 67 0b 636f 6e 74 72 6f 6c 77 6f 72 64 07 6f 70 5f 6d 6f64 65 0f 74 SEO靠我61 72 67 65 74 5f 70 6f 73 69 74 696f 6e 14 54 6f 75 63 68 5f 70 72 6f 62 65 5f 6675 6e 63 74 69 6f SEO靠我6e 10 70 68 79 73 69 63 61 6c5f 6f 75 74 70 75 74 73 08 62 69 74 5f 6d 61 736b 0f 74 61 72 67 72 74 SEO靠我5f 76 65 6c 6f 63 69 7479 0d 74 61 72 67 65 74 5f 74 6f 72 71 75 65 1070 72 6f 66 69 6c 65 5f 76 65 SEO靠我6c 6f 63 69 74 7914 70 72 6f 66 69 6c 65 5f 61 63 63 65 6c 65 7261 74 69 6f 6e 14 70 72 6f 66 69 6c SEO靠我65 5f 64 6563 65 6c 65 72 61 74 69 6f 6e 0b 68 6f 6d 65 5f6f 66 66 73 65 74 0b 68 6f 6d 65 5f 6d 65 SEO靠我74 686f 64 14 68 6f 6d 65 5f 73 77 69 74 63 68 5f 7665 6c 6f 63 69 74 79 12 68 6f 6d 65 5f 7a 65 726SEO靠我f 5f 76 65 6c 6f 63 69 74 79 11 68 6f 6d 65 5f61 63 63 65 6c 65 72 61 74 69 6f 6e SII CategoSEO靠我ry 0x001e (General), 16 words02 00 01 01 01 2f 00 00 00 01 00 04 00 00 03 0011 00 00 00 00 00 00 00 SEO靠我00 00 00 00 00 00 00 00 SII Category 0x0028 (FMMU), 2 words01 02 03 ff SII Category SEO靠我0x0029 (SyncM), 16 words00 10 80 00 26 00 01 01 00 12 00 01 22 00 01 0200 14 11 00 64 00 01 03 00 16SEO靠我 1f 00 20 00 01 04 SII Category 0x0032 (TXPDO), 76 words00 1a 0a 03 00 06 01 00 3f 60 00 07 SEO靠我06 10 00 0041 60 00 08 06 10 00 00 61 60 00 09 02 08 00 0064 60 00 0a 04 20 00 00 b9 60 00 0b 06 10 SEO靠我00 00ba 60 00 0c 04 20 00 00 bb 60 00 0d 04 20 00 00bc 60 00 0e 04 20 00 00 bd 60 00 0f 04 20 00 00fSEO靠我d 60 00 10 07 20 00 00 01 1a 03 ff 00 06 00 0061 60 00 09 02 08 00 00 6c 60 00 11 04 20 00 00f4 60 0SEO靠我0 12 04 20 00 00 02 1a 02 ff 00 06 00 003f 60 00 07 06 10 00 00 77 60 00 13 03 10 00 0003 1a 00 ff 0SEO靠我0 06 00 00 SII Category 0x0033 (RXPDO), 108 words00 16 06 02 00 14 01 00 40 60 00 15 06 10 0SEO靠我0 0060 60 00 16 02 08 00 00 7a 60 00 17 04 20 00 00b8 60 00 18 06 10 00 00 fe 60 01 19 07 20 00 00feSEO靠我 60 02 1a 07 20 00 00 01 16 06 ff 00 14 00 0040 60 00 15 06 10 00 00 60 60 00 16 02 08 00 00ff 60 00SEO靠我 1b 04 20 00 00 b8 60 00 18 06 10 00 00fe 60 01 19 07 20 00 00 fe 60 02 1a 07 20 00 0002 16 06 ff 00SEO靠我 14 00 00 71 60 00 1c 03 10 00 0081 60 00 1d 07 20 00 00 83 60 00 1e 07 20 00 0084 60 00 1f 07 20 00SEO靠我 00 fe 60 01 19 07 20 00 00fe 60 02 1a 07 20 00 00 03 16 05 ff 00 14 00 007c 60 00 20 04 20 00 00 98SEO靠我 60 00 21 02 08 00 0099 60 01 22 04 20 00 00 99 60 02 23 04 20 00 009a 60 00 24 07 20 00 00 SEO靠我SII Category 0x003c (DC), 24 words00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0301 00 04 00 00 00 0SEO靠我0 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 01 00 05 00 00 00 00 00

注意:必须有从站连接才能使用此命令,不运行应用程序SEO靠我也可以使用。

2.21 ethercat sii_write

该命令行用以设置从站的SII内容。

@:~$ ethercat sii_write --help ethercat sii_wrSEO靠我ite [OPTIONS] <FILENAME>Write SII contents to a slave.This command requires a single slave to be selSEO靠我ected.The file contents are checked for validity and integrity. These checks can be overriddSEO靠我en with the --force option.Arguments:FILENAME must be a path to a file that contains apositive numbeSEO靠我r of words. If it is -,data are read from stdin.Command-specific options:--alias -a <alias>--positioSEO靠我n -p <pos> Slave selection. See the help ofthe slaves command.--force -f Override validity checks.NuSEO靠我merical values can be specified either with decimal (no prefix), octal (prefix 0) or hexadecSEO靠我imal (prefix 0x) base.

此命令要求必须指定单个从属设备

可选参数介绍

–alias -a <alias>:匹配从站的别名;–position -p <pos>:匹配从站的绝对位置;SEO靠我 –verbose -v : 分类显示数据文本内容;

注意:必须有从站连接才能使用此命令,不运行应用程序也可以使用。

2.22 ethercat data

该命令行以二进制的形式显示所有过程SEO靠我数据。

ethercat data [OPTIONS]Output binary domain process data.Data of multiple domains are concatenateSEO靠我d.Command-specific options:--domain -d <index> Positive numerical domain index.If omitted, data of aSEO靠我ll domainsare output.Numerical values can be specified either with decimal (no prefix), octaSEO靠我l (prefix 0) or hexadecimal (prefix 0x) base.

可选参数介绍

–domain -d <index>:域的索引值,假如不填写参数则显示所有过程数据; SEO靠我 @:~$ ethercat data 7

注意:必须运行应用程序才可以使用。

2.23 ethercat config

该命令行用来显示从站的配置。

@:~$ ethercat confSEO靠我ig --help ethercat config [OPTIONS]Show slave configurations.Without the --verbose option, sSEO靠我lave configurations are output one-per-line. Example:1001:0 0x0000003b/0x02010000 3 OP SEO靠我 | | | | | | | \- Application-layer | | | state of the attached | | | slavSEO靠我e, or -, if no | | | slave is attached. | | \- Absolute decimal ring | | posSEO靠我ition of the attached | | slave, or - if none | | attached. | \- Expected veSEO靠我ndor ID and product code (both | hexadecimal). \- Alias address and relative positioSEO靠我n (both decimal).With the --verbose option given, the configured PDOs and SDOs are output inSEO靠我 addition.Configuration selection:Slave configurations can be selected withthe --alias and --positioSEO靠我n parameters as follows:1) If neither the --alias nor the --position optionis given, all slave confiSEO靠我gurations are displayed.2) If only the --position option is given, an aliasof zero is assumed (see 4SEO靠我)).3) If only the --alias option is given, all slaveconfigurations with the given alias addressare dSEO靠我isplayed.4) If both the --alias and the --position option aregiven, the selection can match a singleSEO靠我configuration, that is displayed, if it exists.Command-specific options:--alias -a <alias> ConfiguraSEO靠我tion alias (see above).--position -p <pos> Relative position (see above).--verbose -v Show detailed SEO靠我configurations.Numerical values can be specified either with decimal (no prefix), octal (preSEO靠我fix 0) or hexadecimal (prefix 0x) base.

可选参数介绍

–alias -a <alias>:匹配从站的别名;–position -p <pos>:匹配从站的绝对位置SEO靠我; –verbose -v : 显示详细的配置信息;

例子:

显示从站的配置信息和状态。

@:~$ ethercat config 0:0 0x66668888/0x2019SEO靠我0303 0 OP

下面这个例子采用 -v 参数用来显示更加详细的配置信息。

@:~$ ethercat config -a 0 -p 0 -v Alias: 0 PosiSEO靠我tion: 0 Vendor Id: 0x66668888 Product code: 0x20190303 Attached slave: 0 (OPSEO靠我) Watchdog divider: (Default) Watchdog intervals: (Default) SM2, Dir: OutputSEO靠我, Watchdog: EnablePDO 0x1600PDO entry 0x6040:00, 16 bitPDO entry 0x607b:00, 8 bitPDO entry 0x6060:00SEO靠我, 8 bitPDO entry 0x607a:00, 32 bit SM3, Dir: Input, Watchdog: EnablePDO 0x1a00PDO entry 0x60SEO靠我41:00, 16 bitPDO entry 0x606c:00, 32 bitPDO entry 0x6064:00, 32 bit SDO configuration:None. SEO靠我 IDN configuration:None. Feature flags:None. DC configuration:AssignActivate:SEO靠我 0x0300Cycle [ns] Shift [ns]SYNC0 1000000 0SYNC1 0 0

注意:必须运行应用程序才可以使用。

2.24 ethercat domains

该命令行用来显示域的SEO靠我信息。

@:~$ ethercat domains --help ethercat domains [OPTIONS]Show configured domains.Without thSEO靠我e --verbose option, the domains are displayed one-per-line. Example:Domain0: LogBaseAddr 0x0SEO靠我0000000, Size 6, WorkingCounter 0/1The domains base address for the logical datagram (LRD/LWSEO靠我R/LRW) is displayed followed by the domains process data size in byte. The last values are tSEO靠我he current datagram working counter sum and the expected working counter sum. If theSEO靠我 values are equal, all PDOs were exchanged during the last cycle.If the --verbose option is SEO靠我given, the participating slave configurations/FMMUs and the current process data are SEO靠我 additionally displayed:Domain1: LogBaseAddr 0x00000006, Size 6, WorkingCounter 0/1SlaveConfig 1001:SEO靠我0, SM3 ( Input), LogAddr 0x00000006, Size 600 00 00 00 00 00The process data are displayed as hexadeSEO靠我cimal bytes.Command-specific options:--domain -d <index> Positive numerical domain index.If omitted,SEO靠我 all domains aredisplayed.--verbose -v Show FMMUs and process datain addition.Numerical values can bSEO靠我e specified either with decimal (no prefix), octal (prefix 0) or hexadecimal (prefix 0x) basSEO靠我e.

可选参数介绍

–domain -d <index>:域的索引号,为正整数。如果没有填写该值则显示所有的域; –verbose -v : 显示域的详细信息(FMMU和过程数据的信息)SEO靠我

例子

@:~$ ethercat domains Domain0: LogBaseAddr 0x00000000, Size 18, WorkingCounter 3/3

结果说明:

LSEO靠我ogBaseAddr:逻辑寻址的逻辑基地址;Size:域交换数据的字节数;WorkingCounter:第一个数字是WKC的当前值,第二个数字是WKC的期望值;

设置 -v 参数后显示的结果。

@:~$ SEO靠我ethercat domains -v Domain0: LogBaseAddr 0x00000000, Size 18, WorkingCounter 3/3SlaveConfig SEO靠我0:0, SM2 (Output), LogAddr 0x00000000, Size 81f 00 00 08 0a 00 00 00 SlaveConfig 0:0, SM3 ( Input), SEO靠我LogAddr 0x00000008, Size 1037 02 00 00 00 00 00 00 00 00

结果说明:

SlaveConfig:从机配置信息,主要包含别名和地址(绝对地址或相对地址)SEO靠我;SM2:同步管理器2;LogAddr:FMMU映射的地址;Size:映射地址的大小;数据位:十六进制显示的过程数据;

注意:必须运行应用程序才可以使用。

2.25 ethercat crc

该命令行用以 SEO靠我CRC 错误诊断。

@:~$ ethercat crc --help ethercat crc ethercat crc resetCRC error register SEO靠我diagnosis.CRC - CRC Error Counter 0x300, 0x302, 0x304, 0x306 PHY - Physical Interface Error SEO靠我Counter 0x301, 0x303, 0x305, 0x307 FWD - Forwarded RX Error Counter 0x308, 0x309, 0x30a, 0x3SEO靠我0b NXT - Next slave

例子:

@:~$ ethercat crc|Port 0 |Port 1 |Port 2 |Port 3 ||CRC PHY FWD NXT|CRCSEO靠我 PHY FWD NXT|CRC PHY FWD NXT|CRC PHY FWD NXT|0| 0 0 0 | | | |2DM522-EC

注意:必须有从站连接才能使用此命令,不运行应用程序也可以使用SEO靠我

2.26 ethercat rescan

该命令行用以重新扫描总线上的从站信息。

@:~$ ethercat rescan --help ethercat rescanRescan thSEO靠我e bus.Command a bus rescan. Gathered slave information will be forgotten and slaves will be SEO靠我read in again.

例子:

该命令执行后不会有任何信息输出。

@:~$ ethercat rescan

注意:必须有从站连接才能使用此命令,不运行应用程序也可以使用。

2.27 ethercat csSEO靠我truct

该命令行生成的PDO信息可以直接被应用层的ecrt_slave_config_pdos()函数调用。

@:~$ ethercat cstruct --help ethercatSEO靠我 cstruct [OPTIONS]Generate slave PDO information in C language.The output C code can be used directlSEO靠我y with the ecrt_slave_config_pdos() function of the application interface.Command-spSEO靠我ecific options:--alias -a <alias>--position -p <pos> Slave selection. See the help ofthe slaves commSEO靠我and.Numerical values can be specified either with decimal (no prefix), octal (prefix 0) or hSEO靠我exadecimal (prefix 0x) base.

可选参数介绍

–alias -a <alias>:匹配从站的别名;–position -p <pos>:匹配从站的绝对位置;

例子

@:~$ etSEO靠我hercat cstruct -a 0 -p 0 /* Master 0, Slave 0, "2DM522-EC"* Vendor ID: 0x66668888* Product cSEO靠我ode: 0x20190303* Revision number: 0x20190620*/ec_pdo_entry_info_t slave_0_pdo_entries[] = {{0x6040, SEO靠我0x00, 16}, /* controlword */{0x6060, 0x00, 8}, /* op_mode */{0x607a, 0x00, 32}, /* target_position *SEO靠我/{0x60b8, 0x00, 16}, /* Touch_probe_function */{0x60fe, 0x01, 32}, /* physical_outputs */{0x60fe, 0xSEO靠我02, 32}, /* bit_mask */{0x603f, 0x00, 16}, /* errorcode */{0x6041, 0x00, 16}, /* statusword */{0x606SEO靠我1, 0x00, 8}, /* op_mode_display */{0x6064, 0x00, 32}, /* actual_position */{0x60b9, 0x00, 16}, /* ToSEO靠我uch_probe_status */{0x60ba, 0x00, 32}, /* Touch_probe_pos1_pos_value */{0x60bb, 0x00, 32}, /* Touch_SEO靠我probe_pos1_neg_value */{0x60bc, 0x00, 32}, /* Touch_probe_pos2_pos_value */{0x60bd, 0x00, 32}, /* ToSEO靠我uch_probe_pos2_neg_value */{0x60fd, 0x00, 32}, /* digtal_inputs */ };ec_pdo_info_t slave_0_pdos[] = SEO靠我{{0x1600, 6, slave_0_pdo_entries + 0}, /* RxPdoMapping */{0x1a00, 10, slave_0_pdo_entries + 6}, /* TSEO靠我xPdoMapping */ };ec_sync_info_t slave_0_syncs[] = {{0, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},{1, ECSEO靠我_DIR_INPUT, 0, NULL, EC_WD_DISABLE},{2, EC_DIR_OUTPUT, 1, slave_0_pdos + 0, EC_WD_ENABLE},{3, EC_DIRSEO靠我_INPUT, 1, slave_0_pdos + 1, EC_WD_DISABLE},{0xff} };

注意:必须运行应用程序才可以使用。

sudo ethercat cstruct -a 0

记下电机SEO靠我VenderID,ProductID,PDO信息

2.28 ethercat eoe

该命令行用以显示EOE的统计信息,包括主站的发送率和接收率(Byte/s)。

@:~$ ethercat eoe --hSEO靠我elp ethercat eoeDisplay Ethernet over EtherCAT statictics.The TxRate and RxRate are displayed in BytSEO靠我e/s.

注意:必须运行应用程序才可以使用。

2.29 ethercat ip

设置 EOE 的 IP 参数地址。

@:~$ ethercat ip --help ethercat ip [OPTIONS] SEO靠我<ARGS>Set EoE IP parameters.This command requires a single slave to be selected.IP parameters can beSEO靠我 appended as argument pairs:addr <IPv4>[/prefix] IP address (optionally withdecimal subnet prefix)lSEO靠我ink <MAC> Link-layer address (may containcolons or hyphens)default <IPv4> Default SEO靠我gatewaydns <IPv4> DNS servername <hostname> Host name (max. 32 byte)IPv4 adresses cSEO靠我an be given either in dot notation or as hostnames, which will be automatically resolved.Command-speSEO靠我cific options:--alias -a <alias>--position -p <pos> Slave selection. See the help ofthe slavesSEO靠我 command.Numerical values can be specified either with decimal (no prefix), octal (prefix 0) or hexaSEO靠我decimal (prefix 0x) base.

此命令要求必须指定单个从属设备

必选参数介绍

IP参数可以作为参数元组添加:

addr <IPv4> [/prefix]: IP地址(可选十进制子网前缀SEO靠我);link <MAC>: 链路层地址(可能包含colons or hyphens);default <IPv4>: 默认网关;dns <IPv4>: dns服务器;name <hostname>: SEO靠我主机名(最大32字节);

IPv4地址可以用点表示法,比如说"192.168.0.1"或主机名,该命令行将会自动解析。

可选参数介绍

–alias -a <alias>:匹配从站的别名;–positionSEO靠我 -p <pos>:匹配从站的绝对位置;

注意:必须有从站连接才能使用此命令,不运行应用程序也可以使用。

“SEO靠我”的新闻页面文章、图片、音频、视频等稿件均为自媒体人、第三方机构发布或转载。如稿件涉及版权等问题,请与 我们联系删除或处理,客服邮箱:html5sh@163.com,稿件内容仅为传递更多信息之目的,不代表本网观点,亦不代表本网站赞同 其观点或证实其内容的真实性。

网站备案号:浙ICP备17034767号-2