Port Visual Basic to Visual Prolog
From: Blackbird (no_at_mail.com)
Date: 06/26/04
- Next message: student: "Re: Newbie, *really* basic question"
- Previous message: felixzzzzzzzz: "term into List"
- Next in thread: Blackbird: "Re: Port Visual Basic to Visual Prolog"
- Reply: Blackbird: "Re: Port Visual Basic to Visual Prolog"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 26 Jun 2004 22:11:22 +0200
I'm trying to port the following Visual Basic program fragment to Visual
Prolog 6.1 It opens the serial port for communications, sends a break
command, switches to a specific speed, sends another command, then switches
speed again, and starts listening. Any signal coming in is detected with the
OnCom and displayed on the screen.
This is so totally beyond my Visual Prolog skills that I have no clue how to
even start porting it to Visual Prolog 6.1
Any help is appreciated!!
Merel
Private Sub Command1_Click()
'enable communications
MSComm1.PortOpen = True
'Set the Break condition for 0.1 second
MSComm1.Break = True
Duration! = Timer + 0.05
Do Until Timer > Duration!
Dummy = DoEvents()
Loop
MSComm1.Break = False
'switch to programmer speed
MSComm1.Settings = "19200,n,8,1"
'send pass through command
MSComm1.Output = "0000p"
'wait
Duration! = Timer + 0.2
Do Until Timer > Duration!
Dummy = DoEvents()
Loop
'switch to microcontroller speed
MSComm1.Settings = "1200,n,8,1"
End If
End Sub
Private Sub MSComm1_OnComm()
'get the sensor data from the com1 port and
'display on the screen.
ReadingPin = MSComm1.Input
If ReadingPin <> "" Then
ReadingData = MSComm1.Input
End If
End Sub
- Next message: student: "Re: Newbie, *really* basic question"
- Previous message: felixzzzzzzzz: "term into List"
- Next in thread: Blackbird: "Re: Port Visual Basic to Visual Prolog"
- Reply: Blackbird: "Re: Port Visual Basic to Visual Prolog"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|