Homing Proximity Sensors
Posted: Sun Jan 05, 2020 1:56 am
I'm using the phidget nema 23 stepper motor on a ballscrew for linear motion. I'm also using the phidget BR2023 proximity sensor to home the axis.
The sensor is connected to a phidget DAQ1200_0 4x digital input. I'm having a problem when the CPU is high (>80%) processing other data the sensor event isn't firing and the motor is crashing - Any ideas ?
(Windows10 / i7 CPU / 16GB Ram / 128GB SSD)
In VB I'm using to detect the input change event:
The sensor is connected to a phidget DAQ1200_0 4x digital input. I'm having a problem when the CPU is high (>80%) processing other data the sensor event isn't firing and the motor is crashing - Any ideas ?
(Windows10 / i7 CPU / 16GB Ram / 128GB SSD)
In VB I'm using to detect the input change event:
Code: Select all
Private Sub p_AxisLimit_DigitalInputChange(ByVal sender As Object, ByVal e As Phidget22.Events.DigitalInputStateChangeEventArgs) Handles P_AxisLimit.StateChange
Try
'Application.DoEvents()
If (e.State = True) Then
Me.Button22.BackColor = Color.FromArgb(255, 0, 0)
If atPaxisLimit = False Then
StopMotorP()
'P_Axis.TargetPosition = P_Axis.Position
P_Axis.AddPositionOffset(-P_Axis.Position)
atPaxisLimit = true
End If
Else
Me.Button22.BackColor = Color.FromArgb(255, 255, 255)
End If
Catch ex As Exception
Throw ex
End Try
End Sub