ML1400 HSC high preset interrupt

raghfrost

Member
Join Date
Feb 2009
Location
perth
Posts
15
Hi Guru's

I have been trying to set up my HSC interrupt (HSC:0/HPI)to trigger a counter in my ladder logic. I read the manual like 5 times and I still cant seem to know what i am doing wrong. the accumulator is set at 1024 counts and the frequency at the input is 10000hz. I have set the PFN to 3 where my ladder logic is. on the next rung i set HSC:0/HPM to trigger a counter.

Could some one help me out please.

p.s i have attached my HSC config and my ladder logic.

hsc config.jpg the logic.JPG
 
What is not happening?

1. The count in HSC:0.ACC doesn't change? - Check the filter for the counter inputs in the I/O Config Section.

2. The count in your interrupt counter doesn't change? - It isn't seeing a pass with the input OFF. It will only trigger on a false-to-true transition. Try using a 'ADD 1 to a register' method instead of a counter.
 
thankyou sir for replying so promptly.

1) the HSC:0.ACC is changing but the interrupt counter is not.

i don't quite understand how to set up the add 1 to the register as you mentioned in your second point.
 
A counter only increments when its input line is false during a pass then true during the next pass. But the interrupt routine is only called which your input contact is true. Thus it never sees a transition.

Instead of the counter try - ADD, N7:0, 1, N7:0 or whichever register you wish to use.
 
Mr Bernie, I tried doing the add 1 to the register but it work only if toggle it manually. its not registering the false to true transition.
 
If a simple ADD is not working then your interrupt routine is not even being called. Recheck your setup for the interrupt. Is the value shown in your MOV command in the interrupt file changing? Is it always the number shown? It should probably be only a few counts above 0. Try removing the conditional contact before the ADD command.

Edit - Ignore thie following. I looked again at your setup and it's for a simple counter.

[Are you running a quadrature encoder? Could you be counting backward? In that case the High Preset isn't the one being tripped, it's the Low Preset.]
 
Last edited:
Just as a test, try running your configuration with JUST High Preset Mask, Low Preset Mask, Overflow Mask and Underflow Mask set one at a time. See if you get any difference. The ADD should have worked with the contact you had if it was interrupting because of going through the High Preset. Just curious if you are.
 
cant do that now mate. sparkies have taken it. now its just me and the software. I will do it once i am on site again on friday. will keep you posted.
 
Hi All,

I finally got to get pannel to test the code once again. weird thing happened today, only ch0 out of the 6 channels is detecting pulses from the encoder .. the rest dont seem to be detect the pulses from the encoder.

I assumed that by selecting mode 0 for counting up and setting up rest of the 5 counters to similar settings it should work.

correct me if i am wrong this is how the encoders have been
i:0/0 encoder ch A+ ; HSC0
i:0/2 encoder ch A+ ; HSC1
i:0/4 encoder ch A+ ; HSC2
i:0/6 encoder ch A+ ; HSC3
i:0/8 encoder ch A+ ; HSC4
i:0/10 encoder ch A+ ; HSC5
 

Similar Topics

How to wire a Differential encoder to ML1400. Using the HSC I have set up the HSC before using Single ended but have a nice US Digital...
Replies
0
Views
1,115
Setting up the Function file for the HSC as Mode 8 I think I only use the A+ & B+ inputs on I:0/0/0 & I:0/0/1. Why do they show A/C & B/D for the...
Replies
0
Views
1,247
I have programmed a cut-to-length system on ML1400 which I am simulating with a voltage controlled oscillator driving HSC:0. The program uses a...
Replies
1
Views
1,540
Hi Guys I'm new to Allen Bradley and I'm trying to figure out how to get a simple encoder input into the MicroLogix 1400. After looking through...
Replies
13
Views
5,811
Hello, I am new here and have been working with PLCs for a few years now. I have been tasked with setting up a Micrologix 1400….. to a Cmore 10...
Replies
10
Views
481
Back
Top Bottom