Thanks for the help.  That is basically what I've done, expect all I get:

"System error #110: Connection Timed out"

I get the same when I cat and echo, but I get the proper response then get
the error:

[root@dev andy]# echo *IDN?>/dev/usbtmc0
[root@dev andy]# cat /dev/usbtmc0 
Rigol Technologies,DSA815,DSA8A151449181,00.01.06.00.05
***10 second pause ****
cat: /dev/usbtmc0: Connection timed out
[root@dev andy]# 

It appears that it is waiting for more, how to I read only what's there then
exit?

I've tried a simple Read #hDevice and a While not EOF:


Public hDevice As File 
Public sLine As String 


Public Sub Form_Open()
 hDevice = Open "/dev/usbtmc0" For Input Output Watch
End

Public Sub File_Read()
  Dim iByte As Byte

  'Read #hDevice, iByte
  'Print "Got one byte: "; iByte
  '
  While Not Eof(hDevice)
    Line Input #hDevice, sLine
    Print sLine
  Wend
End

Many thanks, any other suggestions?



--
View this message in context: 
http://gambas.8142.n7.nabble.com/Help-binding-to-dev-usbtmc0-tp42276p42320.html
Sent from the gambas-user mailing list archive at Nabble.com.

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to