Time-Controlled Interrupts With the S7-21x Www.otomasyonegitimi.com

Embed Size (px)

Citation preview

  • 8/2/2019 Time-Controlled Interrupts With the S7-21x Www.otomasyonegitimi.com

    1/3

    http://support.automation.siemens.com/WW/llisapi.dll/299027?func=ll&objId=299027&
  • 8/2/2019 Time-Controlled Interrupts With the S7-21x Www.otomasyonegitimi.com

    2/3

    Notes:

    l Interrupts are processed by the CPU in the order of their occurrence and according to theirpriority status. There can only ever be one program active for interrupt processing. If aninterrupt program is being processed then that program is terminated first. It cannot beinterrupted by a subsequently occurring interrupt program, not even if this has a higher priority.If an interrupt occurs while another interrupt is being processed, then the later interrupt is putinto a queue for processing later. The following table shows the three queues for interrupts andthe maximum number of interrupts that can be put into each queue.

    l It might happen that more interrupts occur than can be entered in the queue. In this case thesystem has queue overflow flags that specify the type of interrupt events that could not beincluded in the queue. The table shows the special flags that are set when there is queueoverflow. You may only use these bits, SM 4.0 to 4.2, in an interrupt program, because they willbe reset when the queue has been processed and main program processing continues.

    You will find more information in the S7-21x System Manual under Entry ID 1109154.

    Keywords:program configuration

    Using the "system flag SM 0.1that assigns a fixed 1", set theinterval for the time-controlledsection to 100 * 1ms = 100 ms

    LDMOVB

    SM 0.1100,SMB 34

    Enable all interrupts ENI

    Assign time-controlled interrupt "0"

    to the interrupt program "0"

    ATCH INT,EVENT

    INT=Number of theinterrupt programEVENT=Number of theinterrupt event

    0,10

    Terminate subroutine RET

    Start interrupt program INT 0

    Now you can write the programthat you want to processevery 100 ms

    ....... .... ....

    Terminate the interrupt program RETI

    Queue CPU210 CPU212 CPU214 CPU215 CPU216

    Time-controlled interrupts None 2 4 8 8

    Queue Special flag

    Queue overflow for communications interrupts SM 4.0Queue overflow for I/O interrupts SM 4.1

    Queue overflow for time-controlled interrupts SM 4.2

    Entry ID:299027 Date:2001-09-24

    Page 2 of 3Siemens - Industry Automation and Drive Technologies - Service& Support - Automation...

    10.09.2010http://support.automation.siemens.com/WW/llisapi.dll/299027?func=ll&objId=299027&...

    http://support.automation.siemens.com/WW/llisapi.dll/299027?func=ll&objId=299027&http://support.automation.siemens.com/WW/llisapi.dll/299027?func=ll&objId=299027&
  • 8/2/2019 Time-Controlled Interrupts With the S7-21x Www.otomasyonegitimi.com

    3/3

    I regard this article.... as helpful as not helpful

    Copy link Suggestion for the entry Send to a friend

    Print

    Siemens AG 2010 - Corporate Information - Privacy Policy - Terms of Use

    Page 3 of 3Siemens - Industry Automation and Drive Technologies - Service& Support - Automation...

    10.09.2010http://support.automation.siemens.com/WW/llisapi.dll/299027?func=ll&objId=299027&...

    http://support.automation.siemens.com/WW/llisapi.dll/299027?func=ll&objId=299027&http://support.automation.siemens.com/WW/llisapi.dll/299027?func=ll&objId=299027&