Hi, This is the PDO structures we use for EL3064 modules (available if you run the "ethercat cstruct" command for your module):
ec_pdo_entry_info_t EL3064_pdoEntries[] = { // Ch.1 (0) {0x6000, 0x01, 1}, /* Underrange */ {0x6000, 0x02, 1}, /* Overrange */ {0x6000, 0x03, 2}, /* Limit 1 */ {0x6000, 0x05, 2}, /* Limit 2 */ {0x6000, 0x07, 1}, /* Error */ {0x0000, 0x00, 1}, /* Gap */ {0x0000, 0x00, 6}, /* Gap */ {0x6000, 0x0f, 1}, /* TxPDO State */ {0x6000, 0x10, 1}, /* TxPDO Toggle */ {0x6000, 0x11, 16}, /* Value */ // Ch.2 (10) {0x6010, 0x01, 1}, /* Underrange */ {0x6010, 0x02, 1}, /* Overrange */ {0x6010, 0x03, 2}, /* Limit 1 */ {0x6010, 0x05, 2}, /* Limit 2 */ {0x6010, 0x07, 1}, /* Error */ {0x0000, 0x00, 1}, /* Gap */ {0x0000, 0x00, 6}, /* Gap */ {0x6010, 0x0f, 1}, /* TxPDO State */ {0x6010, 0x10, 1}, /* TxPDO Toggle */ {0x6010, 0x11, 16}, /* Value */ // Ch.3 (20) {0x6020, 0x01, 1}, /* Underrange */ {0x6020, 0x02, 1}, /* Overrange */ {0x6020, 0x03, 2}, /* Limit 1 */ {0x6020, 0x05, 2}, /* Limit 2 */ {0x6020, 0x07, 1}, /* Error */ {0x0000, 0x00, 1}, /* Gap */ {0x0000, 0x00, 6}, /* Gap */ {0x6020, 0x0f, 1}, /* TxPDO State */ {0x6020, 0x10, 1}, /* TxPDO Toggle */ {0x6020, 0x11, 16}, /* Value */ // Ch.4 (30) {0x6030, 0x01, 1}, /* Underrange */ {0x6030, 0x02, 1}, /* Overrange */ {0x6030, 0x03, 2}, /* Limit 1 */ {0x6030, 0x05, 2}, /* Limit 2 */ {0x6030, 0x07, 1}, /* Error */ {0x0000, 0x00, 1}, /* Gap */ {0x0000, 0x00, 6}, /* Gap */ {0x6030, 0x0f, 1}, /* TxPDO State */ {0x6030, 0x10, 1}, /* TxPDO Toggle */ {0x6030, 0x11, 16}, /* Value */ }; ec_pdo_info_t EL3064_pdos[] = { {0x1a00, 10, EL3064_pdoEntries + 0}, /* TxPDO-Map Channel 1 */ {0x1a02, 10, EL3064_pdoEntries + 10}, /* TxPDO-Map Channel 2 */ {0x1a04, 10, EL3064_pdoEntries + 20}, /* TxPDO-Map Channel 3 */ {0x1a06, 10, EL3064_pdoEntries + 30}, /* TxPDO-Map Channel 4 */ }; ec_sync_info_t EL3064_syncs[] = { {0, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE}, {1, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE}, {2, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE}, {3, EC_DIR_INPUT, 4, EL3064_pdos + 0, EC_WD_DISABLE}, {0xff} }; To configure it and use it you call something like the following commands on startup: slaveConfig = ecrt_master_slave_config(master, alias, position, vendorID, productCode); ecrt_slave_config_pdos(slaveConfig, EC_END, EL3064_syncs); value1Offset = ecrt_slave_config_reg_pdo_entry(slaveConfig, EL3064_pdoEntries[9].index, EL3064_pdoEntries[9].subindex, domain, &bitPos); value2Offset = ecrt_slave_config_reg_pdo_entry(slaveConfig, EL3064_pdoEntries[19].index, EL3064_pdoEntries[19].subindex, domain, &bitPos); value3Offset = ecrt_slave_config_reg_pdo_entry(slaveConfig, EL3064_pdoEntries[29].index, EL3064_pdoEntries[29].subindex, domain, &bitPos); value4Offset = ecrt_slave_config_reg_pdo_entry(slaveConfig, EL3064_pdoEntries[39].index, EL3064_pdoEntries[39].subindex, domain, &bitPos); status1Offset = ecrt_slave_config_reg_pdo_entry(slaveConfig, EL3064_pdoEntries[0].index, EL3064_pdoEntries[9].subindex, domain, &bitPos); statue2Offset = ecrt_slave_config_reg_pdo_entry(slaveConfig, EL3064_pdoEntries[10].index, EL3064_pdoEntries[19].subindex, domain, &bitPos); status3Offset = ecrt_slave_config_reg_pdo_entry(slaveConfig, EL3064_pdoEntries[20].index, EL3064_pdoEntries[29].subindex, domain, &bitPos); status4Offset = ecrt_slave_config_reg_pdo_entry(slaveConfig, EL3064_pdoEntries[30].index, EL3064_pdoEntries[39].subindex, domain, &bitPos); The module returns a value between 0 and 32767 (int16 value) to represent 0 - 10V. From that you can figure out your scale factor. You can use a LRW (read/write) domain. Regards, Graeme. From: Sy Meshkat <sy.mesh...@dspcg.com> Sent: Tuesday, 9 July 2019 6:33 AM To: Graeme Foot <graeme.f...@touchcut.com> Subject: Question on use of EL3064 (Beckhoff ADC) Dear Graeme, This is Sy Meshkat with DSP Control Group. Rahul and I talked/wrote to you about Yaskawa EtherCAT Sigma drive in summer of 2017. Thanks to your helps our application is application is working fine. Now, the question I have is weather you have any example of Beckhoff EL3064 Analog to Digital Converter as part of Linux EtherLab application stack. This is a simple 4 channel ADC, but we couldn't find this hardware in IgH's EtherCAT master's hardware. Best regards, Sy Meshkat [cid:image001.jpg@01D5363E.BF036280] DSP Control Group, Inc. 4445 W 77th Street Minneapolis, MN 55435 general . t: 1 + ( 952 ) 831 - 9556 fax f: 1 + ( 952 ) 831 - 4697 cell c: 1 + ( 612 ) 309 - 5478 direct e: 1 + ( 952 ) 831 - 2349 website i: www.dspcg.com<http://www.dspcg.com/> ----------------------------------------------------------------------------------------------------------------- NOTICE: The foregoing message (including all attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. Sections 2510-2521, is CONFIDENTIAL. If you are not the intended recipient of this message, you are hereby notified that any retention, dissemination, distribution or copying of this communication is strictly prohibited. Please reply to the sender that you have received this message in error; then delete it From: Rahul Deshpande [mailto:rahulg...@gmail.com] Sent: Thursday, August 24, 2017 12:58 PM To: sy.meshkat Subject: Fwd: RE: No CoE communication ---------- Forwarded message ---------- From: "Graeme Foot" <graeme.f...@touchcut.com<mailto:graeme.f...@touchcut.com>> Date: Aug 23, 2017 01:49 Subject: RE: No CoE communication To: "Rahul Deshpande" <rahulg...@gmail.com<mailto:rahulg...@gmail.com>> Cc: "etherlab-users@etherlab.org<mailto:etherlab-users@etherlab.org>" <etherlab-users@etherlab.org<mailto:etherlab-users@etherlab.org>> Hi, I have attached a test app to have a look at. It is a (very) cut down version of how my app works. Of course I use RTAI, so it won't be compatible with your Xenomi environment. In main.c at the top of runECat() I have a list of EtherCAT devices and their addresses. It is hard coded here but can of course be loaded from a config file. The device names match devices in the etherCATSlaves.c file. etherCATMaster.c contains the code to configure and run the master. etherCATSlaves.c contains each slave's code. yaskawaSGDV_create() - configures the device and gets the PDO command offsets yaskawaSGDV_prepareToRun() - calculates each commands address (after the domains are populated and allocated) - sets cyclic synchronous position mode (optional, the mode can be set at any time while running) - sets the control word to zero, just in case yaskawaSGDV_run() - is called once each scan. add code here to control the axis yaskawaSGDV_prepareToStop() - is called when the app is closing. add any code here to clean up your axis Note: In this app the prepareToStop() functions are called once and then the app is shut down immediately. In reality you should continue your realtime cycle until all of the devices are stopped, disabled and safe to turn off. The app also relies on some of my patches. I hope this helps Regards, Graeme. -----Original Message----- From: etherlab-users [mailto:etherlab-users-boun...@etherlab.org<mailto:etherlab-users-boun...@etherlab.org>] On Behalf Of Graeme Foot Sent: Wednesday, 16 August 2017 10:42 a.m. To: Rahul Deshpande <rahulg...@gmail.com<mailto:rahulg...@gmail.com>>; etherlab-users@etherlab.org<mailto:etherlab-users@etherlab.org> Subject: Re: [etherlab-users] No CoE communication Hi, I've been asked to let you know what master version and patches I'm using. I'm still running an old version (2526 from the stable-1.5 branch, 12/02/2013). The script I use to download it is attached (004-etherlab_master). I use buildroot to create my linux system, so the script tar's the master folder and puts it in the buildroot downloads folder. Note: I also use a really old buildroot from 2012 with a few modifications, but I have attached the mk file that it uses. The patches that I apply are also attached. The build options I use are: --with-linux-dir="<linux dir>" --enable-cycles --enable-rtdm --enable-e100 --enable-e1000 --enable-e1000e --enable-cx2100 I use RTAI, but that shouldn't make any difference. Regards, Graeme. -----Original Message----- From: etherlab-users [mailto:etherlab-users-boun...@etherlab.org<mailto:etherlab-users-boun...@etherlab.org>] On Behalf Of Graeme Foot Sent: Tuesday, 15 August 2017 12:39 p.m. To: Rahul Deshpande <rahulg...@gmail.com<mailto:rahulg...@gmail.com>>; etherlab-users@etherlab.org<mailto:etherlab-users@etherlab.org> Subject: Re: [etherlab-users] No CoE communication Remember to reply-all to mail the forum as well. Line 85 has: #define Yaskawa_Sigma7 0x00000539, 0x02200301 This is different to my drive, so it may still be the Sigma 7 id causing a mismatch, but it is the id being returned from the ethercat struct command. Other than that, I've got no idea. Graeme.
_______________________________________________ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users