Advertisement
Guest User

Untitled

a guest
Apr 1st, 2012
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 13.83 KB | None | 0 0
  1.     // Communication Area for ft-Device
  2. typedef struct _FT_TRANSFER_AREA
  3. {
  4.     // Digital Inputs Main Module
  5.     // Base+0x00: | E8 | E7 | E6 | E5 | E4 | E3 | E2 | E1 |
  6.     unsigned char E_Main;
  7.  
  8.     // Digital Inputs Extension Modules 1..3
  9.     // Base+0x01: | E16| E15| E14| E13| E12| E11| E10| E9 |
  10.     unsigned char E_Sub1;
  11.     // Base+0x02: | E24| E23| E22| E21| E20| E19| E18| E17|
  12.     unsigned char E_Sub2;
  13.     // Base+0x03: | E32| E31| E30| E29| E28| E27| E26| E25|
  14.     unsigned char E_Sub3;
  15.  
  16.     // Reserved
  17.     // Base+0x04..0x0B
  18.     unsigned char rsvd1[8];
  19.  
  20.     // Abstandsensoren (1=detektiert)
  21.     // Base+0x0C: |  0 |  0 |  0 |  0 |  0 |  0 | D2 | D1 |
  22.     unsigned char Distance;
  23.  
  24.     // Base+0x0D: reserved
  25.     unsigned char rsvd2;
  26.  
  27.     // IR-Receiver input code
  28.     // Base+0x0E: | 0 | 0 | 0 | C | T | T | T | T
  29.     // C = Code: 0 = Code 1 active, 1 = Code 2 active
  30.     // TTTT = Keycode 0..11
  31.     // Arangement of keys on Transmitter
  32.     //   1        8
  33.     //   2     7
  34.     //   3          10
  35.     //   4      9
  36.     //   5        11
  37.     //   6
  38.     // Taste 1 = M3 right
  39.     // Taste 2 = M3 left
  40.     // Taste 3 = Speed. M1
  41.     // Taste 4 = Speed. M2
  42.     // Taste 5 = Speed. M3
  43.     // Taste 6 = Code 2
  44.     // Taste 7 = M1 backward
  45.     // Taste 8 = M1 forward
  46.     // Taste 9 = M2 left
  47.     // Taste 10 = M2 right
  48.     // Taste 11 = Code 1
  49.     unsigned char IRKeys;
  50.  
  51.     // Base+0x0F: | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
  52.     unsigned char res_1;
  53.  
  54.     // Analoginputs of main module
  55.     // 8x 16 Bit, Range 0..1023, L:H Format (intel) )
  56.     // Base+0x10..0x11: AX (Master Modul)
  57.     unsigned short AX;
  58.     // Base+0x12..0x13: AY (Master Modul)
  59.     unsigned short AY;
  60.     // Base+0x14..0x15: A1 (Master Modul)
  61.     unsigned short A1;
  62.     // Base+0x16..0x17: A2 (Master Modul)
  63.     unsigned short A2;
  64.     // Base+0x18..0x19: AZ (Master Modul, vom SLAVE-Modul-BUS)
  65.     unsigned short AZ;
  66.     // Base+0x1A..0x1B: AV (Versorgungsspannung Master Modul)
  67.     unsigned short AV;
  68.     // Base+0x1C..0x1D: D1 (Abstandssensor 1)
  69.     unsigned short D1;
  70.     // Base+0x1E..0x1F: D2 (Abstandssensor 2)
  71.     unsigned short D2;
  72.  
  73.     // Analoginputs of slave modules 1..3
  74.     // Base+0x20..0x21: AX (Slave 1 Modul)
  75.     unsigned short AXS1;
  76.     // Base+0x22..0x23: AX (Slave 2 Modul)
  77.     unsigned short AXS2;
  78.     // Base+0x24..0x25: AX (Slave 3 Modul)
  79.     unsigned short AXS3;
  80.  
  81.     // Detection limit for distance sensors ( to generate digital from analog input )
  82.     // Base+0x26..0x27: DS1
  83.     unsigned short DS1;
  84.     // Base+0x28..0x29: DS2
  85.     unsigned short DS2;
  86.  
  87.     // Reserved
  88.     // Base+0x2A..0x2B
  89.     unsigned short ZE;
  90.  
  91.     // Reserved
  92.     // Base+0x2C..0x2F
  93.     unsigned char rsvd3[4];
  94.  
  95.     // 16-Bit Timers
  96.     // Base+0x30..0x31: Timer 1ms Inkrement
  97.     unsigned short Timer1ms;
  98.     // Base+0x32..0x33: Timer 10ms Inkrement
  99.     unsigned short Timer10ms;
  100.     // Base+0x34..0x35: Timer 100ms Inkrement
  101.     unsigned short Timer100ms;
  102.     // Base+0x36..0x37: Timer 1s Inkrement
  103.     unsigned short Timer1s;
  104.     // Base+0x38..0x39: Timer 10s Inkrement
  105.     unsigned short Timer10s;
  106.     // Base+0x3A..0x3B: Timer 1min Inkrement
  107.     unsigned short Timer1min;
  108.  
  109.     // Reserved
  110.     // Base+0x3C..0x3D
  111.     unsigned short res_bF;
  112.     // Base+0x3E
  113.     unsigned char res_bT;
  114.  
  115.     // Reserved
  116.     // Base+0x3F
  117.     unsigned char rsvd4[1];
  118.  
  119.     // Outputs of the main module ( polarity )
  120.     // Base+0x40: |M4B |M4A |M3B |M3A |M2B |M2A |M1B |M1A |
  121.     // Outputs of extension modules
  122.     unsigned char M_Main;
  123.     // Base+0x41: |M8B |M8A |M7B |M7A |M6B |M6A |M5B |M5A |
  124.     unsigned char M_Sub1;
  125.     // Base+0x42: |M12B|M12A|M11B|M11A|M10B|M10A|M9B |M9A |
  126.     unsigned char M_Sub2;
  127.     // Base+0x43: |M16B|M16A|M15B|M15A|M14B|M14A|M13B|M13A|
  128.     unsigned char M_Sub3;
  129.  
  130.     // Reserved
  131.     // Base+0x44..0x47
  132.     unsigned char rsvd5[4];
  133.  
  134.     // Outputs of the main module ( energy saver mode )
  135.     // 1 = energy saver mode, 0 = operational, PowerUp = 1
  136.     // Base+0x48: | 0  | 0  | 0  | 0  | M4 | M3 | M2 | M1 |
  137.     unsigned char MES_Main;
  138.     // Outputs of extension modules 1..3
  139.     // Base+0x49: | 0  | 0  | 0  | 0  | M8 | M7 | M6 | M5 |
  140.     unsigned char MES_Sub1;
  141.     // Base+0x4A: | 0  | 0  | 0  | 0  | M12| M11| M10| M9 |
  142.     unsigned char MES_Sub2;
  143.     // Base+0x4B: | 0  | 0  | 0  | 0  | M16| M15| M14| M13|
  144.     unsigned char MES_Sub3;
  145.  
  146.     // Reserved
  147.     // Base+0x4C
  148.     unsigned char rsvd6[1];
  149.  
  150.     // Reserved
  151.     // Base+0x4D:
  152.     unsigned char reserved_l1;
  153.     // Reserved
  154.     // Base+0x4E:
  155.     unsigned char reserved_l2;
  156.     // Reserved
  157.     // Base+0x4F:
  158.     unsigned char reserved_l3;
  159.  
  160.     // Outputs of the main module (PWM values, range =0..7)
  161.     // Base+0x50: M1A
  162.     // Base+0x51: M1B
  163.     // Base+0x52: M2A
  164.     // Base+0x53: M2B
  165.     // Base+0x54: M3A
  166.     // Base+0x55: M3B
  167.     // Base+0x56: M4A
  168.     // Base+0x57: M4B
  169.     unsigned char MPWM_Main[8];
  170.  
  171.     // Outputs of slave module 1 (PWM values, range =0..7)
  172.     // Base+0x58: M5A
  173.     // Base+0x59: M5B
  174.     // Base+0x5A: M6A
  175.     // Base+0x5B: M6B
  176.     // Base+0x5C: M7A
  177.     // Base+0x5D: M7B
  178.     // Base+0x5E: M8A
  179.     // Base+0x5F: M8B
  180.     unsigned char MPWM_Sub1[8];
  181.  
  182.     // Outputs of slave module 2 (PWM values, range =0..7)
  183.     // Base+0x60: M9A
  184.     // Base+0x61: M9B
  185.     // Base+0x62: M10A
  186.     // Base+0x63: M10B
  187.     // Base+0x64: M11A
  188.     // Base+0x65: M11B
  189.     // Base+0x66: M12A
  190.     // Base+0x67: M12B
  191.     unsigned char MPWM_Sub2[8];
  192.  
  193.     // Outputs of slave module 3 (PWM values, range =0..7)
  194.     // Base+0x68: M13A
  195.     // Base+0x69: M13B
  196.     // Base+0x6A: M14A
  197.     // Base+0x6B: M14B
  198.     // Base+0x6C: M15A
  199.     // Base+0x6D: M15B
  200.     // Base+0x6E: M16A
  201.     // Base+0x6F: M16B
  202.     unsigned char MPWM_Sub3[8];
  203.  
  204.     // Reserved
  205.     // Base+0x70..0x8F
  206.     unsigned char rsvd7[32];
  207.  
  208.  
  209.     // Analoginputs of slave modules 1..3 (Update-Time: 20ms)
  210.     // Base+0x90..0x91: A1 (Slave 1 Modul)
  211.     unsigned short A1S1;
  212.     // Base+0x92..0x93: A1 (Slave 2 Modul)
  213.     unsigned short A1S2;
  214.     // Base+0x94..0x95: A1 (Slave 3 Modul)
  215.     unsigned short A1S3;
  216.  
  217.     // Analoginputs of slave modules 1..3 (Update-Time: 20ms)
  218.     // Base+0x96..0x97: AV (Slave 1 Modul)
  219.     unsigned short AVS1;
  220.     // Base+0x98..0x99: AV (Slave 2 Modul)
  221.     unsigned short AVS2;
  222.     // Base+0x9A..0x9B: AV (Slave 3 Modul)
  223.     unsigned short AVS3;
  224.  
  225.     // Reserved
  226.     // Base+0x9C..0x9F
  227.     unsigned char rsvd8[4];
  228.  
  229.     // Reserved
  230.     // Base+0xA0..0xA1: AX (Interface) Resistor-Value (0..5662 Ohm)
  231.     unsigned short AX_R;
  232.  
  233.     // Base+0xA2..0xA3: AY (Interface) Resistor-Value (0..5662 Ohm)
  234.     unsigned short AY_R;
  235.  
  236.     // Base+0xA4..0xA5: AX (Slave 1 Modul) Resistor-Value (0..5662 Ohm)
  237.     unsigned short AXS1_R;
  238.  
  239.     // Base+0xA6..0xA7: AX (Slave 2 Modul) Resistor-Value (0..5662 Ohm)
  240.     unsigned short AXS2_R;
  241.  
  242.     // Base+0xA8..0xA9: AX (Slave 3 Modul) Resistor-Value (0..5662 Ohm)
  243.     unsigned short AXS3_R;
  244.  
  245.     // Reserved
  246.     // Base+0xAA..0xDF
  247.     unsigned char rsvd10[54];
  248.  
  249.  
  250.     // Operation mode
  251.     // Base+0xE0: 0x00=online, 0x01=binary download
  252.     unsigned char Mode;
  253.  
  254.     // Output PWM update (0x01=always, 0x02=once)
  255.     // Base+0xE1: | 0  | 0  | 0  | 0  | 0  | 0  |ONCE|ALWA|
  256.     unsigned char MPWM_Update;
  257.  
  258.     // Base+0xE2
  259.     // 0 = Transfer Area closed
  260.     // 1 = Transfer Area is working (Library Thread is running)
  261.     unsigned char TransferAktiv;
  262.  
  263.     // Reserved
  264.     // Base+0xE3..0xE5
  265.  
  266.     unsigned char rsvd11[3];
  267.  
  268.     // I/O Extension modules connected
  269.     // Base+0xE6: | 0  | 0  | 0  | 0  | 0  | S2 | S1 | S0 |
  270.     // S2..S0 = Number of connected I/O Extension Modules
  271.     unsigned char BusModules;
  272.  
  273.     // Slot 1 connected extension module type
  274.     // Base+0xE7: ?
  275.     unsigned char SlotModule1;
  276.  
  277.     // Slot 2 connected extension module type
  278.     // Base+0xE8: ?
  279.     unsigned char SlotModule2;
  280.  
  281.     // Reserved
  282.     // Base+0xE9..0xEF
  283.     unsigned char rsvd12[7];
  284.  
  285.  
  286.     // Change Bytes
  287.     // 1 = EG (Master or Slave 1..3) have changed
  288.     // The Application must read and change this byte to "0"
  289.     // Use the Windows InterlockedExchange() Function for reading and writing at the same time!
  290.     // Base+0xF0:
  291.     unsigned char ChangeEg;
  292.  
  293.     // 1 = Analog Inputs (Master AX, AY, A1, A2, AV, AZ or Extension 1..3 AX,AY,AV)
  294.     // or RfPower, RfError have changed
  295.     // The Application must read and change this byte to "0"
  296.     // Use the Windows InterlockedExchange() Function for reading and writing at the same time!
  297.     // Base+0xF1:
  298.     unsigned char ChangeAn;
  299.  
  300.     // 1 = Infrared Input (Robo-IF) or RfStatus have changed
  301.     // The Application must read and change this byte to "0"
  302.     // Use the Windows InterlockedExchange() Function for reading and writing at the same time!
  303.     // Base+0xF2:
  304.     unsigned char ChangeIr;
  305.  
  306.  
  307.     // Reserved
  308.     // Base+0xF3..0xFF
  309.     unsigned char rsvd13[13];
  310.  
  311.  
  312.     // Digital inputs as 16 bit values
  313.     // Base+0x100..0x101  Input 1 (Master-Modul)
  314.     // Base+0x102..0x103  Input 2 (Master-Modul)
  315.     // Base+0x104..0x105  Input 3 (Master-Modul)
  316.     // Base+0x106..0x107  Input 4 (Master-Modul)
  317.     // Base+0x108..0x109  Input 5 (Master-Modul)
  318.     // Base+0x10A..0x10B  Input 6 (Master-Modul)
  319.     // Base+0x10C..0x10D  Input 7 (Master-Modul)
  320.     // Base+0x10E..0x10F  Input 8 (Master-Modul)
  321.     unsigned short E16_Main[8];
  322.     // Base+0x110..0x111  Input 9 (Slave1-Modul)
  323.     // Base+0x112..0x113  Input 10 (Slave1-Modul)
  324.     // Base+0x114..0x115  Input 11 (Slave1-Modul)
  325.     // Base+0x116..0x117  Input 12 (Slave1-Modul)
  326.     // Base+0x118..0x119  Input 13 (Slave1-Modul)
  327.     // Base+0x11A..0x11B  Input 14 (Slave1-Modul)
  328.     // Base+0x11C..0x11D  Input 15 (Slave1-Modul)
  329.     // Base+0x11E..0x11F  Input 16 (Slave1-Modul)
  330.     unsigned short E16_Sub1[8];
  331.     // Base+0x120..0x121  Input 17 (Slave2-Modul)
  332.     // Base+0x122..0x123  Input 18 (Slave2-Modul)
  333.     // Base+0x124..0x125  Input 19 (Slave2-Modul)
  334.     // Base+0x126..0x127  Input 20 (Slave2-Modul)
  335.     // Base+0x128..0x129  Input 21 (Slave2-Modul)
  336.     // Base+0x12A..0x12B  Input 22 (Slave2-Modul)
  337.     // Base+0x12C..0x12D  Input 23 (Slave2-Modul)
  338.     // Base+0x12E..0x12F  Input 24 (Slave2-Modul)
  339.     unsigned short E16_Sub2[8];
  340.     // Base+0x130..0x131  Input 25 (Slave3-Modul)
  341.     // Base+0x132..0x133  Input 26 (Slave3-Modul)
  342.     // Base+0x134..0x135  Input 27 (Slave3-Modul)
  343.     // Base+0x136..0x137  Input 28 (Slave3-Modul)
  344.     // Base+0x138..0x139  Input 29 (Slave3-Modul)
  345.     // Base+0x13A..0x13B  Input 30 (Slave3-Modul)
  346.     // Base+0x13C..0x13D  Input 31 (Slave3-Modul)
  347.     // Base+0x13E..0x13F  Input 32 (Slave3-Modul)
  348.     unsigned short E16_Sub3[8];
  349.     // Base+0x140..0x141  Distance sensor D1 (Master-Modul)
  350.     // Base+0x142..0x143  Distance sensor D2 (Master-Modul)
  351.     unsigned short Distance16[2];
  352.  
  353.     // Reserved
  354.     // Base+0x144..0x14F
  355.     unsigned char rsvd14[12];
  356.  
  357.     // IR-Keys as 16 bit values (independent of code)
  358.     // Base+0x150..0x151  IR Taste  1 (M3R)
  359.     // Base+0x152..0x153  IR Taste  2 (M3L)
  360.     // Base+0x154..0x155  IR Taste  3 (M1)
  361.     // Base+0x156..0x157  IR Taste  4 (M2)
  362.     // Base+0x158..0x159  IR Taste  5 (M3)
  363.     // Base+0x15A..0x15B  IR Taste  6 (Code2)
  364.     // Base+0x15C..0x15D  IR Taste  7 (M1BW)
  365.     // Base+0x15E..0x15F  IR Taste  8 (M1FW)
  366.     // Base+0x160..0x161  IR Taste  9 (M2L)
  367.     // Base+0x162..0x163  IR Taste 10 (M2R)
  368.     // Base+0x164..0x165  IR Taste 11 (Code1)
  369.     unsigned short IRKeys16[11];
  370.     // Reserved
  371.     // Base+0x166..0x16F
  372.     unsigned char rsvd15[10];
  373.  
  374.     // IR-Keys as 16 bit values (code 1)
  375.     // Base+0x170..0x171  IR Taste  1 (M3R)    Code1
  376.     // Base+0x172..0x173  IR Taste  2 (M3L)    Code1
  377.     // Base+0x174..0x175  IR Taste  3 (M1)     Code1
  378.     // Base+0x176..0x177  IR Taste  4 (M2)     Code1
  379.     // Base+0x178..0x179  IR Taste  5 (M3)     Code1
  380.     // Base+0x17A..0x17B  always 0
  381.     // Base+0x17C..0x17D  IR Taste  7 (M1BW)   Code1
  382.     // Base+0x17E..0x17F  IR Taste  8 (M1FW)   Code1
  383.     // Base+0x180..0x181  IR Taste  9 (M2L)    Code1
  384.     // Base+0x182..0x183  IR Taste 10 (M2R)    Code1
  385.     // Base+0x184..0x185  IR Taste 11 (Code1)  Code1
  386.     unsigned short IRKeys16Code1[11];
  387.  
  388.     // Reserved
  389.     // Base+0x186..0x18F
  390.     unsigned char rsvd16[10];
  391.  
  392.     // IR-Keys as 16 bit values (code 2)
  393.     // Base+0x190..0x191  IR Taste  1 (M3R)    Code2
  394.     // Base+0x192..0x193  IR Taste  2 (M3L)    Code2
  395.     // Base+0x194..0x195  IR Taste  3 (M1)     Code2
  396.     // Base+0x196..0x197  IR Taste  4 (M2)     Code2
  397.     // Base+0x198..0x199  IR Taste  5 (M3)     Code2
  398.     // Base+0x19A..0x19B  IR Taste  6 (Code2)  Code2
  399.     // Base+0x19C..0x19D  IR Taste  7 (M1BW)   Code2
  400.     // Base+0x19E..0x19F  IR Taste  8 (M1FW)   Code2
  401.     // Base+0x1A0..0x1A1  IR Taste  9 (M2LE)   Code2
  402.     // Base+0x1A2..0x1A3  IR Taste 10 (M2RI)   Code2
  403.     // Base+0x1A4..0x1A5  always 0
  404.     unsigned short IRKeys16Code2[11];
  405.  
  406.     // Reserved
  407.     // Base+0x1A6..0x1AF
  408.     unsigned char rsvd17[10];
  409.  
  410.    
  411.     // Base+0x1B0..0x1B1
  412.     unsigned short RfStatus;
  413.     // 1 = RfError (0x1B4..0x1B5) is > 25. We think, Rf connection (only Onlinemodus) is lost
  414.  
  415.     // Base+0x1B2..0x1B3
  416.     unsigned short RfPower;
  417.     // Signal Power of the RF Signal entering the RF input (only Onlinemodus, 7 bit, 0..127)  
  418.  
  419.  
  420.     // Base+0x1B4..0x1B5
  421.     unsigned short RfError;
  422.     // Rf-Error Count (0..250)  
  423.  
  424.  
  425.     // Base+0x1B6..0x1B7
  426.     unsigned short MsgNumInBuffer;
  427.     // Number of Messages inside the Buffer
  428.  
  429.  
  430.     // Base+0x1B8..0x1B9
  431.     // Number of Interface-RF-Modul if installed or "-1" if not installed
  432.     unsigned short RfModulNr;
  433.  
  434.  
  435.     // Reserved
  436.     // Base+0x1BA..0x1BB
  437.     unsigned char rsvd19[2];
  438.  
  439.  
  440.     // Reserved for Internal Use
  441.     // Base+0x1BC..0x1BF
  442.     DWORD dwTC;
  443.  
  444.  
  445.     // Reserved
  446.     // Base+0x1C0..0x1FF
  447.     unsigned char rsvd20[64];
  448.  
  449. } FT_TRANSFER_AREA;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement