Micrologix 1400 HSC ACC convert to rate

M. Jemai

Member
Join Date
Mar 2013
Location
TN
Posts
10
Gents,
I am using the micrologix HSC0 to calculate engine rpm, would you please help how to convert the HSC:0.ACC Long register into rate
and is there a way to emulate the HSC

Thanks
 
Hi,
Chapter 5 in Publication 1762-RM001G-EN-P details operation of HSC function in micrologix and it also gives examples of different modes of operation.
To convert your count value into rate, assuming you are using 1024pulse/revolution encoder, you can simply use a timed interrupt to read HSC:0.ACC value, move it to a register and subtract it from previous and divide by the value of interrupt timer.
e.g follow the following algo...
1) Move HSC:0.ACC to N7/xx and start timer with 2s preset
2) at timer T/DN bit move HSC:0.ACC to N7/yy
3) rate= (N7/yy - N7/xx)/2
4) rpm= (rate*60)/(pulse per rev)
5)goto 1

This is something very simple that could do what you require but you can increase accuracy by using timed interrupts, averaging 10 values of rpm and other such schemes.

Regards,
Anas
www.pakplc.com
 
Thanks Anas for your help!
I have added an STI file that is executed every 1000 ms and calculate the engine rpm from HSC0 as shown on attached file
since I am a way from field and I don't have the hardware's in hand to simulate the solution any one can have a look and advice if that will work!
 
I realize this is an old post but I'm trying to do something similar and was wondering what the results were.
I'm doing a project with a ML1400 (1766L32BXBA). What I need to do is figure out the speed of the machine in feet/minute. I've installed an encoder (1024 ppr) that is connected to a roller with a circumference of 12" so every 1024 pulsezs equals 1 foot. The encoder output is connected to PLC input I:0 for HSC:0 (up counting mode 0). This machine only runs in one direction. In other plc's I've used have the speed function to determine the incoming pulse frequency (Hertz), however this plc does not seem to have this function. I need to know the speed from start until about 3000 ft/minute. I see that using the high speed counter I can see the incoming or accumulated pulses at HSC:0.ACC, but I'm not sure how to go about manipulating the data to get what I need. Any suggestions would be appreciated.
 

Similar Topics

Hi, everyone I’m working on a registration project where I’m counting encoder pulses between registration marks. I’m expecting to see around 1800...
Replies
2
Views
424
I am trying to program a Micrologix 1400 to control a beer keg filler using an IFM SM6001 flow meter. The meter will be set up for a pulse...
Replies
5
Views
1,832
Is it possible to set up the HSC in the 1766-L32BXB as a ring counter. So it will roll over to 0 counting up and continue to count up that...
Replies
2
Views
1,086
Hi everyone first of all. This is first question in the forum. I am using HSC application. I'm reading A and B pulse count. 1 round of the motor...
Replies
12
Views
4,316
Is it possible to add a HSC onto a MicroLogix 1400 processor? I am using RSLogix500 and the toolbar has the HSC button greyed out. Is there any...
Replies
5
Views
4,108
Back
Top Bottom