8/21/2014 6:41 PM | ||||||||||||||||||||||
Joined: 7/7/2010 Last visit: 12/11/2024 Posts: 15491 Rating: (2456)
|
My eyes thank you! For timed interrupt, select "new block" -> OB -> cyclic interrupt, set the time in ms (for s7-1500 it is set in uS, so 10 ms = 10000 for s7-1500's -- just as an FYI for how fast that can run! For the others, to my knowledge there is no equivalent interrupt for data received. Just have your receiveinstructions NDR (new data ready) & send instructions Done outputs trigger a call to your FBs/FCs to handle. The normal scan of your plc should be faster than your send/receive in most cases, if it is serial data, 232/485. For profinet/ethernet, you might consider that cyclic interrupt to run no faster than 2 ms, but I found 5 ms cyclic interrupt to handle the network communication calls (for sending and receiving) to be very performance friendly for most projects. However, if you do not care how fast the data is flowing other than it flows at regular scan time levels, just put it within your normal program logic. |
|||||||||||||||||||||
science guy |
||||||||||||||||||||||
This contribution was helpful to1 thankful Users |
8/23/2014 5:48 AM | |
Joined: 8/9/2011 Last visit: 11/1/2023 Posts: 324 Rating: (19) |
Hi , I think we don't have to invoke Cyclic interrupt OBs. But i may have to invoke timed interrupts. how to do it. If i have to use ATTACH Instruction how to assign for Event parameter of it. That was my actual issue. Thank you. |
"Any intelligent fool can make things bigger, more complex. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction.":):) |
|
8/23/2014 9:37 AM | |
Posts: 5225 Rating: (1197) |
You have not been here is a while - welcome back. It is good of you to wanting to know about the interrupts before you need to use them. Interrupts can be tricky to use, sometimes. Instead of just giving you the answer, I am going to ask you to have a look at the S7-1200's system manual. I have the one for the firmware 4.0 CPU. If you do not have it yet please look at [LINK]. In my manual chapter 8.4 describes the functions used for interrupts. The instructions you are looking for is.. SRT_DINT, CAN_DINT, and QRY_DINT. if you get stuck.. please return and tell us so. w |
8/23/2014 12:56 PM | |
Joined: 8/9/2011 Last visit: 11/1/2023 Posts: 324 Rating: (19) |
Hi, Thank you , We have done the same for events 24 & 26. We just used time delay interrupts with zero ms delay in START interrupt instruction. Hope it works.please clarify. I think we cant compromise with interrupts as we loaded 75KB work memory upto 99.44%!! |
"Any intelligent fool can make things bigger, more complex. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction.":):) |
|
8/23/2014 2:56 PM | |
Posts: 5225 Rating: (1197) |
Please show us a screen capture to understand 100% what you are doing.
Ouch! Maybe have a look at [LINK] |
This contribution was helpful to1 thankful Users |
8/26/2014 11:20 AM | |
Joined: 8/9/2011 Last visit: 11/1/2023 Posts: 324 Rating: (19) |
Hi, Thanks for the manual. As in printscreen1 for events 24 & 26 interrupts are invoked.As it’s a time delay we still suffer 1ms delay as DTME parameter demands 1ms as a minimum value. (PrintScreen2) INT1 contains onlyinsructionRCV_PtP which gets enabled only for rising edge where we had to execute the same twice to catch the pulse during scan. We checked the execution with CTU instruction which is similar and its working but we haven't confirmed with RCV_PtP instruction because of not having hardware setup yet. |
Last edited by: GaJEnDrA D S at: 8/26/2014 11:35 AM"Any intelligent fool can make things bigger, more complex. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction.":):) |
|
8/26/2014 11:22 AM | |
Joined: 8/9/2011 Last visit: 11/1/2023 Posts: 324 Rating: (19) |
We can only upload 1 attachment at a time |
"Any intelligent fool can make things bigger, more complex. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction.":):) |
|
8/26/2014 12:55 PM | |
Joined: 8/9/2011 Last visit: 11/1/2023 Posts: 324 Rating: (19) |
Hi, I think Printscreen1 still has delay problem. Negetive edge will appear to SRT_DINT insruction at the 2nd scan of the CPU only .So interrupt will execute only after time = scan time +1ms(instruction delay). As in Printscreen11 (corrected) the delay will be just 1ms as scan will be jumped back to insruction to generate negative edge. |
"Any intelligent fool can make things bigger, more complex. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction.":):) |
|
Follow us on