Help with EII (Event Input Interupt) on ML1100

timbo_uk

Member
Join Date
Nov 2005
Location
Bradford, UK
Posts
336
Hi,

After dropping onto Ken Roach's excelent info (MR PLC Forum in November 2007; Google is great!)on using EII rather than HSC, I need a little help with an output not operating as expected.

I have 2 flowmeters to use on a project I am (still) developing, only 1 works at a time so I was initially going to use a relay to select either signal to an input to the HSC.

The pulse train is about 1mS on 4mS off.

After reading Kens post I decided to try using EII. So I can have independant inputs to the PLC; therefore less to go wrong in future!

To test on the bench I have copied Kens ladder and added a little for my test routine (as attached image). The ladder routine called at each rising edge on I:0/0.

This counts as expected, but I wanted to check to make sure it hit all pulses, and didnt miss any. So I added O:0/2 at rung 1, expecting it to pulse each time the interupt section was called. I was then going to put a 2 channel scope on I:0/1 and O:0/2 and check for a match at varying frequencies.

Some how this output just stays on all the time.

What stupid thing am I missing please? :unsure:

2009-01-09_030452.jpg
 
Last edited:
The routine gets scanned when the input triggers, and as it is supposed to, the output turns ON, that's it, no further scans to turn it off [even it is being scanned, it will still remain ON because of unconditional rung].

If you want to turn it off put a unlatch command in the common routine which is always scanned. Or put a one shot, [of course you need an always ON bit before the ONS.]

Best Regards
___________
 
Last edited:
You don't have any conditions on your output. You need to somehow turn the output off in between interrupts. This may be quite difficult with the short pulse trains you're dealing with 1mS on / 4mS off.
If the processor scan time is less than 4 mS, you can try placing an OTU O:0/2 outside of the interrupt routine and change the OTE to an OTL in the interrupt routine. This will make the output latch "ON" when the interrupt is executed and then unlatch "OFF" in the reqular scan. Again, because of the PLC scan time this very well might not work.

The other thing to play with is the IOM (Immediate Output with Mask) instruction. In your interrupt routine, make 1st rung OTL O:0/2. Make 2nd rung IOM with correct settings to update O:0/2. Next 3 rungs will be your other logic. 2nd to last rung is OTU O:0/2. Last rung is IOM again. The success of this logic will still depend on the speed of the output hardware and the PLC scan time.

The Micrologix updates it's outputs at the end of the PLC scan. The IOM instruction forces the selected outputs to update right now.

EDIT:
After thinking about this more, I like the idea of using the IOM in conjunction with a toggle. Each time the interrupt is executed, the output is switched off if it was on and switched on if it was off. Then look for output to be half frequency of input on scope.
 
Last edited:

Similar Topics

Hello, I need to write the following program in Ladder language, but I could not integrate the Fibonacci sequence into the ladder. Can you help...
Replies
17
Views
258
this a program to send data to barcode printer I want to integrate a new printer in a new machine and i wanted to adapt the old prgram on it but I...
Replies
4
Views
157
So i've been at this for a long while, i have Citect Scada 2018, i have full access to everything but i can't seem to find any option or...
Replies
0
Views
54
Hi all, hope you are having a great day, I am in need of your help to create a AOI or program that does this kind of job: I have a IO Link...
Replies
26
Views
488
please help me . I have to make this ladder diagram and I can’t figure it out :(
Replies
12
Views
363
Back
Top Bottom