0% found this document useful (0 votes)
506 views

Micrologix Lab 4

RSLogix 500 LAB#4 MicroLogix 1100 High Speed Counter Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 1 What we are going to do: • We are going to configure and program a High Speed Counter for Mode 2Counter with external direction • The HSCNT will control immediate outputs when the presets are reached. Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 2 Steps for Today’s Assignment 1. 2. 3. 4. 5. 6. 7. Create a new project Configure the HSC Function file
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
506 views

Micrologix Lab 4

RSLogix 500 LAB#4 MicroLogix 1100 High Speed Counter Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 1 What we are going to do: • We are going to configure and program a High Speed Counter for Mode 2Counter with external direction • The HSCNT will control immediate outputs when the presets are reached. Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 2 Steps for Today’s Assignment 1. 2. 3. 4. 5. 6. 7. Create a new project Configure the HSC Function file
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

MicroLogix

1100
RSLogix 500 LAB#4

High Speed Counter

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 1


What we are going to do:

• We are going to configure and program a High Speed Counter for Mode 2-
Counter with external direction

• The HSCNT will control immediate outputs when the presets are reached.

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 2


Steps for Today’s Assignment

1. Create a new project

2. Configure the HSC Function file

3. Create a HSC Subroutine

4. Adjust Input Filter Settings

5. Enter 4 rungs of ladder logic

6. Transfer your program to the MicroLogix 1100

7. Monitor and test your program

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 3


Basics

• Controlling an AC Drive with Preset Speed and Direction


(Position Feedback with A/B Encoder)
• Definitions:
– Output O/4 --> Speed reference (OFF = high, ON = low Speed)
– Output O/5 --> Direction (OFF = forward, ON = reverse)
– Input I/2 --> Reset HSCNT Accumulator

• Timing Diagram:

low
Speed high

Direction forward reverse

Encoder Pulses 0 1700 2000 300 0

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 4


Creating a new “PROJECT”

1.Create New Project


– Select “File > NEW” To Create a File

2.Select Controller
– Enter Processor Name “M-LAB4”
– “Click” on “Bul.1763 MicroLogix 1100 Series A
– (Either double click, or select and then click
OK)
1,3
3.Save Program Files
– Select “File > Save As”
– Type MicroEconomix LAB 4 in the “File name”


box
Click “Save”
2
– Click “Yes” when asked to change the
processor name
– Click “Ok” for revision note box

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 5


Configure the HSC Function File

4. Function Files
– Double click on the Function File
in the Project tree
4
5.HSC Function File
– Enlarge the HSC0 Function File
to see all the appropriate
Parameters
5

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 6


Configure the HSC Function File

6.HSC Parameters
– Enterthe following Values to
define the HSC0 signals.
– Program File Number: 10, this
defines the subroutine that will be
called (executed) when the HSC0
counts to High/Low preset or
Over/underflow
– Auto start: 1, This defines if the
HSC function automatically starts 6
whenever the controller enters the
run mode
– Counting Enabled: 1, Used to
enable or disable HSC
– HSC Mode: 2, sets mode to counter
w/external direction
– Output Mask: 48h, defines the
HSC control of outputs 5 and 6
– High/Low presets values
– High preset = 17
– Low preset = 0
– Over/Under flow values
– Overflow = 21
– Underflow= -21

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 7


Creating a Program File

The High Speed Counter


requires a program file to
be executed on any HSC
interrupt

7.New Program File


– Right click on the Program File
Folder in the Project Tree and select
“New”

8.HSCNT File #10


– Enter the file number “10”
– Enter the file name “HSCNT”
– Accept the edits with OK

7
8

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 8


Adjust Input Filter Settings

In order for the High


Speed Counter Inputs to
recognize the short
impulses of the encoder,
the input filter time must
be properly configured

9.Configure Embedded I/Os


– Double click on the I/O Configuration
in the project tree
– Double click on the Bul. 1763
MicroLogix 1100 in the I/O
Configuration window
– Select the Embedded I/O
Configuration tab
– Change Input 0+1 from “default”
to “100us”
– Accept edits with OK
– Exit the I/O configuration window

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 9


Creating Ladder Logic
10
Create new rungs
according to previous
labs 11

10.Reset Accumulator RAC 12


– Select the “Micro High Spd Cntr” Tab
in the toolbar
– Drag and drop the RAC instruction
to the 1st rung according to the picture
– Specify HSC0 and “0”

11.Load HSC Values HSL


– Drag and drop the HSL instruction
to the appropriate place
– Enter the parameters for each rung
according to the picture

12. Counting Direction


– Drag and drop the XIC (XIO at rung 3)
to the assigned place
– Enter the address HSC:0/DIR .

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 10


Creating Ladder Logic

13.Compare instruction LIM


– Select the “Compare” Tab
in the toolbar

– Drag and drop the LIM instruction


to the rungs according to the picture 13
– Specify HSC:0.ACC as Test
– Enter Low Lim and High Lim
parameters according to the picture

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 11


Transfer the Program to the Micro

14.Save your work


– Click on the “Save” button
– Click “OK” for revision note box

15.Download the Program


– Select the menu item OFFLINE 15
– Select “Download”
– Click “YES” if/when asked to change
processor from Run to Program Mode
– Click “Yes” if/when asked to change
processor back to RUN Mode
– Click “Yes” when asked to go Online

16.Put the Micro into RUN


– Click on the down arrow next to the
word REMOTE PROG
– Select “Run”

16

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 12


Test & Monitor the Program
17. With the controller in “Remote
Run”, you can monitor or edit data
within the controller. This allows:
– Program debugging
– Change data variables while in run
18. Push Button I:0/0 to see any
changes of the accumulator

19.Functional Test
With input I:0/1(external direction) off, Push
button I:0/0 (high speed input) on. Verify the
HSC accumulator is counting up.
At 17 --> output O/4 turns ON
At 20 --> output O/5 turns ON, output O/4
turns OFF
Push on I:0/1(external direction), with I:0/0
(high speed input) off. Verify the HSC
accumulator is counting down.
At 3 --> output O/4 and O/5 turns ON
At 0 --> output O/4 and O/5 turns OFF

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 13


Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 14

You might also like