Hardware Interrupt Handling on S7-300 PLC

You don't, the data you refer to is filled in by the CPU to tell you which interrupt has occurred (you can have many interrupt sources).

You enable the h/w interrupt in the h/w config editor for the card involved:

hwi.JPG
 
There seems to be two questions from the OP.
1. Set up of the HW interrupt for a DI module.
2. Simulation of OB40 interrupt with PLCSIM


L D 's post and screen capture shows the setup of the interrupt

For the OP, the operation of the digital interrupt is described in chapter 3 of this manual:http://support.automation.siemens.com/WW/view/en/8859629
Check figure 3-6.

The triggering of OB40 in PLCSIM, is Execute Menu - > Trigger Error OB -> Hardware Interrupt (OB40-47. In the dialog box that appears, from what the OP indicated, use 0 as the module address and 2000 as the POINT_ADDR (I think). This will simulate a OB40 for his DI module.

Thats my understanding, and my 2 cents.
 
There seems to be two questions from the OP.
1. Set up of the HW interrupt for a DI module.
2. Simulation of OB40 interrupt with PLCSIM


L D 's post and screen capture shows the setup of the interrupt

For the OP, the operation of the digital interrupt is described in chapter 3 of this manual:http://support.automation.siemens.com/WW/view/en/8859629
Check figure 3-6.

The triggering of OB40 in PLCSIM, is Execute Menu - > Trigger Error OB -> Hardware Interrupt (OB40-47. In the dialog box that appears, from what the OP indicated, use 0 as the module address and 2000 as the POINT_ADDR (I think). This will simulate a OB40 for his DI module.

Thats my understanding, and my 2 cents.



i have sending you screenshot of mine one...

i have configured an input(i0.0) of DI16 module which is in 4th slot.. and i have given W#16#0 as a module address and DW#16#2000 as a POINT_ADDR.

it accepts the configuration but still it cann't work(OB40 was not called up)..

HARDWARE_INT_PLCSIM.jpg
 
What code have you got in OB40 ?

I used the following test code to verify OB40 was being called with POINT_ADDR=1 or POINT_ADDR=2000


Code:
      L     MW   300
      +     1
      T     MW   300
 
Last edited:
What code have you got in OB40 ?

I used the following test code to verify OB40 was being called with POINT_ADDR=1 or POINT_ADDR=2000


Code:
      L     MW   300
      +     1
      T     MW   300


m using the same code... ok now it is being called by click on apply button..

by applying input in I0.0 it's not called....

Only by click on Apply button it is been called....

how is OB40 called by applying input in I0.0?
 
The PLCSIM is simulating the call to OB40, you must press the apply button to trigger the simulation.
You need real hardware to test with the input.
 

Similar Topics

I'm using CX2030 Beckoff PLC. Twincat 3 runtime. What I'm looking for is option to activated certain PLCTask once I register certain Digital...
Replies
0
Views
1,291
Hi guys; i want to simulate a hardware interrupt in s7-300 with PLCSIM. i configured a CPU300 (not compact) , a DI card with interrupt...
Replies
3
Views
1,889
Hi all, I'm trying to fit a CP343-1 Lean card (v3.0 6GK7 343-1CX10-0XE0) on to an existing rack that has a CPU318-2 (6ES7 318-2AJ00-0AB0) in...
Replies
2
Views
4,699
Hello! I am using: S7-1214C 6ES7 214-1HG31-0XB0 V3.0 SB1221 6ES7 221-3AD30-0XB0 V1.0 and some other modules ... TIA Portal V11 SP2...
Replies
0
Views
4,517
Hi guys, I'm currently working with a siemens PLC 314C-2DP and am using the fast counter input(channel 2) with an incremental encoder...
Replies
6
Views
5,166
Back
Top Bottom