Hi
I currently have a MSComm control (piezoComm1) which I use to send commands to a device attached to COM1.
I am using the Output property to send commands to the device, eg. MOV A25 which will move the device to 25 microns. This is working fine as I have tested the device's position using Hyper Terminal. However, I would like to test the position of the device within my VB project and display the results in a label on the form. Heres my code:

VB Code:
  1. Private Sub cmdGo_Click()
  2.     frmMain.piezoComm1.Settings = "115200, N, 8, 1"     'set baud rate, parity, data bits and stop bits
  3.     frmMain.piezoComm1.CommPort = 1                     'set PC COMM port
  4.     frmMain.piezoComm1.InputLen = 0                     'retrieve all of the input buffer
  5.     frmMain.piezoComm1.InputMode = comInputModeText     'input buffer to receive text - not binary
  6.     frmMain.piezoComm1.PortOpen = True                  'open port
  7.     frmMain.piezoComm1.Handshaking = comRTS             'request to send handshaking
  8.        
  9.     frmMain.piezoComm1.Output = frmMain.Text1 + Chr$(13) + Chr$(10) 'send command in text box
  10.     frmMain.lblResult1.Caption = frmMain.piezoComm1.Input           'put contents of input buffer into label
  11.  
  12.     frmMain.piezoComm1.PortOpen = False                 'close port
  13. End Sub

When I type the query position command "POS? A" in the text box and click the button the designated label disappears, as if its caption value is set to blank/nothing. I am confident that this command works as I have used it in Hyper Terminal.

Can anybody shed some light on this problem?

Thank you in advance

Wallace