Hi Gavin, Thanks for your advices and I really appreciated. I still get several questions that I want to double check with you.
First, I assume the error on return non-zero exit code in case of error only check whether the linux command is executed successfully or not. It does not actually get the status of the slave to see whether it received the file successfully. For example, I am trying to send a file in a folder over ethercat while leave the folder empty by issuing the command ethercat -m0 foe_write -p0 /var/ftp/gather/Drive_configuration.ccd it shows that Failed to open '/var/ftp/gather/Drive_configuration.ccd' in stderr. However, the exit code is still 0 which means no error. Second, is there a specific document on how to use ioctl to send file over FoE in detail because I am not exactly sure on where to start on the source code. Best regards, Lingjie (Kimi) Kong Software Engineer - Servo Control Engineering || Common Solution Group || Applied Materials lingjie_k...@amat.com<mailto:lingjie_k...@amat.com> || Office: (408)563-4400 || Cell: (858)242-9076 The content of this message is Applied Materials Confidential. If you are not the intended recipient and have received this message in error, any use or distribution is prohibited. Please notify me immediately by reply e-mail and delete this message from your computer system. Thank you. ** Save a tree. Please don't print this e-mail unless needed. From: Gavin Lambert [mailto:gav...@compacsort.com] Sent: Thursday, September 14, 2017 3:52 PM To: Lingjie Kong --TR <lingjie_k...@amat.com>; etherlab-dev@etherlab.org Subject: RE: foe_write result The "foe_write" ethercat command will print an error on stderr and return a non-zero exit code in case of error. It's intended to be used interactively by whoever is commissioning the system, although it can be used in a script. Alternatively if you want to call it programmatically you could use the equivalent master ioctl call directly, which provides the specific FoE error code. The unofficial patchset also adds some additional ecrt.h APIs that you can call for FoE, although these require more "plumbing" to use. From: lingjie_k...@amat.com<mailto:lingjie_k...@amat.com> Sent: Friday, 15 September 2017 10:25 To: etherlab-dev@etherlab.org<mailto:etherlab-dev@etherlab.org> Subject: [etherlab-dev] foe_write result Hi, I am working on file over ethercat (FOE) to send motor driver's configuration file. From the ethercat 1.5.2 document, it looks like I can use foe_write to send the file. However, I am just wondering that what I can check to see whether the file transfer is successfully or not. Best regards, Lingjie (Kimi) Kong Software Engineer - Servo Control Engineering || Common Solution Group || Applied Materials lingjie_k...@amat.com<mailto:lingjie_k...@amat.com> || Office: (408)563-4400 ________________________________
_______________________________________________ etherlab-dev mailing list etherlab-dev@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-dev