types.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  *
00003  *  $Id: types.c 490 2006-08-02 12:25:25Z fp $
00004  *
00005  *  Copyright (C) 2006  Florian Pose, Ingenieurgemeinschaft IgH
00006  *
00007  *  This file is part of the IgH EtherCAT Master.
00008  *
00009  *  The IgH EtherCAT Master is free software; you can redistribute it
00010  *  and/or modify it under the terms of the GNU General Public License
00011  *  as published by the Free Software Foundation; either version 2 of the
00012  *  License, or (at your option) any later version.
00013  *
00014  *  The IgH EtherCAT Master is distributed in the hope that it will be
00015  *  useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  *  GNU General Public License for more details.
00018  *
00019  *  You should have received a copy of the GNU General Public License
00020  *  along with the IgH EtherCAT Master; if not, write to the Free Software
00021  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00022  *
00023  *  The right to use EtherCAT Technology is granted and comes free of
00024  *  charge under condition of compatibility of product made by
00025  *  Licensee. People intending to distribute/sell products based on the
00026  *  code, have to sign an agreement to guarantee that products using
00027  *  software based on IgH EtherCAT master stay compatible with the actual
00028  *  EtherCAT specification (which are released themselves as an open
00029  *  standard) as the (only) precondition to have the right to use EtherCAT
00030  *  Technology, IP and trade marks.
00031  *
00032  *****************************************************************************/
00033 
00040 /*****************************************************************************/
00041 
00042 #include <linux/module.h>
00043 
00044 #include "globals.h"
00045 #include "types.h"
00046 
00047 /*****************************************************************************/
00048 
00049 const ec_sync_t mailbox_sm0 = {0x1800, 246, 0x26, {NULL}};
00050 const ec_sync_t mailbox_sm1 = {0x18F6, 246, 0x22, {NULL}};
00051 
00052 /******************************************************************************
00053  *  slave objects
00054  *****************************************************************************/
00055 
00056 const ec_slave_type_t Beckhoff_EK1100 = {
00057     "Beckhoff", "EK1100", "Bus Coupler", EC_TYPE_BUS_COUPLER,
00058     {NULL} // no sync managers
00059 };
00060 
00061 /*****************************************************************************/
00062 
00063 const ec_slave_type_t Beckhoff_EK1110 = {
00064     "Beckhoff", "EK1110", "Extension terminal", EC_TYPE_INFRA,
00065     {NULL} // no sync managers
00066 };
00067 
00068 /*****************************************************************************/
00069 
00070 const ec_field_t bk1120_out = {"Outputs", 0}; // variable size
00071 const ec_field_t bk1120_in = {"Inputs", 0}; // variable size
00072 
00073 const ec_sync_t bk1120_sm0 = {0x1C00, 264, 0x26, {NULL}};
00074 const ec_sync_t bk1120_sm1 = {0x1E00, 264, 0x22, {NULL}};
00075 
00076 const ec_sync_t bk1120_sm2 = { // outputs
00077     0x1000, 0, 0x24, // variable size
00078     {&bk1120_out, NULL}
00079 };
00080 
00081 const ec_sync_t bk1120_sm3 = { // inputs
00082     0x1600, 0, 0x00, // variable size
00083     {&bk1120_in, NULL}
00084 };
00085 
00086 const ec_slave_type_t Beckhoff_BK1120 = {
00087     "Beckhoff", "BK1120", "KBUS Coupler", EC_TYPE_NORMAL,
00088     {&bk1120_sm0, &bk1120_sm1, &bk1120_sm2, &bk1120_sm3, NULL}
00089 };
00090 
00091 /*****************************************************************************/
00092 
00093 const ec_field_t el1004_in = {"InputValue", 1};
00094 
00095 const ec_sync_t el1004_sm0 = { // inputs
00096     0x1000, 1, 0x00,
00097     {&el1004_in, NULL}
00098 };
00099 
00100 const ec_slave_type_t Beckhoff_EL1004 = {
00101     "Beckhoff", "EL1004", "4x Digital Input, 3ms", EC_TYPE_NORMAL,
00102     {&el1004_sm0, NULL}
00103 };
00104 
00105 /*****************************************************************************/
00106 
00107 const ec_field_t el1014_in = {"InputValue", 1};
00108 
00109 const ec_sync_t el1014_sm0 = { // inputs
00110     0x1000, 1, 0x00,
00111     {&el1014_in, NULL}
00112 };
00113 
00114 const ec_slave_type_t Beckhoff_EL1014 = {
00115     "Beckhoff", "EL1014", "4x Digital Input, 10us", EC_TYPE_NORMAL,
00116     {&el1014_sm0, NULL}
00117 };
00118 
00119 /*****************************************************************************/
00120 
00121 const ec_field_t el20XX_out = {"OutputValue", 1};
00122 
00123 const ec_sync_t el20XX_sm0 = {
00124     0x0F00, 1, 0x46,
00125     {&el20XX_out, NULL}
00126 };
00127 
00128 const ec_slave_type_t Beckhoff_EL2004 = {
00129     "Beckhoff", "EL2004", "4x Digital Output", EC_TYPE_NORMAL,
00130     {&el20XX_sm0, NULL}
00131 };
00132 
00133 const ec_slave_type_t Beckhoff_EL2032 = {
00134     "Beckhoff", "EL2032", "2x Digital Output (2A)", EC_TYPE_NORMAL,
00135     {&el20XX_sm0, NULL}
00136 };
00137 
00138 /*****************************************************************************/
00139 
00140 const ec_field_t el31X2_st1 = {"Status",     1};
00141 const ec_field_t el31X2_ip1 = {"InputValue", 2};
00142 const ec_field_t el31X2_st2 = {"Status",     1};
00143 const ec_field_t el31X2_ip2 = {"InputValue", 2};
00144 
00145 const ec_sync_t el31X2_sm2 = {0x1000, 4, 0x24, {NULL}};
00146 
00147 const ec_sync_t el31X2_sm3 = {
00148     0x1100, 6, 0x20,
00149     {&el31X2_st1, &el31X2_ip1, &el31X2_st2, &el31X2_ip2, NULL}
00150 };
00151 
00152 const ec_slave_type_t Beckhoff_EL3102 = {
00153     "Beckhoff", "EL3102", "2x Analog Input diff.", EC_TYPE_NORMAL,
00154     {&mailbox_sm0, &mailbox_sm1, &el31X2_sm2, &el31X2_sm3, NULL}
00155 };
00156 
00157 const ec_slave_type_t Beckhoff_EL3162 = {
00158     "Beckhoff", "EL3162", "2x Analog Input", EC_TYPE_NORMAL,
00159     {&mailbox_sm0, &mailbox_sm1, &el31X2_sm2, &el31X2_sm3, NULL}
00160 };
00161 
00162 /*****************************************************************************/
00163 
00164 const ec_field_t el41X2_op = {"OutputValue", 2};
00165 
00166 const ec_sync_t el41X2_sm2 = {
00167     0x1000, 4, 0x24,
00168     {&el41X2_op, &el41X2_op, NULL}
00169 };
00170 
00171 const ec_slave_type_t Beckhoff_EL4102 = {
00172     "Beckhoff", "EL4102", "2x Analog Output", EC_TYPE_NORMAL,
00173     {&mailbox_sm0, &mailbox_sm1, &el41X2_sm2, NULL}
00174 };
00175 
00176 const ec_slave_type_t Beckhoff_EL4132 = {
00177     "Beckhoff", "EL4132", "2x Analog Output diff.", EC_TYPE_NORMAL,
00178     {&mailbox_sm0, &mailbox_sm1, &el41X2_sm2, NULL}
00179 };
00180 
00181 /*****************************************************************************/
00182 
00183 const ec_field_t el5001_st = {"Status",     1};
00184 const ec_field_t el5001_ip = {"InputValue", 4};
00185 
00186 const ec_sync_t el5001_sm2 = {
00187     0x1000, 4, 0x24,
00188     {NULL}
00189 };
00190 
00191 const ec_sync_t el5001_sm3 = {
00192     0x1100, 5, 0x20,
00193     {&el5001_st, &el5001_ip, NULL}
00194 };
00195 
00196 const ec_slave_type_t Beckhoff_EL5001 = {
00197     "Beckhoff", "EL5001", "SSI-Interface", EC_TYPE_NORMAL,
00198     {&mailbox_sm0, &mailbox_sm1, &el5001_sm2, &el5001_sm3, NULL}
00199 };
00200 
00201 /*****************************************************************************/
00202 
00203 const ec_field_t el5101_ct = {"Control",     1};
00204 const ec_field_t el5101_op = {"OutputValue", 2};
00205 const ec_field_t el5101_st = {"Status",      1};
00206 const ec_field_t el5101_ip = {"InputValue",  2};
00207 const ec_field_t el5101_la = {"LatchValue",  2};
00208 
00209 const ec_sync_t el5101_sm2 = {
00210     0x1000, 3, 0x24,
00211     {&el5101_ct, &el5101_op, NULL}
00212 };
00213 
00214 const ec_sync_t el5101_sm3 = {
00215     0x1100, 5, 0x20,
00216     {&el5101_st, &el5101_ip, &el5101_la, NULL}
00217 };
00218 
00219 const ec_slave_type_t Beckhoff_EL5101 = {
00220     "Beckhoff", "EL5101", "Incremental Encoder Interface", EC_TYPE_NORMAL,
00221     {&mailbox_sm0, &mailbox_sm1, &el5101_sm2, &el5101_sm3, NULL}
00222 };
00223 
00224 /*****************************************************************************/
00225 
00226 const ec_sync_t el6601_sm0 = {0x1800, 522, 0x26, {NULL}};
00227 const ec_sync_t el6601_sm1 = {0x1C00, 522, 0x22, {NULL}};
00228 
00229 const ec_slave_type_t Beckhoff_EL6601 = {
00230     "Beckhoff", "EL6601", "1-Port Ethernet Switch Terminal", EC_TYPE_EOE,
00231     {&el6601_sm0, &el6601_sm1, NULL, NULL, NULL}
00232 };
00233 
00234 /*****************************************************************************/
00235 
00236 const ec_field_t trlinenc2_st = {"Status",     1};
00237 const ec_field_t trlinenc2_ip = {"InputValue", 4};
00238 
00239 const ec_sync_t trlinenc2_sm0 = {0x1800, 192, 0x26, {NULL}};
00240 const ec_sync_t trlinenc2_sm1 = {0x1C00, 192, 0x22, {NULL}};
00241 const ec_sync_t trlinenc2_sm2 = {0x1000,   4, 0x24, {NULL}};
00242 
00243 const ec_sync_t trlinenc2_sm3 = {
00244     0x1100, 5, 0x20,
00245     {&trlinenc2_st, &trlinenc2_ip, NULL}
00246 };
00247 
00248 const ec_slave_type_t TR_Electronic_LinEnc2 = {
00249     "TR-Electronic", "LinEnc2", "SSI-Encoder", EC_TYPE_NORMAL,
00250     {&trlinenc2_sm0, &trlinenc2_sm1, &trlinenc2_sm2, &trlinenc2_sm3, NULL}
00251 };
00252 
00255 /*****************************************************************************/
00256 
00261 ec_slave_ident_t slave_idents[] = {
00262     {0x00000002, 0x03EC3052, &Beckhoff_EL1004},
00263     {0x00000002, 0x03F63052, &Beckhoff_EL1014},
00264     {0x00000002, 0x044C2C52, &Beckhoff_EK1100},
00265     {0x00000002, 0x04562C52, &Beckhoff_EK1110},
00266     {0x00000002, 0x04602C22, &Beckhoff_BK1120},
00267     {0x00000002, 0x07D43052, &Beckhoff_EL2004},
00268     {0x00000002, 0x07F03052, &Beckhoff_EL2032},
00269     {0x00000002, 0x0C1E3052, &Beckhoff_EL3102},
00270     {0x00000002, 0x0C5A3052, &Beckhoff_EL3162},
00271     {0x00000002, 0x10063052, &Beckhoff_EL4102},
00272     {0x00000002, 0x10243052, &Beckhoff_EL4132},
00273     {0x00000002, 0x13893052, &Beckhoff_EL5001},
00274     {0x00000002, 0x13ED3052, &Beckhoff_EL5101},
00275     {0x00000002, 0x19C93052, &Beckhoff_EL6601},
00276     {0x000000D4, 0x00000017, &TR_Electronic_LinEnc2},
00277     {}
00278 };
00279 
00280 /*****************************************************************************/

Generated on Wed Aug 2 18:41:43 2006 for IgH EtherCAT master by  doxygen 1.4.6