VB Question

JASONW10

Board Regular
Joined
Mar 11, 2005
Messages
231
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
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Forum statistics

Threads
1,224,522
Messages
6,179,297
Members
452,903
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top