Re: [Gambas-user] Help binding to /dev/usbtmc0?

2013-07-01 Thread Benoît Minisini
Le 01/07/2013 17:22, dr.diesel a écrit : > Well, even with: > > Public hDevice As File > Public sLine As String > > Public Sub Form_Open() > hDevice = Open "/dev/usbtmc0" For Read Output Watch > End 'Read Output' has no sense (Gambas should complain there, I will check why it does not), it shou

Re: [Gambas-user] Help binding to /dev/usbtmc0?

2013-07-01 Thread dr.diesel
Well, even with: Public hDevice As File Public sLine As String Public Sub Form_Open() hDevice = Open "/dev/usbtmc0" For Read Output Watch End Public Sub File_Read() sLine = Read #hDevice, -256 Print sLine End It sill just times out when the form opens, without even sending any comma

Re: [Gambas-user] Help binding to /dev/usbtmc0?

2013-07-01 Thread Tobias Boege
On Mon, 01 Jul 2013, dr.diesel wrote: > Thanks again, I believe this is what is causing my problems with > "/dev/usbtmc0" > > read(2) and fread(2) > Here's another aspect you need to be aware of. The kernel offers two sets of > system calls for file I/O, and their behavior is slightly different, >

Re: [Gambas-user] Help binding to /dev/usbtmc0?

2013-07-01 Thread Benoît Minisini
Le 01/07/2013 16:38, dr.diesel a écrit : > Thanks again, I believe this is what is causing my problems with > "/dev/usbtmc0" > > read(2) and fread(2) > Here's another aspect you need to be aware of. The kernel offers two sets of > system calls for file I/O, and their behavior is slightly different,

Re: [Gambas-user] Help binding to /dev/usbtmc0?

2013-07-01 Thread dr.diesel
Thanks again, I believe this is what is causing my problems with "/dev/usbtmc0" read(2) and fread(2) Here's another aspect you need to be aware of. The kernel offers two sets of system calls for file I/O, and their behavior is slightly different, especially when it comes to reading data. The read(

Re: [Gambas-user] Help binding to /dev/usbtmc0?

2013-06-29 Thread Randall Morgan
Sorry to jump in here but I was wondering if this could be caused the mode the usb connection is opened in? The OS is not required to send the data to usb devices at the time your program talks to the usb port. The data is often cached for some time before being sent to the usb device. There is a u

Re: [Gambas-user] Help binding to /dev/usbtmc0?

2013-06-29 Thread Tobias Boege
On Fri, 28 Jun 2013, dr.diesel wrote: > 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

Re: [Gambas-user] Help binding to /dev/usbtmc0?

2013-06-28 Thread dr.diesel
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

Re: [Gambas-user] Help binding to /dev/usbtmc0?

2013-06-26 Thread Tobias Boege
On Tue, 25 Jun 2013, dr.diesel wrote: > Hello all, > > I'm trying to communicate to a Rigol spectrum analyzer, which is routed to > /dev/usbtmc0 once connected via USB. You can easily echo and cat serial > commands to usbtmc0 but I'd prefer to use a socket of some sort, any > suggestions on how t

[Gambas-user] Help binding to /dev/usbtmc0?

2013-06-25 Thread dr.diesel
Hello all, I'm trying to communicate to a Rigol spectrum analyzer, which is routed to /dev/usbtmc0 once connected via USB. You can easily echo and cat serial commands to usbtmc0 but I'd prefer to use a socket of some sort, any suggestions on how to do this via gambas? usbtmc0 has no port speed o