Implement interrupt

mwcarlos

Member
Join Date
Feb 2004
Posts
4
Hi There.
Im using the DirectLogic 05 DD. The first 3 inputs are fast (< 100us). I struggle to implement the interrupt to execute code, the moment an input switch. Is there a way to limit my scantime to maybe +/- 1-2 ms.

Thank You
Carlo van Schalkwyk
 
Check page 5-26 of your DL05 user manual .

The immideate insturctions are explaned there. These are not interupts but will execute the insturction before the current scan is compleated. As far as I know these insturctions can be used with any input. I'm not sure that using the high speed inputs are intended for this purpose.

It is my understanding X0 - X2 are intended to be counter inputs, like from an encoder or other simmilar device. The intention is to provide up to a 5KH pulse count. How to use the counter inputs is also covered in Chapter 3 of the manual.

The only way to limit your scan time is to limit the length of your program. Various instructions require a different number of clock cycles to execute. Omron is really good at pointing this out in their manuals and provides execution times for each instruction. I havn't noticed this info in the ADC manuals, but I never looked for it. Anyway the more complex the insturctions the longer they take to execute.

Mike.
 
Last edited:
Mike, I think Carlo is looking to use interrupts (Mode 40), or possibly the Pulse Catch function (Mode 50). See Chapter 3. The problem is that the DL05 only supports these functions on input X0 alone... :(

Carlo, if you need 3 high-speed inputs, you should consider using a DL06, as you can use interrupts or Pulse Catch on X0, X1, X2, AND X3... :cool:

beerchug

-Eric
 
Eric,

Opps, I never got past mode 20 (UDCounter) for obivious reasons.:oops:

Thanks for the correction.(y)

Hey, but I got the chapter right! moon2

Mike
 
Thank You for your interist.
What I have is this:
Two convergent sensors, sensing on the round side of a rolling tin can. There is also a single trigger proxy, that would indicate when to take reading. The reading, however need to be taken the moment the proxy indicates it, because the speed of the can may vary.

So.. what I need is 1 interrupt trigger (X0), and two fast inputs (X1 + X2), so that my response time would be tipicaly less that 1-3ms.


Again thank you elevmike for the manuals!

Carlo
:)
 
Last edited:
Carlo,

If you need more than 1 fast input, then you need to go to a DL-06 as Eric suggested earlier.

If your looking for an output from the PLC within 3ms from the input, this may be an unrealistic expectation. However please review, and or test the immideate instructions (STRI, STRNI, OUTI) etc.. These instructions execute before the end of the CPU scan, and may assist in providing the required response time.

What is the purpose of your reading? are you counting cans, checking for out of round, speed indication?? Your answer to this question may help in figuring a workaround.

Mike
 
I want to use the convergent sensor to look for sque labels on cans => the sensor will activate if the reflective can is detected on a spesified distance from sensor. The reading, however must be maid, within 1-2ms, as the can travels at max 4 mm/ms. The ecjection of the can can however be don later.

As I see it I need the proxy to call an interrupt that will in turn make imediate messurements of the two convergent sensors. If a fault is detected, the ecjection procedure can be handeled in the main program.

Your input will be apriciated

Thanks
Carlo
 
You might be able to do this application with the DL05. Set up input X0 as an interrupt, and set the filter times for X1 and X1 to zero (no filter). In the interrupt routine, use immediate instructions to read X1 and X2. The example on page 3-47 is pretty much perfect except for the filter times. Based on that example, your ladder should look something like this:

| SP0 +-------+
|---] [------------+---| LD |
| | | K40 | Select Mode 40
| | +-------+
| | +-------+
| +---| OUT |
| | | V7633 |
| | +-------+
| | +-------+
| +---| LD |
| | | K4 | Set X0 as external interrupt
| | +-------+
| | +-------+
| +---| OUT |
| | | V7634 |
| | +-------+
| | +-------+
| +---| LD |
| | | K0006 | Set filter time for X1 and X2 to zero
| | +-------+
| | +-------+
| +---| OUT |
| | | V7635 |
| | +-------+
| | +-------+
| +---| OUT |
| | | V7636 |
| | +-------+
| |
| +-----( ENI ) Enable interrupts
........
|
+--------+
| INT O0 |
+--------+
| X1 X2
|---]I[-----]I[---------( OUT )
|
|-----------------------( IRT )


You interrupt routine will be based on what input state you're looking for on X1 and X2. Just be sure to use immediate instructions.

Again, I'm not positive this will be fast enough for your application, but it's worth a shot!... :confused:

beerchug

-Eric

P.S. You've been linking to Chapter 3 quite a bit lately, Mike. A favorite chapter of yours?... ;)
 
Thank you all for the advice.
And thanks Mike for your absession with chapter 3 :D - it helped me allot.

Thanks Carlo ;)
 

Similar Topics

Let's say I have an inverter fed three phase induction motor drive where in the braking phase (when the motor operates in a generator mode) the...
Replies
2
Views
141
I want to improve a semi custom product I am delivering to a customer with implementation of safety relays. The system is fairly simple with just...
Replies
5
Views
582
I'm struggling to implement the test case which is highlighted. What ends up happening is the servo starts when I turn the cycle on, but it...
Replies
3
Views
1,067
I am trying to implement FIFO for filling tanks in the order it went empty in easysoft or some of you might know it by easydoft 7. I am trying to...
Replies
2
Views
2,313
Dear friends, I'm using Mitsubishi FX3G PLC and GxWorks2 Software for programming. I need to implement 10 power X (X is a +/- floating value)...
Replies
2
Views
1,070
Back
Top Bottom