You are on page 1of 16

EXAMPLEPLCNETCODEFORPF4.

RSS LAD 90 - VFD_COMM --- Total Rungs in File = 41

Example of using the Micrologix1100/1400 RS-485 port to talk directly to an Allen Bradley Powerflex 4 VFD. We use the Micrologix 1100 DF1/RS485 port to connect to the drives and use the following ladder logic to talk to those drives. For each VFD, 1) Write out any new Logic command 2) Read the logic status data 3) Read the drive error codes So, for 4 VFD's their will be a total of 4 * 3 = 12 Rs-485 commands that must be completed, then we start at the top of this loop and do it all over again. Because there are so many commands to send/receive and the RS-485 is so slow, the RS-485 is good enough to get error data but much too slow to actually operate the VFD's. RS-485 Registers 8192 (8193) - Writing Logic Command Data If all bits are zero, no changes (no command). Bit 3: 1 = Clr Faults, 0 = Not Clear Faults 8193 (8194) - Writing Speed Reference (not used) 8448 (8449) - Reading Logic Status Data Bit 7: 1 = Faulted, 0 = Not Faulted 8451 (8452) - Reading Speed Feedback (not used) 8449 (8450) - Reading Drive Error Codes 1 through 104 (2 through 105) - Read / Write Drive parameters D001 through P104 0000

NULL B3:0 0

0001

In case we're having trouble reading from the VFD's, clear out any residual data we read from the VFD's the last time we were powered up. This assures us we only see the 'real' VFD data read (error codes). First VFD 8448 Reading Logic First Pass Status Word S:1 FLL Fill File 15 Source 0 Dest #N23:40 Length 15 When the Third VFD is manually reversed, clear any VFD faults on it. Wait for the fault to be seen as cleared before quitting trying to clear it. Third VFD Rev Selector Switch Clr Third VFD Faults turned on Oneshot B12:0 B3:7 ONS 6 1 Clear Third VFD Faults HMI_SWP_VFD_CLRFAULT B21:1 8

0002

Clear Third VFD Faults N23:57 L 3

Page 1

Sunday, April 10, 2011 - 16:50:04

EXAMPLEPLCNETCODEFORPF4.RSS LAD 90 - VFD_COMM --- Total Rungs in File = 41

0003

Third VFD Modbus (03) 8448 Reading Logic Status - Faulted Bit N23:44 7 First Pass S:1 15

Clear Third VFD Faults N23:57 U 3

Page 2

Sunday, April 10, 2011 - 16:50:06

EXAMPLEPLCNETCODEFORPF4.RSS LAD 90 - VFD_COMM --- Total Rungs in File = 41

0004

Reached Final VFD B3:7 0

WRITE LOGIC COMMAND REGISTER 8192 (8193) OF EACH VFD First VFD 8192 Writing Logic Cmd Data Bits MSG Read/Write Message MSG File MG91:10 Setup Screen < Second VFD 8192 Writing Logic Cmd Data Bits MSG Read/Write Message MSG File MG91:11 Setup Screen <

EN DN ER

0005

First VFD 8192 Writing Logic Cmd Data Bits MG91:10 DN First VFD 8192 Writing Logic Cmd Data Bits MG91:10 ER Second VFD 8192 Writing Logic Cmd Data Bits MG91:11 DN Second VFD 8192 Writing Logic Cmd Data Bits MG91:11 ER Third VFD 8192 Writing Logic Cmd Data Bits MG91:12 DN Third VFD 8192 Writing Logic Cmd Data Bits MG91:12 ER

EN DN ER

0006

Third VFD 8192 Writing Logic Cmd Data Bits MSG Read/Write Message MSG File MG91:12 Setup Screen <

EN DN ER

0007

Fourth VFD 8192 Writing Logic Cmd Data Bits MSG Read/Write Message MSG File MG91:13 Setup Screen <

EN DN ER

Page 3

Sunday, April 10, 2011 - 16:50:12

EXAMPLEPLCNETCODEFORPF4.RSS LAD 90 - VFD_COMM --- Total Rungs in File = 41

0008

Fourth VFD 8192 Writing Logic Cmd Data Bits MG91:13 DN Fourth VFD 8192 Writing Logic Cmd Data Bits MG91:13 ER

