Professional Documents
Culture Documents
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
Page 1
0003
Third VFD Modbus (03) 8448 Reading Logic Status - Faulted Bit N23:44 7 First Pass S:1 15
Page 2
0004
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
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
0013
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
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
0021
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
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
Page 8
0027
First VFD P036 Start Source 2 = 2-wire 5 = RS485 (not used) MOV Move Source Dest
Page 9
First VFD P037 Stop Mode 4 = Ramp MOV Move Source Dest
First VFD P038 Speed Ref 4 = Preset 0-3 5 = RS485 (not used) MOV Move Source Dest
First VFD A051 Digital In 1 Select 0 = Not Used 4 = Preset Freqs MOV Move Source Dest
Page 10
First VFD A052 Digital In 2 Select 0 = Not Used 4 = Preset Freq MOV Move Source Dest
First VFD A055 Relay Output Select 0 = Ready (No Fault) MOV Move Source Dest
Page 11
Page 12
First VFD A082 Dyn Brake Resist Sel 0 = Disabled 1 = Std Enable MOV Move Source Dest
0028
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
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
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
0031
First VFD A067 A073 MSG Read/Write Message MSG File MG91:43 Setup Screen <
EN DN ER
0032
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
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
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
0035
Reached Final VFD When Programming All B3:7 7 Reached Final VFD During Normal Operation B3:7 8 First Pass S:1 15
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
0039
0040
Page 16