147 lines
4.7 KiB
Markdown
147 lines
4.7 KiB
Markdown
|
|
Default IP: ==192.168.124.1== with the switch X1 in 1 and the X16 in 0
|
|
|
|
![[Pasted image 20241106112808.png]]
|
|
|
|
### Output:
|
|
***
|
|
|
|
_400B_1_AC_Drv_Ctrl_Word (Control Word):
|
|
|
|
|Bit|Función|Descripción|
|
|
|---|---|---|
|
|
|0|Run forward (CW)|1 = Run forward, 0 = Stop|
|
|
|1|Run reverse (CCW)|1 = Run reverse, 0 = Stop|
|
|
|2|Reset error|0->1 edge: Reset error|
|
|
|3|Reserved|-|
|
|
|4|Reserved|-|
|
|
|5|Activate network control|1 = Network control, 0 = Local control|
|
|
|6|Activate network setpoint|1 = Network setpoint, 0 = Local setpoint|
|
|
|7|Reserved|-|
|
|
|8|Reserved|-|
|
|
|9|Reserved|-|
|
|
|10|Reserved|-|
|
|
|11|Reserved|-|
|
|
|12|Disable inverter|1 = Disable inverter, 0 = Enable inverter|
|
|
|13|Activate quick stop|1 = Activate quick stop, 0 = Deactivate quick stop|
|
|
|14|Disable PID controlling|1 = Disable PID, 0 = Enable PID|
|
|
|15|Activate DC braking|1 = Activate DC braking, 0 = Deactivate DC braking|
|
|
|
|
|
|
page 356:
|
|
![[Pasted image 20241021163812.png]]
|
|
|
|
### Input:
|
|
***
|
|
_400C_1_AC_Drv_Stat_Word (Status Word):
|
|
|
|
|Bit|Función|Descripción|
|
|
|---|---|---|
|
|
|0|Fault/Trip active|1 = Fault active, 0 = No fault|
|
|
|1|Warning active|1 = Warning active, 0 = No warning|
|
|
|2|Running forward|1 = Running forward, 0 = Not running forward|
|
|
|3|Running reverse|1 = Running reverse, 0 = Not running reverse|
|
|
|4|Ready|1 = Ready, 0 = Not ready|
|
|
|5|Network control active|1 = Network control active, 0 = Local control active|
|
|
|6|Network setpoint active|1 = Network setpoint active, 0 = Local setpoint active|
|
|
|7|At Reference|1 = At reference speed, 0 = Not at reference speed|
|
|
|8|Profile-State bit 0|Profile state (see note below)|
|
|
|9|Profile-State bit 1|Profile state (see note below)|
|
|
|10|Profile-State bit 2|Profile state (see note below)|
|
|
|11|Profile-State bit 3|Profile state (see note below)|
|
|
|12|Process controller active|1 = PID active, 0 = PID inactive|
|
|
|13|Torque mode active|1 = Torque mode active, 0 = Speed mode active|
|
|
|14|Current limit reached|1 = Current limit reached, 0 = Current below limit|
|
|
|15|DC braking active|1 = DC braking active, 0 = DC braking inactive|
|
|
|
|
Nota sobre los bits de Profile-State (8-11): Estos bits codifican el estado del perfil del drive:
|
|
|
|
- 0: Manufacturer-specific (reservado)
|
|
- 1: Startup (inicialización del drive)
|
|
- 2: Not_Ready (voltaje principal apagado)
|
|
- 3: Ready (voltaje principal encendido)
|
|
- 4: Enabled (drive ha recibido comando de marcha)
|
|
- 5: Stopping (drive ha recibido comando de parada y está deteniéndose)
|
|
- 6: Fault_Stop (drive está detenido debido a una falta)
|
|
- 7: Faulted (han ocurrido faltas)
|
|
|
|
page 357:
|
|
![[Pasted image 20241021163838.png]]
|
|
|
|
|
|
### Setup on Rockwell
|
|
***
|
|
![[Pasted image 20241111140210.png]]
|
|
|
|
![[Pasted image 20241111140305.png|500]]
|
|
|
|
![[Pasted image 20241111140409.png|500]]
|
|
|
|
![[Pasted image 20241111140129.png|525]]
|
|
|
|
|
|
### AOI for Rockwell :
|
|
```pascal
|
|
|
|
//
|
|
// Motor Protocol for Lenze 550i protec - Firmware 7.xx - mav - v0.1 - 11.2024
|
|
//
|
|
|
|
// From Drive:
|
|
// *************************
|
|
// 400C.0 : Fault/Trip
|
|
// 400C.1 : Warning active
|
|
// 400C.2 : Running Fordward
|
|
// 400C.3 : Running reverse
|
|
// 400C.4 : Ready
|
|
// 400C.13 : Current limit reached
|
|
// 400C.14 : DC breaking active
|
|
|
|
// To Drive:
|
|
// ***************************
|
|
// 400B.0 : Run Fodrward
|
|
// 400B.1 : Run reverse
|
|
// 400B.2 : Reset
|
|
// 400B.5 : Activate network
|
|
// 400B.6 : Activate setpoint
|
|
// 400B.12 : Disable inverter
|
|
// 400B.13 : Activate quick stop
|
|
// 400B.15 : Activate DC breaking
|
|
|
|
//Plc->Drive: start command forward
|
|
IO_Drive.Telegram.Q._400B_1_AC_Drv_Ctrl_Word.0 := IO_Drive.Fw;
|
|
|
|
//Plc->Drive: start command reverse
|
|
IO_Drive.Telegram.Q._400B_1_AC_Drv_Ctrl_Word.1 := IO_Drive.Bw;
|
|
|
|
//Plc->Drive: reset fault command
|
|
IO_Drive.Telegram.Q._400B_1_AC_Drv_Ctrl_Word.2 := IO_Cycle.I.PbReset;
|
|
if IO_Cycle.I.PbReset then
|
|
IO_Drive.Alarm:=0;
|
|
end_if;
|
|
|
|
//Plc->Drive: activate network control
|
|
IO_Drive.Telegram.Q._400B_1_AC_Drv_Ctrl_Word.5 := IO_Drive.Fw or IO_Drive.Bw;
|
|
|
|
//Plc->Drive: activate network setpoint
|
|
IO_Drive.Telegram.Q._400B_1_AC_Drv_Ctrl_Word.6 := not IO_Drive.ExternalSpeed and (IO_Drive.Fw or IO_Drive.Bw);
|
|
|
|
//Plc->Drive: speed command value (converting Hz to RPM for the drive)
|
|
IO_Drive.VToInv := IO_Drive.VToDrive_Hz * 30; // Convert Hz to RPM (assuming 120Hz = 2436 RPM)
|
|
IO_Drive.Telegram.Q._400B_4_Net_Spd_Stpnt_RPM := IO_Drive.VToInv;
|
|
|
|
//Drive->Plc: drive fault
|
|
if not IO_Drive.Alarm then
|
|
IO_Drive.Alarm := IO_Drive.Telegram.I._400C_1_AC_Drv_Stat_Word.0 OR IO_Drive.Telegram.I.ConnectionFaulted;
|
|
end_if;
|
|
|
|
//Drive->Plc: drive running
|
|
IO_Drive.Running := not IO_Drive.Telegram.I.ConnectionFaulted and (IO_Drive.Telegram.I._400C_1_AC_Drv_Stat_Word.2 OR IO_Drive.Telegram.I._400C_1_AC_Drv_Stat_Word.3);
|
|
|
|
//Drive->Plc: actual speed (converting RPM from drive to Hz)
|
|
IO_Drive.VFromInv := IO_Drive.Telegram.I._400C_4_Actual_Speed_RPM / 30; // Convert RPM to Hz
|
|
|
|
```
|
|
|
|
|