diff --git a/GitVersion.yml b/GitVersion.yml index ef800d38e..e5f6382c3 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -1,5 +1,5 @@ mode: ContinuousDeployment -next-version: 0.56.3 +next-version: 0.56.4 branches: main: regex: ^master$|^main$ @@ -15,7 +15,7 @@ branches: pre-release-weight: 55000 develop: regex: ^dev(elop)?(ment)?$ - mode: ManualDeployment + mode: ContinuousDelivery label: alpha increment: Minor prevent-increment: diff --git a/src/components.kuka.robotics/ctrl/test/KukaRoboticsTests.st b/src/components.kuka.robotics/ctrl/test/KukaRoboticsTests.st index 660e5077e..2cbde37e1 100644 --- a/src/components.kuka.robotics/ctrl/test/KukaRoboticsTests.st +++ b/src/components.kuka.robotics/ctrl/test/KukaRoboticsTests.st @@ -21,3 +21,8 @@ NAMESPACE AXOpen.Components.Kuka.Robotics.Tests END_METHOD END_CLASS END_NAMESPACE + + + + + diff --git a/src/components.rexroth.drives/components.rexroth.drives.sln b/src/components.rexroth.drives/components.rexroth.drives.sln index 09ad8a235..251195ceb 100644 --- a/src/components.rexroth.drives/components.rexroth.drives.sln +++ b/src/components.rexroth.drives/components.rexroth.drives.sln @@ -1,4 +1,4 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 +Microsoft Visual Studio Solution File, Format Version 12.00 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "this", "this.proj", "{C91BAA51-7B27-48BF-BE13-DED526D007B3}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "inxton_axopen_abstractions", "..\abstractions\src\AXOpen.Abstractions\inxton_axopen_abstractions.csproj", "{26B3BB63-88A9-4CDF-8F04-8E78F3284F6F}" diff --git a/src/components.rexroth.drives/ctrl/assets/rexroth_ctrlx_drive/rexroth_ctrlx_drive_xcs.hwl.yml b/src/components.rexroth.drives/ctrl/assets/rexroth_ctrlx_drive/rexroth_ctrlx_drive_xcs.hwl.yml index e48c05165..879208c74 100644 --- a/src/components.rexroth.drives/ctrl/assets/rexroth_ctrlx_drive/rexroth_ctrlx_drive_xcs.hwl.yml +++ b/src/components.rexroth.drives/ctrl/assets/rexroth_ctrlx_drive/rexroth_ctrlx_drive_xcs.hwl.yml @@ -1,3 +1,4 @@ +# Templates: Devices: - Name: 'rexroth_ctrlx_drive_xcs' @@ -151,3 +152,4 @@ Templates: FileName: 'GSDML-V2.41-BOSCH REXROTH AG-CTRLX DRIVE-20241107.XML' GsdId: 'ID_SM_Operating_status_STO_P_0_0106_0_0_prod' Slot: 8 +# diff --git a/src/components.rexroth.drives/ctrl/assets/rexroth_indradrive/rexroth_indradrive.hwl.yml b/src/components.rexroth.drives/ctrl/assets/rexroth_indradrive/rexroth_indradrive.hwl.yml index 7ba5b4003..285a2e23f 100644 --- a/src/components.rexroth.drives/ctrl/assets/rexroth_indradrive/rexroth_indradrive.hwl.yml +++ b/src/components.rexroth.drives/ctrl/assets/rexroth_indradrive/rexroth_indradrive.hwl.yml @@ -1,3 +1,4 @@ +# Templates: Devices: - Name: 'rexroth_indradrive' @@ -72,3 +73,4 @@ Templates: GsdId: ID_OutMod_13Words FileName: GSDML-V2.1-BOSCH REXROTH AG-011F-INDRADRIVE_01V01-20110705.XML Slot: 4 +# diff --git a/src/components.rexroth.drives/ctrl/src/AxoCtrlxDriveXsc/AxoCtrlxDriveXsc.st b/src/components.rexroth.drives/ctrl/src/AxoCtrlxDriveXsc/AxoCtrlxDriveXsc.st index c90717791..0691efb11 100644 --- a/src/components.rexroth.drives/ctrl/src/AxoCtrlxDriveXsc/AxoCtrlxDriveXsc.st +++ b/src/components.rexroth.drives/ctrl/src/AxoCtrlxDriveXsc/AxoCtrlxDriveXsc.st @@ -29,7 +29,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives VAR PUBLIC // AxisRef {#ix-attr:[Container(Layout.Stack)]} {#ix-attr:[ComponentDetails("AxisRef")]} - {#ix-attr:[ReadOnly()]} + // {#ix-attr:[ReadOnly()]} AxisRefExt : AXOpen.Components.Rexroth.Drives.AxoCtrlxDriveXscAxisReference; END_VAR VAR PUBLIC // Scaling @@ -92,6 +92,11 @@ NAMESPACE AXOpen.Components.Rexroth.Drives {#ix-set:AttributeName = "<#Scaling constant actual jerk#>"} {#ix-set:AttributeToolTip = "<#Depends on the actual settings in the ctrlX DRIVE Engineering#>"} ScalingConstantActualJerk : LREAL := 0.001; + {#ix-attr:[ComponentDetails("Scaling")]} + {#ix-attr:[ReadOnly()]} + {#ix-set:AttributeName = "<#Axis type#>"} + {#ix-set:AttributeToolTip = "<#Depends on the actual settings in the ctrlX DRIVE Engineering#>"} + AxisType : eAxoDriveAxisType := eAxoDriveAxisType#Undefined; END_VAR VAR PUBLIC // Debug {#ix-attr:[Container(Layout.Stack)]} @@ -100,7 +105,12 @@ NAMESPACE AXOpen.Components.Rexroth.Drives {#ix-set:AttributeName = "<#_State#>"} _State : UINT; END_VAR - + VAR PUBLIC // Reboot + {#ix-attr:[Container(Layout.Stack)]} + {#ix-attr:[ComponentDetails("Administrative")]} + {#ix-set:AttributeName = "<#Reboot drive controller#>"} + RebootTask : AxoTask; + END_VAR VAR PRIVATE _data2 : ARRAY[0..1] OF BYTE; _data4 : ARRAY[0..3] OF BYTE; @@ -124,26 +134,32 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _ReadRecord : ReadRecord; _WriteRecord : WriteRecord; _ScalingRead : BOOL; - _S_0_0076 : WORD; // 2byte, binary - _S_0_0077 : INT; // 2byte, 0 decimal places - _S_0_0078 : INT; // 2byte, 0 decimal places - _S_0_0044 : WORD; // 2byte, binary - _S_0_0045 : INT; // 2byte, 0 decimal places - _S_0_0046 : INT; // 2byte, 0 decimal places - _S_0_0160 : WORD; // 2byte, binary - _S_0_0161 : INT; // 2byte, 0 decimal places - _S_0_0162 : INT; // 2byte, 0 decimal places - _S_0_0086 : WORD; // 2byte, binary - _S_0_0093 : INT; // 2byte, 0 decimal places - _S_0_0094 : INT; // 2byte, 0 decimal places - _S_0_0112 : REAL; // 4bytes, 3decimal places - _P_0_0450 : REAL; // 2bytes, 2decimal places + _S_0_0076 : WORD; // 2byte, binary - Position data scaling type + _S_0_0077 : INT; // 2byte, 0 decimal places - Linear position scaling factor + _S_0_0078 : INT; // 2byte, 0 decimal places - Linear position scaling exponent + _S_0_0079 : DINT; // 4byte, 0 decimal places - Rotational resolution + _S_0_0044 : WORD; // 2byte, binary - Velocity scaling type + _S_0_0045 : INT; // 2byte, 0 decimal places - Velocity scaling factor + _S_0_0046 : INT; // 2byte, 0 decimal places - Velocity scaling exponent + _S_0_0160 : WORD; // 2byte, binary - Acceleration scaling type + _S_0_0161 : INT; // 2byte, 0 decimal places - Acceleration scaling factor + _S_0_0162 : INT; // 2byte, 0 decimal places - Acceleration scaling exponent + _S_0_0086 : WORD; // 2byte, binary - Torque/force scaling type + _S_0_0093 : INT; // 2byte, 0 decimal places - Torque/force scaling factor + _S_0_0094 : INT; // 2byte, 0 decimal places - Torque/force scaling exponent + _S_0_0112 : REAL; // 4bytes, 3decimal places - Nominal current [A] + _P_0_0450 : REAL; // 2bytes, 2decimal places - Current constant [Nm/A] _infoTimer : AXOpen.Timers.OnDelayTimer; _errorTimer : AXOpen.Timers.OnDelayTimer; - _tmpTimer : AXOpen.Timers.OnDelayTimer; + _tmpTimer : AXOpen.Timers.OnDelayTimer; _lastMessageCodeFromMC : ULINT; + _debugCounter : ULINT; + + MessageCodeOutOfMC : ULINT; + ErrorOutOfMC : BOOL; + _lastMessageCodeOutOfMC : ULINT; END_VAR /// @@ -164,6 +180,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives END_VAR SUPER.Run(inParent); Messenger.Serve(THIS); + TaskMessenger.Serve(THIS); IF NOT _initHwCheckDone THEN IF inParent = NULL THEN @@ -1115,364 +1132,709 @@ NAMESPACE AXOpen.Components.Rexroth.Drives RETURN; END_IF; _initHwCheckDone := TRUE; - END_IF; + END_IF; + //*********************** Reboot task ***********************/ + RebootTask.Run(THIS); + IF RebootTask.StartTriggered() THEN + _State := UINT#0; + END_IF; + IF RebootTask.Execute() THEN + IF _State = UINT#0 THEN + AxoPower_Task.SwitchOff(); + AxoStop_Task.Restore(); + AxoHalt_Task.Restore(); + AxoHome_Task.Restore(); + AxoMoveAbsolute_Task.Restore(); + AxoMoveRelative_Task.Restore(); + AxoMoveAdditive_Task.Restore(); + AxoMoveVelocity_Task.Restore(); + AxoTorqueControl_Task.Restore(); + AxoSetPosition_Task.Restore(); + AxoSetOverride_Task.SwitchOff(); + AxoReadParameter_Task.SwitchOff(); + AxoReadRealParameter_Task.SwitchOff(); + AxoReadBoolParameter_Task.SwitchOff(); + AxoWriteParameter_Task.Restore(); + AxoWriteRealParameter_Task.Restore(); + AxoWriteBoolParameter_Task.Restore(); + AxoReadDigitalInput_Task.SwitchOff(); + AxoReadDigitalOutput_Task.SwitchOff(); + AxoWriteDigitalOutput_Task.Restore(); + AxoReadActualPosition_Task.SwitchOff(); + AxoReadActualVelocity_Task.SwitchOff(); + AxoReadActualTorque_Task.SwitchOff(); + AxoReadStatus_Task.SwitchOff(); + AxoReadMotionState_Task.SwitchOff(); + AxoReadAxisInfo_Task.SwitchOff(); + AxoReadAxisError_Task.SwitchOff(); + AxoReset_Task.Restore(); + _tmpTimer.OnDelay(THIS, FALSE , T#0s); + _State := UINT#800; + THIS.CallTimers(FALSE); + END_IF; + + IF _State = UINT#800 THEN + IF _infoTimer.output THEN + TaskMessenger.Activate( UINT#1000, eAxoMessageCategory#Potential); + DriveStatus.Error.Id := UINT#1000; + END_IF; + + AxisRefExt.Outputs.DriveControlWord_S_0_0134_0_0.DriveEnable := FALSE; + AxisRefExt.Outputs.DriveControlWord_S_0_0134_0_0.DriveOn := FALSE; + + AxisRefExt.Outputs.SignalControlWord_S_0_0145_0_0.DeviceReboot := TRUE; + + IF _tmpTimer.OnDelay(THIS, TRUE , T#3s) THEN + _State := UINT#801; + THIS.CallTimers(FALSE); + END_IF; + END_IF; + + IF _State = UINT#801 THEN + IF _infoTimer.output THEN + TaskMessenger.Activate( UINT#1001, eAxoMessageCategory#Potential); + DriveStatus.Error.Id := UINT#1001; + END_IF; + + _tmpTimer.OnDelay(THIS, FALSE , T#0s); + + AxisRefExt.Outputs.SignalControlWord_S_0_0145_0_0.DeviceReboot := FALSE; + + IF TRUE THEN + _State := UINT#802; + THIS.CallTimers(FALSE); + END_IF; + END_IF; + + IF _State = UINT#802 THEN + RebootTask.DoneWhen(TRUE); + END_IF; + END_IF; + Messenger.ActivateOnCondition(ULINT#1800, NOT _ScalingRead, eAxoMessageCategory#Potential); //********************Diagnostics******************// HardwareDiagnosticsTask.Run(THIS,AxisRefExt.HWIDs.HW_Device); //*******************SCALING***********************// IF NOT _ScalingRead THEN IF _State = UINT#0 THEN - _State := UINT#1; + AxisType := eAxoDriveAxisType#Undefined; + _State := _State + UINT#1; END_IF; //Reading Position data scaling: Type (0x2900:01 / S-0-0076 / --) 2byte, binary - IF _State = UINT#1 THEN - _ReadRecord( request := TRUE, - hardwareID := (AxisRefExt.HWIDs.HW_S_0_0134_0_0), + IF _State = UINT#1 THEN // Scaling type + _ReadRecord( request := TRUE, // 001: linear scaling: + hardwareID := (AxisRefExt.HWIDs.HW_S_0_0134_0_0), // 010: rotary scaling: index := DINT#76, maxLength := UINT#2, record := _data2); + Messenger.ActivateOnCondition(ULINT#1801, _ReadRecord.error, eAxoMessageCategory#Error); IF NOT _ReadRecord.busy AND _ReadRecord.valid AND NOT _ReadRecord.error THEN _word.%B0 := _data2[0]; _word.%B1 := _data2[1]; _S_0_0076 := _word; - _State := UINT#2; + _State := _State + UINT#1; END_IF; END_IF; - IF _State = UINT#2 THEN - _ReadRecord(request := FALSE, record := _data2); - IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN - _State := UINT#3; + IF _State = UINT#2 THEN // Scaling type + _ReadRecord(request := FALSE, record := _data2); // 001: linear scaling: + IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN // 010: rotary scaling: + _State := _State + UINT#1; END_IF; END_IF; - //Reading Position data scaling: Factor (0x2900:02 / S-0-0077 / --) 2byte, 0 decimal places - IF _State = UINT#3 THEN - _ReadRecord( request := TRUE, - hardwareID := (AxisRefExt.HWIDs.HW_S_0_0134_0_0), - index := DINT#77, + //Checking the axis type in Position data scaling: Type (0x2900:01 / S-0-0076 / --) + IF _State = UINT#3 THEN // Scaling type + IF (_S_0_0076 AND WORD#16#0007) = WORD#16#0001 THEN // 001: linear scaling: + AxisType := eAxoDriveAxisType#Linear; // 010: rotary scaling: + _State := _State + UINT#1; + ELSIF (_S_0_0076 AND WORD#16#0007) = WORD#16#0002 THEN + AxisType := eAxoDriveAxisType#Rotary; + _State := _State + UINT#1; + ELSE + AxisType := eAxoDriveAxisType#Error; + Messenger.ActivateOnCondition(ULINT#1802, TRUE, eAxoMessageCategory#Error); + RETURN; + END_IF; + END_IF; + //Checking the axis unit system in Position data scaling: Type (0x2900:01 / S-0-0076 / --) + IF _State = UINT#4 THEN // Unit for linear scaling + IF NOT _S_0_0076.%X4 THEN // 0: Meter [m] + _State := _State + UINT#2; // 1: Inch [in] + ELSE // Unit for rotary Scaling + Messenger.ActivateOnCondition(ULINT#1803, TRUE, eAxoMessageCategory#Error); // 0: Angular degree + RETURN; // 1: Reserved + END_IF; + END_IF; + // Irelevant for position, skipping this control. + // //Checking the axis time base in Position data scaling: Type (0x2900:01 / S-0-0076 / --) + // IF _State = UINT#5 THEN + // IF _S_0_0076.%X5 THEN + // _State := _State + UINT#1; + // ELSE + // Messenger.ActivateOnCondition(ULINT#1804, TRUE, eAxoMessageCategory#Error); + // RETURN; + // END_IF; + // END_IF; + //Checking the axis Data reference in Position data scaling: Type (0x2900:01 / S-0-0076 / --) + IF _State = UINT#6 THEN // Data reference + IF _S_0_0076.%X6 THEN // 0: at the motor shaft + _State := _State + UINT#1; // 1: at the load + ELSE + Messenger.ActivateOnCondition(ULINT#1805, TRUE, eAxoMessageCategory#Error); + RETURN; + END_IF; + END_IF; + //Reading Velocity scaling type (0x2910:01 / S-0-0044 / --) 2byte, binary + IF _State = UINT#7 THEN // Scaling type + _ReadRecord( request := TRUE, // 001: linear scaling: + hardwareID := (AxisRefExt.HWIDs.HW_S_0_0134_0_0), // 010: rotary scaling: + index := DINT#44, maxLength := UINT#2, record := _data2); + Messenger.ActivateOnCondition(ULINT#1806, _ReadRecord.error, eAxoMessageCategory#Error); IF NOT _ReadRecord.busy AND _ReadRecord.valid AND NOT _ReadRecord.error THEN _word.%B0 := _data2[0]; _word.%B1 := _data2[1]; - _S_0_0077 := TO_INT(_word); - _State := UINT#4; + _S_0_0044 := _word; + _State := _State + UINT#1; END_IF; END_IF; - IF _State = UINT#4 THEN - _ReadRecord(request := FALSE, record := _data2); - IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN - _State := UINT#5; + IF _State = UINT#8 THEN // Scaling type + _ReadRecord(request := FALSE, record := _data2); // 001: linear scaling: + IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN // 010: rotary scaling: + _State := _State + UINT#1; END_IF; END_IF; - //Reading Position data scaling: Exponent (0x2900:03 / S-0-0078 / --) 2byte, 0 decimal places - IF _State = UINT#5 THEN - _ReadRecord( request := TRUE, - hardwareID := (AxisRefExt.HWIDs.HW_S_0_0134_0_0), - index := DINT#78, + //Checking the axis type in Velocity scaling type (0x2910:01 / S-0-0044 / --) + IF _State = UINT#9 THEN // Scaling type + IF (_S_0_0044 AND WORD#16#0007) = WORD#16#0001 AND AxisType = eAxoDriveAxisType#Linear THEN // 001: linear scaling: + _State := _State + UINT#1; // 010: rotary scaling: + ELSIF (_S_0_0044 AND WORD#16#0007) = WORD#16#0002 AND AxisType = eAxoDriveAxisType#Rotary THEN + _State := _State + UINT#1; + ELSE + AxisType := eAxoDriveAxisType#Error; + Messenger.ActivateOnCondition(ULINT#1807, TRUE, eAxoMessageCategory#Error); + RETURN; + END_IF; + END_IF; + //Checking the axis unit system in Velocity scaling type (0x2910:01 / S-0-0044 / --) + IF _State = UINT#10 THEN // Unit for linear scaling + IF AxisType = eAxoDriveAxisType#Linear AND NOT _S_0_0044.%X4 OR // 0: Millimeter [mm] + AxisType = eAxoDriveAxisType#Rotary AND _S_0_0044.%X4 THEN // 1: Inch [in] + _State := _State + UINT#1; // Unit for rotary scaling + ELSE // 0: Revolution + Messenger.ActivateOnCondition(ULINT#1808, TRUE, eAxoMessageCategory#Error); // 1: Degrees + RETURN; + END_IF; + END_IF; + //Checking the axis time base in Velocity scaling type (0x2910:01 / S-0-0044 / --) + IF _State = UINT#11 THEN // Unit of time + IF _S_0_0044.%X5 THEN // 0: Minute [min] + _State := _State + UINT#1; // 1: Second [s] + ELSE + Messenger.ActivateOnCondition(ULINT#1809, TRUE, eAxoMessageCategory#Error); + RETURN; + END_IF; + END_IF; + //Checking the axis Data reference in Velocity scaling type (0x2910:01 / S-0-0044 / --) + IF _State = UINT#12 THEN // Data reference + IF _S_0_0044.%X6 THEN // 0: at the motor shaft + _State := _State + UINT#1; // 1: at the load + ELSE + Messenger.ActivateOnCondition(ULINT#1810, TRUE, eAxoMessageCategory#Error); + RETURN; + END_IF; + END_IF; + //Reading Acceleration scaling type (0x2920:01 / S-0-0160 / --) 2byte, binary + IF _State = UINT#13 THEN // Scaling type + _ReadRecord( request := TRUE, // 001: linear scaling: + hardwareID := (AxisRefExt.HWIDs.HW_S_0_0134_0_0), // 010: rotary scaling: + index := DINT#160, // 011: Ramp time maxLength := UINT#2, record := _data2); + Messenger.ActivateOnCondition(ULINT#1811, _ReadRecord.error, eAxoMessageCategory#Error); IF NOT _ReadRecord.busy AND _ReadRecord.valid AND NOT _ReadRecord.error THEN _word.%B0 := _data2[0]; _word.%B1 := _data2[1]; - _S_0_0078 := TO_INT(_word); - _State := UINT#6; + _S_0_0160 := _word; + _State := _State + UINT#1; END_IF; END_IF; - IF _State = UINT#6 THEN - _ReadRecord(request := FALSE, record := _data2); - IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN - _State := UINT#7; + IF _State = UINT#14 THEN // Scaling type + _ReadRecord(request := FALSE, record := _data2); // 001: linear scaling: + IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN // 010: rotary scaling: + _State := _State + UINT#1; // 011: Ramp time END_IF; END_IF; - //Reading Velocity data scaling: Type (0x2902:01 / S-0-0044 / --) 2byte, binary - IF _State = UINT#7 THEN - _ReadRecord( request := TRUE, - hardwareID := (AxisRefExt.HWIDs.HW_S_0_0134_0_0), - index := DINT#44, + //Checking the axis type in Acceleration scaling type (0x2920:01 / S-0-0160 / --) + IF _State = UINT#15 THEN // Scaling type + IF (_S_0_0160 AND WORD#16#0007) = WORD#16#0001 AND AxisType = eAxoDriveAxisType#Linear THEN // 001: linear scaling: + _State := _State + UINT#1; // 010: rotary scaling: + ELSIF (_S_0_0160 AND WORD#16#0007) = WORD#16#0002 AND AxisType = eAxoDriveAxisType#Rotary THEN // 011: Ramp time + _State := _State + UINT#1; + ELSE + AxisType := eAxoDriveAxisType#Error; + Messenger.ActivateOnCondition(ULINT#1812, TRUE, eAxoMessageCategory#Error); + RETURN; + END_IF; + END_IF; + //Checking the axis unit system in Acceleration scaling type (0x2920:01 / S-0-0160 / --) + IF _State = UINT#16 THEN // Unit for linear scaling + IF NOT _S_0_0160.%X4 THEN // 0: Meter [m] + _State := _State + UINT#1; // 1: Inch [in] + ELSE // Unit for rotary scaling + Messenger.ActivateOnCondition(ULINT#1813, TRUE, eAxoMessageCategory#Error); // 0: Radiant [rad] + RETURN; // 1: Reserved + END_IF; + END_IF; + //Checking the axis time base in Acceleration scaling type (0x2920:01 / S-0-0160 / --) + IF _State = UINT#17 THEN // Unit of time + IF NOT _S_0_0160.%X5 THEN // 0: Second [s²] + _State := _State + UINT#1; // 1: Reserved + ELSE + Messenger.ActivateOnCondition(ULINT#1814, TRUE, eAxoMessageCategory#Error); + RETURN; + END_IF; + END_IF; + //Checking the axis Data reference in Acceleration scaling type (0x2920:01 / S-0-0160 / --) + IF _State = UINT#18 THEN // Data reference + IF _S_0_0160.%X6 THEN // 0: at the motor shaft + _State := _State + UINT#1; // 1: at the load + ELSE + Messenger.ActivateOnCondition(ULINT#1815, TRUE, eAxoMessageCategory#Error); + RETURN; + END_IF; + END_IF; + //Reading Torque/force scaling type (0x2930:01 / S-0-0086 / --) 2byte, binary + IF _State = UINT#19 THEN // Scaling type + _ReadRecord( request := TRUE, // 000: Percentage-based scaling (% of reference value) + hardwareID := (AxisRefExt.HWIDs.HW_S_0_0134_0_0), // 001: translational scaling (force in N, lbf) + index := DINT#86, // 010: Rotary scaling (torque in Nm, inlbf) maxLength := UINT#2, record := _data2); + Messenger.ActivateOnCondition(ULINT#1816, _ReadRecord.error, eAxoMessageCategory#Error); IF NOT _ReadRecord.busy AND _ReadRecord.valid AND NOT _ReadRecord.error THEN _word.%B0 := _data2[0]; _word.%B1 := _data2[1]; - _S_0_0044 := _word; - _State := UINT#8; + _S_0_0086 := _word; + _State := _State + UINT#1; END_IF; END_IF; - IF _State = UINT#8 THEN - _ReadRecord(request := FALSE, record := _data2); - IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN - _State := UINT#9; + IF _State = UINT#20 THEN // Scaling type + _ReadRecord(request := FALSE, record := _data2); // 000: Percentage-based scaling (% of reference value) + IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN // 001: translational scaling (force in N, lbf) + _State := _State + UINT#1; // 010: Rotary scaling (torque in Nm, inlbf) END_IF; END_IF; - //Reading Velocity data scaling: Factor (0x2902:02 / S-0-0045 / --) 2byte, 0 decimal places - IF _State = UINT#9 THEN + //Checking the axis type in Torque/force scaling type (0x2930:01 / S-0-0086 / --) + IF _State = UINT#21 THEN // Scaling type + IF (_S_0_0086 AND WORD#16#0007) = WORD#16#0001 AND AxisType = eAxoDriveAxisType#Linear THEN // 000: Percentage-based scaling (% of reference value) + _State := _State + UINT#1; // 001: translational scaling (force in N, lbf) + ELSIF (_S_0_0086 AND WORD#16#0007) = WORD#16#0002 AND AxisType = eAxoDriveAxisType#Rotary THEN // 010: Rotary scaling (torque in Nm, inlbf) + _State := _State + UINT#1; + ELSE + AxisType := eAxoDriveAxisType#Error; + Messenger.ActivateOnCondition(ULINT#1817, TRUE, eAxoMessageCategory#Error); + RETURN; + END_IF; + END_IF; + //Checking the axis unit system in Torque/force scaling type (0x2930:01 / S-0-0086 / --) + IF _State = UINT#22 THEN // Unit for force + IF NOT _S_0_0086.%X4 THEN // 0: newton [N] + _State := _State + UINT#2; // 1: pound-force [lbf] + ELSE // Unit for torque + Messenger.ActivateOnCondition(ULINT#1818, TRUE, eAxoMessageCategory#Error); // 0: Newton-meter [Nm] + RETURN; // 1: inch-pound-force [inlbf] + END_IF; + END_IF; + // Irelevant for torque, skipping this control. + // //Checking the axis time base in Torque/force scaling type (0x2930:01 / S-0-0086 / --) + // IF _State = UINT#23 THEN + // IF _S_0_0086.%X5 THEN + // _State := _State + UINT#1; + // ELSE + // Messenger.ActivateOnCondition(ULINT#1819, TRUE, eAxoMessageCategory#Error); + // RETURN; + // END_IF; + // END_IF; + //Checking the axis Data reference in Torque/force scaling type (0x2930:01 / S-0-0086 / --) + IF _State = UINT#24 THEN // Data reference + IF _S_0_0086.%X6 THEN // 0: at the motor shaft + _State := _State + UINT#1; // 1: at the load + ELSE + Messenger.ActivateOnCondition(ULINT#1820, TRUE, eAxoMessageCategory#Error); + RETURN; + END_IF; + END_IF; + //Reading Position data scaling: Factor (0x2900:02 / S-0-0077 / --) 2byte, 0 decimal places + IF _State = UINT#25 THEN _ReadRecord( request := TRUE, hardwareID := (AxisRefExt.HWIDs.HW_S_0_0134_0_0), - index := DINT#45, + index := DINT#77, maxLength := UINT#2, record := _data2); + Messenger.ActivateOnCondition(ULINT#1821, _ReadRecord.error, eAxoMessageCategory#Error); IF NOT _ReadRecord.busy AND _ReadRecord.valid AND NOT _ReadRecord.error THEN _word.%B0 := _data2[0]; _word.%B1 := _data2[1]; - _S_0_0045 := TO_INT(_word); - _State := UINT#10; + _S_0_0077 := TO_INT(_word); + _State := _State + UINT#1; END_IF; END_IF; - IF _State = UINT#10 THEN + IF _State = UINT#26 THEN _ReadRecord(request := FALSE, record := _data2); IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN - _State := UINT#11; + _State := _State + UINT#1; END_IF; END_IF; - //Reading Velocity data scaling: Exponent (0x2902:03 / S-0-0046 / --) 2byte, 0 decimal places - IF _State = UINT#11 THEN + //Reading Position data scaling: Exponent (0x2900:03 / S-0-0078 / --) 2byte, 0 decimal places + IF _State = UINT#27 THEN _ReadRecord( request := TRUE, hardwareID := (AxisRefExt.HWIDs.HW_S_0_0134_0_0), - index := DINT#46, + index := DINT#78, maxLength := UINT#2, record := _data2); + Messenger.ActivateOnCondition(ULINT#1822, _ReadRecord.error, eAxoMessageCategory#Error); IF NOT _ReadRecord.busy AND _ReadRecord.valid AND NOT _ReadRecord.error THEN _word.%B0 := _data2[0]; _word.%B1 := _data2[1]; - _S_0_0046 := TO_INT(_word); - _State := UINT#12; + _S_0_0078 := TO_INT(_word); + _State := _State + UINT#1; END_IF; END_IF; - IF _State = UINT#12 THEN + IF _State = UINT#28 THEN _ReadRecord(request := FALSE, record := _data2); IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN - _State := UINT#13; + _State := _State + UINT#1; END_IF; END_IF; - //Reading Acceleration data scaling: Type (0x2904:01 / S-0-0160 / --) 2byte, binary - IF _State = UINT#13 THEN + //Reading Rotary position resolution (0x2900:04 / S-0-0079 / --) 4byte, 0 decimal places + IF _State = UINT#29 THEN _ReadRecord( request := TRUE, hardwareID := (AxisRefExt.HWIDs.HW_S_0_0134_0_0), - index := DINT#160, + index := DINT#79, + maxLength := UINT#4, + record := _data4); + Messenger.ActivateOnCondition(ULINT#1823, _ReadRecord.error, eAxoMessageCategory#Error); + IF NOT _ReadRecord.busy AND _ReadRecord.valid AND NOT _ReadRecord.error THEN + _dword.%B0 := _data4[0]; + _dword.%B1 := _data4[1]; + _dword.%B2 := _data4[2]; + _dword.%B3 := _data4[3]; + _S_0_0079 := TO_DINT(_dword); + _State := _State + UINT#1; + END_IF; + END_IF; + IF _State = UINT#30 THEN + _ReadRecord(request := FALSE, record := _data4); + IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN + _State := _State + UINT#1; + END_IF; + END_IF; + //Reading Velocity data scaling: Factor (0x2902:02 / S-0-0045 / --) 2byte, 0 decimal places + IF _State = UINT#31 THEN + _ReadRecord( request := TRUE, + hardwareID := (AxisRefExt.HWIDs.HW_S_0_0134_0_0), + index := DINT#45, maxLength := UINT#2, record := _data2); + Messenger.ActivateOnCondition(ULINT#1824, _ReadRecord.error, eAxoMessageCategory#Error); IF NOT _ReadRecord.busy AND _ReadRecord.valid AND NOT _ReadRecord.error THEN _word.%B0 := _data2[0]; _word.%B1 := _data2[1]; - _S_0_0160 := _word; - _State := UINT#14; + _S_0_0045 := TO_INT(_word); + _State := _State + UINT#1; END_IF; END_IF; - IF _State = UINT#14 THEN + IF _State = UINT#32 THEN _ReadRecord(request := FALSE, record := _data2); IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN - _State := UINT#15; + _State := _State + UINT#1; END_IF; END_IF; - //Reading Acceleration data scaling: Factor (0x2904:02 / S-0-0161 / --) 2byte, 0 decimal places - IF _State = UINT#15 THEN + //Reading Velocity data scaling: Exponent (0x2902:03 / S-0-0046 / --) 2byte, 0 decimal places + IF _State = UINT#33 THEN _ReadRecord( request := TRUE, hardwareID := (AxisRefExt.HWIDs.HW_S_0_0134_0_0), - index := DINT#161, + index := DINT#46, maxLength := UINT#2, record := _data2); + Messenger.ActivateOnCondition(ULINT#1825, _ReadRecord.error, eAxoMessageCategory#Error); IF NOT _ReadRecord.busy AND _ReadRecord.valid AND NOT _ReadRecord.error THEN _word.%B0 := _data2[0]; _word.%B1 := _data2[1]; - _S_0_0161 := TO_INT(_word); - _State := UINT#16; + _S_0_0046 := TO_INT(_word); + _State := _State + UINT#1; END_IF; END_IF; - IF _State = UINT#16 THEN + IF _State = UINT#34 THEN _ReadRecord(request := FALSE, record := _data2); IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN - _State := UINT#17; + _State := _State + UINT#1; END_IF; END_IF; - //Reading Acceleration data scaling: Exponent (0x2904:03 / S-0-0162 / --) 2byte, 0 decimal places - IF _State = UINT#17 THEN + //Reading Acceleration data scaling: Factor (0x2904:02 / S-0-0161 / --) 2byte, 0 decimal places + IF _State = UINT#35 THEN _ReadRecord( request := TRUE, hardwareID := (AxisRefExt.HWIDs.HW_S_0_0134_0_0), - index := DINT#162, + index := DINT#161, maxLength := UINT#2, record := _data2); + Messenger.ActivateOnCondition(ULINT#1826, _ReadRecord.error, eAxoMessageCategory#Error); IF NOT _ReadRecord.busy AND _ReadRecord.valid AND NOT _ReadRecord.error THEN _word.%B0 := _data2[0]; _word.%B1 := _data2[1]; - _S_0_0162 := TO_INT(_word); - _State := UINT#18; + _S_0_0161 := TO_INT(_word); + _State := _State + UINT#1; END_IF; END_IF; - IF _State = UINT#18 THEN + IF _State = UINT#36 THEN _ReadRecord(request := FALSE, record := _data2); IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN - _State := UINT#19; + _State := _State + UINT#1; END_IF; END_IF; - //Reading Torque/force data scaling: Type (0x2906:01 / S-0-0086 / --) 2byte, binary - IF _State = UINT#19 THEN + //Reading Acceleration data scaling: Exponent (0x2904:03 / S-0-0162 / --) 2byte, 0 decimal places + IF _State = UINT#37 THEN _ReadRecord( request := TRUE, hardwareID := (AxisRefExt.HWIDs.HW_S_0_0134_0_0), - index := DINT#86, + index := DINT#162, maxLength := UINT#2, record := _data2); + Messenger.ActivateOnCondition(ULINT#1827, _ReadRecord.error, eAxoMessageCategory#Error); IF NOT _ReadRecord.busy AND _ReadRecord.valid AND NOT _ReadRecord.error THEN _word.%B0 := _data2[0]; _word.%B1 := _data2[1]; - _S_0_0086 := _word; - _State := UINT#20; + _S_0_0162 := TO_INT(_word); + _State := _State + UINT#1; END_IF; END_IF; - IF _State = UINT#20 THEN + IF _State = UINT#38 THEN _ReadRecord(request := FALSE, record := _data2); IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN - _State := UINT#21; + _State := _State + UINT#1; END_IF; END_IF; //Reading Torque/force data scaling: Factor (0x2906:02 / S-0-0093 / --) 2byte, 0 decimal places - IF _State = UINT#21 THEN + IF _State = UINT#39 THEN _ReadRecord( request := TRUE, hardwareID := (AxisRefExt.HWIDs.HW_S_0_0134_0_0), index := DINT#93, maxLength := UINT#2, record := _data2); + Messenger.ActivateOnCondition(ULINT#1828, _ReadRecord.error, eAxoMessageCategory#Error); IF NOT _ReadRecord.busy AND _ReadRecord.valid AND NOT _ReadRecord.error THEN _word.%B0 := _data2[0]; _word.%B1 := _data2[1]; _S_0_0093 := TO_INT(_word); - _State := UINT#22; + _State := _State + UINT#1; END_IF; END_IF; - IF _State = UINT#22 THEN + IF _State = UINT#40 THEN _ReadRecord(request := FALSE, record := _data2); IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN - _State := UINT#23; + _State := _State + UINT#1; END_IF; END_IF; //Reading Torque/force data scaling: Exponent (0x2906:03 / S-0-0094 / --) 2byte, 0 decimal places - IF _State = UINT#23 THEN + IF _State = UINT#41 THEN _ReadRecord( request := TRUE, hardwareID := (AxisRefExt.HWIDs.HW_S_0_0134_0_0), index := DINT#94, maxLength := UINT#2, record := _data2); + Messenger.ActivateOnCondition(ULINT#1829, _ReadRecord.error, eAxoMessageCategory#Error); IF NOT _ReadRecord.busy AND _ReadRecord.valid AND NOT _ReadRecord.error THEN _word.%B0 := _data2[0]; _word.%B1 := _data2[1]; _S_0_0094 := TO_INT(_word); - _State := UINT#24; + _State := _State + UINT#1; END_IF; END_IF; - IF _State = UINT#24 THEN + IF _State = UINT#42 THEN _ReadRecord(request := FALSE, record := _data2); IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN - _State := UINT#25; + _State := _State + UINT#1; END_IF; END_IF; //Reading Inverter type data: Nominal current (0x2314:01 / S-0-0112 / --) 4bytes, 3decimal places - IF _State = UINT#25 THEN + IF _State = UINT#43 THEN _ReadRecord( request := TRUE, hardwareID := (AxisRefExt.HWIDs.HW_S_0_0134_0_0), index := DINT#112, maxLength := UINT#4, record := _data4); + Messenger.ActivateOnCondition(ULINT#1830, _ReadRecord.error, eAxoMessageCategory#Error); IF NOT _ReadRecord.busy AND _ReadRecord.valid AND NOT _ReadRecord.error THEN _dword.%B0 := _data4[0]; _dword.%B1 := _data4[1]; _dword.%B2 := _data4[2]; _dword.%B3 := _data4[3]; _S_0_0112 := TO_REAL(TO_INT(_dword)) * REAL#0.001; - _State := UINT#26; + _State := _State + UINT#1; END_IF; END_IF; - IF _State = UINT#26 THEN + IF _State = UINT#44 THEN _ReadRecord(request := FALSE, record := _data4); IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN - _State := UINT#27; + _State := _State + UINT#1; END_IF; END_IF; //Reading Motor torque model: Current constant (0x2018:01 / P-0-0450 / --) 2bytes, 2decimal places - IF _State = UINT#27 THEN + IF _State = UINT#45 THEN _ReadRecord( request := TRUE, hardwareID := (AxisRefExt.HWIDs.HW_S_0_0134_0_0), index := DINT#4546, maxLength := UINT#2, record := _data2); + Messenger.ActivateOnCondition(ULINT#1831, _ReadRecord.error, eAxoMessageCategory#Error); IF NOT _ReadRecord.busy AND _ReadRecord.valid AND NOT _ReadRecord.error THEN _word.%B0 := _data2[0]; _word.%B1 := _data2[1]; _P_0_0450 := TO_REAL(TO_INT(_word)) * REAL#0.01; - _State := UINT#28; + _State := _State + UINT#1; END_IF; END_IF; - IF _State = UINT#28 THEN + IF _State = UINT#46 THEN _ReadRecord(request := FALSE, record := _data2); IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN - _State := UINT#29; + _State := _State + UINT#1; END_IF; END_IF; //Calculating scaling constants - IF _State = UINT#29 THEN - // Position - ScalingConstantRequiredPosition := _exp[-_S_0_0078 - 3] / TO_LREAL(_S_0_0077); - ScalingConstantActualPosition := LREAL#1.0/ScalingConstantRequiredPosition; - // Velocity - ScalingConstantRequiredVelocity := LREAL#60.0 * _exp[-_S_0_0046 - 3] / TO_LREAL(_S_0_0045); - ScalingConstantActualVelocity := LREAL#1.0/ScalingConstantRequiredVelocity; - // Acceleration - ScalingConstantRequiredAcceleration := _exp[-_S_0_0162 - 3] / TO_LREAL(_S_0_0161); - ScalingConstantActualAcceleration := LREAL#1.0/ScalingConstantRequiredAcceleration; - // Deceleration - ScalingConstantRequiredDeceleration := ScalingConstantRequiredAcceleration; - ScalingConstantActualDeceleration := ScalingConstantActualAcceleration; - // Torque - ScalingConstantActualTorque := TO_LREAL(_S_0_0093) *_exp[_S_0_0094 - 2] * TO_LREAL(_P_0_0450) * TO_LREAL(_S_0_0112) ; - ScalingConstantRequiredTorque := LREAL#1.0/ScalingConstantActualTorque; - // Jerk - ScalingConstantRequiredJerk := 1000.0; - ScalingConstantActualJerk := 0.001; - - AxoStop_Deceleration := 1000.0; // mm/s2 - AxoStop_Jerk := 150000.0; // mm/s3 - AxoHalt_Deceleration := 1000.0; // mm/s2 - AxoHalt_Jerk := 150000.0; // mm/s3 - AxoHome_Position := 0.0; // mm - AxoHome_HommingMode := 551; // Negative direction, travel range limit switch, negative edge (NC contact) - AxoHome_Velocity := 2.0; // mm/s - AxoHome_Acceleration := 1000.0; // mm/s2 - AxoHome_Deceleration := 1000.0; // mm/s2 - AxoSetPosition_Position := 0.0; // mm - AxoMoveAbsolute_Position := 0.0; // mm - AxoMoveAbsolute_Velocity := 5.0; // mm/s - AxoMoveAbsolute_Acceleration := 1000.0; // mm/s2 - AxoMoveAbsolute_Deceleration := 1000.0; // mm/s2 - AxoMoveAbsolute_Jerk := 150000.0; // mm/s3 - AxoMoveRelative_Distance := 5.0; // mm - AxoMoveRelative_Velocity := 5.0; // mm/s - AxoMoveRelative_Acceleration := 1000.0; // mm/s2 - AxoMoveRelative_Deceleration := 1000.0; // mm/s2 - AxoMoveRelative_Jerk := 150000.0; // mm/s3 - AxoMoveAdditive_Distance := 5.0; // mm - AxoMoveAdditive_Velocity := 5.0; // mm/s - AxoMoveAdditive_Acceleration := 1000.0; // mm/s2 - AxoMoveAdditive_Deceleration := 1000.0; // mm/s2 - AxoMoveAdditive_Jerk := 150000.0; // mm/s3 - AxoMoveVelocity_Velocity := 5.0; // mm/s - AxoMoveVelocity_Acceleration := 1000.0; // mm/s2 - AxoMoveVelocity_Deceleration := 1000.0; // mm/s2 - AxoMoveVelocity_Jerk := 150000.0; // mm/s3 - AxoTorqueControl_Torque := 0.0; // Nm - AxoTorqueControl_TorqueRamp := 1.0; // Nm/s - AxoTorqueControl_Velocity := 5.0; // mm/s - AxoTorqueControl_Acceleration := 1000.0;// mm/s2 - AxoTorqueControl_Deceleration := 1000.0;// mm/s2 - AxoTorqueControl_Jerk := 150000.0; // mm/s3 - AxoJog_Velocity := 2.0; // mm/s - AxoJog_Acceleration := 500.0; // mm/s2 - AxoJog_Deceleration := 500.0; // mm/s2 - AxoJog_Jerk := 150000.0; // mm/s3 - AxisRefExt.Outputs.BipolarTorqueLimitation_S_0_0092_0_0 := INT#1000; // 1000~~ 100% - + IF _State = UINT#47 THEN + IF AxisType = eAxoDriveAxisType#Linear THEN + // Position + ScalingConstantRequiredPosition := _exp[-_S_0_0078 - 3] / TO_LREAL(_S_0_0077); + ScalingConstantActualPosition := LREAL#1.0/ScalingConstantRequiredPosition; + // Velocity + ScalingConstantRequiredVelocity := _exp[-_S_0_0046 - 3] / TO_LREAL(_S_0_0045); + ScalingConstantActualVelocity := LREAL#1.0/ScalingConstantRequiredVelocity; + // Acceleration + ScalingConstantRequiredAcceleration := _exp[-_S_0_0162 - 3] / TO_LREAL(_S_0_0161); + ScalingConstantActualAcceleration := LREAL#1.0/ScalingConstantRequiredAcceleration; + // Deceleration + ScalingConstantRequiredDeceleration := ScalingConstantRequiredAcceleration; + ScalingConstantActualDeceleration := ScalingConstantActualAcceleration; + // Torque + ScalingConstantActualTorque := TO_LREAL(_S_0_0093) *_exp[_S_0_0094]; + ScalingConstantRequiredTorque := LREAL#1.0/ScalingConstantActualTorque; + // Jerk + ScalingConstantRequiredJerk := ScalingConstantRequiredAcceleration; + ScalingConstantActualJerk := LREAL#1.0/ScalingConstantRequiredJerk; + + AxoStop_Deceleration := 1000.0; // mm/s2 + AxoStop_Jerk := 150000.0; // mm/s3 + AxoHalt_Deceleration := 1000.0; // mm/s2 + AxoHalt_Jerk := 150000.0; // mm/s3 + AxoHome_Position := 0.0; // mm + AxoHome_HommingMode := 615; // Negative direction, travel range limit switch, negative edge (NC contact), no Home switch evaluation, no Reference mark evaluation + AxoHome_Velocity := 2.0; // mm/s + AxoHome_Acceleration := 1000.0; // mm/s2 + AxoHome_Deceleration := 1000.0; // mm/s2 + AxoSetPosition_Position := 0.0; // mm + AxoMoveAbsolute_Position := 0.0; // mm + AxoMoveAbsolute_Velocity := 5.0; // mm/s + AxoMoveAbsolute_Acceleration := 1000.0; // mm/s2 + AxoMoveAbsolute_Deceleration := 1000.0; // mm/s2 + AxoMoveAbsolute_Jerk := 150000.0; // mm/s3 + AxoMoveRelative_Distance := 5.0; // mm + AxoMoveRelative_Velocity := 5.0; // mm/s + AxoMoveRelative_Acceleration := 1000.0; // mm/s2 + AxoMoveRelative_Deceleration := 1000.0; // mm/s2 + AxoMoveRelative_Jerk := 150000.0; // mm/s3 + AxoMoveAdditive_Distance := 5.0; // mm + AxoMoveAdditive_Velocity := 5.0; // mm/s + AxoMoveAdditive_Acceleration := 1000.0; // mm/s2 + AxoMoveAdditive_Deceleration := 1000.0; // mm/s2 + AxoMoveAdditive_Jerk := 150000.0; // mm/s3 + AxoMoveVelocity_Velocity := 5.0; // mm/s + AxoMoveVelocity_Acceleration := 1000.0; // mm/s2 + AxoMoveVelocity_Deceleration := 1000.0; // mm/s2 + AxoMoveVelocity_Jerk := 150000.0; // mm/s3 + AxoTorqueControl_Torque := 0.0; // N + AxoTorqueControl_TorqueRamp := 1.0; // N/s + AxoTorqueControl_Velocity := 5.0; // mm/s + AxoTorqueControl_Acceleration := 1000.0;// mm/s2 + AxoTorqueControl_Deceleration := 1000.0;// mm/s2 + AxoTorqueControl_Jerk := 150000.0; // mm/s3 + AxoJog_Velocity := 2.0; // mm/s + AxoJog_Acceleration := 500.0; // mm/s2 + AxoJog_Deceleration := 500.0; // mm/s2 + AxoJog_Jerk := 150000.0; // mm/s3 + AxisRefExt.Outputs.BipolarTorqueLimitation_S_0_0092_0_0 := INT#1000; // 1000~~ 100% + ELSIF AxisType = eAxoDriveAxisType#Rotary THEN + // Position + ScalingConstantRequiredPosition := TO_LREAL(_S_0_0079) / LREAL#360.0; + ScalingConstantActualPosition := LREAL#1.0/ScalingConstantRequiredPosition; + // Velocity + ScalingConstantRequiredVelocity := _exp[-_S_0_0046] / (TO_LREAL(_S_0_0045)); + ScalingConstantActualVelocity := LREAL#1.0/ScalingConstantRequiredVelocity; + // Acceleration + ScalingConstantRequiredAcceleration := _exp[-_S_0_0162] / (TO_LREAL(_S_0_0161) * LREAL#180.0 /System.Math.Constants#PI); + ScalingConstantActualAcceleration := LREAL#1.0/ScalingConstantRequiredAcceleration; + // Deceleration + ScalingConstantRequiredDeceleration := ScalingConstantRequiredAcceleration; + ScalingConstantActualDeceleration := ScalingConstantActualAcceleration; + // Torque + ScalingConstantActualTorque := TO_LREAL(_S_0_0093) *_exp[_S_0_0094]; + ScalingConstantRequiredTorque := LREAL#1.0/ScalingConstantActualTorque; + // Jerk + ScalingConstantRequiredJerk := ScalingConstantRequiredAcceleration; + ScalingConstantActualJerk := LREAL#1.0/ScalingConstantRequiredJerk; + + AxoStop_Deceleration := 36000.0; // deg/s2 + AxoStop_Jerk := 3600000.0; // deg/s3 + AxoHalt_Deceleration := 36000.0; // deg/s2 + AxoHalt_Jerk := 3600000.0; // deg/s3 + AxoHome_Position := 0.0; // deg + AxoHome_HommingMode := 71; // Negative direction, negative edge (NC contact), homing switch connected to drive, no Reference mark evaluation + AxoHome_Velocity := 45.0; // deg/s + AxoHome_Acceleration := 36000.0; // deg/s2 + AxoHome_Deceleration := 36000.0; // deg/s2 + AxoSetPosition_Position := 0.0; // deg + AxoMoveAbsolute_Position := 0.0; // deg + AxoMoveAbsolute_Velocity := 3600.0; // deg/s + AxoMoveAbsolute_Acceleration := 36000.0; // deg/s2 + AxoMoveAbsolute_Deceleration := 36000.0; // deg/s2 + AxoMoveAbsolute_Jerk := 3600000.0; // deg/s3 + AxoMoveRelative_Distance := 360.0; // deg + AxoMoveRelative_Velocity := 3600.0; // deg/s + AxoMoveRelative_Acceleration := 36000.0; // deg/s2 + AxoMoveRelative_Deceleration := 36000.0; // deg/s2 + AxoMoveRelative_Jerk := 3600000.0; // deg/s3 + AxoMoveAdditive_Distance := 360.0; // deg + AxoMoveAdditive_Velocity := 3600.0; // deg/s + AxoMoveAdditive_Acceleration := 36000.0; // deg/s2 + AxoMoveAdditive_Deceleration := 36000.0; // deg/s2 + AxoMoveAdditive_Jerk := 3600000.0; // deg/s3 + AxoMoveVelocity_Velocity := 3600.0; // deg/s + AxoMoveVelocity_Acceleration := 36000.0; // deg/s2 + AxoMoveVelocity_Deceleration := 36000.0; // deg/s2 + AxoMoveVelocity_Jerk := 3600000.0; // deg/s3 + AxoTorqueControl_Torque := 0.0; // Nm + AxoTorqueControl_TorqueRamp := 1.0; // Nm/s + AxoTorqueControl_Velocity := 3600.0; // deg/s + AxoTorqueControl_Acceleration := 36000.0; // deg/s2 + AxoTorqueControl_Deceleration := 36000.0; // deg/s2 + AxoTorqueControl_Jerk := 3600000.0; // deg/s3 + AxoJog_Velocity := 45.0; // deg/s + AxoJog_Acceleration := 720.0; // deg/s2 + AxoJog_Deceleration := 720.0; // deg/s2 + AxoJog_Jerk := 1800000.0; // deg/s3 + AxisRefExt.Outputs.BipolarTorqueLimitation_S_0_0092_0_0 := INT#1000; // 1000~~ 100% + END_IF; _ScalingRead := TRUE; - _State := UINT#0; + _State := UINT#50; END_IF; RETURN; END_IF; + // Retrigger the reading of the scaling parameters in case of leaving the operation mode. + IF (*_ScalingRead AND*) NOT AxisRefExt.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit1 AND + (AxisRefExt.Inputs.SignalStatusWord_S_0_0144_0_0.CmPmOmBit0 OR AxisRefExt.Inputs.SignalStatusWord_S_0_0144_0_0.CmPmOmBit1 ) THEN + _ScalingRead := FALSE; + _State := UINT#0; + END_IF; + //*************************************************// Messenger.ActivateOnCondition(ULINT#300, Enable AND NOT EnablePositive, eAxoMessageCategory#Info); @@ -1524,7 +1886,24 @@ NAMESPACE AXOpen.Components.Rexroth.Drives ELSE THIS.MessageCodeFromMC := ULINT#0; END_IF; - END_IF; + END_IF; + + THIS.ErrorOutOfMC := NOT THIS.ErrorFromMC AND (AxisRefExt.Inputs.DriveStatusWord_S_0_0135_0_0.DriveErrorZKL1 OR (AxisRefExt.Inputs.DriveStatusWord_S_0_0135_0_0.WarningZKL2 AND AxisRefExt.Inputs.DiagnosticMessage_S_0_0390_0_0 >= DWORD#16#C00E0000)); + MessageCodeOutOfMC := TO_ULINT(AxisRefExt.Inputs.DiagnosticMessage_S_0_0390_0_0 AND DWORD#16#000FFFFF); + Messenger.ActivateOnCondition(THIS.MessageCodeOutOfMC, THIS.ErrorOutOfMC AND MessageCodeOutOfMC = _lastMessageCodeOutOfMC ,eAxoMessageCategory#Error); + IF Messenger.MessengerState = eAxoMessengerState#Idle THEN + IF THIS.ErrorOutOfMC THEN + _lastMessageCodeOutOfMC := THIS.MessageCodeOutOfMC; + ELSE + THIS.MessageCodeOutOfMC := ULINT#0; + END_IF; + END_IF; + + IF _ScalingRead AND _State = UINT#50 THEN + // AxisRefExt.Outputs.SignalControlWord_S_0_0145_0_0.AcceptanceOfPositioningCommandValue := AxisRefExt.Inputs.SignalStatusWord_S_0_0144_0_0.PositionCommandAck; + // THIS.AxoReset_Task.RemoteInvoke := TRUE; + _State := UINT#0; + END_IF; END_METHOD /// @@ -1716,7 +2095,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _data2[0].%X0 := AxisRefExt.Outputs.SignalControlWord_S_0_0145_0_0.SwitchToCM; _data2[0].%X1 := AxisRefExt.Outputs.SignalControlWord_S_0_0145_0_0.SwitchTo0M; _data2[0].%X2 := AxisRefExt.Outputs.SignalControlWord_S_0_0145_0_0.CancelReferencePoint; - _data2[0].%X3 := AxisRefExt.Outputs.SignalControlWord_S_0_0145_0_0._bit11_Reserve; + _data2[0].%X3 := AxisRefExt.Outputs.SignalControlWord_S_0_0145_0_0.DeviceReboot; _data2[0].%X4 := AxisRefExt.Outputs.SignalControlWord_S_0_0145_0_0._bit12_Reserve; _data2[0].%X5 := AxisRefExt.Outputs.SignalControlWord_S_0_0145_0_0._bit13_Reserve; _data2[0].%X6 := AxisRefExt.Outputs.SignalControlWord_S_0_0145_0_0._bit14_Reserve; @@ -1842,6 +2221,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives /// VAR INTERNAL MC_PowerEnable_PV : BOOL := FALSE; //Enable - previous value + MC_PowerErrorID : DINT; END_VAR METHOD PUBLIC OVERRIDE MC_Power VAR_INPUT @@ -1881,19 +2261,21 @@ NAMESPACE AXOpen.Components.Rexroth.Drives Status := FALSE; Valid := TRUE; END_IF; - IF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.DriveErrorZKL1 = TRUE THEN + // IF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.DriveErrorZKL1 OR (_AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.WarningZKL2 AND _AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0 >= DWORD#16#C00E0000) THEN + IF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.DriveErrorZKL1 AND (NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit0 OR NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit1) THEN Status := FALSE; Error := TRUE; - ErrorID.%B1 := _AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0.%B1; - ErrorID.%B0 := _AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0.%B0; + MC_PowerErrorID := TO_DINT(_AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0 AND DWORD#16#000FFFFF); END_IF; END_IF; IF NOT Enable AND MC_PowerEnable_PV THEN + MC_PowerErrorID := DINT#0; _AxisReference^.Outputs.DriveControlWord_S_0_0134_0_0.DriveEnable := FALSE; _AxisReference^.Outputs.DriveControlWord_S_0_0134_0_0.DriveOn := FALSE; END_IF; + ErrorID := MC_PowerErrorID; MC_PowerEnable_PV := Enable; END_METHOD @@ -1956,7 +2338,6 @@ NAMESPACE AXOpen.Components.Rexroth.Drives MC_HomeErrorID := DINT#0; DriveStatus.Error.Id := UINT#0; TaskMessenger.Restore(); - THIS.CallTimers(FALSE); _tmpTimer.OnDelay(THIS, FALSE , T#0s); // _AxisReference^.Outputs.DriveControlWord_S_0_0134_0_0.IPOSYNC := FALSE; // _AxisReference^.Outputs.DriveControlWord_S_0_0134_0_0.DriveHalt := FALSE; @@ -1970,6 +2351,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.JogNegative := FALSE; _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.ClearError := FALSE; _State := UINT#310; + THIS.CallTimers(FALSE); END_IF; // Reseting InReference flag IF _State = UINT#310 THEN @@ -1981,6 +2363,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives IF NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.InReference THEN _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.CancelReferencePoint := FALSE; _State := UINT#311; + THIS.CallTimers(FALSE); RETURN; END_IF; END_IF; @@ -1992,6 +2375,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives END_IF; IF Acceleration <= 0 OR Deceleration <= 0 THEN _State := UINT#329; + THIS.CallTimers(FALSE); RETURN; END_IF; @@ -2007,11 +2391,13 @@ NAMESPACE AXOpen.Components.Rexroth.Drives record := _data4); IF NOT _WriteRecord.busy AND _WriteRecord.done AND NOT _WriteRecord.error THEN _State := UINT#312; + THIS.CallTimers(FALSE); ElSIF _WriteRecord.error THEN Messenger.Activate( UINT#1444, eAxoMessageCategory#Error); MC_HomeErrorID := DINT#1444; _WriteRecord(request := FALSE, record := _data4); _State := UINT#329; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#312 THEN @@ -2022,6 +2408,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _WriteRecord(request := FALSE, record := _data4); IF NOT _WriteRecord.busy AND NOT _WriteRecord.done AND NOT _WriteRecord.error THEN _State := UINT#313; + THIS.CallTimers(FALSE); END_IF; END_IF; //Writing Homing function: Configuration (0x2500:02 / S-0-0147 / --) @@ -2040,11 +2427,13 @@ NAMESPACE AXOpen.Components.Rexroth.Drives record := _data2); IF NOT _WriteRecord.busy AND _WriteRecord.done AND NOT _WriteRecord.error THEN _State := UINT#314; + THIS.CallTimers(FALSE); ElSIF _WriteRecord.error THEN Messenger.Activate( UINT#1445, eAxoMessageCategory#Error); MC_HomeErrorID := DINT#1445; _WriteRecord(request := FALSE, record := _data2); _State := UINT#329; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#314 THEN @@ -2055,6 +2444,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _WriteRecord(request := FALSE, record := _data2); IF NOT _WriteRecord.busy AND NOT _WriteRecord.done AND NOT _WriteRecord.error THEN _State := UINT#315; + THIS.CallTimers(FALSE); END_IF; END_IF; //Writing Homing speeds: Speed during search for switch (0x6099:01 / S-0-0041 / --) @@ -2076,11 +2466,13 @@ NAMESPACE AXOpen.Components.Rexroth.Drives IF NOT _WriteRecord.busy AND _WriteRecord.done AND NOT _WriteRecord.error THEN _WriteRecord(request := FALSE, record := _data4); _State := UINT#316; + THIS.CallTimers(FALSE); ElSIF _WriteRecord.error THEN Messenger.Activate( UINT#1446, eAxoMessageCategory#Error); MC_HomeErrorID := DINT#1446; _WriteRecord(request := FALSE, record := _data4); _State := UINT#329; + THIS.CallTimers(FALSE); END_IF; END_IF; //Writing Homing speeds: Speed during search for zero (0x6099:02 / S-0-0542 / --) @@ -2102,11 +2494,13 @@ NAMESPACE AXOpen.Components.Rexroth.Drives IF NOT _WriteRecord.busy AND _WriteRecord.done AND NOT _WriteRecord.error THEN _WriteRecord(request := FALSE, record := _data4); _State := UINT#317; + THIS.CallTimers(FALSE); ElSIF _WriteRecord.error THEN Messenger.Activate( UINT#1446, eAxoMessageCategory#Error); MC_HomeErrorID := DINT#1446; _WriteRecord(request := FALSE, record := _data4); _State := UINT#329; + THIS.CallTimers(FALSE); END_IF; END_IF; //Writing Homing acceleration (0x609A:00 / S-0-0042 / --) @@ -2127,11 +2521,13 @@ NAMESPACE AXOpen.Components.Rexroth.Drives record := _data4); IF NOT _WriteRecord.busy AND _WriteRecord.done AND NOT _WriteRecord.error THEN _State := UINT#318; + THIS.CallTimers(FALSE); ElSIF _WriteRecord.error THEN Messenger.Activate( UINT#1447, eAxoMessageCategory#Error); MC_HomeErrorID := DINT#1447; _WriteRecord(request := FALSE, record := _data4); _State := UINT#329; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#318 THEN @@ -2142,6 +2538,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _WriteRecord(request := FALSE, record := _data4); IF NOT _WriteRecord.busy AND NOT _WriteRecord.done AND NOT _WriteRecord.error THEN _State := UINT#319; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#319 THEN @@ -2156,6 +2553,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ActualOperatingModeBit1 AND NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ActualOperatingModeBit2 THEN _State := UINT#320; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#320 THEN @@ -2166,6 +2564,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives IF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit0 AND _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit1 THEN _State := UINT#321; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#321 THEN @@ -2173,22 +2572,34 @@ NAMESPACE AXOpen.Components.Rexroth.Drives TaskMessenger.Activate( UINT#521, eAxoMessageCategory#Potential); DriveStatus.Error.Id := UINT#521; END_IF; - _AxisReference^.Outputs.DriveControlWord_S_0_0134_0_0.DriveHalt := TRUE; - _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.HomingControl := TRUE; - _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AcceptanceOfPositioningCommandValue := NOT _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AcceptanceOfPositioningCommandValue; - _State := UINT#322; + _AxisReference^.Outputs.DriveControlWord_S_0_0134_0_0.DriveHalt := TRUE; + IF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.CommandProcessingStatus AND NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.InStandstill THEN + _State := UINT#322; + THIS.CallTimers(FALSE); + END_IF; END_IF; IF _State = UINT#322 THEN IF _infoTimer.output THEN TaskMessenger.Activate( UINT#522, eAxoMessageCategory#Potential); DriveStatus.Error.Id := UINT#522; END_IF; + _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.HomingControl := TRUE; + _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AcceptanceOfPositioningCommandValue := NOT _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AcceptanceOfPositioningCommandValue; + _State := UINT#323; + THIS.CallTimers(FALSE); + END_IF; + IF _State = UINT#323 THEN + IF _infoTimer.output THEN + TaskMessenger.Activate( UINT#523, eAxoMessageCategory#Potential); + DriveStatus.Error.Id := UINT#523; + END_IF; IF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.InReference AND _AxisReference^.Inputs.SignalStatusWord_S_0_0144_0_0.DriveStandstill THEN _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.HomingControl := FALSE; - _State := UINT#323; + _State := UINT#324; + THIS.CallTimers(FALSE); END_IF; END_IF; - IF _State = UINT#323 THEN + IF _State = UINT#324 THEN _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AcceptanceOfPositioningCommandValue := FALSE; _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.HomingControl := FALSE; _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AbsoluteRelative := FALSE; @@ -2196,20 +2607,20 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.JogPositive := FALSE; _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.JogNegative := FALSE; _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.ClearError := FALSE; - _State := UINT#324; + _State := UINT#325; + THIS.CallTimers(FALSE); END_IF; - IF _State = UINT#324 THEN + IF _State = UINT#325 THEN _tmpTimer.OnDelay(THIS, _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.InReference AND _AxisReference^.Inputs.SignalStatusWord_S_0_0144_0_0.DriveStandstill , T#100ms); IF _tmpTimer.output THEN - _State := UINT#325; + _State := UINT#326; + THIS.CallTimers(FALSE); END_IF; END_IF; - IF _State = UINT#325 THEN - _State := UINT#326; - END_IF; IF _State = UINT#326 THEN _State := UINT#327; - END_IF; + THIS.CallTimers(FALSE); + END_IF; IF _State = UINT#327 THEN Done := TRUE; MC_HomeCycle := ULINT#0; @@ -2230,9 +2641,12 @@ NAMESPACE AXOpen.Components.Rexroth.Drives IF _State>=UINT#310 AND _State= DWORD#16#C00E0000) + // Filtering out warning with code C00E2054 (NOT HOMED) + AND (_AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0 <> DWORD#16#C00E2054) THEN IF MC_HomeErrorID = DINT#0 THEN - MC_HomeErrorID := TO_DINT(_AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0); + MC_HomeErrorID := TO_DINT(_AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0 AND DWORD#16#000FFFFF); END_IF; _State := UINT#329; ELSIF _AxisReference^.Data.Cycle <> MC_HomeCycle THEN @@ -2243,7 +2657,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives THIS.CallTimers(TRUE,FALSE); THIS.AxoHome_Task.ThrowWhen(_errorTimer.output ); - THIS.AxoHome_Task.ThrowWhen(THIS.AxoHome_Task.Duration >= DriveConfig.TaskTimeout AND DriveConfig.TaskTimeout > T#0s ,'<#AxoHome_Task timeout.#>'); + // THIS.AxoHome_Task.ThrowWhen(THIS.AxoHome_Task.Duration >= DriveConfig.TaskTimeout AND DriveConfig.TaskTimeout > T#0s ,'<#AxoHome_Task timeout.#>'); DriveStatus.Action.Id := _State; END_IF; @@ -2328,14 +2742,17 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _AxisReference^.Outputs.CommandDecceleration_S_0_0359_0_0 := TO_DINT(Deceleration * ScalingConstantRequiredDeceleration ); _AxisReference^.Outputs.CommandJerk_S_0_0193_0_0 := TO_DINT(Jerk * ScalingConstantRequiredJerk ); _State := UINT#330; + THIS.CallTimers(FALSE); END_IF; IF _State = UINT#330 THEN Busy := TRUE; Active := TRUE; IF Deceleration <= 0 OR Jerk <= 0 THEN _State := UINT#339; + THIS.CallTimers(FALSE); ELSE _State := UINT#331; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#331 THEN @@ -2348,6 +2765,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _AxisReference^.Outputs.DriveControlWord_S_0_0134_0_0.DriveHalt := FALSE; IF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.InStandstill THEN _State := UINT#332; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#332 THEN @@ -2355,6 +2773,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives Active := TRUE; IF TRUE THEN _State := UINT#333; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#333 THEN @@ -2362,6 +2781,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives Active := TRUE; IF TRUE THEN _State := UINT#334; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#334 THEN @@ -2369,6 +2789,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives Active := TRUE; IF TRUE THEN _State := UINT#335; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#335 THEN @@ -2376,6 +2797,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives Active := TRUE; IF TRUE THEN _State := UINT#336; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#336 THEN @@ -2383,12 +2805,14 @@ NAMESPACE AXOpen.Components.Rexroth.Drives Active := TRUE; IF TRUE THEN _State := UINT#337; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#337 THEN Done := TRUE; Active := TRUE; MC_StopCycle := ULINT#0; + THIS.CallTimers(FALSE); END_IF; IF _State = UINT#338 THEN MC_StopCycle := ULINT#0; @@ -2404,9 +2828,10 @@ NAMESPACE AXOpen.Components.Rexroth.Drives IF _State>=UINT#330 AND _State= DWORD#16#C00E0000) THEN IF MC_StopErrorID = DINT#0 THEN - MC_StopErrorID := TO_DINT(_AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0); + MC_StopErrorID := TO_DINT(_AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0 AND DWORD#16#000FFFFF); END_IF; _State := UINT#339; ELSIF _AxisReference^.Data.Cycle <> MC_StopCycle THEN @@ -2495,6 +2920,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _AxisReference^.Outputs.CommandDecceleration_S_0_0359_0_0 := TO_DINT(Deceleration * ScalingConstantRequiredDeceleration); _AxisReference^.Outputs.CommandJerk_S_0_0193_0_0 := TO_DINT(Jerk * ScalingConstantRequiredJerk); _State := UINT#340; + THIS.CallTimers(FALSE); END_IF; IF _State = UINT#340 THEN IF _infoTimer.output THEN @@ -2505,8 +2931,10 @@ NAMESPACE AXOpen.Components.Rexroth.Drives Active := TRUE; IF Deceleration <= 0 OR Jerk <= 0 THEN _State := UINT#349; + THIS.CallTimers(FALSE); ELSE _State := UINT#341; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#341 THEN @@ -2519,6 +2947,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _AxisReference^.Outputs.DriveControlWord_S_0_0134_0_0.DriveHalt := FALSE; IF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.InStandstill THEN _State := UINT#342; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#342 THEN @@ -2526,6 +2955,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives Active := TRUE; IF TRUE THEN _State := UINT#343; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#343 THEN @@ -2533,21 +2963,25 @@ NAMESPACE AXOpen.Components.Rexroth.Drives Active := TRUE; IF TRUE THEN _State := UINT#344; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#344 THEN IF TRUE THEN _State := UINT#345; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#345 THEN IF TRUE THEN _State := UINT#346; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#346 THEN IF TRUE THEN _State := UINT#347; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#347 THEN @@ -2569,9 +3003,10 @@ NAMESPACE AXOpen.Components.Rexroth.Drives IF _State>=UINT#340 AND _State= DWORD#16#C00E0000) THEN IF MC_HaltErrorID = DINT#0 THEN - MC_HaltErrorID := TO_DINT(_AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0); + MC_HaltErrorID := TO_DINT(_AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0 AND DWORD#16#000FFFFF); END_IF; _State := UINT#349; ELSIF _AxisReference^.Data.Cycle <> MC_HaltCycle THEN @@ -2677,6 +3112,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AbsoluteRelative := FALSE; MC_MoveAbsoluteContinuousUpdate_SV := ContinuousUpdate; _State := UINT#350; + THIS.CallTimers(FALSE); END_IF; IF _State = UINT#350 THEN IF _infoTimer.output THEN @@ -2698,6 +3134,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives MC_MoveAbsoluteJerk_PV := Jerk; MC_MoveAbsoluteDirection_PV := Direction; _State := UINT#351; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#351 THEN @@ -2714,6 +3151,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ActualOperatingModeBit1 AND NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ActualOperatingModeBit2 THEN _State := UINT#352; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#352 THEN @@ -2726,6 +3164,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives IF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit0 AND _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit1 THEN _State := UINT#353; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#353 THEN @@ -2736,8 +3175,9 @@ NAMESPACE AXOpen.Components.Rexroth.Drives Busy := TRUE; Active := TRUE; _AxisReference^.Outputs.DriveControlWord_S_0_0134_0_0.DriveHalt := TRUE; - IF TRUE THEN + IF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.CommandProcessingStatus AND NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.InStandstill THEN _State := UINT#354; + THIS.CallTimers(FALSE); END_IF; END_IF; //Executing movement @@ -2748,9 +3188,10 @@ NAMESPACE AXOpen.Components.Rexroth.Drives END_IF; Busy := TRUE; Active := TRUE; - _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AcceptanceOfPositioningCommandValue := NOT _AxisReference^.Inputs.SignalStatusWord_S_0_0144_0_0.PositionCommandAck; + _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AcceptanceOfPositioningCommandValue := NOT _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AcceptanceOfPositioningCommandValue; // _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AcceptanceOfPositioningCommandValue := NOT _AxisReference^.Inputs.SignalStatusWord_S_0_0144_0_0.PositionCommandAck; IF TRUE THEN _State := UINT#355; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#355 THEN @@ -2762,6 +3203,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives Active := TRUE; IF _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AcceptanceOfPositioningCommandValue = _AxisReference^.Inputs.SignalStatusWord_S_0_0144_0_0.PositionCommandAck THEN _State := UINT#356; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#356 THEN @@ -2771,6 +3213,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives END_IF; IF _AxisReference^.Inputs.SignalStatusWord_S_0_0144_0_0.DriveStandstill AND _AxisReference^.Inputs.SignalStatusWord_S_0_0144_0_0.InTargetPosition THEN _State := UINT#357; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#357 THEN @@ -2801,9 +3244,11 @@ NAMESPACE AXOpen.Components.Rexroth.Drives END_IF; IF NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit0 OR NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit1 THEN _State := UINT#358; - ELSIF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.DriveErrorZKL1 THEN + ELSIF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.DriveErrorZKL1 OR + (_AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.WarningZKL2 AND _AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0 >= DWORD#16#C00E0000) THEN + // _debugCounter := _debugCounter + ULINT#1; IF MC_MoveAbsoluteErrorID = DINT#0 THEN - MC_MoveAbsoluteErrorID := TO_DINT(_AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0); + MC_MoveAbsoluteErrorID := TO_DINT(_AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0 AND DWORD#16#000FFFFF); END_IF; _State := UINT#359; ELSIF _AxisReference^.Data.Cycle <> MC_MoveAbsoluteCycle THEN @@ -2910,6 +3355,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.ImmediateChange := TRUE; MC_MoveRelativeContinuousUpdate_SV := ContinuousUpdate; _State := UINT#360; + THIS.CallTimers(FALSE); END_IF; IF _State = UINT#360 THEN IF _infoTimer.output THEN @@ -2930,6 +3376,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives MC_MoveRelativeDeceleration_PV := Deceleration; MC_MoveRelativeJerk_PV := Jerk; _State := UINT#361; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#361 THEN @@ -2946,6 +3393,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ActualOperatingModeBit1 AND NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ActualOperatingModeBit2 THEN _State := UINT#362; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#362 THEN @@ -2958,6 +3406,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives IF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit0 AND _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit1 THEN _State := UINT#363; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#363 THEN @@ -2968,8 +3417,9 @@ NAMESPACE AXOpen.Components.Rexroth.Drives Busy := TRUE; Active := TRUE; _AxisReference^.Outputs.DriveControlWord_S_0_0134_0_0.DriveHalt := TRUE; - IF TRUE THEN + IF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.CommandProcessingStatus AND NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.InStandstill THEN _State := UINT#364; + THIS.CallTimers(FALSE); END_IF; END_IF; //Executing movement @@ -2980,9 +3430,10 @@ NAMESPACE AXOpen.Components.Rexroth.Drives END_IF; Busy := TRUE; Active := TRUE; - _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AcceptanceOfPositioningCommandValue := NOT _AxisReference^.Inputs.SignalStatusWord_S_0_0144_0_0.PositionCommandAck; + _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AcceptanceOfPositioningCommandValue := NOT _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AcceptanceOfPositioningCommandValue; //_AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AcceptanceOfPositioningCommandValue := NOT _AxisReference^.Inputs.SignalStatusWord_S_0_0144_0_0.PositionCommandAck; IF TRUE THEN _State := UINT#365; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#365 THEN @@ -2994,6 +3445,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives Active := TRUE; IF _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AcceptanceOfPositioningCommandValue = _AxisReference^.Inputs.SignalStatusWord_S_0_0144_0_0.PositionCommandAck THEN _State := UINT#366; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#366 THEN @@ -3003,6 +3455,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives END_IF; IF _AxisReference^.Inputs.SignalStatusWord_S_0_0144_0_0.DriveStandstill AND _AxisReference^.Inputs.SignalStatusWord_S_0_0144_0_0.InTargetPosition THEN _State := UINT#367; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#367 THEN @@ -3042,9 +3495,10 @@ NAMESPACE AXOpen.Components.Rexroth.Drives END_IF; IF NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit0 OR NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit1 THEN _State := UINT#368; - ELSIF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.DriveErrorZKL1 THEN + ELSIF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.DriveErrorZKL1 OR + (_AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.WarningZKL2 AND _AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0 >= DWORD#16#C00E0000) THEN IF MC_MoveRelativeErrorID = DINT#0 THEN - MC_MoveRelativeErrorID := TO_DINT(_AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0); + MC_MoveRelativeErrorID := TO_DINT(_AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0 AND DWORD#16#000FFFFF); END_IF; _State := UINT#369; ELSIF _AxisReference^.Data.Cycle <> MC_MoveRelativeCycle THEN @@ -3176,10 +3630,12 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _AxisReference^.Data.Cycle := _AxisReference^.Data.Cycle + ULINT#2; MC_MoveAdditiveCycle := _AxisReference^.Data.Cycle ; _State := UINT#371; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#370 THEN _State := UINT#371; + THIS.CallTimers(FALSE); END_IF; IF _State = UINT#371 THEN IF _infoTimer.output THEN @@ -3195,6 +3651,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ActualOperatingModeBit1 AND NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ActualOperatingModeBit2 THEN _State := UINT#372; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#372 THEN @@ -3207,6 +3664,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives IF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit0 AND _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit1 THEN _State := UINT#373; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#373 THEN @@ -3217,8 +3675,9 @@ NAMESPACE AXOpen.Components.Rexroth.Drives Busy := TRUE; Active := TRUE; _AxisReference^.Outputs.DriveControlWord_S_0_0134_0_0.DriveHalt := TRUE; - IF TRUE THEN + IF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.CommandProcessingStatus AND NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.InStandstill THEN _State := UINT#374; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#374 THEN @@ -3228,9 +3687,10 @@ NAMESPACE AXOpen.Components.Rexroth.Drives END_IF; Busy := TRUE; Active := TRUE; - _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AcceptanceOfPositioningCommandValue := NOT _AxisReference^.Inputs.SignalStatusWord_S_0_0144_0_0.PositionCommandAck; + _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AcceptanceOfPositioningCommandValue := NOT _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AcceptanceOfPositioningCommandValue; //_AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AcceptanceOfPositioningCommandValue := NOT _AxisReference^.Inputs.SignalStatusWord_S_0_0144_0_0.PositionCommandAck; IF TRUE THEN _State := UINT#375; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#375 THEN @@ -3242,6 +3702,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives Active := TRUE; IF _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AcceptanceOfPositioningCommandValue = _AxisReference^.Inputs.SignalStatusWord_S_0_0144_0_0.PositionCommandAck THEN _State := UINT#376; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#376 THEN @@ -3251,6 +3712,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives END_IF; IF _AxisReference^.Inputs.SignalStatusWord_S_0_0144_0_0.DriveStandstill AND _AxisReference^.Inputs.SignalStatusWord_S_0_0144_0_0.InTargetPosition THEN _State := UINT#377; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#377 THEN @@ -3294,9 +3756,10 @@ NAMESPACE AXOpen.Components.Rexroth.Drives END_IF; IF NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit0 OR NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit1 THEN _State := UINT#378; - ELSIF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.DriveErrorZKL1 THEN + ELSIF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.DriveErrorZKL1 OR + (_AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.WarningZKL2 AND _AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0 >= DWORD#16#C00E0000) THEN IF MC_MoveAdditiveErrorID = DINT#0 THEN - MC_MoveAdditiveErrorID := TO_DINT(_AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0); + MC_MoveAdditiveErrorID := TO_DINT(_AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0 AND DWORD#16#000FFFFF); END_IF; _State := UINT#379; ELSIF _AxisReference^.Data.Cycle <> MC_MoveAdditiveCycle THEN @@ -3437,6 +3900,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives MC_MoveVelocityContinuousUpdate_SV := ContinuousUpdate; _State := UINT#380; + THIS.CallTimers(FALSE); END_IF; IF _State = UINT#380 THEN Busy := TRUE; @@ -3454,6 +3918,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives MC_MoveVelocityJerk_PV := Jerk; MC_MoveVelocityDirection_PV := Direction_; _State := UINT#381; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#381 THEN @@ -3470,6 +3935,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ActualOperatingModeBit1 AND NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ActualOperatingModeBit2 THEN _State := UINT#382; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#382 THEN @@ -3482,6 +3948,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives IF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit0 AND _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit1 THEN _State := UINT#383; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#383 THEN @@ -3492,8 +3959,9 @@ NAMESPACE AXOpen.Components.Rexroth.Drives Busy := TRUE; Active := TRUE; _AxisReference^.Outputs.DriveControlWord_S_0_0134_0_0.DriveHalt := TRUE; - IF TRUE THEN //NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.CommandProcessingStatus THEN + IF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.CommandProcessingStatus AND NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.InStandstill THEN _State := UINT#384; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#384 THEN @@ -3511,13 +3979,15 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.JogNegative := TRUE; END_IF; - IF NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.InStandstill THEN + IF NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.InStandstill THEN _State := UINT#385; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#385 THEN IF TRUE THEN _State := UINT#386; + THIS.CallTimers(FALSE); END_IF; END_IF; IF Direction_ = AXOpen.Components.Abstractions.Drives.eAxoDriveDirection#PositiveDirection THEN @@ -3535,6 +4005,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives END_IF; IF InVelocity AND NOT MC_MoveVelocityContinuousUpdate_SV THEN _State := UINT#387; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#387 THEN @@ -3568,9 +4039,10 @@ NAMESPACE AXOpen.Components.Rexroth.Drives END_IF; IF NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit0 OR NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit1 THEN _State := UINT#388; - ELSIF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.DriveErrorZKL1 THEN + ELSIF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.DriveErrorZKL1 OR + (_AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.WarningZKL2 AND _AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0 >= DWORD#16#C00E0000) THEN IF MC_MoveVelocityErrorID = WORD#0 THEN - MC_MoveVelocityErrorID := TO_WORD(_AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0); + MC_MoveVelocityErrorID := TO_WORD(_AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0 AND DWORD#16#000FFFFF); END_IF; _State := UINT#389; ELSIF _AxisReference^.Data.Cycle <> MC_MoveVelocityCycle THEN @@ -3714,6 +4186,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives // _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.SetAbsPositionFunction := FALSE; MC_TorqueControlContinuousUpdate_SV := ContinuousUpdate; _State := UINT#390; + THIS.CallTimers(FALSE); END_IF; IF _State = UINT#390 THEN Busy := TRUE; @@ -3736,14 +4209,17 @@ NAMESPACE AXOpen.Components.Rexroth.Drives MC_TorqueControlTorqueRamp_PV := TorqueRamp; IF PositiveDirection_ AND THIS.ActualPosition >= MC_TorqueControlPositionLimit_PV THEN _State := UINT#399; + THIS.CallTimers(FALSE); Messenger.Activate( UINT#1538, eAxoMessageCategory#ProgrammingError); MC_TorqueControlErrorID := DINT#1538; ELSIF NOT PositiveDirection_ AND THIS.ActualPosition <= MC_TorqueControlPositionLimit_PV THEN _State := UINT#399; + THIS.CallTimers(FALSE); Messenger.Activate( UINT#1539, eAxoMessageCategory#ProgrammingError); MC_TorqueControlErrorID := DINT#1539; ELSE _State := UINT#391; + THIS.CallTimers(FALSE); END_IF; END_IF; END_IF; @@ -3766,11 +4242,13 @@ NAMESPACE AXOpen.Components.Rexroth.Drives IF NOT _WriteRecord.busy AND _WriteRecord.done AND NOT _WriteRecord.error THEN _WriteRecord(request := FALSE, record := _data2); _State := UINT#392; + THIS.CallTimers(FALSE); ElSIF _WriteRecord.error THEN _WriteRecord(request := FALSE, record := _data2); Messenger.Activate( UINT#1540, eAxoMessageCategory#Error); MC_WriteRealParameterErrorID := WORD#1540; _State := UINT#399; + THIS.CallTimers(FALSE); END_IF; END_IF; //Writing Torque/force control: Ramp time (0x2838:02 / S-0-0823 / --) @@ -3792,11 +4270,13 @@ NAMESPACE AXOpen.Components.Rexroth.Drives IF NOT _WriteRecord.busy AND _WriteRecord.done AND NOT _WriteRecord.error THEN _WriteRecord(request := FALSE, record := _data2); _State := UINT#393; + THIS.CallTimers(FALSE); ElSIF _WriteRecord.error THEN _WriteRecord(request := FALSE, record := _data2); Messenger.Activate( UINT#1541, eAxoMessageCategory#Error); MC_WriteRealParameterErrorID := WORD#1541; _State := UINT#399; + THIS.CallTimers(FALSE); END_IF; END_IF; //Writing Torque/force control: High velocity limit value (0x60C9:00 / P-0-0421.0.3 / P-0-2249) @@ -3820,11 +4300,13 @@ NAMESPACE AXOpen.Components.Rexroth.Drives IF NOT _WriteRecord.busy AND _WriteRecord.done AND NOT _WriteRecord.error THEN _WriteRecord(request := FALSE, record := _data4); _State := UINT#394; + THIS.CallTimers(FALSE); ElSIF _WriteRecord.error THEN _WriteRecord(request := FALSE, record := _data4); Messenger.Activate( UINT#1542, eAxoMessageCategory#Error); MC_WriteRealParameterErrorID := WORD#1542; _State := UINT#399; + THIS.CallTimers(FALSE); END_IF; END_IF; //Writing Torque/force control: Low velocity limit value (0x60C8:00 / P-0-0421.0.4 / P-0-2250) @@ -3848,11 +4330,13 @@ NAMESPACE AXOpen.Components.Rexroth.Drives IF NOT _WriteRecord.busy AND _WriteRecord.done AND NOT _WriteRecord.error THEN _WriteRecord(request := FALSE, record := _data4); _State := UINT#395; + THIS.CallTimers(FALSE); ElSIF _WriteRecord.error THEN _WriteRecord(request := FALSE, record := _data4); Messenger.Activate( UINT#1543, eAxoMessageCategory#Error); MC_WriteRealParameterErrorID := WORD#1543; _State := UINT#399; + THIS.CallTimers(FALSE); END_IF; END_IF; //Executing movement @@ -3867,10 +4351,16 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _AxisReference^.Outputs.DriveControlWord_S_0_0134_0_0.CommandOperationModeBit0 := TRUE; _AxisReference^.Outputs.DriveControlWord_S_0_0134_0_0.CommandOperationModeBit1 := FALSE; _AxisReference^.Outputs.DriveControlWord_S_0_0134_0_0.CommandOperationModeBit2 := FALSE; + // IF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ActualOperatingModeBit0 AND + // NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ActualOperatingModeBit1 AND + // NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ActualOperatingModeBit2 THEN IF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ActualOperatingModeBit0 AND NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ActualOperatingModeBit1 AND - NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ActualOperatingModeBit2 THEN + NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ActualOperatingModeBit2 AND + _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.CommandProcessingStatus AND + NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.InStandstill THEN _State := UINT#396; + THIS.CallTimers(FALSE); END_IF; END_IF; IF PositiveDirection_ THEN @@ -3884,6 +4374,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives IF _State = UINT#396 THEN IF InTorque AND NOT MC_TorqueControlContinuousUpdate_SV THEN _State := UINT#397; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#397 THEN @@ -3925,9 +4416,10 @@ NAMESPACE AXOpen.Components.Rexroth.Drives END_IF; IF NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit0 OR NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit1 THEN _State := UINT#398; - ELSIF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.DriveErrorZKL1 THEN + ELSIF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.DriveErrorZKL1 OR + (_AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.WarningZKL2 AND _AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0 >= DWORD#16#C00E0000) THEN IF MC_TorqueControlErrorID = DINT#0 THEN - MC_TorqueControlErrorID := TO_DINT(_AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0); + MC_TorqueControlErrorID := TO_DINT(_AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0 AND DWORD#16#000FFFFF); END_IF; _State := UINT#399; ELSIF _AxisReference^.Data.Cycle <> MC_TorqueControlCycle THEN @@ -4025,6 +4517,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.ClearError := FALSE; MC_SetPositionPowerStatusPV := _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit1 AND _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit0; _State := UINT#400; + THIS.CallTimers(FALSE); END_IF; // Power off IF _State = UINT#400 THEN @@ -4038,6 +4531,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _AxisReference^.Outputs.DriveControlWord_S_0_0134_0_0.DriveOn := FALSE; IF NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit0 THEN _State := UINT#401; + THIS.CallTimers(FALSE); RETURN; END_IF; END_IF; @@ -4052,6 +4546,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives IF NOT _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.InReference THEN _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.CancelReferencePoint := FALSE; _State := UINT#402; + THIS.CallTimers(FALSE); RETURN; END_IF; END_IF; @@ -4074,11 +4569,13 @@ NAMESPACE AXOpen.Components.Rexroth.Drives record := _data4); IF NOT _WriteRecord.busy AND _WriteRecord.done AND NOT _WriteRecord.error THEN _State := UINT#403; + THIS.CallTimers(FALSE); ElSIF _WriteRecord.error THEN Messenger.Activate( UINT#1551, eAxoMessageCategory#Error); MC_HomeErrorID := DINT#1551; _WriteRecord(request := FALSE, record := _data4); - _State := UINT#609; + _State := UINT#409; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#403 THEN @@ -4090,6 +4587,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _WriteRecord(request := FALSE, record := _data4); IF NOT _WriteRecord.busy AND NOT _WriteRecord.done AND NOT _WriteRecord.error THEN _State := UINT#404; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#404 THEN @@ -4103,8 +4601,10 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.SetAbsPositionFunction := FALSE; IF MC_SetPositionPowerStatusPV THEN _State := UINT#405; + THIS.CallTimers(FALSE); ELSE _State := UINT#407; + THIS.CallTimers(FALSE); END_IF; END_IF; END_IF; @@ -4119,6 +4619,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives IF _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit0 AND _AxisReference^.Inputs.DriveStatusWord_S_0_0135_0_0.ReadyForOperationBit1 THEN _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.SetAbsPositionFunction := FALSE; _State := UINT#407; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#407 THEN @@ -4147,9 +4648,10 @@ NAMESPACE AXOpen.Components.Rexroth.Drives IF _State>=UINT#400 AND _State= DWORD#16#C00E0000) THEN IF MC_SetPositionErrorID = DINT#0 THEN - MC_SetPositionErrorID := TO_DINT(_AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0); + MC_SetPositionErrorID := TO_DINT(_AxisReference^.Inputs.DiagnosticMessage_S_0_0390_0_0 AND DWORD#16#000FFFFF); END_IF; _State := UINT#409; ELSIF _AxisReference^.Data.Cycle <> MC_SetPositionCycle THEN @@ -4283,6 +4785,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives Busy := TRUE; MC_ReadParameterErrorID := DINT#0; _State := UINT#410; + THIS.CallTimers(FALSE); END_IF; IF _State = UINT#410 THEN IF _infoTimer.output THEN @@ -4307,12 +4810,14 @@ NAMESPACE AXOpen.Components.Rexroth.Drives MC_ReadParameterValid := TRUE; MC_ReadParameterValue :=TO_LINT(_lword); _State := UINT#411; + THIS.CallTimers(FALSE); END_IF; IF _ReadRecord.error THEN _ReadRecord(request := FALSE, record := _data8); Messenger.Activate( UINT#1581, eAxoMessageCategory#Error); MC_ReadParameterErrorID := DINT#1581; _State := UINT#419; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#411 THEN @@ -4324,6 +4829,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _ReadRecord(request := FALSE, record := _data8); IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN _State := UINT#410; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#419 THEN @@ -4399,6 +4905,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives Busy := TRUE; MC_ReadRealParameterErrorID := DINT#0; _State := UINT#420; + THIS.CallTimers(FALSE); END_IF; IF _State = UINT#420 THEN IF _infoTimer.output THEN @@ -4418,13 +4925,15 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _dword.%B3 := _data4[3]; MC_ReadRealParameterValid := TRUE; MC_ReadRealParameterValue :=TO_REAL(TO_DINT(_dword)); - _State := UINT#621; + _State := UINT#421; + THIS.CallTimers(FALSE); END_IF; IF _ReadRecord.error THEN _ReadRecord(request := FALSE, record := _data4); Messenger.Activate( UINT#1591, eAxoMessageCategory#Error); MC_ReadRealParameterErrorID := DINT#1591; - _State := UINT#629; + _State := UINT#429; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#421 THEN @@ -4436,6 +4945,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _ReadRecord(request := FALSE, record := _data4); IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN _State := UINT#420; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#429 THEN @@ -4512,6 +5022,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives Busy := TRUE; MC_ReadBoolParameterErrorID := WORD#16#0000; _State := UINT#430; + THIS.CallTimers(FALSE); END_IF; IF _State = UINT#430 THEN IF _infoTimer.output THEN @@ -4528,12 +5039,14 @@ NAMESPACE AXOpen.Components.Rexroth.Drives MC_ReadBoolParameterValid := TRUE; MC_ReadBoolParameterValue := _data2[0].%X0; _State := UINT#431; + THIS.CallTimers(FALSE); END_IF; IF _ReadRecord.error THEN _ReadRecord(request := FALSE, record := _data2); Messenger.Activate( UINT#1601, eAxoMessageCategory#Error); MC_ReadBoolParameterErrorID := WORD#1601; _State := UINT#439; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#431 THEN @@ -4545,6 +5058,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _ReadRecord(request := FALSE, record := _data2); IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN _State := UINT#430; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#439 THEN @@ -4625,6 +5139,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives DriveStatus.Error.Id := UINT#0; TaskMessenger.Restore(); _State := UINT#440; + THIS.CallTimers(FALSE); END_IF; IF _State = UINT#440 THEN IF _infoTimer.output THEN @@ -4648,17 +5163,20 @@ NAMESPACE AXOpen.Components.Rexroth.Drives record := _data8); IF NOT _WriteRecord.busy AND _WriteRecord.done AND NOT _WriteRecord.error THEN _State := UINT#441; + THIS.CallTimers(FALSE); ElSIF _WriteRecord.error THEN _WriteRecord(request := FALSE, record := _data8); Messenger.Activate( UINT#1611, eAxoMessageCategory#Error); MC_WriteParameterErrorID := WORD#1611; _State := UINT#449; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#441 THEN _WriteRecord(request := FALSE, record := _data8); IF NOT _WriteRecord.busy AND NOT _WriteRecord.done AND NOT _WriteRecord.error THEN _State := UINT#447; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#447 THEN @@ -4743,6 +5261,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives IF _State = UINT#0 THEN Busy := TRUE; _State := UINT#450; + THIS.CallTimers(FALSE); END_IF; IF _State = UINT#450 THEN IF _infoTimer.output THEN @@ -4762,11 +5281,13 @@ NAMESPACE AXOpen.Components.Rexroth.Drives record := _data4); IF NOT _WriteRecord.busy AND _WriteRecord.done AND NOT _WriteRecord.error THEN _State := UINT#451; + THIS.CallTimers(FALSE); ElSIF _WriteRecord.error THEN _WriteRecord(request := FALSE, record := _data4); Messenger.Activate( UINT#1621, eAxoMessageCategory#Error); MC_WriteRealParameterErrorID := WORD#1621; _State := UINT#459; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#451 THEN @@ -4778,6 +5299,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _WriteRecord(request := FALSE, record := _data4); IF NOT _WriteRecord.busy AND NOT _WriteRecord.done AND NOT _WriteRecord.error THEN _State := UINT#457; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#457 THEN @@ -4862,6 +5384,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives IF _State = UINT#0 THEN Busy := TRUE; _State := UINT#460; + THIS.CallTimers(FALSE); END_IF; IF _State = UINT#460 THEN IF _infoTimer.output THEN @@ -4878,11 +5401,13 @@ NAMESPACE AXOpen.Components.Rexroth.Drives record := _data2); IF NOT _WriteRecord.busy AND _WriteRecord.done AND NOT _WriteRecord.error THEN _State := UINT#461; + THIS.CallTimers(FALSE); ElSIF _WriteRecord.error THEN _WriteRecord(request := FALSE, record := _data2); Messenger.Activate( UINT#1631, eAxoMessageCategory#Error); MC_WriteBoolParameterErrorID := WORD#1631; _State := UINT#469; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#461 THEN @@ -4894,6 +5419,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _WriteRecord(request := FALSE, record := _data2); IF NOT _WriteRecord.busy AND _WriteRecord.done AND NOT _WriteRecord.error THEN _State := UINT#467; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#467 THEN @@ -4984,6 +5510,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives Busy := TRUE; MC_ReadDigitalInputErrorID := WORD#16#0000; _State := UINT#470; + THIS.CallTimers(FALSE); END_IF; IF _State = UINT#470 THEN IF _infoTimer.output THEN @@ -5004,12 +5531,14 @@ NAMESPACE AXOpen.Components.Rexroth.Drives MC_ReadDigitalInputValid := TRUE; MC_ReadDigitalInputValue := System.BitAccess.GetBit(_dword, TO_USINT(InputNumber)); _State := UINT#471; + THIS.CallTimers(FALSE); END_IF; IF _ReadRecord.error THEN _ReadRecord(request := FALSE, record := _data4); Messenger.Activate( UINT#1642, eAxoMessageCategory#Error); MC_ReadDigitalInputErrorID := WORD#1642; _State := UINT#479; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#471 THEN @@ -5021,6 +5550,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _ReadRecord(request := FALSE, record := _data4); IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN _State := UINT#470; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#479 THEN @@ -5103,6 +5633,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives Busy := TRUE; MC_ReadDigitalOutputErrorID := WORD#16#0000; _State := UINT#480; + THIS.CallTimers(FALSE); END_IF; IF _State = UINT#480 THEN IF _infoTimer.output THEN @@ -5123,12 +5654,14 @@ NAMESPACE AXOpen.Components.Rexroth.Drives MC_ReadDigitalOutputValid := TRUE; MC_ReadDigitalOutputValue := System.BitAccess.GetBit(_dword, TO_USINT(OutputNumber)); _State := UINT#481; + THIS.CallTimers(FALSE); END_IF; IF _ReadRecord.error THEN _ReadRecord(request := FALSE, record := _data4); Messenger.Activate( UINT#1652, eAxoMessageCategory#Error); MC_ReadDigitalOutputErrorID := WORD#1652; _State := UINT#489; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#481 THEN @@ -5140,6 +5673,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _ReadRecord(request := FALSE, record := _data4); IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN _State := UINT#480; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#489 THEN @@ -5226,6 +5760,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives IF _State = UINT#0 THEN Busy := TRUE; _State := UINT#490; + THIS.CallTimers(FALSE); END_IF; IF _State = UINT#490 THEN IF _infoTimer.output THEN @@ -5244,11 +5779,13 @@ NAMESPACE AXOpen.Components.Rexroth.Drives MC_WriteDigitalOutputParameterPV.%B2 := _data4[2]; MC_WriteDigitalOutputParameterPV.%B3 := _data4[3]; _State := UINT#491; + THIS.CallTimers(FALSE); END_IF; IF _ReadRecord.error THEN Messenger.Activate( UINT#1662, eAxoMessageCategory#Error); MC_WriteDigitalOutputErrorID := WORD#1662; _State := UINT#499; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#491 THEN @@ -5260,6 +5797,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives _ReadRecord(request := FALSE, record := _data8); IF NOT _ReadRecord.busy AND NOT _ReadRecord.valid AND NOT _ReadRecord.error THEN _State := UINT#492; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#492 THEN @@ -5270,6 +5808,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives Busy := TRUE; MC_WriteDigitalOutputParameterPV := System.BitAccess.SetBit(value := MC_WriteDigitalOutputParameterPV,bitValue := Value,index := TO_USINT(OutputNumber)); _State := UINT#493; + THIS.CallTimers(FALSE); END_IF; IF _State = UINT#493 THEN Busy := TRUE; @@ -5284,17 +5823,20 @@ NAMESPACE AXOpen.Components.Rexroth.Drives record := _data4); IF NOT _WriteRecord.busy AND _WriteRecord.done AND NOT _WriteRecord.error THEN _State := UINT#494; + THIS.CallTimers(FALSE); ElSIF _WriteRecord.error THEN _WriteRecord(request := FALSE, record := _data4); Messenger.Activate( UINT#1663, eAxoMessageCategory#Error); MC_WriteParameterErrorID := WORD#1663; _State := UINT#499; + THIS.CallTimers(FALSE); END_IF; END_IF; IF _State = UINT#494 THEN _WriteRecord(request := FALSE, record := _data4); IF NOT _WriteRecord.busy AND NOT _WriteRecord.done AND NOT _WriteRecord.error THEN _State := UINT#497; + THIS.CallTimers(FALSE); END_IF; END_IF; @@ -5338,7 +5880,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives /// This method returns the actual position. /// METHOD PUBLIC OVERRIDE MC_ReadActualPosition - VAR_INPUT + VAR_INPUT AxisRef : AXOpen.Components.Abstractions.Drives.IAxoAxisReference; Enable : BOOL; // Get the value of the parameter continuously while enabled END_VAR @@ -5640,54 +6182,6 @@ NAMESPACE AXOpen.Components.Rexroth.Drives MC_ReadAxisErrorCycle := _AxisReference^.Data.Cycle ; END_IF; - // IF Enable THEN - // THIS.UpdateInputs(_AxisReference^); - // IF _State = UINT#0 THEN - // Busy := TRUE; - // MC_ReadAxisErrorErrorID := WORD#16#0000; - // Parametrization.Inputs.Enable := FALSE; - // _State := UINT#310; - // END_IF; - // IF _State = UINT#310 THEN - // Busy := TRUE; - // Parametrization.Inputs.Enable := TRUE; - // Parametrization.Inputs.ReadWrite := FALSE; - // Parametrization.Inputs.ParameterNo := 12306; - // Parametrization.Inputs.Subindex := 0; - // Parametrization.Inputs.AxisNo := BYTE#1; - // Parametrization.Inputs.HardwareId := _AxisReference^.Data.hwIdModuleAccessPoint; - // IF Parametrization.Outputs.Done AND NOT Parametrization.Outputs.Error THEN - // MC_ReadAxisErrorValid := TRUE; - // MC_ReadAxisErrorValue := Parametrization.Outputs.ValueReadLINT; - // _State := UINT#311; - // END_IF; - // IF Parametrization.Outputs.Error THEN - // Messenger.Activate( UINT#1731, eAxoMessageCategory#ProgrammingError); - // MC_ReadAxisErrorErrorID := WORD#1731; - // _State := UINT#319; - // END_IF; - // END_IF; - // IF _State = UINT#311 THEN - // Busy := TRUE; - // Parametrization.Inputs.Enable := FALSE; - // Parametrization.Inputs.ReadWrite := FALSE; - // IF NOT Parametrization.Outputs.Done THEN - // _State := UINT#310; - // END_IF; - // END_IF; - // IF _State = UINT#319 THEN - // Error := TRUE; - // END_IF; - - // IF _State>=UINT#310 AND _State MC_ReadAxisErrorCycle THEN - // _AxisReference^.Data.Cycle := _AxisReference^.Data.Cycle - ULINT#1; - // _State := UINT#319; - // END_IF; - // END_IF; - // THIS.UpdateOutputs(_AxisReference^); - // END_IF; - IF NOT Enable AND MC_ReadAxisErrorEnable_PV THEN _AxisReference^.Status.CurrentMotionTaskId := AXOpen.Components.Drives.eAxoMotionTaskId#Axo_None; MC_ReadAxisErrorErrorID := WORD#0; @@ -5702,7 +6196,6 @@ NAMESPACE AXOpen.Components.Rexroth.Drives MC_ReadAxisErrorEnable_PV := Enable; Messenger.ActivateOnCondition(LastMessageCode,Enable AND Valid AND LastMessageCode = TO_ULINT(MC_ReadAxisErrorValue), eAxoMessageCategory#Error); - // IF NOT Messenger.IsActive THEN IF Messenger.MessengerState = eAxoMessengerState#Idle THEN LastMessageCode := TO_ULINT(MC_ReadAxisErrorValue); END_IF; @@ -5771,7 +6264,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives Busy := TRUE; Error := FALSE; ErrorID := UINT#0; - _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AcceptanceOfPositioningCommandValue := FALSE; + // _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AcceptanceOfPositioningCommandValue := FALSE; _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.HomingControl := FALSE; _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.AbsoluteRelative := FALSE; _AxisReference^.Outputs.SignalControlWord_S_0_0145_0_0.ImmediateChange := TRUE; @@ -5949,6 +6442,7 @@ NAMESPACE AXOpen.Components.Rexroth.Drives TaskMessenger.Restore(); //AxoPower_Task.Restore(); + RebootTask.Restore(); AxoStop_Task.Restore(); AxoHalt_Task.Restore(); AxoHome_Task.Restore(); diff --git a/src/components.rexroth.drives/ctrl/src/AxoCtrlxDriveXsc/TypesStructuresAndEnums/AxoCtrlxDriveXscSignalControlWord_S_0_0145_0_0.st b/src/components.rexroth.drives/ctrl/src/AxoCtrlxDriveXsc/TypesStructuresAndEnums/AxoCtrlxDriveXscSignalControlWord_S_0_0145_0_0.st index 896701acb..3fe81376e 100644 --- a/src/components.rexroth.drives/ctrl/src/AxoCtrlxDriveXsc/TypesStructuresAndEnums/AxoCtrlxDriveXscSignalControlWord_S_0_0145_0_0.st +++ b/src/components.rexroth.drives/ctrl/src/AxoCtrlxDriveXsc/TypesStructuresAndEnums/AxoCtrlxDriveXscSignalControlWord_S_0_0145_0_0.st @@ -27,8 +27,8 @@ NAMESPACE AXOpen.Components.Rexroth.Drives SwitchTo0M : BOOL; // Bit 0 of the Subdevice STM: C0200 Activate operation mode (S-0-0422) !!! must be set in drive !!! {#ix-set:AttributeName = "<#CancelReferencePoint#>"} CancelReferencePoint : BOOL; // Homing function: C1500 Command cancel reference point (0x2500:01 / S-0-0191 / --) !!! must be set in drive !!! - {#ix-set:AttributeName = "<#_bit11_Reserve#>"} - _bit11_Reserve : BOOL; + {#ix-set:AttributeName = "<#Device reboot#>"} + DeviceReboot : BOOL; {#ix-set:AttributeName = "<#_bit12_Reserve#>"} _bit12_Reserve : BOOL; {#ix-set:AttributeName = "<#_bit13_Reserve#>"} diff --git a/src/components.rexroth.drives/docs/AxoCtrlxDriveXsc.md b/src/components.rexroth.drives/docs/AxoCtrlxDriveXsc.md index d4739c8f4..8605d3bd5 100644 --- a/src/components.rexroth.drives/docs/AxoCtrlxDriveXsc.md +++ b/src/components.rexroth.drives/docs/AxoCtrlxDriveXsc.md @@ -39,7 +39,7 @@ View the .NET twin source at [`AXOpen.Components.Rexroth.Drives`](https://github # [BLAZOR](#tab/blazor) -`AxoCtrlxDriveXsc` does not ship a dedicated Blazor view. It renders via the generic `AxoComponent` pattern using `RenderableContentControl`, which inspects the component type at runtime and selects the matching rendering based on the `Presentation` attribute. +`AxoCtrlxDriveXsc` ships a dedicated Blazor view, `AxoCtrlxDriveXscView`, with `Status`, `Command`, and `Spot` derivatives. `RenderableContentControl` automatically resolves and renders this dedicated view at runtime based on the selected `Presentation`, so the markup below renders the dedicated view without importing it explicitly. ## Status display @@ -61,7 +61,7 @@ Available `Presentation` values: `Status-Display`, `Command-Control`, `Service-C ## Source -View the Blazor package at [`AXOpen.Components.Rexroth.Drives.blazor`](https://github.com/Inxton/AXOpen/tree/3-unify-showcase/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/). +View the dedicated view at [`AxoCtrlxDriveXscView.razor`](https://github.com/Inxton/AXOpen/tree/3-unify-showcase/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/AxoCtrlxDriveXsc/AxoCtrlxDriveXscView.razor), or the whole Blazor package at [`AXOpen.Components.Rexroth.Drives.blazor`](https://github.com/Inxton/AXOpen/tree/3-unify-showcase/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/). # [HARDWARE](#tab/hardware) @@ -77,4 +77,66 @@ PROFINET hardware template at `showcase/app/hwc/library_templates/rexroth_ctrlx_ [!code-yaml[](../../showcase/app/hwc/plc_line.hwl.yml?name=RexrothCtrlxDriveIoSystem)] +## Drive commissioning (ctrlX DRIVE Engineering) + +Before the controller can exchange cyclic process data with `AxoCtrlxDriveXsc`, +the drive must be parameterized in the **ctrlX DRIVE Engineering** commissioning +tool. The cyclic Consumer/Producer telegram and the signal control/status words +configured here must match the layout the component expects on its +`AxisRefExt` inputs and outputs. Perform the steps in order. + +### 1. Master communication — PROFINET + FSP Drive profile + +Under **Master communication → Master communication settings**, set the +protocol to **PROFINET®** and the application profile to **FSP Drive profile**. +Confirm the master communication is active (e.g. `AR established`) and note the +assigned PROFINET device name, which must match the device entry in +`plc_line.hwl.yml`. + +![Master communication settings — PROFINET and FSP Drive profile](pics/rexroth_ctrlx_drive/001_FSP_DRIVE_PROFILE.png) + +### 2. Consumer — cyclic setpoint data (controller → drive) + +Configure the **Consumer** telegram (Slot 0) with the cyclic data the drive +receives from the controller: the servodrive-profile control word and the +drive-controlled-positioning command values (target position, velocity, +acceleration profile). This is the process data the component writes through +`AxisRefExt.Outputs`. + +![Consumer cyclic data configuration](pics/rexroth_ctrlx_drive/002_CONSUMER.png) + +### 3. Producer — cyclic actual/status data (drive → controller) + +Configure the **Producer** telegram (Slot 1) with the cyclic data the drive +sends back: the servodrive-profile status word, position feedback, torque/force +actual value, velocity, and the diagnostic message. This is the process data +the component reads through `AxisRefExt.Inputs` / `AxisRefExt.Status`. + +![Producer cyclic data configuration](pics/rexroth_ctrlx_drive/003_PRODUCER.png) + +### 4. Signal control word + +Map the **Signal control word** bits to the drive parameters the component +drives (control word and field-bus control bits). The bit assignments must +match the order the component expects in its outgoing control word. + +![Signal control word bit mapping](pics/rexroth_ctrlx_drive/004_SignalControlWord.png) + +### 5. Signal status word + +Map the **Signal status word** bits to the source parameters reported back +(status word, position-feedback status, field-bus status, actual values). The +component decodes these bits to derive its `eAxoDriveState`. + +![Signal status word bit mapping](pics/rexroth_ctrlx_drive/005_SignalStatusWord.png) + +### 6. Operation mode selection + +Under **Operation modes / Drive Halt → Operation mode selection**, set the +**primary operation mode** to **Drive-controlled positioning** and the +secondary operation modes (e.g. **Torque/force control**, **Velocity control**) +to match the motion tasks you intend to use from `AxoCtrlxDriveXsc`. + +![Operation mode selection](pics/rexroth_ctrlx_drive/006_OperationMode.png) + --- diff --git a/src/components.rexroth.drives/docs/AxoIndraDrive.md b/src/components.rexroth.drives/docs/AxoIndraDrive.md index 1355e069e..445e006ff 100644 --- a/src/components.rexroth.drives/docs/AxoIndraDrive.md +++ b/src/components.rexroth.drives/docs/AxoIndraDrive.md @@ -39,7 +39,7 @@ View the .NET twin source at [`AXOpen.Components.Rexroth.Drives`](https://github # [BLAZOR](#tab/blazor) -`AxoIndraDrive` does not ship a dedicated Blazor view. It renders via the generic `AxoComponent` pattern using `RenderableContentControl`, which inspects the component type at runtime and selects the matching rendering based on the `Presentation` attribute. +`AxoIndraDrive` ships a dedicated Blazor view, `AxoIndraDriveView`, with `Status`, `Command`, and `Spot` derivatives. `RenderableContentControl` automatically resolves and renders this dedicated view at runtime based on the selected `Presentation`, so the markup below renders the dedicated view without importing it explicitly. ## Status display @@ -61,7 +61,7 @@ Available `Presentation` values: `Status-Display`, `Command-Control`, `Service-C ## Source -View the Blazor package at [`AXOpen.Components.Rexroth.Drives.blazor`](https://github.com/Inxton/AXOpen/tree/3-unify-showcase/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/). +View the dedicated view at [`AxoIndraDriveView.razor`](https://github.com/Inxton/AXOpen/tree/3-unify-showcase/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/AxoIndraDrive/AxoIndraDriveView.razor), or the whole Blazor package at [`AXOpen.Components.Rexroth.Drives.blazor`](https://github.com/Inxton/AXOpen/tree/3-unify-showcase/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/). # [HARDWARE](#tab/hardware) diff --git a/src/components.rexroth.drives/docs/CHANGELOG.md b/src/components.rexroth.drives/docs/CHANGELOG.md index dd4d8d686..2cd668be9 100644 --- a/src/components.rexroth.drives/docs/CHANGELOG.md +++ b/src/components.rexroth.drives/docs/CHANGELOG.md @@ -23,6 +23,26 @@ on every run. --> +### 0.56.4 + +**New features:** +- Added dedicated Blazor views `AxoCtrlxDriveXscView` and `AxoIndraDriveView` (with `Status`, `Command`, and `Spot` derivatives) for the Rexroth drive components. + +**Bug fixes:** +- `AxoCtrlxDriveXsc`: reworked torque and velocity scaling calculations, switched torque/velocity parameters to degrees and adjusted scaling values, and fixed torque scaling for linear actuators. +- `AxoCtrlxDriveXsc`: retrigger scaling-parameter reading when leaving operation mode so scaling stays consistent. +- `AxoCtrlxDriveXsc`: added message-timer resets so diagnostic messages clear correctly. + +**Other:** +- `AxoCtrlxDriveXsc`: filter the `C00E2054` ("NOT HOMED") diagnostic message while homing is in progress. +- `AxoCtrlxDriveXsc`: added a debug message for the unknown error code `F4035`. +- `AxoCtrlxDriveXsc`: removed the homing (`AxoHome`) task timeout. +- Added ctrlX DRIVE servo-drive communication-configuration reference images under `ctrl/assets/rexroth_ctrlx_drive/servodrive_communication_config/`. +- Added a step-by-step "Drive commissioning (ctrlX DRIVE Engineering)" section to `AxoCtrlxDriveXsc.md` (PROFINET/FSP profile, Consumer/Producer telegrams, signal control/status word mapping, operation-mode selection) with screenshots under `docs/pics/rexroth_ctrlx_drive/`. +- Corrected the BLAZOR tab of `AxoCtrlxDriveXsc` and `AxoIndraDrive` docs to reflect the dedicated Blazor views (`AxoCtrlxDriveXscView`, `AxoIndraDriveView`) now resolved by `RenderableContentControl`, with source links. +- Enriched `README.md` with a Components table (ctrlX DRIVE XSC + IndraDrive), a Dependencies table, and the Bosch Rexroth vendor link. +- Populated `TROUBLES.md` with drive-specific common issues, the `eAxoDriveState` error states and `Errorstop` recovery, diagnostics, and known limitations. + ### 0.43.0 **Other:** diff --git a/src/components.rexroth.drives/docs/README.md b/src/components.rexroth.drives/docs/README.md index a8c9de5fb..731d80b9e 100644 --- a/src/components.rexroth.drives/docs/README.md +++ b/src/components.rexroth.drives/docs/README.md @@ -2,9 +2,27 @@ The **components.rexroth.drives** is a set of libraries covering the product portfolio of motion systems from the vendor [Rexroth](https://www.boschrexroth.com/en/dc/) for the target PLC platform [Siemens AX](https://www.siemens.com/global/en/products/automation/industry-software/automation-software/simatic-ax.html) and [AxOpen](https://github.com/inxton/AXOpen?tab=readme-ov-file) framework. -The package consists of a PLC library providing control logic and its .NET twin counterpart aimed at the visualization part. This package currently covers the IndraDrive drives family. +The package consists of a PLC library providing control logic and its .NET twin counterpart aimed at the visualization part. This package currently covers the IndraDrive and ctrlX DRIVE families. + +### Components + +| Component | Description | +|-----------|-------------| +| `AxoCtrlxDriveXsc` | Rexroth ctrlX DRIVE XSC servo drive. Extends `AxoDrive` with ctrlX-specific axis reference (`AxisRefExt`) and scaling constants. | +| `AxoIndraDrive` | Rexroth IndraDrive servo drive. Extends `AxoDrive` with IndraDrive fieldbus/parameter axis reference (`AxisRef`). | + +Both components derive from `AXOpen.Components.Drives.AxoDrive` and follow the PLCopen-style motion state machine (`eAxoDriveState`). + +### Dependencies + +| Package | Purpose | +|---------|---------| +| `@inxton/axopen.components.drives` | Provides the `AxoDrive` base component and the shared `eAxoDriveState` motion state machine. | +| `@ax/simatic-1500-distributedio` | SIMATIC S7-1500 distributed I/O support for PROFINET device communication. | ### Links to documentation [Siemens AX-documentation](https://developer.siemens.com/simatic-ax/developer.html) [AxOpen-documentation](https://inxton.github.io/AXOpen/) + +[Bosch Rexroth documentation](https://www.boschrexroth.com/en/dc/) diff --git a/src/components.rexroth.drives/docs/TROUBLES.md b/src/components.rexroth.drives/docs/TROUBLES.md index 5cdc2ba7d..478ef17ac 100644 --- a/src/components.rexroth.drives/docs/TROUBLES.md +++ b/src/components.rexroth.drives/docs/TROUBLES.md @@ -1,5 +1,159 @@ # Troubleshooting -Unfortunately, we don't have a direct solution to your problem at the moment. If you encounter any issues, please [file a report on our GitHub](https://github.com/inxton/AXOpen/issues/new/choose). We appreciate your feedback and patience. +This guide covers the most common issues encountered when integrating the +`AxoCtrlxDriveXsc` and `AxoIndraDrive` components, the drive state machine, +and the diagnostics surface exposed by both components. + +--- + +## Common Issues + +### The drive values never update / the view stays blank + +**What you observe**: `DriveState`, `ActualPosition`, `ActualVelocity` and +`ActualTorque` never change, motion tasks never complete. + +**Why it happens**: the component advances its internal logic and its task +state machines only while its `Run(...)` method is being called cyclically. +If `Run(...)` stops being called, every value and task freezes in place. + +**What to check**: ensure the component's `Run(...)` method is called on every +cycle from within the call tree of your `AxoContext.Main()` method. It does +**not** have to be called directly in `Main()` — calling it from any object, +station, or method reachable through the `Main()` call chain is sufficient, as +long as the call executes on every scan. + +### A motion task only works once, then does nothing + +**What you observe**: the first invocation of a motion/parameter task succeeds, +but invoking it again has no effect or immediately reports the previous result. + +**Why it happens**: tasks (`AxoTask`) latch their result. A completed task must +be restored before it can run again. + +**What to check**: call `Restore()` on the task (the Blazor task views expose a +Restore button for this) before re-invoking it, and keep calling `Run(...)` +while the task executes. Only one motion task is serviced at a time — do not +expect two motion commands to run concurrently. + +### The drive will not leave `Disabled` / will not enable + +**What you observe**: `DriveState` stays at `Disabled` and motion commands are +ignored. + +**Why it happens**: the drive must be powered/enabled before it transitions to +`Standstill` and accepts motion. A pending error also blocks enabling. + +**What to check**: use the Power/enable task in the Operate panel, confirm the +drive is not in `Errorstop` (see Error States below), and verify the I/O +mapping so the component actually exchanges process data with the physical +drive. + +### Manual control panel is missing in the UI + +**What you observe**: the Blazor view shows the read-only Monitor/STATE panel +instead of the interactive Operate/CONFIGURATION panel. + +**Why it happens**: the container view branches on +`_isManuallyControllable.Cyclic`. When it is `false`, only the monitor and +state views are shown. + +**What to check**: activate manual control on the component so +`_isManuallyControllable` becomes `true`; the Operate commands and +CONFIGURATION panel then render. + +--- + +## Hardware vs. Configuration vs. Application + +Both `AxoCtrlxDriveXsc` and `AxoIndraDrive` control physical PROFINET devices. +When data exchange fails, isolate the layer before changing code: + +- **Communication issues** — device unreachable, link down, watchdog timeout. + Check the physical connection, the device IP address, and the PROFINET device + name. The drive will not reach `Standstill` if process data is not exchanged. +- **Configuration issues** — GSDML/template mismatch, wrong slot or module + assignment, parameter error. Check the device entry in + `showcase/app/hwc/plc_line.hwl.yml` and the device template under + `ctrl/assets/` (`rexroth_ctrlx_drive` / `rexroth_indradrive`). +- **Application issues** — wrong `hwID`, missing or swapped I/O references, + incorrect `Run(...)` arguments. Check the ST wiring that passes the hardware + identifier and the axis reference (`AxisRefExt` for ctrlX, + `AxisRef` for IndraDrive) into the component. + +--- + +## Error States + +Both components expose their motion state through `DriveState`, typed as +`eAxoDriveState` (defined in `AXOpen.Components.Drives`). The states follow the +PLCopen motion state model: + +| State | Meaning | +|-------|---------| +| `Disabled` | Drive is not powered/enabled. No motion is possible. | +| `Standstill` | Drive is enabled and holding position, ready to accept a motion command. | +| `Homing` | A homing/reference task is in progress. | +| `Stopping` | A stop has been commanded; the drive is decelerating to standstill. | +| `DiscreteMotion` | A point-to-point move (absolute/relative/additive) is active. | +| `ContinuousMotion` | A velocity move is active. | +| `SynchronizedMotion` | A synchronized/coordinated move is active. | +| `Errorstop` | The drive has faulted and stopped. **This is the error state.** | + +### Recovering from `Errorstop` + +**Possible causes**: drive-side fault (over-current, following error, limit +switch, communication loss), an invalid motion target, or a hardware/safety +condition reported by the physical drive. + +**Resolution**: +1. Read `DriveState` to confirm `Errorstop`, and inspect the component's alarm + messenger (`_Messenger`, surfaced as the alarm badge/panel in the Blazor + view) for the specific fault text. +2. Clear the originating condition (acknowledge the drive fault, remove the + limit/safety condition, correct an out-of-range target). +3. Invoke the reset task to clear the error, then re-enable the drive. On + success the drive returns to `Standstill`. +4. If the drive immediately re-enters `Errorstop`, the underlying hardware fault + is still present — diagnose at the physical drive before retrying. + +--- + +## Diagnostics + +Read these members to understand the component's runtime state (all are exposed +read-only in the STATE / Monitor panel of the Blazor view): + +| Member | Meaning | +|--------|---------| +| `DriveState` | Current `eAxoDriveState` motion state (see table above). | +| `ActualPosition` | Live position feedback. | +| `ActualVelocity` | Live velocity feedback. | +| `ActualTorque` | Live torque feedback. | +| `DriveStatus` | Aggregated status readout of the drive. | +| `DriveConfig` | Active configuration parameters (writable in the CONFIGURATION panel). | +| `_Messenger` | Alarm/message source; populated faults appear in the header alarm badge. | + +For `AxoCtrlxDriveXsc`, additionally inspect the `AxisRefExt` +(Inputs/Outputs/Status) and the scaling constants. For `AxoIndraDrive`, inspect +`AxisRef` (FieldBus_In/FieldBus_Out, Parameter_In/Parameter_Out, Status, Data). + +--- + +## Known Limitations + +- A component services a single active motion task at a time; motion commands + are not executed concurrently. +- The component reflects the capabilities reported by the physical drive over + PROFINET — features not supported by the connected drive firmware cannot be + exercised from the component. + +--- + +## Support + +If you encounter an issue not covered here, please +[file a report on our GitHub](https://github.com/inxton/AXOpen/issues/new/choose). +We appreciate your feedback and patience. --- diff --git a/src/components.rexroth.drives/docs/pics/rexroth_ctrlx_drive/001_FSP_DRIVE_PROFILE.png b/src/components.rexroth.drives/docs/pics/rexroth_ctrlx_drive/001_FSP_DRIVE_PROFILE.png new file mode 100644 index 000000000..9f603be9c Binary files /dev/null and b/src/components.rexroth.drives/docs/pics/rexroth_ctrlx_drive/001_FSP_DRIVE_PROFILE.png differ diff --git a/src/components.rexroth.drives/docs/pics/rexroth_ctrlx_drive/002_CONSUMER.png b/src/components.rexroth.drives/docs/pics/rexroth_ctrlx_drive/002_CONSUMER.png new file mode 100644 index 000000000..f0a164889 Binary files /dev/null and b/src/components.rexroth.drives/docs/pics/rexroth_ctrlx_drive/002_CONSUMER.png differ diff --git a/src/components.rexroth.drives/docs/pics/rexroth_ctrlx_drive/003_PRODUCER.png b/src/components.rexroth.drives/docs/pics/rexroth_ctrlx_drive/003_PRODUCER.png new file mode 100644 index 000000000..0bd2062c2 Binary files /dev/null and b/src/components.rexroth.drives/docs/pics/rexroth_ctrlx_drive/003_PRODUCER.png differ diff --git a/src/components.rexroth.drives/docs/pics/rexroth_ctrlx_drive/004_SignalControlWord.png b/src/components.rexroth.drives/docs/pics/rexroth_ctrlx_drive/004_SignalControlWord.png new file mode 100644 index 000000000..02a3aab4a Binary files /dev/null and b/src/components.rexroth.drives/docs/pics/rexroth_ctrlx_drive/004_SignalControlWord.png differ diff --git a/src/components.rexroth.drives/docs/pics/rexroth_ctrlx_drive/005_SignalStatusWord.png b/src/components.rexroth.drives/docs/pics/rexroth_ctrlx_drive/005_SignalStatusWord.png new file mode 100644 index 000000000..2a984dab8 Binary files /dev/null and b/src/components.rexroth.drives/docs/pics/rexroth_ctrlx_drive/005_SignalStatusWord.png differ diff --git a/src/components.rexroth.drives/docs/pics/rexroth_ctrlx_drive/006_OperationMode.png b/src/components.rexroth.drives/docs/pics/rexroth_ctrlx_drive/006_OperationMode.png new file mode 100644 index 000000000..6cb5a2d95 Binary files /dev/null and b/src/components.rexroth.drives/docs/pics/rexroth_ctrlx_drive/006_OperationMode.png differ diff --git a/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/AxoCtrlxDriveXsc/AxoCtrlxDriveXscView.razor b/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/AxoCtrlxDriveXsc/AxoCtrlxDriveXscView.razor new file mode 100644 index 000000000..24f20f7e9 --- /dev/null +++ b/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/AxoCtrlxDriveXsc/AxoCtrlxDriveXscView.razor @@ -0,0 +1,506 @@ +@namespace AXOpen.Components.Rexroth.Drives +@using AXOpen.Core +@using AXOpen.Core.Blazor +@using AXOpen.Components.Drives +@using Operon.Components.Tab +@inherits AxoComponentViewBase + +@* Bosch Rexroth ctrlX DRIVE (XCS) — proxy view. Mirrors the AxoDrive base *@ +@* command surface (same as the Festo AxoCmmtAs exemplar). ctrlX-specific *@ +@* state/diagnostic members are used in the header, state and spot slots. *@ + + + +
+ @DriveStateLabel +
+ Position + @FormattedPosition +
+
+ Velocity + @FormattedVelocity +
+
+ Torque + @FormattedTorque +
+
+
+ + +
+ + +
+
+ + + + + +
+
+ + + + + + +
+
+
+ + +
+ +
+ + + + + +
+
+
+ + +
+ +
+ + +
+
+
+ + +
+ +
+ + + +
+
+
+ + +
+ +
+ + + + + +
+
+
+ + +
+ +
+ + + + +
+
+
+ + +
+ +
+ + + +
+
+
+ + +
+ +
+ + + + +
+
+
+ + +
+ +
+ + + + + + +
+
+
+ + +
+
+ + + + + + +
+
+ + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + + +
+
+ + + + + + + + + +
+
+
+ + +
+
+ + + + + + +
+
+ + + + +
+
+
+
+
+
+ + +
+ + +
+
+ + + + + +
+
+ + + + + + +
+
+
+ + +
+ +
+ + + + + +
+
+
+ + +
+ +
+ + +
+
+
+ + +
+ +
+ + + +
+
+
+ + +
+ +
+ + + + + +
+
+
+ + +
+ +
+ + + + +
+
+
+ + +
+ +
+ + + +
+
+
+ + +
+ +
+ + + + +
+
+
+ + +
+ +
+ + + + + + +
+
+
+ + +
+
+ + + + + + +
+
+ + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + + +
+
+ + + + + + + + + +
+
+
+ + +
+
+ + + + + + +
+
+ + + + +
+
+
+
+
+
+ + +
+
+
+
Drive configuration
+