READ LOGIC STATUS DATA REGISTER 8448 (8449) OF EACH VFD First VFD 8448 Reading Logic Status Data Bits MSG Read/Write Message MSG File MG91:20 Setup Screen <

EN DN ER

0009

Clear out the data if an error occurred during the read to ensure we are not reading stale data. First VFD 8448 Reading Logic Status Data Bits MG91:20 ER

First VFD 8448 Reading Logic Status Word CLR Clear Dest N23:40 4109< Second VFD 8448 Reading Logic Status Data Bits MSG Read/Write Message MSG File MG91:21 Setup Screen <

0010

First VFD 8448 Reading Logic Status Data Bits MG91:20 DN First VFD 8448 Reading Logic Status Data Bits MG91:20 ER Second VFD 8448 Reading Logic Status Data Bits MG91:21 ER

EN DN ER

0011

Second VFD 8448 Reading Logic Status Word CLR Clear Dest N23:42 12335< Third VFD 8448 Reading Logic Status Data Bits MSG Read/Write Message MSG File MG91:22 Setup Screen <

0012

Second VFD 8448 Reading Logic Status Data Bits MG91:21 DN Second VFD 8448 Reading Logic Status Data Bits MG91:21 ER

EN DN ER

Page 4

Sunday, April 10, 2011 - 16:50:14

EXAMPLEPLCNETCODEFORPF4.RSS LAD 90 - VFD_COMM --- Total Rungs in File = 41

0013

Third VFD 8448 Reading Logic Status Data Bits MG91:22 ER

Third VFD 8448 Reading Logic Status Word CLR Clear Dest N23:44 13< Fourth VFD 8448 Reading Logic Status Data Bits MSG Read/Write Message MSG File MG91:23 Setup Screen <

0014

Third VFD 8448 Reading Logic Status Data Bits MG91:22 DN Third VFD 8448 Reading Logic Status Data Bits MG91:22 ER Fourth VFD 8448 Reading Logic Status Data Bits MG91:23 ER

EN DN ER

0015

Fourth VFD 8448 Reading Logic Status Word CLR Clear Dest N23:46 259<

Page 5

Sunday, April 10, 2011 - 16:50:17

EXAMPLEPLCNETCODEFORPF4.RSS LAD 90 - VFD_COMM --- Total Rungs in File = 41

0016

Fourth VFD 8448 Reading Logic Status Data Bits MG91:23 DN Fourth VFD 8448 Reading Logic Status Data Bits MG91:23 ER First VFD 8449 Drive Error Code MG91:30 ER

READ LOGIC DRIVE ERROR CODE REGISTER 8449 (8450) OF EACH VFD First VFD 8449 Drive Error Code MSG Read/Write Message MSG File MG91:30 Setup Screen <

EN DN ER

0017

First VFD 8449 Drive Error Code CLR Clear Dest N23:50 0< Second VFD 8449 Drive Error Code MSG Read/Write Message MSG File MG91:31 Setup Screen <

0018

First VFD 8449 Drive Error Code MG91:30 DN First VFD 8449 Drive Error Code MG91:30 ER Second VFD 8449 Drive Error Code MG91:31 ER

EN DN ER

0019

Second VFD 8449 Drive Error Code CLR Clear Dest N23:51 0< Third VFD 8449 Drive Error Code MSG Read/Write Message MSG File MG91:32 Setup Screen <

0020

Second VFD 8449 Drive Error Code MG91:31 DN Second VFD 8449 Drive Error Code MG91:31 ER

EN DN ER

Page 6

Sunday, April 10, 2011 - 16:50:18

EXAMPLEPLCNETCODEFORPF4.RSS LAD 90 - VFD_COMM --- Total Rungs in File = 41

0021

Third VFD 8449 Drive Error Code MG91:32 ER

Third VFD 8449 Drive Error Code CLR Clear Dest N23:52 0< Fourth VFD 8449 Drive Error Code MSG Read/Write Message MSG File MG91:33 Setup Screen <

0022

Third VFD 8449 Drive Error Code MG91:32 DN Third VFD 8449 Drive Error Code MG91:32 ER Fourth VFD 8449 Drive Error Code MG91:33 ER

