On this line I keep getting this error "Method or data memeber not found", where ever esle the SENDCOMMAND IS LOCATED. any ideas
It highlights (SendComand)
lsReturn = WTUserScale1.SendCommand(mcsGATECLOSE, "0")
here is the entire code
Public Sub SendToSilo()
Dim lsReturn As String
Dim lsMessage As String
Dim lsPreviousDest As String
Dim lsCurrentDest As String
Dim llStep As Long
Dim lbSilotoSilo As Boolean
Dim lsCommand As String
On Error GoTo PROC_ERR
'' set the timeout values
mlDecelTimeout = strFormula.DecelTimeout
mlTargetTimeout = strFormula.TargetTimeout
'' this is the current destination
lsCurrentDest = Trim$(strFormula.Destination)
'' where are we at in the formula process?
lsPreviousDest = GetPreviousDestination(glFormula, glCurrentStep)
If Len(Trim$(lsPreviousDest)) = 0 Then
'' there is no previous step, this is the first step of the formula,
'' so proceed normally from the discharge pit to the silo destination
lsCommand = mcsREVFAST
mbDecelProxFlag = False
Else
'' the formula is in process, check to see if the last
'' destination was the discharge pit or a silo
If lsPreviousDest <> "DISCHARGE_PIT" Then
'' the last destination was a silo, so this must be a SLIP FORMULA
msfControl.BlinkMode = NoBlink
'' send the tare scale command
lsReturn = WTUserScale1.SendCommand(mcsTARE, "0")
If lsReturn = "OK" Then
'' continue on
Else
'' command not processed, so try again
lsReturn = WTUserScale1.SendCommand(mcsTARE, "0")
If lsReturn = "OK" Then
'' continue on
Else
'' shut the system down,
lsMessage = "TARE SCALE COMMAND NOT ACKNOWLEGED"
Call SystemShutDown(lsMessage, "frmRunFormula.SendToSilo()")
Exit Sub
End If
End If
Select Case lsPreviousDest
Case "SILO_3"
Select Case lsCurrentDest
Case "SILO_11"
lsCommand = mcsREVFAST
mbDecelProxFlag = False
Case "SILO_12"
lsCommand = mcsREVFAST
mbDecelProxFlag = False
End Select
Case "SILO_4"
Select Case lsCurrentDest
Case "SILO_10"
lsCommand = mcsREVFAST
mbDecelProxFlag = False
Case "SILO_13"
lsCommand = mcsREVSLOW
mbDecelProxFlag = True
End Select
End Select
Else
'' last destination was the discharge pit, so proceed normally
'' from the discharge pit to the silo destination, this must be a BALL CLAY FORMULA
lsCommand = mcsREVFAST
mbDecelProxFlag = False
End If
End If
'' move the trolley to the current silo
lsReturn = WTUserScale1.SendCommand(lsCommand, CStr(mlDecelTimeout))
If lsReturn = "OK" Then
'' set the silo control object
Call SetSiloControlObject(lsCurrentDest)
'' set the screen labels
lblTrolleyStatus.BackColor = &HFF00& '' Green
lblTrolleyStatus.Caption = "MOTION REVERSE"
lblFillingStatus.BackColor = &HC0C0C0 '' gray
lblFillingStatus.Caption = "IDLE"
msfControl.BlinkMode = BlinkInvisible
msfControl.BlinkSpeed = Fast
Else
'' command not processed, so try again
lsReturn = WTUserScale1.SendCommand(lsCommand, CStr(mlDecelTimeout))
If lsReturn = "OK" Then
'' set the silo control object
Call SetSiloControlObject(lsCurrentDest)
'' set the screen labels
lblTrolleyStatus.BackColor = &HFF00& '' Green
lblTrolleyStatus.Caption = "MOTION REVERSE"
lblFillingStatus.BackColor = &HC0C0C0 '' gray
lblFillingStatus.Caption = "IDLE"
msfControl.BlinkMode = BlinkInvisible
msfControl.BlinkSpeed = Fast
Else
'' shut the system down
lsMessage = lsCommand & " COMMAND NOT ACKNOWLEGED"
Call SystemShutDown(lsMessage, "frmRunFormula.SendToSilo()")
Exit Sub
End If
End If
'' start the timer for the silo prox timout
gbStartTiming = True
glSeconds = 0
'' start the timer to monitor for the decel/target prox switches
tmrSiloProxMonitor.Enabled = True
PROC_EXIT:
Exit Sub
PROC_ERR:
msErrLocation = "frmRunFormula.SendToSilo"
Call SaveErrorToFile(Err.Number, Err.Description, msErrLocation)
GoTo PROC_EXIT
End Sub
It highlights (SendComand)
lsReturn = WTUserScale1.SendCommand(mcsGATECLOSE, "0")
here is the entire code
Public Sub SendToSilo()
Dim lsReturn As String
Dim lsMessage As String
Dim lsPreviousDest As String
Dim lsCurrentDest As String
Dim llStep As Long
Dim lbSilotoSilo As Boolean
Dim lsCommand As String
On Error GoTo PROC_ERR
'' set the timeout values
mlDecelTimeout = strFormula.DecelTimeout
mlTargetTimeout = strFormula.TargetTimeout
'' this is the current destination
lsCurrentDest = Trim$(strFormula.Destination)
'' where are we at in the formula process?
lsPreviousDest = GetPreviousDestination(glFormula, glCurrentStep)
If Len(Trim$(lsPreviousDest)) = 0 Then
'' there is no previous step, this is the first step of the formula,
'' so proceed normally from the discharge pit to the silo destination
lsCommand = mcsREVFAST
mbDecelProxFlag = False
Else
'' the formula is in process, check to see if the last
'' destination was the discharge pit or a silo
If lsPreviousDest <> "DISCHARGE_PIT" Then
'' the last destination was a silo, so this must be a SLIP FORMULA
msfControl.BlinkMode = NoBlink
'' send the tare scale command
lsReturn = WTUserScale1.SendCommand(mcsTARE, "0")
If lsReturn = "OK" Then
'' continue on
Else
'' command not processed, so try again
lsReturn = WTUserScale1.SendCommand(mcsTARE, "0")
If lsReturn = "OK" Then
'' continue on
Else
'' shut the system down,
lsMessage = "TARE SCALE COMMAND NOT ACKNOWLEGED"
Call SystemShutDown(lsMessage, "frmRunFormula.SendToSilo()")
Exit Sub
End If
End If
Select Case lsPreviousDest
Case "SILO_3"
Select Case lsCurrentDest
Case "SILO_11"
lsCommand = mcsREVFAST
mbDecelProxFlag = False
Case "SILO_12"
lsCommand = mcsREVFAST
mbDecelProxFlag = False
End Select
Case "SILO_4"
Select Case lsCurrentDest
Case "SILO_10"
lsCommand = mcsREVFAST
mbDecelProxFlag = False
Case "SILO_13"
lsCommand = mcsREVSLOW
mbDecelProxFlag = True
End Select
End Select
Else
'' last destination was the discharge pit, so proceed normally
'' from the discharge pit to the silo destination, this must be a BALL CLAY FORMULA
lsCommand = mcsREVFAST
mbDecelProxFlag = False
End If
End If
'' move the trolley to the current silo
lsReturn = WTUserScale1.SendCommand(lsCommand, CStr(mlDecelTimeout))
If lsReturn = "OK" Then
'' set the silo control object
Call SetSiloControlObject(lsCurrentDest)
'' set the screen labels
lblTrolleyStatus.BackColor = &HFF00& '' Green
lblTrolleyStatus.Caption = "MOTION REVERSE"
lblFillingStatus.BackColor = &HC0C0C0 '' gray
lblFillingStatus.Caption = "IDLE"
msfControl.BlinkMode = BlinkInvisible
msfControl.BlinkSpeed = Fast
Else
'' command not processed, so try again
lsReturn = WTUserScale1.SendCommand(lsCommand, CStr(mlDecelTimeout))
If lsReturn = "OK" Then
'' set the silo control object
Call SetSiloControlObject(lsCurrentDest)
'' set the screen labels
lblTrolleyStatus.BackColor = &HFF00& '' Green
lblTrolleyStatus.Caption = "MOTION REVERSE"
lblFillingStatus.BackColor = &HC0C0C0 '' gray
lblFillingStatus.Caption = "IDLE"
msfControl.BlinkMode = BlinkInvisible
msfControl.BlinkSpeed = Fast
Else
'' shut the system down
lsMessage = lsCommand & " COMMAND NOT ACKNOWLEGED"
Call SystemShutDown(lsMessage, "frmRunFormula.SendToSilo()")
Exit Sub
End If
End If
'' start the timer for the silo prox timout
gbStartTiming = True
glSeconds = 0
'' start the timer to monitor for the decel/target prox switches
tmrSiloProxMonitor.Enabled = True
PROC_EXIT:
Exit Sub
PROC_ERR:
msErrLocation = "frmRunFormula.SendToSilo"
Call SaveErrorToFile(Err.Number, Err.Description, msErrLocation)
GoTo PROC_EXIT
End Sub