Professional Documents
Culture Documents
The variety of uses for the hardware, software and firmware (hereinafter “Products”) described in this
Documentation, mandates that those responsible for the application and use of those Products must satisfy
themselves that all necessary steps have been taken to ensure that each application and actual use meets all
performance and safety requirements, including any applicable laws, regulations, codes and standards in addition
to any applicable technical documents.
In no event will Rockwell Automation, Inc., or any of its affiliate or subsidiary companies (hereinafter “Rockwell
Automation”) be responsible or liable for any indirect or consequential damages resulting from the use or
application of the Products described in this Documentation. Rockwell Automation does not assume
responsibility or liability for damages of any kind based on the alleged use of, or reliance on, this Documentation.
No patent liability is assumed by Rockwell Automation with respect to use of information, circuits, equipment, or
software described in the Documentation.
Except as specifically agreed in writing as part of a maintenance or support contract, equipment users are
responsible for:
• properly using, calibrating, operating, monitoring and maintaining all Products consistent with all Rockwell
Automation or third-party provided instructions, warnings, recommendations and documentation;
• ensuring that only properly trained personnel use, operate and maintain the Products at all times;
• staying informed of all Product updates and alerts and implementing all updates and fixes; and • all other
factors affecting the Products that are outside of the direct control of Rockwell Automation.
Reproduction of the contents of the Documentation, in whole or in part, without written permission of Rockwell
Automation is prohibited.
Throughout this manual we use the following notes to make you aware of safety considerations:
4 of 20
Motor Control: Using the Variable Frequency Drive, PLC and HMI
In this part of the lab we will use the PLC and the controller for the PanelView display panel (HMI) to control and display the
status of the VFD.
All PLC’s receive Input data, act upon it and write Output data. The I/O points are time critical and need to be read IN and
written OUT on every scan of its I/O.
However long it takes to read in the Inputs, execute the logic and write the Outputs is called the Scan Time of the
Processor. The time is measured in milliseconds (.ms) and can get longer as the PLC code gets longer or more
complicated. The duration of the scan time becomes critical when it takes too long to get through and changes to machine
inputs could be missed.
The I/O attached (or local) to the frame of the Micro850 (Base I/O, Plug-In and Expansion I/O) are its #1 priority to service
and scan. This is called Class I Messaging or-priority read/writes.
After The I/O and PLC code are updated in 1 Scan Time then the PLC takes care of some internal updating (clearing
internal buffers, zero registers and scratchpads, etc.).
Internal updates are called Class II messaging, or CPU housekeeping.
So for every (1) Processor Scan Time the PLC executes Class I and Class II messaging. Whatever this time is (in ms)
there is a % of time (called Overhead Time Slice) set aside for background communications- or Class III Messaging.
Although other Input/Output devices can be added to this Micro800 model PLC (HMI, VFD, and remote I/O via a network),
the PLC only treats its ‘local’ I/O as Class I. All other non-local I/O devices (or background communications) use Class III
Messaging.
Class III Messaging only gets executed after Class I and II have finished and only run during that percentage of
Overhead Time Slice. Here’s how a Class III differs from Class I and II:
Let’s just say that it takes a M850 CPU 20ms to complete Class I and II messaging. If the Overhead Time Slice is 10%,
the actual time the PLC will allow for all (3) message scanning will be 22ms.
This means that after Class I and II there is only 2ms left for Class III messages to occur. At the end of 22ms even if the
read/write to the HMI or VFD haven’t completed, the PLC marks where it left off on that Class III message and returns to
take cake of Class I and II, then picks up where it left off on the Class III data.
This is why (sometimes) the HMI may appear to be slow to respond to data changes on a screen. Class III messaging is
not of high priority and because of that depending on how much data is being requested in a Class III, it could take several
scans to finish.
So that the CPU Scan Time and Overhead Time slice are not constantly running all these Class III messages- the Class
III type messages require a trigger to execute them. This way, a request for a Class III message to use the Overhead
Time Slice only occurs when the Message requests an update, not an update on every scan.
The HMI and VFD are Class III messaging devices. While the HMI does not need an instruction to be triggered the VFD
does.
In the PLC code a messaging Function Block called MSG_CIPGENERIC is used to read/write to the VFD. It is a Common
Industrial Protocol (CIP) Generic Message that can communicates EXPLICITLY to a particular device (as long as that device
as well is CIP capable.
An EXPLICIT message writes and reads to a specifically targeted addressed device. An Inexplicit message just throws data
out on the network and it’s the responsibility of other network devices to grab it.
The PLC code in this lab identifies a target IP address of the device, the type of data to read/write and what data (or tags)
within that block are to access. Then ‘triggers’ this Class III.
In this lab we use a load up a MSG_CIPGENERIC Function Block that will send data into and read data out of the VFD with.
It will be triggered on every scan.
5 of 20
Motor Control: Using the Variable Frequency Drive, PLC and HMI
The message code will be stored in the area called User-Defined Function Blocks. In doing so, if we had multiple VFD’s
we wanted to control, we write this (custom) Function Block once, store it in the UDFB area and we can run the (1) UDFB
instruction with multiple VFD’s if we wanted to. All we would need to do is change the IP address of the VFD that we
wanted to Write & Read from.
Prerequisites
Understanding of the Rockwell Automation Connected Components Workbench (CCW)
Software:
o PLC Programming
o VFD Programming
USB
Cable
EtherNet/IP Switch
Stratix 2000
(no IP Address) Desktop PC
6 of 20
Motor Control: Using the Variable Frequency Drive, PLC and HMI
From the previous Section 2, you’ll either have CCW showing you your VFD project called Tuned_VFD. If so
(F1) Save it
Then (F1) and select Close to close out this project from Section 2
Once the Import is complete, you should have the following project called VfdControlWithPV_7T7 (or 6T6)
displayed.
The PLC code in this Project does not use any of the I/O that is connected to your Micro850 PLC
(2080-LC50-24QBB) so it won’t be showing any I/O modules in the Project Configuration of the PLC.
You can always install and program I/O later.
The PLC communications is already set for an EtherNet IP
There are (2) Program files, (1) User Defined Function Block (UDFB), (1) PanelView file (either T7t or
T6T) and (1) VFD file.
7 of 20
Motor Control: Using the Variable Frequency Drive, PLC and HMI
Open up each of the Program files and review what’s going on:
AutoManualMode:
Simple toggling between the Auto / Manual command from the HMI.
Main_Drive_StsCmd:
Simple control of Start/Stop, source of speed reference and publishing data to the HMI.
Take a look at Rung 10
8 of 20
Motor Control: Using the Variable Frequency Drive, PLC and HMI
Take a look at the User-Defined Function Block in the tree called RA_PFx_ENET_STS_CMD
While the UDFB can be written in Ladder Logic Code, this particular UDFB was written in
Structured Text.
Notice line 54 is where the text starts to pull in data from the Main_Drive_StsCmd Program
9 of 20
Motor Control: Using the Variable Frequency Drive, PLC and HMI
10 of 20
Motor Control: Using the Variable Frequency Drive, PLC and HMI
This is the first display page that will appear when the HMI starts up
Main_Drive_StsCmd
Main_Drive_FaultHelp
11 of 20
Motor Control: Using the Variable Frequency Drive, PLC and HMI
3.2 Downloading the Project Code
Remember, you can use RSLinx Classic Gateway to see the network configuration you already have
If you open RSLinx Classis to review your Network, if you’re using the PanelView T6T it will not show up in the
Ethernet tree, but the T7T will
12 of 20
Motor Control: Using the Variable Frequency Drive, PLC and HMI
When prompted that “Downloading will overwrite the project in the controller….”
Select Download with Project Values
13 of 20
Motor Control: Using the Variable Frequency Drive, PLC and HMI
Notice that on the VFD Keypad display panel the Fault light is flashing and there is an F073 Fault Code.
This is due to the download- the DRIVE reboots and Ethernet communications to the PLC are broken.
Press the ‘STOP’ button on the VFD panel to reset the fault.
14 of 20
Motor Control: Using the Variable Frequency Drive, PLC and HMI
For the T6T, if the IP address is For the T7T select the T6T from the
tree and click
correct select Download on O
Go into the File Manager AT the HMI and select this application to Run
15 of 20
Motor Control: Using the Variable Frequency Drive, PLC and HMI
(2) (5)
(3) Set Speed Ref
(3)
Displays and sets the Speed Cmd.
(4) Stop
Stops the VFD
Press it to Stop the VFD
(5) Current
Displays the current ‘state’ of control
(6) Switch to
Switch’s between Auto and Manual modes of operation.
While on this page Switch to Manual and notice what happens to the display.
The Current state changes from Auto to Manual and the Start, Stop and Set Speed Ref disappear
This is because they are not part of “Manual” operation
If you look at the objects for this display page in the CCW programming software you’ll see that Start,
Stop and Set Speed Ref have “visibility’ attributes set to only be visible when the system is in Auto
mode
16 of 20
Motor Control: Using the Variable Frequency Drive, PLC and HMI
While in Auto…press
(7) Main Drive Status & Command This
launches page 2 of our HMI display screens and
displays information of the VFD while operating
in Auto mode
Press the X in the upper top corner- of the Main Drive:Status and Command page, this returns
you to page 1 Machine Functions
On the Machine Functions display change the Set Speed ref (3) to 0.00 and press the Stop
button (4)
17 of 20
Motor Control: Using the Variable Frequency Drive, PLC and HMI
Your Machine Drive Status and
(1)
Command page will show the current
status of your VFD based on the Auto
Speed reference you entered.
(7)
(2) (5)
(3)
(4) (6)
18 of 20
Motor Control: Using the Variable Frequency Drive, PLC and HMI
In Manual mode- the Machine Functions page doesn’t give us any operational control. It’s now all in Main
Drive & Status Command.
Try several values and monitor the motion of the motor, the Keypad display and the Status of this
display.
Typical VFD faults would be Over Current, Buss Voltage Fault, Over/Under Volts, (reference pg 159 of
the VFD Users Manual)
This page describes what happened and what corrective action needs to be done.
The VFD fault codes are stored in the VFD. All the PLC cares about is whether communications to the VFD is
good or not
That’s why- when you unplug Ethernet cable of the VFD, the data from the PLC (on the right side of the Status
and Command page) is still being displayed. That’s because the HMI is reading the data on this screen from
the PLC, not the VFD.
But the Status of the VFD on the left side of the page goes blank- the PLC can’t read any status (or specific fault
data) from the VFD because its disconnected.
Plugging the cable back in- re-establishes the communication to the PLC so that it can read what’s going on with
the VFD and display the status again
19 of 20
Motor Control: Using the Variable Frequency Drive, PLC and HMI
(this particular code only latches fault if the VFD is running.)
3.5 (optional) Editing the System to provide RPM values, not Frequency
(to be delivered)
20 of 20