Siemens SMP16-SFT251 Technical Description

Counter board with two 32-bit incremental/pulse counters
Table of Contents

Advertisement

Quick Links

Technical Description
April 2003
Order number: 6AR1930-4AA06-2AA0
SMP16-SFT251
Order number: 6AR1304-0EA00-0AA0
Counter board with two 32-bit incremental/pulse counters
SICOMP Industrial Microcomputer
(4)J31069-D2090-U001-A1-7618

Advertisement

Table of Contents
loading

Summary of Contents for Siemens SMP16-SFT251

  • Page 1: Status Register

    Technical Description April 2003 Order number: 6AR1930-4AA06-2AA0 SMP16-SFT251 Order number: 6AR1304-0EA00-0AA0 Counter board with two 32-bit incremental/pulse counters SICOMP Industrial Microcomputer (4)J31069-D2090-U001-A1-7618...
  • Page 2 Information in the technical descriptions specifies products but does not guarantee characteristics. The product described in this documentation may require licensing. Questions should be directed to your local Siemens office. Availability and technical modifications subject to change without prior notice.
  • Page 3 When longer interrupt signal lines cannot be avoided, twisted pair wiring must be used. Related SICOMP SMP16 Literature For more information on installing and handling SICOMP boards, see "SICOMP IMC system manual". ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 4: Table Of Contents

    Loading the Counters 6.3.3 Position Acquisition via Shaft Encoder Edge Evaluation 6.3.4 Position Acquisition with Hardware Support 6.3.5 Position Acquisition without Hardware Support 6.3.6 Frequency and Pulse Width Measurement 6.3.7 Overview of the Commands ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 5 Read/Write Accesses 6.5.2 Board Commands Sample Programs Position Acquisition with Hardware Support (BG_Mode = "0") Position Acquisition without Hardware Support (BG_Mode = "1") Frequency and Pulse Width Measurement without Using the Zero-Marking- Pulse Input ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 6 SMP16-SFT251 ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 7: Initial Startup

    In addition, there must be a way to transfer the generated configuration file (i.e., STARTUP.SKD) to the target system. Some examples are listed below. - Serial connection via zero modem cable (is supported by AKO start program) - Floppy disk drives on both systems - LAN connection ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 8 The ACEN input of the first software configurable board in the chain of configuration remains open as does the ACDONE output of the last board. All other ACDONE outputs must be connected with the ACEN input of the next board. See chapter 3.2.1. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 9: Wiring The I/O

    Never install your control lines near strong interference (e.g., motors, relays, high-voltage or power lines, thyristor controllers, power inverters and transmitters). Also adhere to the information on electromagnetic compatibility contained in the SICOMP IMC system manual under the chapter on ambient conditions. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 10: Features

    Features SMP16-SFT251 Features Characteristics The SMP16-SFT251 is a counter board with two 32-bit counters. Its software is compatible with the SMP-E251. It should be used instead of the SMP-E251. The board has the following characteristics. General • Two 15-pin, sub D socket strips for connection of the I/O •...
  • Page 11: Front Leds

    0 and n=1 for channel 1. Figure 2.1 Block circuit diagram of the SMP16-SFT251 Front LEDs The two front LEDs (L1 and L2) show the direction of rotation of the shaft encoder for channel 0 or channel 1 during position acquisition.
  • Page 12: Operational Values

    For this reason, encoders with the RS 422 interface should be used for encoder applications with track frequencies > 500 kHz. Otherwise, the encoder signals might not be transferred accurately which would cause counting errors in the system. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 13: Physical Characteristics Of The Encoder Signals

    N track (UREF) Figure 2.2 Time relationships of the encoder signals A edge to B edge 125 nsec (min.) Pulse width, A/B track 250 nsec (min.) Pulse width, N track 125 nsec (min.) ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 14: Frequency And Pulse Width Measurement

    250 nsec 2.5.3 Special Signals ZS00, ZS10, ZS20, ZS30 ZS01, ZS11, ZS21, ZS31 Figure 2.4 Time relationships of the special signals High edge to high edge 400 nsec (min.) Pulse width 250 nsec (min.) ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 15: Time Relationships Of The 24 V Interface

    500 nsec (typ.) Time from High → Low 400 nsec (typ.) These signal runtimes apply to 24 V outputs with push-pull clock pulse technology. Other runtimes may apply when other technologies are used. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 16: Ambient Conditions

    The files (SFT251.BGB and SFT251.BGT) which are required to set the board are available on the Internet under: http://www.ad.siemens.de/sicomp/html_76/hotline.htm SMD safety fuse Order number: R451.750 (the Littlefuse company) Figure 3.1 shows where the two fuses are located on the board. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 17: Interfaces

    Switch, 24 V technology ↔ RS 422, channel 0 DIP switch, 8-pin Switch, 24 V technology ↔ RS 422, channel 1 DIP switch, 8-pin 8-fold DIP switch F1, F2: Safety fuses Figure 3.1 Overview of the connection and setting elements ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 18: Pin Connector X2 To Smp16 Bus

    The ACEN input signals a board that it has been selected for configuration of the ASBIC chip. Using the ACDON output, it indicates that it has finished its own configuration and the next board can be configured. See chapter 1.1. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 19: Other Special Signals

    This interrupt is identical to the INT0* signal. Modern applications sometimes use this pin as NMI*. When, for instance, the SMP16-COM595 bus coupler and the SMP16-SFT251 are installed in the same slot for this reason, the INT0* signal must be switched off from this pin. See chapter 6.4.5. INT0* can always be taken from pin c27.
  • Page 20: I/O Connectors X3 And X4

    (An*, Bn* and Nn*) of each signal (A, B, and N) must be connected to GND. The lines with the signals (An, Bn and Nn) must be twisted in pairs with the corresponding grounding line. The lines of the extra inputs must be twisted in pairs with the corresponding grounding line. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 21: Interface Switches S1 And S2

    This connection is provided for already existing applications with SMP-E251 for which pin 15 of plug connectors X3 and X4 was used as the grounding connection. In all other applications, this connection should be open. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 22: Configuration With Software

    SMP16-SFT251 Configuration with Software The configuration data of the SMP16-SFT251 are stored by the ASBIC chip on the serial EEPROM of the board. The tables below show the default settings of the values which can be changed by the automatic configuration software SMP16-AKO.
  • Page 23 Function off Function on Ext. clear, channel 1 Pulse on track N (zero marking pulse) resets the counter. Function off Function on For more details on how to handle these settings, see chapter 6.3. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 24: Compatibility With Smp-E251

    In addition, the physical design of the shaft encoder inputs is not the same as that of the SMP-E251. Switch S1 or S2 can be used to choose between RS 422 and 24 V technology. In contrast to the SMP-E251, the 24 V inputs of the SMP16-SFT251 require more current due to the optical decoupling. See chapter 2.3.
  • Page 25: Programming The Board

    0 (bit 4) can be used to run the board as compatible with the SMP-E251 or to use expanded functions (SMP-E251 or SMP16-SFT251 mode). The board is always in SMP-E251 mode (BG_Mode = "0") after power-up or a hardware reset.
  • Page 26 Not possible when write protection is set Caution Some of the reserved addresses of ASBIC channel 0 are used for testing and factory settings. Never write access these areas since this might render the board useless. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 27 Channel 0 UREG_20, byte 0 Universal register 2 y + 9 UREG_20, byte 1 y + A UREG_20, byte 2 y + B UREG_20, byte 3 y + C to F Reserved Reserved ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 28: Reset Reactions

    The board can be reset with a hardware reset via the SMP16 bus. Status after reset/initialization • All registers are cleared. Both counters are reset to "00000000hex." • The front LEDs are off. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 29: Function Description

    This makes it possible to load the counter synchronously even during running operation. Note: Loading the counters will only work with operating mode "position acquisition with hardware support" when write protection of the particular channel is disabled (see chap. 6.3.4). ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 30: Position Acquisition Via Shaft Encoder Edge Evaluation

    The hysteresis function which can be activated in the mode registers of the counters (see also chap. 6.3.11) can be used to counteract this behavior and suppress the first counting pulse after a reverse in the direction of rotation. The following figure illustrates use of the hysteresis function. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 31 SMP16-SFT251 Programming the Board A track B track Counting pulses Evaluation: Down Counting direction: Figure 6.2 Shaft encoder edge evaluation with the hysteresis function ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 32: Position Acquisition With Hardware Support

    (SW strobe, SW clear, etc.) can continue to be performed if counter write protection is canceled. The one-time counter is not used during cyclic mode and is also not set. Note: Hysteresis can be used for the zero-marking-pulse logic (see chapter 6.3.11). ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 33: Position Acquisition Without Hardware Support

    The meaning of these signals is described in chapter 6.4. To be able to receive zero-marking pulses again, the zero-marking-pulse latch of the respective channel must be reset with the "reset zero-marking-pulse latch" command. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 34 ± 1 increment (i.e., in the example above, the difference of the counter states between two zero- marking pulses may fluctuate between 19,999 and 20,001). However, these fluctuations cancel each other out when all increments are added up. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 35: Frequency And Pulse Width Measurement

    Programming the Board 6.3.6 Frequency and Pulse Width Measurement The counters of the SMP16-SFT251 can measure frequencies or pulse widths. This operating mode can be set for each counter in the appropriate mode register (see chapter 6.4.1). Frequency measurement A gate (differential) is applied on the B input of the counter. The counter is ready to count while this gate is open (logical "1").
  • Page 36 B track Gate (internal) Counting interval Figure 6.4 Gating with TOR_MD = "1" While the gate is active, status bit TOR0 or TOR1 is set in status registers 1 or 2. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 37 B input is still open or is already closed. When the gate is closed, the counter state can be transferred to the zero-marking-pulse buffer with an SW strobe and then read. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 38: Overview Of The Commands

    ASBIC channel 0 area. For more information, see chapter 6.1. • When BG_Mode = "1," the commands are generated by write accesses to the command register (ASBIC channel 0, base address w). Each data bit has a special meaning. See table below. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 39 This applies particularly to the commands "SW strobe," "SW clear," "SW reload," and "cancel counter write protection." These commands should never be executed together with other commands of the same channel. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 40: Extra Inputs Zs00 To Zs30 (Counting Channel 0) Or Zs01 To Zs31

    INT1 trigger can be enabled/disabled in control register 0 (bit 5, LAX). 6.3.9 The Universal Registers In addition to the 32-bit, zero-marking-pulse buffer, the SMP16-SFT251 contains three more 32-bit universal registers for each channel. The following table lists the functions of the registers (see also chapter 6.3.8).
  • Page 41: The Clear Functions

    ------- (channel 0 or 1) "00000000" SW reload Always active ------- Loads the counter with the (channel 0 or 1) contents of the counter load register n = channel number (0 or 1) ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 42: The Hysteresis Functions

    Set bit 5 (HZ) in the mode register of the applicable channel. See chapter 6.4.1. Set bit 11 (KOMP0_HYST) in control register 1 (counting channel 0), or set bit 11 (KOMP1_HYST) in control register 2 (counting channel See chapter 6.4.3 or 6.4.4. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 43: Switching The Two Counting Channels In Parallel

    Comparator of counting In clear register: Bit 11 in interrupt Bit 11 in status channel 1 Bit 14 (CLR_INT5_CR1) = "1" mask register 2 The clear register is described in more detail in chapter 6.4.10. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 44: Description Of The Registers

    The direction of counting is specified for frequency and pulse width measurement. Hysteresis off/counting up Hysteresis on/counting down Edge For position acquisition evaluation 0000 Quadruple edge evaluation 0001 Double edge evaluation 0101 Single edge evaluation ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 45: Control Register 0

    BG_Mode Board mode Switches the board to SMP16-SFT251 mode. In this mode, the board is no longer compatible with the SMP-E251. This mode provides an increased scope of functions. The address location of ASBIC channel 0 differs depending on the status of this bit.
  • Page 46: Control Register 1 (16-Bit Register, Addresses X And X+1)

    Activates the hysteresis of the zero-marking-pulse logic of channel 0 (only works when the HYST hysteresis of channel 0 in mode register 0 is active: HZ = "1") Zero-marking-pulse hysteresis off Zero-marking-pulse hysteresis on ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 47: Control Register 2 (16-Bit Register, Addresses X+2 And X+3)

    Trigger function on K02K1 Switches shaft encoder inputs A, B and N from channel 0 to channel 1. This can be used to deactivate the shaft encoder inputs of channel 1. Rerouting off Rerouting on ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 48 Activates the hysteresis of the zero-marking-pulse logic of channel 1 (only works when the HYST hysteresis of channel 1 in mode register 1 is active). HZ = "1") Zero-marking-pulse hysteresis off Zero-marking-pulse hysteresis on ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 49: Interrupt Mask (16-Bit Register, Addresses X+4 And X+5)

    The interrupt mask can be read and written with both 16-bit and 8-bit accesses. The interrupts of the SMP16-SFT251 can be masked in this register. This register does not contain interrupts INT0 and INT1. For SMP-E251 compatibility's sake, these interrupts are contained in control register 0.
  • Page 50: Interrupt Register, Channel 0 And Channel 1

    Counting Channel 0 Counting Channel 1 w + 8 w + 1 Name Zero-marking-pulse signal arrived at the counter. (Counter status was stored in the zero-marking- pulse buffer.) Interrupt flag not set Interrupt flag set ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 51: Status Register 0

    No INT0 request INT0 interrupt of channel 1 is queued. REF0 INT0 request of counting channel 0 (same as counter-interrupt flag in the interrupt register) No INT0 request INT0 request of channel 0 is queued. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 52 Intermediately stored overflow indication of channel 1 (can be reset with the "reset alarm bits" command) No overflow Overflow Intermediately stored overflow indication of channel 0 (can be reset with the "reset alarm bits" command) No overflow Overflow ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 53: Status Register 2 (16-Bit Register, Addresses X+6 And X+7)

    Status of the gate of channel 0 (only valid when "frequency and pulse width measurement" is activated in mode register 0 of channel 0. PD = "1") Gate closed. No clock pulses are being counted. Gate open. Clock pulses are being counted. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 54 Status of the gate of channel 1 (only valid when "frequency or pulse width measurement" is activated in mode register 1 of channel 1. PD = "1") Gate closed. No clock pulses are being counted. Gate open. Clock pulses are being counted. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 55: Clear Register (16-Bit Register, Addresses X+6 And X+7)

    Deletes the INT4 request of the comparison register of channel 0, including the related CR10 status bit in status register 2 0 No effect 1 Reset the INT4 request of the comparison register ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 56 Deletes the INT5 request of the comparison register of channel 1, including the related CR11 status bit in status register 2 0 No effect 1 Reset the INT5 request of the comparison register ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 57: Times

    Command → effect t11b Max. of 160 nsec Time interval t11b is ensured by an onboard-ready controller which delays all later commands up to 250 nsec after the rising edge of the write signal. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 58: Sample Programs

    // The status registers can be scanned cyclically in a loop to determine // whether a zero-marking pulse has arrived on one of the counting channels. // Zero-marking pulse arrived on channel 0? Q0 = inportb(0x407) & 0x40; ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 59 // Example: SW strobe for channel 0 outportb(0x400,0x00); // Read counter with byte-accesses CNT00 = inportb(0x401); CNT01 = inportb(0x402); CNT02 = inportb(0x403); CNT03 = inportb(0x404); ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 60: Position Acquisition Without Hardware Support (Bg_Mode = "1")

    // Read counter 0 with word-accesses CNT00 = inport(0x402); CNT01 = inport(0x404); // Read counter 1 with word-accesses CNT10 = inport(0x406); CNT11 = inport(0x408); The determined counter states can now be processed further. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 61: Frequency And Pulse Width Measurement Without Using The Zero-Marking-Pulse Input

    When the gate width is known, the counter status can then be used to determine the desired frequency. When the frequency is known, the counter status can then be used to determine the desired gate width. ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...
  • Page 62 Sample Programs SMP16-SFT251 ©Siemens AG 2003, All Rights Reserved (4)J31069-D2090-U001-A1-7618...

This manual is also suitable for:

6ar1304-0ea00-0aa0

Table of Contents