You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old November 23rd, 2022, 03:47 PM   #1
adam_lhadi
Member
Algeria

adam_lhadi is offline
 
Join Date: Feb 2022
Location: algeria
Posts: 35
Time_delay_interrupt

HI everyone as a beginner i have been working with the time delay interrupt to understand how it works

the SRT_DINT instruction starts the counting with a negative edge in EN input

when disactivating the interrupt with CAN_DINT instruction the the counting stops but it give an error code 16#80A0 (Time-delay interrupt has not started.) rather than 16#0000 why is that

i didn't totally understand the use of the DIS_AIRT and EN_AIRT instruction and what's the difference between DIS_AIRT and CAN_DINT

when creating a time delay interrupt OB what's his cycle time (how long he last) what the limitations when putting a code inside of it like putting a timer

thanks for all please correct me if am wrong

kind regards

Last edited by adam_lhadi; November 23rd, 2022 at 03:59 PM.
  Reply With Quote
Old November 24th, 2022, 03:34 AM   #2
parky
Member
United Kingdom

parky is online now
 
parky's Avatar
 
Join Date: Oct 2004
Location: Midlands
Posts: 4,510
I think probably using timers in a time interrupt is not a good thing, also perhaps this will help

https://support.industry.siemens.com...rt-dint/133159
  Reply With Quote
Old November 24th, 2022, 06:32 AM   #3
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: ᚴᚬᛒᛅᚾᚼᚬᚠᚾ
Posts: 15,697
Quote:
Originally Posted by adam_lhadi View Post
i didn't totally understand the use of the DIS_AIRT and EN_AIRT instruction and what's the difference between DIS_AIRT and CAN_DINT
DIS_AIRT and EN_AIRT are for handling when multiple interrupts may interfere with each other.
They are not directly related to SRT_DINT, CAN_DINT, QRY_DINT.

Quote:
Originally Posted by adam_lhadi View Post
when creating a time delay interrupt OB what's his cycle time (how long he last) what the limitations when putting a code inside of it like putting a timer
The called OB only runs once. You generally dont program timers in interrupt OBs.

In TIA help the use of SRT_DINT, CAN_DINT, QRY_DINT is described with a link to a program example as well as a link to a general sample library.

What are you trying to achieve ?
I think that SRT_DINT, CAN_DINT, QRY_DINT are used when you want a hardware interrupt, but dont want it to be too sensitive, i.e. triggering many events on a signal that bounces.
__________________
Jesper
NOTICE:
JesperMP has passive-aggressive tendencies, can be impolite and may even use sarcasm !
Also: ᛁᚠ ᚢᚬᚢ ᚴᚬᚾ ᚱᛅᚬᛏ ᚦᛁᛋ ᚦᛅᚾ ᚢᚬᚢ ᚼᚬᚠᛅ ᚴᚬᛁᚾᛅᛏ ᛘᚢ ᚱᛅᛋᛒᛅᚴᛏ
  Reply With Quote
Old November 25th, 2022, 06:24 AM   #4
adam_lhadi
Member
Algeria

adam_lhadi is offline
 
Join Date: Feb 2022
Location: algeria
Posts: 35
Quote:
Originally Posted by JesperMP View Post
DIS_AIRT and EN_AIRT are for handling when multiple interrupts may interfere with each other.
They are not directly related to SRT_DINT, CAN_DINT, QRY_DINT.

The called OB only runs once. You generally dont program timers in interrupt OBs.

In TIA help the use of SRT_DINT, CAN_DINT, QRY_DINT is described with a link to a program example as well as a link to a general sample library.

What are you trying to achieve ?
I think that SRT_DINT, CAN_DINT, QRY_DINT are used when you want a hardware interrupt, but dont want it to be too sensitive, i.e. triggering many events on a signal that bounces.
i think the SRT_DINT, CAN_DINT, are used for time delay interrupt i didn't know that they can be used for hardware interrupt, because usually i use attach and detach for HW
about the interference of time delay interrupt we can use the offset that's what makes me wondering about the difference between the offset and AIRT and EN_AIRT instructions
  Reply With Quote
Old November 25th, 2022, 06:27 AM   #5
adam_lhadi
Member
Algeria

adam_lhadi is offline
 
Join Date: Feb 2022
Location: algeria
Posts: 35
Quote:
Originally Posted by parky View Post
I think probably using timers in a time interrupt is not a good thing, also perhaps this will help

https://support.industry.siemens.com...rt-dint/133159
so we can say that there is some limitations
also it's scan time is it inlimited
  Reply With Quote
Old November 25th, 2022, 08:15 AM   #6
parky
Member
United Kingdom

parky is online now
 
parky's Avatar
 
Join Date: Oct 2004
Location: Midlands
Posts: 4,510
Timed interrupts are exactly that, for example a 100ms interrupt wil trigger every 100ms & run the code in the interrupt OB. this interrupts the normal scan of the main program, there are limitations for example too many calls to interrupts could alter the normal program scan time, also if the code in the interrupt OB took longer than the 100ms to scan not all the code would complete or the interrupt would be triggered again before all code is processed, this would probably generate an error.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:46 AM.


.