Watchdog / messaging timings applied before the drive runs.

+
+
+ +
+
+
+
+ + +
+
+
+
Drive feedback
+

Component status, messengers and hardware diagnostics.

+
+
+ + + + +
+
+ +
+
+
Scaling constants
+

Required vs. actual scaling factors per motion quantity.

+
+
+ + + + + + + + + + + + +
+
+ +
+
+
Axis reference (XCS)
+

ctrlX servodrive process image and hardware identifiers.

+
+
+ + + + + +
+
+
+
+ + +
+
+ @DriveStateLabel +
+
+

Position

+ @FormattedPosition +
+
+

Velocity

+ @FormattedVelocity +
+
+

Torque

+ @FormattedTorque +
+
+
+
diff --git a/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/AxoCtrlxDriveXsc/AxoCtrlxDriveXscView.razor.cs b/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/AxoCtrlxDriveXsc/AxoCtrlxDriveXscView.razor.cs new file mode 100644 index 000000000..bca0a8b57 --- /dev/null +++ b/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/AxoCtrlxDriveXsc/AxoCtrlxDriveXscView.razor.cs @@ -0,0 +1,93 @@ +using AXOpen.Components.Abstractions.Drives; +using AXOpen.Components.Drives; +using AXOpen.Core.Blazor; +using AXSharp.Connector.ValueTypes; +using System; +using System.Globalization; + +namespace AXOpen.Components.Rexroth.Drives +{ + public partial class AxoCtrlxDriveXscView : AxoComponentViewBase + { + private static readonly string UnknownValue = "--"; + + private eAxoDriveState? CurrentDriveState => Component is null + ? null + : (eAxoDriveState)Component.DriveState.Cyclic; + + public string DriveStateLabel => CurrentDriveState?.ToString() ?? "Unknown"; + + public string DriveStateBadgeClass => CurrentDriveState switch + { + eAxoDriveState.Disabled => "badge-secondary", + eAxoDriveState.Stopping => "badge-warning", + eAxoDriveState.Homing => "badge-warning", + eAxoDriveState.DiscreteMotion => "badge-primary", + eAxoDriveState.ContinuousMotion => "badge-info", + eAxoDriveState.Errorstop => "badge-danger", + eAxoDriveState.Standstill => "badge-success", + _ => "badge-secondary" + }; + + public string FormattedPosition => FormatValue(Component?.ActualPosition); + + public string FormattedVelocity => FormatValue(Component?.ActualVelocity); + + public string FormattedTorque => FormatValue(Component?.ActualTorque, "Nm"); + + private static string FormatValue(OnlinerLReal? value, string unit = "") + { + if (value is null) + { + return UnknownValue; + } + + var numeric = value.Cyclic; + if (!double.IsFinite(numeric)) + { + return UnknownValue; + } + + return string.IsNullOrEmpty(unit) + ? FormattableString.Invariant($"{numeric:0.###}") + : FormattableString.Invariant($"{numeric:0.###} {unit}"); + } + + public override void ConfigurePolling() + { + if (Component is null) + { + return; + } + + this.StartPolling(Component.DriveState, 250); + this.StartPolling(Component.ActualPosition, 250); + this.StartPolling(Component.ActualVelocity, 250); + this.StartPolling(Component.ActualTorque, 250); + } + } + + public class AxoCtrlxDriveXscStatusView : AxoCtrlxDriveXscView + { + public AxoCtrlxDriveXscStatusView() + { + this.ViewType = eViewType.Status; + } + } + + public class AxoCtrlxDriveXscCommandView : AxoCtrlxDriveXscView + { + public AxoCtrlxDriveXscCommandView() + { + this.ViewType = eViewType.Command; + } + } + + public class AxoCtrlxDriveXscSpotView : AxoCtrlxDriveXscView + { + public AxoCtrlxDriveXscSpotView() + { + this.ViewType = eViewType.Spot; + } + } +} diff --git a/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/AxoCtrlxDriveXsc/AxoCtrlxDriveXscView.razor.css b/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/AxoCtrlxDriveXsc/AxoCtrlxDriveXscView.razor.css new file mode 100644 index 000000000..b344eb0b8 --- /dev/null +++ b/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/AxoCtrlxDriveXsc/AxoCtrlxDriveXscView.razor.css @@ -0,0 +1,37 @@ +.drive-spot { + width: 100%; + border-radius: 0.85rem; + border: 1px solid rgba(148, 163, 184, 0.35); + padding: 0.85rem 1rem; + background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(16, 185, 129, 0.15)); + display: flex; + flex-direction: column; + gap: 0.4rem; +} + +.drive-spot__state { + display: flex; + justify-content: space-between; + font-size: 0.75rem; + text-transform: uppercase; + letter-spacing: 0.08em; + color: rgba(248, 250, 252, 0.85); +} + +.drive-spot__metric { + display: flex; + flex-direction: column; + gap: 0.1rem; +} + +.drive-spot__metric p { + margin: 0; + font-size: 0.7rem; + text-transform: uppercase; + color: rgba(226, 232, 240, 0.85); +} + +.drive-spot__metric strong { + font-size: 1rem; + color: rgba(248, 250, 252, 0.95); +} diff --git a/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/AxoIndraDrive/AxoIndraDriveView.razor b/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/AxoIndraDrive/AxoIndraDriveView.razor new file mode 100644 index 000000000..24de07c6a --- /dev/null +++ b/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/AxoIndraDrive/AxoIndraDriveView.razor @@ -0,0 +1,486 @@ +@namespace AXOpen.Components.Rexroth.Drives +@using AXOpen.Core +@using AXOpen.Core.Blazor +@using AXOpen.Components.Drives +@using Operon.Components.Tab +@inherits AxoComponentViewBase + +@* Bosch Rexroth IndraDrive — proxy view. Mirrors the AxoDrive base command *@ +@* surface (same as the Festo AxoCmmtAs exemplar). IndraDrive-specific state *@ +@* members (AxisRef fieldbus/parameter image) appear in the state slot. *@ + + + +
+ @DriveStateLabel +
+ Position + @FormattedPosition +
+
+ Velocity + @FormattedVelocity +
+
+ Torque + @FormattedTorque +
+
+
+ + +
+ + +
+
+ + + + + +
+
+ + + + + + +
+
+
+ + +
+ +
+ + + + + +
+
+
+ + +
+ +
+ + +
+
+
+ + +
+ +
+ + + +
+
+
+ + +
+ +
+ + + + + +
+
+
+ + +
+ +
+ + + + +
+
+
+ + +
+ +
+ + + +
+
+
+ + +
+ +
+ + + + +
+
+
+ + +
+ +
+ + + + + + +
+
+
+ + +
+
+ + + + + + +
+
+ + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + + +
+
+ + + + + + + + + +
+
+
+ + +
+
+ + + + + + +
+
+ + + + +
+
+
+
+
+
+ + +
+ + +
+
+ + + + + +
+
+ + + + + + +
+
+
+ + +
+ +
+ + + + + +
+
+
+ + +
+ +
+ + +
+
+
+ + +
+ +
+ + + +
+
+
+ + +
+ +
+ + + + + +
+
+
+ + +
+ +
+ + + + +
+
+
+ + +
+ +
+ + + +
+
+
+ + +
+ +
+ + + + +
+
+
+ + +
+ +
+ + + + + + +
+
+
+ + +
+
+ + + + + + +
+
+ + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + + +
+
+ + + + + + + + + +
+
+
+ + +
+
+ + + + + + +
+
+ + + + +
+
+
+
+
+
+ + +
+
+
+
Drive configuration
+