EN DN ER

0023

Fourth VFD 8449 Drive Error Code CLR Clear Dest N23:53 0<

Page 7

Sunday, April 10, 2011 - 16:50:20

EXAMPLEPLCNETCODEFORPF4.RSS LAD 90 - VFD_COMM --- Total Rungs in File = 41

0024

Fourth VFD 8449 Drive Error Code MG91:33 DN Fourth VFD 8449 Drive Error Code MG91:33 ER First VFD ModBus Read D0003 Output Current MG91:34 ER

READ OUTPUT CURRENT REGISTER D003 (004) OF LIFT VFD First VFD ModBus Read D0003 Output Current MSG Read/Write Message MSG File MG91:34 Setup Screen <

EN DN ER

0025

First VFD ModBus Read D0003 Output Current CLR Clear Dest N23:41 214<

0026

During normal operation, we have reached the final VFD in our sequence of writes and reads. Set a bit to tell us to start all over again in our sequence. First VFD Reached Final VFD ModBus Read D0003 During Normal Op Output Current Oneshot Program All VFD's MG91:34 B3:7 B3:7 ONS DN 9 6 First VFD ModBus Read D0003 Output Current MG91:34 ER

Reached Final VFD During Normal Operation B3:7 8

Page 8

Sunday, April 10, 2011 - 16:50:22

EXAMPLEPLCNETCODEFORPF4.RSS LAD 90 - VFD_COMM --- Total Rungs in File = 41

Code to program First VFD First Pass S:1 15

0027

First VFD P031 Motor NP Volts MOV Move Source Dest

460 460< N80:31 460<

First VFD P032 Motor NP Hertz MOV Move Source Dest

60 60< N80:32 60<

First VFD P033 Motor OL Current MOV Move Source Dest

60 60< N80:33 60<

First VFD P034 Min Freq MOV Move Source Dest

0 0< N80:34 0<

First VFD P035 Max Freq MOV Move Source Dest

120 120< N80:35 120<

First VFD P036 Start Source 2 = 2-wire 5 = RS485 (not used) MOV Move Source Dest

2 2< N80:36 2<

Page 9

Sunday, April 10, 2011 - 16:50:23

EXAMPLEPLCNETCODEFORPF4.RSS LAD 90 - VFD_COMM --- Total Rungs in File = 41

First VFD P037 Stop Mode 4 = Ramp MOV Move Source Dest

4 4< N80:37 4<

First VFD P038 Speed Ref 4 = Preset 0-3 5 = RS485 (not used) MOV Move Source Dest

4 4< N80:38 4<

First VFD P039 Accel Time 1 MOV Move Source Dest

1 1< N80:39 1<

First VFD P040 Decel Time 1 MOV Move Source Dest

3 3< N80:40 3<

First VFD A051 Digital In 1 Select 0 = Not Used 4 = Preset Freqs MOV Move Source Dest

4 4< N80:51 4<

Page 10

Sunday, April 10, 2011 - 16:50:25

EXAMPLEPLCNETCODEFORPF4.RSS LAD 90 - VFD_COMM --- Total Rungs in File = 41

First VFD A052 Digital In 2 Select 0 = Not Used 4 = Preset Freq MOV Move Source Dest

0 0< N80:52 0<

First VFD A055 Relay Output Select 0 = Ready (No Fault) MOV Move Source Dest

0 0< N80:55 0<

First VFD A067 Accel Time 2 MOV Move Source Dest

1 1< N80:67 1<

First VFD A068 Decel Time 2 MOV Move Source Dest

3 3< N80:68 3<

First VFD A069 Internal Freq MOV Move Source Dest

0 0< N80:69 0<

Page 11

Sunday, April 10, 2011 - 16:50:26

EXAMPLEPLCNETCODEFORPF4.RSS LAD 90 - VFD_COMM --- Total Rungs in File = 41

First VFD A070 Preset Freq 0 MOV Move Source Dest

200 200< N80:70 200<

First VFD A071 Preset Freq 1 MOV Move Source Dest

800 800< N80:71 800<

First VFD A072 Preset Freq 2 MOV Move Source Dest

0 0< N80:72 0<

First VFD A073 Preset Freq 1 MOV Move Source Dest

