Micrlogix 1400 HSC Interrupt & PLS

4 posts in this topic

PLC Micrologix 1400 with 6 HSC. Connected an encoder with A,B & N. The encoder (Rotary incremental) is 2000 pulses per revolution 1. 

Need to achieve the following :

1. Whenever 2000 ppr reached increment count as 1 cycle complete

2. When 250 PPR then activate a solenoid Output (O0/0)

3. When 1750 PPR turn of output in step 2

I connected the Encoder to HSC0. Set the HIP to 2000 and LIP to 0. Then I created a Program File No. 3. In this I do the add of count (increment) . The PFN 3 is raised successfully on each 2000 PPR reached (as interrupt style).

Now when I use the PLS feature, I set the HSC0 Mode as A00 (as per the example in the manual) . In the PLS I set the HIP to 250 , OHD output 0 as 1. I set another HIP to 1750  and set OLD output 0 to 0. 

In the function file HSC0, I set the OMB to 1. With all this done, I get the following issues

1. Output 0 not coming on and off as needed in step 2 and 3 above

2. Now the count increment happens almost 2 times. First 0 - 250 and then 0-1750. How to address this problem. Where I am going wrong ?

Thanks in advance.


Share this post

Link to post
Share on other sites

There is an example configuration that I posted about a week ago that provides a detailed example as to how to use the PLS function.Open the program and it should provide the info you require.

Share this post

Link to post
Share on other sites

Thanks mpereira. I downloaded your example. Will test that today and post my comment. You have set your HIPs in your PLS file as follows

500 -->  OUTPUT 0 ON
150--> OUTPUT 1 ON

150 --> OUTPUT 2 ON


You started with 500 (reverse order). Was this intentional. I mean do we have to give in descending order for the PLS to work ? Also in above settings, why can you not switch on both Output 1 and Output 2 at the same time against the 150 HIP ? Will not both outputs switch on at the same time if given in single line ?

Also , you have not used the OLD part. This is because of the TIP in the manual as follows :

 The Output High Data (OHD) is only written when the High preset (HIP) is reached. The Output Low Data (OLD) is written when the low  preset is reached.

TIP  Output High Data is only operational when the counter is counting up. Output Low Data is only operational when the counter is counting down.

In another 5 hours time I will try this and update here. 

Share this post

Link to post
Share on other sites

Just one more thing. I am using  LAD 3 (given as PFN 3 for the HSC0) to increment a memory variable. Apart from the above PLS requirement, where I want to switch on outputs based on the HSC accumulator value, I also want to keep count when the ACC reaches HIP of 2000 set in the Function file of HSC. You have just set HIP as 0 in the function file / HSC 0 area. I wonder if your PLS setting and counting of the encoder cycle can be done at the same time. 


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now