# Property of PMA Electrical Solutions, LLC. # # Allen-Bradley PowerFlex 40P (bulletin 22D) ONLY. # NOT claimed: PowerFlex 4, 4M, 40, 400, 525 or 527. The 40P is a separate # bulletin with its own manual; the plain PowerFlex 40 manual (22B-UM001) never # mentions the 40P, and the 40P's own parameter set differs from the 40's in # ways that matter on the wire — its display group is b0xx (not d0xx), b001 # [Output Freq] displays 0.01 Hz (the PF40's d001 displays 0.1 Hz), P035 # [Maximum Freq] tops out at 500.0 Hz (PF40: 400.0 Hz), and it adds an Enhanced # Program group E201-E249 plus an Advanced Display group d301-d316 that the # PF40 does not have. Do NOT treat profiles/rockwell_powerflex40.toml as # covering this drive, and do not port values between the two files. # # Communication path: the drive's embedded RS-485 (DSI) RJ45 port, Modbus RTU. # No option module and no firmware qualifier — the manual covers firmware # 1.xx-3.xx and states the RS-485 (DSI) support without version conditions # (p.149). Supported function codes: 03 read holding, 06 write single, # 16 (0x10) write multiple (p.151). No FC04 path exists in this manual. # Optional 22-COMM-x network adapters exist but are a different map and are # explicitly NOT what this profile drives. # # Source: Rockwell publication 22D-UM001F-EN-E, September 2024. # pp.149-156 Appendix C RS-485 (DSI) Protocol: function codes, the 0-/1-based # note, Logic Command 8192, Reference 8193, Logic Status 8448, # Drive Error Codes 8449, Feedback 8451, and the # "register address = parameter number" rule (p.156) # p.48 Parameter Organization table — the group bounds used by # [parameters] and the b0xx display-group numbers # pp.49-54 Basic Display group b001-b029 ("Display:" rows = the scaling) # p.55 P031-P035, including P033 [Motor OL Current] and P035 max freq # pp.79-81 A100 [Fault Clear], A103-A107 comm setup # p.107 E249 [Cmd Stat Select], default 0 "Velocity" # pp.117-119 Chapter 4 fault descriptions (cross-check of the 8449 table) # # Drive-side setup before this profile can command anything (p.151): # P036 [Start Source] = 5 "Comm Port" -> Logic Command 8192 obeyed # P038 [Speed Reference] = 5 "Comm Port" -> Reference 8193 obeyed # E249 [Cmd Stat Select] = 0 "Velocity" (default) — MANDATORY for this # profile. At E249 = 1 "Position" the SAME registers 8192/8448 carry a # completely different bit layout (pp.153-154): command bits 10,9,8 become # a position-source selector and bits 11-15 become Find Home / Hold Step / # Pos Redefine / Sync Enable / Traverse Disable, and status bits 6 and # 8-15 change meaning. The stop/start/direction/clear-fault bits 0-5 are # identical in both, but every monitor bit name below is Velocity-mode # only. Verify E249 = 0 before trusting this map. # A103 [Comm Data Rate] 3 = 9600 (default) # A104 [Comm Node Addr] default 100, range 1-247 # A107 [Comm Format] 0 = RTU 8-N-1 (default) # A105 [Comm Loss Action] default 0 "Fault"; A106 [Comm Loss Time] default 5.0 s # E207 [Comm Write Mode] 0 "EEPROM" (default) commits parameter writes to # EEPROM. Set 1 "RAM only" before any polling loop that writes parameter # registers repeatedly, or the EEPROM wears out. # Without P036/P038 the drive ACKs the writes and silently ignores them. # # ADDRESSING. The manual prints an "Address (Decimal)" column and states # (p.151) that a 1-based master needs those numbers offset by +1 — i.e. the # printed numbers ARE the 0-based protocol addresses, which is what goes on the # wire here. Formula: 0-based address = the decimal number as printed, no # offset. No 4xxxx/PLC notation appears anywhere in this manual. # worked example 1: Logic Command, printed 8192 -> address 8192 # (the manual's own words: "8192 for some master devices ... and 8193 for # others", the 8193 being the 1-based restatement of the same register) # worked example 2: "the Modbus register address equals the parameter # number" (p.156) -> b001 [Output Freq] = 1, P039 [Accel Time 1] = 39, # P033 [Motor OL Current] = 33, A100 [Fault Clear] = 100 # # SCALING is the fixed decimal point in each parameter's "Display:" row, not a # configurable fieldbus scale. This drive is 16-bit fixed point throughout — no # IEEE-754 point exists in this manual. Parameters marked "32-bit" (b010, b026, # A056, A059, A062, E238-E245, d304, d306, d308) occupy TWO consecutive # parameter numbers over RS-485 (p.47); none of them is a monitor point below. # # TWO DIFFERENT FREQUENCY SCALES, deliberately. Appendix C gives the Reference # register 8193 as "xxx.xx ... decimal 100 equals 1.00 Hz" (p.153) but the # Feedback register 8451 as "xxx.x ... decimal 123 equals 12.3 Hz" (p.155). # The 8451 footnote claims it "returns the same data as b001 [Output Freq]", # yet p.49 gives b001 a 0.01 Hz display — the manual contradicts itself on # 8451. Each register below is scaled by the statement printed against that # register, and the read-back for a commanded speed is taken from b001 # (register 1, 0.01 Hz) rather than 8451, so a bench check of 8451's true # resolution is not on the control path. # # CONFIGURATION-DEPENDENT: b003/b029/P033 full-scale is (Drive Rated Amps x 2) # and b022 is (Drive Rated Power x 2), so identical raw counts mean different # amps and kW on different frame sizes. The 0.01/0.1 resolutions themselves are # fixed. # # REVERSE is a discrete 2-bit field in the Logic Command (bits 5,4 = 10), NOT # the sign of the reference. run_rev is therefore a real, separate command and # speed_signed is false — do not copy the ABB sign-of-reference pattern here. # A095 [Reverse Disable] can block it at the drive. # # RESET uses A100 [Fault Clear] = 1 "Reset Fault" at register 100, which the # manual describes as "used primarily to clear a fault over network # communications" (p.79). Bit 3 of the Logic Command also clears faults, but # writing a reset value into the run register is exactly the class of defect # validate() guards against, and A100 is a register that cannot start a motor # under any value. A100 = 2 "Clear Buffer" clears the fault-code history. # Note the manual's "Stop drive before changing this parameter" flag on A100. name = "Allen-Bradley PowerFlex 40P" vendor = "Allen-Bradley" device_type = "vfd" verified = false probe_register = 8448 # Logic Status, readable whenever the DSI port is alive [serial] baudrate = 9600 # A103 default 3 = 9600 parity = "N" # A107 default 0 = RTU 8-N-1 stopbits = 1 [monitor] # Appendix C dedicated registers (pp.152-155). Bit names are E249 = 0 # "Velocity" definitions only. # Bits 5,4 are ONE 2-bit direction field (00/11 = No Command, 01 = Forward, # 10 = Reverse, p.152); two flag names is display only. logic_command = { address = 8192, bits = { 0 = "STOP", 1 = "START", 2 = "JOG", 3 = "CLEAR_FAULTS", 4 = "DIR_FWD", 5 = "DIR_REV", 6 = "LOGIC_IN_1", 7 = "LOGIC_IN_2" } } speed_reference = { address = 8193, scale = 0.01, unit = "Hz" } # p.153, xxx.xx logic_status = { address = 8448, bits = { 0 = "READY", 1 = "ACTIVE", 2 = "CMD_FORWARD", 3 = "ROTATING_FORWARD", 4 = "ACCELERATING", 5 = "DECELERATING", 7 = "FAULTED", 8 = "AT_REFERENCE", 9 = "REF_BY_COMM", 10 = "CMD_BY_COMM", 11 = "PARAMS_LOCKED", 12 = "DIGITAL_IN_1", 13 = "DIGITAL_IN_2", 14 = "DIGITAL_IN_3", 15 = "DIGITAL_IN_4" } } feedback = { address = 8451, scale = 0.1, unit = "Hz" } # p.155, xxx.x — see the scale note in the header # Basic Display group, register = parameter number (pp.49-54) output_frequency = { address = 1, scale = 0.01, unit = "Hz" } # b001, 0.01 Hz commanded_frequency = { address = 2, scale = 0.01, unit = "Hz" }# b002 output_current = { address = 3, scale = 0.01, unit = "A" } # b003 output_voltage = { address = 4, unit = "V" } # b004, 1 VAC dc_bus_voltage = { address = 5, unit = "V" } # b005, 1 VDC drive_status = { address = 6, bits = { 0 = "RUNNING", 1 = "FORWARD", 2 = "ACCELERATING", 3 = "DECELERATING" } } # b006 elapsed_run_time = { address = 18, scale = 10.0, unit = "h" } # b018, 1 = 10 Hrs output_power = { address = 22, scale = 0.01, unit = "kW" } # b022 power_factor_angle = { address = 23, scale = 0.1, unit = "deg" }# b023 drive_temperature = { address = 24, unit = "C" } # b024, 1 degC torque_current = { address = 29, scale = 0.01, unit = "A" } # b029 # Logic Command word, p.152 (E249 = 0 "Velocity"). Bit 0 Stop, bit 1 Start, # bits 5,4 direction. Bits 14-13-12 are left 000 "No Command" so the frequency # source stays as configured by P038 instead of being overridden on every write. [control] command_register = 8192 reset_register = 100 # A100 [Fault Clear] — a different register, p.79 speed_register = 8193 speed_scale = 0.01 # p.153: decimal 100 = 1.00 Hz speed_signed = false # direction is bits 5,4, not the reference sign speed_unit = "Hz" max_ref = 500.0 # P035 [Maximum Freq] max, p.55 (the PF40's is 400.0) step_delay = 0.05 stop = [0x0001] # bit 0 Stop run_fwd = [0x0012] # bit 1 Start + bits 5,4 = 01 Forward run_rev = [0x0022] # bit 1 Start + bits 5,4 = 10 Reverse reset = [1, 0] # A100 = 1 "Reset Fault", then back to 0 "Ready/Idle" # A105 [Comm Loss Action] defaults to 0 "Fault": the drive trips F81 Comm Loss # and coasts to stop once A106 [Comm Loss Time] elapses (default 5.0 s, range # 0.1-60.0 s, register 106). Keep the keepalive well under whatever A106 is # actually set to on the unit in front of you. [control.watchdog] interval_ms = 2000 fault = "F81 Comm Loss" [running_check] register = 8448 bit = 1 # Logic Status bit 1 = Active (Running), p.154 # 8449 Drive Error Codes (p.155). History is b007/b008/b009, b007 the most # recent (p.50). The 40P also keeps d310-d316 [Fault 4...10 Code] in the # Advanced Display group; by the p.156 rule those would be # registers 310-316, but the manual gives no worked example for a d3xx # parameter, so they are named here rather than shipped unverified. # A100 [Fault Clear] = 2 "Clear Buffer" clears the whole queue. [faults] register = 8449 history = [7, 8, 9] # Exactly the values printed in the register 8449 table on p.155. Values absent # from that table (1, 9-11, 14-28, ...) are not listed by Rockwell and are NOT # invented here. # DISCREPANCY worth a bench check: this table gives 94 = "Encoder Loss Fault", # while Chapter 4's fault descriptions (p.119) call the encoder-loss fault F91. # The register value from the manual's own register table is what is shipped; # 91 is deliberately left out rather than guessed as a duplicate. [faults.codes] 0 = "No Fault" 2 = "Auxiliary Input" 3 = "Power Loss" 4 = "Undervoltage" 5 = "Overvoltage" 6 = "Motor Stalled" 7 = "Motor Overload" 8 = "Heatsink Overtemperature" 12 = "HW Overcurrent (300%)" 13 = "Ground Fault" 29 = "Analog Input Loss" 33 = "Auto Restart Tries" 38 = "Phase U to Ground Short" 39 = "Phase V to Ground Short" 40 = "Phase W to Ground Short" 41 = "Phase UV Short" 42 = "Phase UW Short" 43 = "Phase VW Short" 48 = "Parameters Defaulted" 63 = "Software Overcurrent" 64 = "Drive Overload" 70 = "Power Unit Fail" 71 = "Network Loss Fault" 80 = "AutoTune Fail" 81 = "Communication Loss" 94 = "Encoder Loss Fault" 100 = "Parameter Checksum Error" 111 = "Hardware Enable Fault" 122 = "I/O Board Fail" # P033 [Motor OL Current], register 33. p.55: Display 0.1 Amps, min/max # 0.0/(Drive Rated Amps x 2), default based on drive rating. This is a settable # overload threshold whose DEFAULT tracks the frame rating — it is not a # read-only nameplate register, so a drive someone has already re-tuned will # report its tuned value, not its frame size. This manual exposes no read-only # drive-rated-amps register. [rating] register = 33 words = 1 scale = 0.1 unit = "A" label = "Motor OL Current (P033)" # Writable configuration space, register = parameter number (group bounds from # the Parameter Organization table, p.48): # Basic Program P031-P043 # Advanced Program A051-A164 # Enhanced Program E201-E249 # The Basic Display group b001-b029 and the Advanced Display group d301-d316 # are READ ONLY and are deliberately excluded. Numbers unused inside these # spans (A057, A060, A063, A148, ...) simply do not exist, except where they # are the high word of a 32-bit parameter (A056/A059/A062, E238-E245). [parameters] ranges = [[31, 43], [51, 164], [201, 249]] [connection] summary = "Connect directly to the PowerFlex 40P built-in RS-485 DSI port using Modbus RTU; no network option module is required." warnings = ["Lock out and verify the drive is de-energized before opening its cover.", "Wire only RJ45 pins 4 and 5; Rockwell states the other pins carry power for peripherals.", "Keep the RS-485 cable at least 0.3 m (1 ft) from power conductors and cross at right angles.", "Rockwell notes that other manufacturers may interpret + and - differently; if a correctly configured two-wire link is silent, swap the pair at the master only."] [[connection.methods]] id = "built_in_dsi_rs485" title = "Built-in RS-485 DSI" transport = "serial" hardware = "built_in" port = "Drive RS-485 (DSI) RJ45" connector = "RJ45; pin 4 TxRxD+, pin 5 TxRxD-; all other RJ45 pins must remain disconnected" adapter = "Isolated USB-to-RS-485 adapter" cable = "Shielded two-conductor RS-485 cable, optionally through Rockwell AK-U0-RJ45-TB2P breakout" parts = ["Isolated USB-to-RS-485 adapter", "Shielded two-conductor cable", "RJ45 plug wired only on pins 4/5 or AK-U0-RJ45-TB2P", "120 ohm terminators at the two bus ends"] steps = ["Lock out all power and verify the DC bus is discharged.", "Locate the RS-485 (DSI) RJ45 port.", "Wire TxRxD+ to pin 4 and TxRxD- to pin 5; leave every other RJ45 pin open.", "Connect the cable shield as specified below, at one end of each segment only, and install 120 ohm termination at both physical ends.", "Restore control power with the motor inhibited and verify a holding-register read before enabling control."] setup = ["P036 [Start Source] = 5 Comm Port.", "P038 [Speed Reference] = 5 Comm Port.", "Set A103 data rate, A104 unique node, A105 loss action, A106 loss time and A107 frame format."] warnings = ["Never connect Power over Ethernet to this port.", "Do not use an ordinary fully wired Ethernet patch lead between the drive and a serial adapter."] source = "Rockwell 22D-UM001F-EN-E (Sept 2024), pp. 149-152." [[connection.methods.wiring]] adapter = "TxRxD+" device = "RJ45 pin 4 — TxRxD+" signal = "RS-485 positive conductor" [[connection.methods.wiring]] adapter = "TxRxD-" device = "RJ45 pin 5 — TxRxD-" signal = "RS-485 negative conductor" [[connection.methods.wiring]] adapter = "Cable shield / PE" device = "Drive RJ45 shield terminal to PE" signal = "Shield bond" required = false