Watchdog / messaging timings applied before the drive runs.

+
+
+ +
+
+
+
+ + +
+
+
+
Drive feedback
+

Component status, messengers and hardware diagnostics.

+
+
+ + + + +
+
+ +
+
+
Axis reference (fieldbus)
+

IndraDrive PROFINET process image and parameter channel.

+
+
+ + + + + + +
+
+
+
+ + +
+
+ @DriveStateLabel +
+
+

Position

+ @FormattedPosition +
+
+

Velocity

+ @FormattedVelocity +
+
+

Torque

+ @FormattedTorque +
+
+
+
diff --git a/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/AxoIndraDrive/AxoIndraDriveView.razor.cs b/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/AxoIndraDrive/AxoIndraDriveView.razor.cs new file mode 100644 index 000000000..87bc896f9 --- /dev/null +++ b/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/AxoIndraDrive/AxoIndraDriveView.razor.cs @@ -0,0 +1,93 @@ +using AXOpen.Components.Abstractions.Drives; +using AXOpen.Components.Drives; +using AXOpen.Core.Blazor; +using AXSharp.Connector.ValueTypes; +using System; +using System.Globalization; + +namespace AXOpen.Components.Rexroth.Drives +{ + public partial class AxoIndraDriveView : AxoComponentViewBase + { + private static readonly string UnknownValue = "--"; + + private eAxoDriveState? CurrentDriveState => Component is null + ? null + : (eAxoDriveState)Component.DriveState.Cyclic; + + public string DriveStateLabel => CurrentDriveState?.ToString() ?? "Unknown"; + + public string DriveStateBadgeClass => CurrentDriveState switch + { + eAxoDriveState.Disabled => "badge-secondary", + eAxoDriveState.Stopping => "badge-warning", + eAxoDriveState.Homing => "badge-warning", + eAxoDriveState.DiscreteMotion => "badge-primary", + eAxoDriveState.ContinuousMotion => "badge-info", + eAxoDriveState.Errorstop => "badge-danger", + eAxoDriveState.Standstill => "badge-success", + _ => "badge-secondary" + }; + + public string FormattedPosition => FormatValue(Component?.ActualPosition); + + public string FormattedVelocity => FormatValue(Component?.ActualVelocity); + + public string FormattedTorque => FormatValue(Component?.ActualTorque, "Nm"); + + private static string FormatValue(OnlinerLReal? value, string unit = "") + { + if (value is null) + { + return UnknownValue; + } + + var numeric = value.Cyclic; + if (!double.IsFinite(numeric)) + { + return UnknownValue; + } + + return string.IsNullOrEmpty(unit) + ? FormattableString.Invariant($"{numeric:0.###}") + : FormattableString.Invariant($"{numeric:0.###} {unit}"); + } + + public override void ConfigurePolling() + { + if (Component is null) + { + return; + } + + this.StartPolling(Component.DriveState, 250); + this.StartPolling(Component.ActualPosition, 250); + this.StartPolling(Component.ActualVelocity, 250); + this.StartPolling(Component.ActualTorque, 250); + } + } + + public class AxoIndraDriveStatusView : AxoIndraDriveView + { + public AxoIndraDriveStatusView() + { + this.ViewType = eViewType.Status; + } + } + + public class AxoIndraDriveCommandView : AxoIndraDriveView + { + public AxoIndraDriveCommandView() + { + this.ViewType = eViewType.Command; + } + } + + public class AxoIndraDriveSpotView : AxoIndraDriveView + { + public AxoIndraDriveSpotView() + { + this.ViewType = eViewType.Spot; + } + } +} diff --git a/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/AxoIndraDrive/AxoIndraDriveView.razor.css b/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/AxoIndraDrive/AxoIndraDriveView.razor.css new file mode 100644 index 000000000..b344eb0b8 --- /dev/null +++ b/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives.blazor/AxoIndraDrive/AxoIndraDriveView.razor.css @@ -0,0 +1,37 @@ +.drive-spot { + width: 100%; + border-radius: 0.85rem; + border: 1px solid rgba(148, 163, 184, 0.35); + padding: 0.85rem 1rem; + background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(16, 185, 129, 0.15)); + display: flex; + flex-direction: column; + gap: 0.4rem; +} + +.drive-spot__state { + display: flex; + justify-content: space-between; + font-size: 0.75rem; + text-transform: uppercase; + letter-spacing: 0.08em; + color: rgba(248, 250, 252, 0.85); +} + +.drive-spot__metric { + display: flex; + flex-direction: column; + gap: 0.1rem; +} + +.drive-spot__metric p { + margin: 0; + font-size: 0.7rem; + text-transform: uppercase; + color: rgba(226, 232, 240, 0.85); +} + +.drive-spot__metric strong { + font-size: 1rem; + color: rgba(248, 250, 252, 0.95); +} diff --git a/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives/AxoCtrlxDriveXsc/AxoCtrlxDriveXsc.cs b/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives/AxoCtrlxDriveXsc/AxoCtrlxDriveXsc.cs index 1bd3f08e1..ef946c390 100644 --- a/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives/AxoCtrlxDriveXsc/AxoCtrlxDriveXsc.cs +++ b/src/components.rexroth.drives/src/AXOpen.Components.Rexroth.Drives/AxoCtrlxDriveXsc/AxoCtrlxDriveXsc.cs @@ -1,4 +1,4 @@ -using AXOpen.Messaging.Static; +using AXOpen.Messaging.Static; using AXSharp.Connector; using System; using System.Collections.Generic; @@ -357,6 +357,42 @@ private void InitializeMessenger() new KeyValuePair(1800, new AxoMessengerTextItem("Scaling parameters not yet read out of the drive" ,"Check proper value of the device Hardware ID")), + new KeyValuePair(1801, new AxoMessengerTextItem("Error while Reading Position data scaling: Type (0x2900:01 / S-0-0076 / --)" ,"")), + new KeyValuePair(1802, new AxoMessengerTextItem("Error: Invalid axis type defined in Position data scaling: Type (0x2900:01 / S-0-0076 / --). The only permmited valueas are: 'Rotary' or 'Linear'","Bits 0-2: 001-linear, 010-rotary")), + new KeyValuePair(1803, new AxoMessengerTextItem("Error: Invalid unit system defined in Position data scaling: Type (0x2900:01 / S-0-0076 / --). The only permitted values are '0: Meter [m]' or '0: Angular degree'.","Bit 4: Unit for linear scaling: 0: Meter [m], 1: Inch [in], Unit for rotary Scaling: 0: Angular degree, 1: Reserved")), + new KeyValuePair(1804, new AxoMessengerTextItem("Error: Invalid time base defined in Position data scaling: Type (0x2900:01 / S-0-0076 / --). The only permitted value is 's'.","Bit 5:")), + new KeyValuePair(1805, new AxoMessengerTextItem("Error: Invalid Data reference defined in Position data scaling: Type (0x2900:01 / S-0-0076 / --). The only permitted value is 'at the load'.","Bit 6: Data reference: 0: at the motor shaft,1: at the load")), + new KeyValuePair(1806, new AxoMessengerTextItem("Error while Reading Velocity scaling type (0x2910:01 / S-0-0044 / --)" ,"")), + new KeyValuePair(1807, new AxoMessengerTextItem("Error: Invalid axis type defined in Velocity scaling type (0x2910:01 / S-0-0044 / --). The only permmited valueas are: 'Rotary' or 'Linear'","Bits 0-2: 001-linear, 010-rotary")), + new KeyValuePair(1808, new AxoMessengerTextItem("Error: Invalid unit system defined in Velocity scaling type (0x2910:01 / S-0-0044 / --). The only permitted values are '0: Millimeter [mm]' or '1: Degrees'.","Bit 4: Unit for linear scaling: 0: Millimeter [mm], 1: Inch [in], Unit for rotary Scaling: 0: Revolution, 1: Degrees")), + new KeyValuePair(1809, new AxoMessengerTextItem("Error: Invalid time base defined in Velocity scaling type (0x2910:01 / S-0-0044 / --). The only permitted value is 'Second [s]'.","Bit 5: Unit of time: 0: Minute [min], 1: Second [s]")), + new KeyValuePair(1810, new AxoMessengerTextItem("Error: Invalid Data reference defined in Velocity scaling type (0x2910:01 / S-0-0044 / --). The only permitted is 'load'.","Bit 6: Data reference: 0: at the motor shaft,1: at the load")), + new KeyValuePair(1811, new AxoMessengerTextItem("Error while Reading Acceleration scaling type (0x2920:01 / S-0-0160 / --)" ,"")), + new KeyValuePair(1812, new AxoMessengerTextItem("Error: Invalid axis type defined in Acceleration scaling type (0x2920:01 / S-0-0160 / --). The only permmited valueas are: 'Rotary' or 'Linear'","Bits 0-2: 001-linear, 010-rotary")), + new KeyValuePair(1813, new AxoMessengerTextItem("Error: Invalid unit system defined in Acceleration scaling type (0x2920:01 / S-0-0160 / --). The only permitted values are '0: Meter [m]' or Radiant [rad]'.","Bit 4: Unit for linear scaling: 0: Meter [m], 1: Inch [in], Unit for rotary Scaling: 0: Radiant [rad], 1: Reserved")), + new KeyValuePair(1814, new AxoMessengerTextItem("Error: Invalid time base defined in Acceleration scaling type (0x2920:01 / S-0-0160 / --). The only permitted value is 'Second [s²]'.","Bit 5: Unit of time: Second [s²], 1: Reserved")), + new KeyValuePair(1815, new AxoMessengerTextItem("Error: Invalid Data reference defined in Acceleration scaling type (0x2920:01 / S-0-0160 / --). The only permitted is 'load'.","Bit 6: Data reference: 0: at the motor shaft,1: at the load")), + new KeyValuePair(1816, new AxoMessengerTextItem("Error while Reading Torque/force scaling type (0x2930:01 / S-0-0086 / --)" ,"")), + new KeyValuePair(1817, new AxoMessengerTextItem("Error: Invalid axis type defined in Torque/force scaling type (0x2930:01 / S-0-0086 / --). The only permmited valueas are: 'translational scaling' or 'Rotary scaling'","Bits 0-2: 000: Percentage-based scaling (% of reference value), 001: translational scaling (force in N, lbf), 010: Rotary scaling (torque in Nm, inlbf)")), + new KeyValuePair(1818, new AxoMessengerTextItem("Error: Invalid unit system defined in Torque/force scaling type (0x2930:01 / S-0-0086 / --). The only permitted values are '0: newton [N]' or '0: newton meter [Nm]'.","Bit 4: Unit for force: 0: newton [N], 1: pound-force [lbf], Unit for torque: 0: newton meter [Nm], 1: inch pound-force [inlbf]")), + new KeyValuePair(1819, new AxoMessengerTextItem("Error: Invalid time base defined in Torque/force scaling type (0x2930:01 / S-0-0086 / --). The only permitted value is 's'." ,"")), + new KeyValuePair(1820, new AxoMessengerTextItem("Error: Invalid Data reference defined in Torque/force scaling type (0x2930:01 / S-0-0086 / --). The only permitted is 'load'.","Bit 6: Data reference: 0: at the motor shaft,1: at the load")), + new KeyValuePair(1821, new AxoMessengerTextItem("Error while Reading Position data scaling: Factor (0x2900:02 / S-0-0077 / --)" ,"")), + new KeyValuePair(1822, new AxoMessengerTextItem("Error while Reading Position data scaling: Exponent (0x2900:03 / S-0-0078 / --)" ,"")), + new KeyValuePair(1823, new AxoMessengerTextItem("Error while Reading Rotary position resolution (0x2900:04 / S-0-0079 / --)" ,"")), + + new KeyValuePair(1824, new AxoMessengerTextItem("Error while Reading Velocity data scaling: Factor (0x2902:02 / S-0-0045 / --)" ,"")), + new KeyValuePair(1825, new AxoMessengerTextItem("Error while Reading Velocity data scaling: Exponent (0x2902:03 / S-0-0046 / --)" ,"")), + new KeyValuePair(1826, new AxoMessengerTextItem("Error while Reading Acceleration data scaling: Factor (0x2904:02 / S-0-0161 / --)" ,"")), + new KeyValuePair(1827, new AxoMessengerTextItem("Error while Reading Acceleration data scaling: Exponent (0x2904:03 / S-0-0162 / --)" ,"")), + new KeyValuePair(1828, new AxoMessengerTextItem("Error while Reading Torque/force data scaling: Factor (0x2906:02 / S-0-0093 / --)" ,"")), + new KeyValuePair(1829, new AxoMessengerTextItem("Error while Reading Torque/force data scaling: Exponent (0x2906:03 / S-0-0094 / --)" ,"")), + new KeyValuePair(1830, new AxoMessengerTextItem("Error while Reading Inverter type data: Nominal current (0x2314:01 / S-0-0112 / --)" ,"")), + new KeyValuePair(1831, new AxoMessengerTextItem("Error while Reading Motor torque model: Current constant (0x2018:01 / P-0-0450 / --)" ,"")), + + + + // TemplateTask_10steps_1 new KeyValuePair(10000, new AxoMessengerTextItem("TemplateTask_10steps_1 finished with error!","Check the details.")), @@ -1168,6 +1204,7 @@ private void InitializeMessenger() new KeyValuePair(999449, new AxoMessengerTextItem("F4019 Incorrect sequence upon phase start","Check the manufacturer documentation at: https://docs.automation.boschrexroth.com/doc/2447310533/ctrlx-drive-elion-diagnostic-messages-of-runtime-a-s-v-rs-reference-book/latest/en/")), new KeyValuePair(999456, new AxoMessengerTextItem("F4020 Communication bus cable break","Check the manufacturer documentation at: https://docs.automation.boschrexroth.com/doc/2447310533/ctrlx-drive-elion-diagnostic-messages-of-runtime-a-s-v-rs-reference-book/latest/en/")), new KeyValuePair(999476, new AxoMessengerTextItem("F4034 Emergency-Stop activated","Check the manufacturer documentation at: https://docs.automation.boschrexroth.com/doc/2447310533/ctrlx-drive-elion-diagnostic-messages-of-runtime-a-s-v-rs-reference-book/latest/en/")), + new KeyValuePair(999477, new AxoMessengerTextItem("F4035 ???Message code not found in any technical documentation provided by the vendor at the time this component was created. Nor did Claude.ai find any meaningful results, even after 1.5 hours and 2 million tokens burned.???","!!! DO NOT Check the manufacturer documentation at: https://docs.automation.boschrexroth.com/doc/2447310533/ctrlx-drive-elion-diagnostic-messages-of-runtime-a-s-v-rs-reference-book/latest/en/. Instead, contact the local supplier and beat him until he reveals the meaning of this error code.")), new KeyValuePair(999478, new AxoMessengerTextItem("F4036 Disturbed internal communication with communication module","Check the manufacturer documentation at: https://docs.automation.boschrexroth.com/doc/2447310533/ctrlx-drive-elion-diagnostic-messages-of-runtime-a-s-v-rs-reference-book/latest/en/")), new KeyValuePair(999479, new AxoMessengerTextItem("F4037 Excessive position command difference","Check the manufacturer documentation at: https://docs.automation.boschrexroth.com/doc/2447310533/ctrlx-drive-elion-diagnostic-messages-of-runtime-a-s-v-rs-reference-book/latest/en/")), new KeyValuePair(999481, new AxoMessengerTextItem("F4039 Communication return with enable signal set","Check the manufacturer documentation at: https://docs.automation.boschrexroth.com/doc/2447310533/ctrlx-drive-elion-diagnostic-messages-of-runtime-a-s-v-rs-reference-book/latest/en/")), diff --git a/src/components.rexroth.drives/this.sln b/src/components.rexroth.drives/this.sln index 09ad8a235..251195ceb 100644 --- a/src/components.rexroth.drives/this.sln +++ b/src/components.rexroth.drives/this.sln @@ -1,4 +1,4 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 +Microsoft Visual Studio Solution File, Format Version 12.00 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "this", "this.proj", "{C91BAA51-7B27-48BF-BE13-DED526D007B3}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "inxton_axopen_abstractions", "..\abstractions\src\AXOpen.Abstractions\inxton_axopen_abstractions.csproj", "{26B3BB63-88A9-4CDF-8F04-8E78F3284F6F}" diff --git a/src/core/src/AXOpen.Core.Blazor/AxoComponent/AxoComponentView.razor b/src/core/src/AXOpen.Core.Blazor/AxoComponent/AxoComponentView.razor index c586af447..f2a3dab57 100644 --- a/src/core/src/AXOpen.Core.Blazor/AxoComponent/AxoComponentView.razor +++ b/src/core/src/AXOpen.Core.Blazor/AxoComponent/AxoComponentView.razor @@ -1,4 +1,4 @@ -@namespace AXOpen.Core +@namespace AXOpen.Core @using AXOpen.Messaging @using AXOpen.Messaging.Static @using AXSharp.Connector.ValueTypes @@ -71,6 +71,7 @@ @foreach (var detailsTab in DetailsTabs) { +
@@ -106,4 +107,4 @@ eAlarmLevel.Unacknowledged => "badge-warning", _ => "badge-primary" }; -} \ No newline at end of file +} diff --git a/src/showcase/app/ix-blazor/showcase.blazor/Pages/components-rexroth-drives/Documentation/RexrothDrives.razor b/src/showcase/app/ix-blazor/showcase.blazor/Pages/components-rexroth-drives/Documentation/RexrothDrives.razor index 1e05171b3..6d2a836c6 100644 --- a/src/showcase/app/ix-blazor/showcase.blazor/Pages/components-rexroth-drives/Documentation/RexrothDrives.razor +++ b/src/showcase/app/ix-blazor/showcase.blazor/Pages/components-rexroth-drives/Documentation/RexrothDrives.razor @@ -412,8 +412,8 @@ private readonly string _plcComponent2Path = "src/showcase/app/src/components.rexroth.drives/Documentation/AxoCtrlxDriveXsc_Showcase.st"; // Hardware configuration paths private readonly string _hwcPlcLineYmlPath = "src/showcase/app/hwc/plc_line.hwl.yml"; - private readonly string _hwcIndraDriveTemplatePath = "src/showcase/app/hwc/library_templates/rexroth_indradrive/rexroth_indradrive.hwl.yml"; - private readonly string _hwcCtrlxDriveTemplatePath = "src/showcase/app/hwc/library_templates/rexroth_ctrlx_drive/rexroth_ctrlx_drive_xcs.hwl.yml"; + private readonly string _hwcIndraDriveTemplatePath = "src/components.rexroth.drives/ctrl/assets/rexroth_indradrive/rexroth_indradrive.hwl.yml"; + private readonly string _hwcCtrlxDriveTemplatePath = "src/components.rexroth.drives/ctrl/assets/rexroth_ctrlx_drive/rexroth_ctrlx_drive_xcs.hwl.yml"; // Library resource paths private readonly string _libReadmePath = "src/components.rexroth.drives/docs/README.md"; private readonly string _libComponent1DocPath = "src/components.rexroth.drives/docs/AxoIndraDrive.md"; diff --git a/src/showcase/app/ix-blazor/showcase.blazor/Services/Search/ShowcasePageRegistry.cs b/src/showcase/app/ix-blazor/showcase.blazor/Services/Search/ShowcasePageRegistry.cs index a8e4dbe93..87daf056d 100644 --- a/src/showcase/app/ix-blazor/showcase.blazor/Services/Search/ShowcasePageRegistry.cs +++ b/src/showcase/app/ix-blazor/showcase.blazor/Services/Search/ShowcasePageRegistry.cs @@ -575,8 +575,8 @@ public static List GetAllPages() => "src/components.rexroth.drives/ctrl/src/AxoCtrlxDriveXsc/AxoCtrlxDriveXsc.st", "src/components.rexroth.drives/ctrl/apax.yml", "src/showcase/app/hwc/plc_line.hwl.yml", - "src/showcase/app/hwc/library_templates/rexroth_indradrive/rexroth_indradrive.hwl.yml", - "src/showcase/app/hwc/library_templates/rexroth_ctrlx_drive/rexroth_ctrlx_drive_xcs.hwl.yml", + "src/components.rexroth.drives/ctrl/assets/rexroth_indradrive/rexroth_indradrive.hwl.yml", + "src/components.rexroth.drives/ctrl/assets/rexroth_ctrlx_drive/rexroth_ctrlx_drive_xcs.hwl.yml", ] },