Discussion in "Software" started by    Saurabh9118    Mar 7, 2010.
Sun Mar 07 2010, 12:46 pm
#1
can anybody suggest me how to interface hyper terminal to VB?
actually i m controlling four stepper motors through PC.... i need to send commands to uC 8051 :
@APC***- for Auto mode Previous Channel(motor),
@ANC***- for Auto mode Next Channel(motor) etc.....

i did all the programming in C for that... but i want to add a command button instead of wrinting these commands in hyper terminal... how can i do that?


[ Edited Sun Mar 07 2010, 12:49 pm ]
Sun Mar 07 2010, 05:48 pm
#2
use c# and drag and drop Text box and also drag and drop button too double click draged button and write

SerialPort.Write(TextBox1.Text);


this will send the command written in text box


[ Edited Sun Mar 07 2010, 05:49 pm ]
 Saurabh9118 like this.
Mon Mar 08 2010, 04:05 pm
#3
[Topic moved to Computer Related > Software]
Mon Mar 08 2010, 10:27 pm
#5
Thanx...guys...
I vl submit my project very soon... this is a wonderful site...it helped me a lot in overcoming each difficulty... Special thanx 2 Ajay sir.
Wed Mar 10 2010, 04:46 pm
#6
I hav one query: (refer first post for commands)
I m using hyper terminal in my project for controlling these motors & it shows as below
auto mode channel 1.... after some delay... auto mode channel 2




But now i want to do same thing in VB...i did some part lik i can giv command in VB but i m nt able to
check it like dat of hyper terminal as shown in fig.... can u please tell me how can i get same thing in
VB text box?



Private Sub Command1_Click()
MSComm1.Output = "@ANC***"
End Sub

Private Sub Command2_Click()
MSComm1.Output = "@APC***"
End Sub

Private Sub Command3_Click()
End
End Sub

Private Sub Form_Load()
MSComm1.CommPort = 1                    'Define COM port available on PC
MSComm1.Settings = "9600, N, 8, 1"      '9600 Baudrate, No Parity, 8 bits data, 1 Stopbit.
MSComm1.InputLen = 1                    'Read 1 character/byte whenever Input property is used.
MSComm1.InputMode = comInputModeBinary  'Input will retrieve data in array of bytes.
MSComm1.PortOpen = True                 'Open Serial Port COM1.
End Sub

Private Sub MSComm1_OnComm()

End Sub

Private Sub Text1_Change()

End Sub


how can i display same things as in hyper terminal in text1 box.....?


[ Edited Wed Mar 10 2010, 11:24 pm ]
Thu Mar 11 2010, 01:47 am
#7
whatever you receive on serial port.. add it to text box

text1.text = "Text to display in text box"

'to update text box
Text1.text = Text1.text & "New Text"


Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Davidbab
Tue Apr 23 2024, 10:41 am
Richardrit
Tue Apr 23 2024, 09:54 am
HenryLaf
Mon Apr 22 2024, 03:50 pm
bleradrar
Mon Apr 22 2024, 06:38 am
ppu-pro_ka
Sun Apr 21 2024, 07:39 pm
Infewow
Sun Apr 21 2024, 06:30 pm
HumanTak
Sun Apr 21 2024, 12:26 pm
Zacharybus
Sun Apr 21 2024, 02:45 am