I am using Visual BASIC 6.0 to write a new version of a program that controls my model train layout. I don't want to run the trains all day long while testing and debugging the program. I am worried about the possibility of a train accident while testing and debugging the program. Is it possible for me to temporarily replace some routines in the program with keyboard control routines?
Private Sub checksensor01()
Do Until CtiData.SensorData(0) = 1
CtiData.ReasonForCall = CTI_DATA_EXCHANGE
CtiCommunicate CtiData
UpdateNetworkStatus
DoEvents
Loop
wait (0.2)
sensor01 = 1
End Sub
Private Sub stopatstation01(string01 As String)
RichTextBox1.Text = "Stop at " + string01
communicate (CTI_DATA_EXCHANGE)
checksensor03
If sensor03 = 1 Then
XMCommCRC2.Output = engine02
wait ((Int((3) * Rnd + 8)))
XMCommCRC2.Output = engine01
End If
End Sub
These two routines control my model train layout. I think that I could write something like this: if debug = true then keyboard input code. Jeffrey.
------------------
Private Sub checksensor01()
Do Until CtiData.SensorData(0) = 1
CtiData.ReasonForCall = CTI_DATA_EXCHANGE
CtiCommunicate CtiData
UpdateNetworkStatus
DoEvents
Loop
wait (0.2)
sensor01 = 1
End Sub
Private Sub stopatstation01(string01 As String)
RichTextBox1.Text = "Stop at " + string01
communicate (CTI_DATA_EXCHANGE)
checksensor03
If sensor03 = 1 Then
XMCommCRC2.Output = engine02
wait ((Int((3) * Rnd + 8)))
XMCommCRC2.Output = engine01
End If
End Sub
These two routines control my model train layout. I think that I could write something like this: if debug = true then keyboard input code. Jeffrey.
------------------
Comment