0 0< N80:73 0<

First VFD A080 DC Brake Time MOV Move Source Dest

20 20< N80:80 20<

First VFD A081 DC Brake Amps MOV Move Source Dest

72 72< N80:81 72<

Page 12

Sunday, April 10, 2011 - 16:50:28

EXAMPLEPLCNETCODEFORPF4.RSS LAD 90 - VFD_COMM --- Total Rungs in File = 41

First VFD A082 Dyn Brake Resist Sel 0 = Disabled 1 = Std Enable MOV Move Source Dest

1 1< N80:82 1<

First VFD A089 Current Limit MOV Move Source Dest

156 156< N80:89 156<

0028

Program All VFD's B3:7 6

First VFD ModBus Read D0003 Output Current MG91:34 DN First VFD ModBus Read D0003 Output Current MG91:34 ER

First VFD P031 P040 MSG Read/Write Message MSG File MG91:40 Setup Screen <

EN DN ER

0029

Program All VFD's B3:7 6

First VFD P031 P040 MG91:40 DN First VFD P031 P040 MG91:40 ER

First VFD A051 A052 MSG Read/Write Message MSG File MG91:41 Setup Screen <

EN DN ER

0030

Program All VFD's B3:7 6

First VFD A051 A052 MG91:41 DN First VFD A051 A052 MG91:41 ER

First VFD A055 MSG Read/Write Message MSG File MG91:42 Setup Screen <

EN DN ER

Page 13

Sunday, April 10, 2011 - 16:50:30

EXAMPLEPLCNETCODEFORPF4.RSS LAD 90 - VFD_COMM --- Total Rungs in File = 41

0031

Program All VFD's B3:7 6

First VFD A055 MG91:42 DN First VFD A055 MG91:42 ER

First VFD A067 A073 MSG Read/Write Message MSG File MG91:43 Setup Screen <

EN DN ER

0032

Program All VFD's B3:7 6

First VFD A067 A073 MG91:43 DN First VFD A067 A073 MG91:43 ER

First VFD A080 A082 MSG Read/Write Message MSG File MG91:44 Setup Screen <

EN DN ER

0033

Program All VFD's B3:7 6

First VFD A080 A082 MG91:44 DN First VFD A080 A082 MG91:44 ER

First VFD A089 MSG Read/Write Message MSG File MG91:45 Setup Screen <

EN DN ER

Page 14

Sunday, April 10, 2011 - 16:50:31

EXAMPLEPLCNETCODEFORPF4.RSS LAD 90 - VFD_COMM --- Total Rungs in File = 41

0034

Second, third and fourth VFD programming code goes here... While programming the VFD's, we have reached the final VFD in our sequence of writes and reads. Set a bit to tell us to start all over again in our sequence. Reached Final VFD When Programming All Reached Final VFD Fourth VFD A089 Oneshot Program All VFD's When Programming All MG91:75 B3:7 B3:7 B3:7 ONS ER 2 6 7 Fourth VFD A089 MG91:75 DN

Page 15

Sunday, April 10, 2011 - 16:50:33

EXAMPLEPLCNETCODEFORPF4.RSS LAD 90 - VFD_COMM --- Total Rungs in File = 41

0035

Reached Final VFD When Programming All B3:7 7 Reached Final VFD During Normal Operation B3:7 8 First Pass S:1 15

LOOP RS-485 PROGRAMMING BACK TO TOP Reached Final VFD B3:7 0

0036

When we get the 'program VFD's' request fron the HMI, wait for the VFD's to finish their normal communication loop, then go through one full pass of programmiing all the VFD's. Program all VFD's From HMI HMI_PROGRAM_VFD Program VFD Oneshot B21:1 B3:7 ONS 6 10 Program All VFD's B3:7 6 Got Program VFD cmd from HMI B3:7 11 Reached Final VFD When Programming All B3:7 7 Reached Final VFD During Normal Operation B3:7 8

Got Program VFD cmd from HMI B3:7 L 11 Got Program VFD cmd from HMI B3:7 U 11

0037

0038

Program All VFD's B3:7 L 6 Program All VFD's B3:7 U 6 END

0039

0040

Page 16

Sunday, April 10, 2011 - 16:50:34

You might also like