Interrupts on a CPU 313C-2 DP

automatt

Member
Join Date
Dec 2006
Location
Cornwall
Posts
12
Hi,
I'm currently using the above processor on a job that requires counting 4 of the inputs at about 235Hz. At the moment I'm missing pulses so I would like to use the interrupt capability of the CPU.

In the hardware config I have checked the box "Rising Edge" ,for example input bit 0 (see attached image), but I don't know what OB the process will jump to. How do I set this or find it out?

Thanks,
Matt

Interrupt.jpg
 
It's been a while for me with the Siemens stuff and I've never had a chance to work with the 313C. However, with the 315, there is a single hardware interupt OB (OB43 I think?). When a hardware interrupt occurs the OB will automatically run. One of the data words in the OB declaration contains a mask indicating the source of the interrupt. Save this information and move on.

Do as little in the interrupt as you can get away with. You don't want to extend the interrupt time so long that you miss another event. If the events are fixed to each other this probably isn't a concern. But if the events are random you still might have an issue.

Also, a 235 Hz signal only gives you about 2msec of on time (assuming a 50% duty cycle; things only get worse fromn there). Can your input points consistently respond that fast?

Keith
 
Yes, OB40. But CPU313 has two counting inputs. (they are handling with SFB47, see also similar 46 48)

You need in four inputs, so, may be it is possible to organize hardware time-division multipexing of counting inputs?
 
Thanks, I'll look into that. I'm also considering the possibilty of using an FM 350-2 Counter Module which would definitely sort the problem but with a price tag!
 

Similar Topics

https://support.industry.siemens.com/cs/document/109480387/how-do-you-implement-module-and-channel-diagnostics-in-the-user-program-of-the-simatic-s...
Replies
16
Views
7,842
Hi, Is it possible to distinguish what caused a diagnostic interrupt? For example, on a remote IO station I have a rack that has a IM155-5 PN HF...
Replies
4
Views
2,247
hi , I am beginner in programming in PLC. I created some programs where I used technology motion ( with stepper motor and drive with motor DC). I...
Replies
3
Views
1,940
Hello again! Working on a S5-95 project (again). Out of the blue, the PLC enters STOP mode. The malfunction, according to ISTACK, was caused by...
Replies
4
Views
2,315
Hi I'm using a HSC interrupt so that when the counter reference value is reached my interrupt block runs and sets an output then writes a new...
Replies
1
Views
1,473
Back
Top Bottom