Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #34675
| Subject | Re: problem with usbtmc-communication |
|---|---|
| From | wrw@mac.com |
| Date | 2012-12-11 21:21 -0500 |
| References | (9 earlier) <99b04e06-734c-4702-bf74-855e28d8f633@x20g2000vbf.googlegroups.com> <mailman.675.1355153683.29569.python-list@python.org> <50b9eb4f-f319-491d-894c-2a9386b6941a@x20g2000vbf.googlegroups.com> <mailman.728.1355236484.29569.python-list@python.org> <b3fa909b-a89d-4087-b562-08efb6fb0797@17g2000vba.googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.764.1355278877.29569.python-list@python.org> (permalink) |
On Dec 11, 2012, at 3:48 PM, Jean Dubois <jeandubois314@gmail.com> wrote:
[byte]
>>
>> OK - I see where the examples came from, and I notice -
>>
>> int my_inst;
>> my_inst=open(ā/dev/usbtmc1ā,O_RDWR);
>> write(my_inst,ā*RST\nā,5);
>> close(my_inst);
>>
>> and similarly in another place -
>>
>> retval=write(myfile,"*IDN?\n",6);
>>
>> Note that both write commands contain a byte count of the number of characters to be written (\n counts as one character).
>> Again, the read commands contain byte counts. I'm very suspicious that a write command with no byte count writes nothing, but does move a buffer pointer.
>>
>> -Bill
>
> Does Python support/implement simular commands? Can I use
> usbkeith.write("*IDN?\n",6) and something simular for the reading
> commands?
>
> thanks,
> jean
> --
> http://mail.python.org/mailman/listinfo/python-list
Yes of course. BUT, that isn't really a python question, it depends on how the device driver implements the function call.
-Bill
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[newbie] problem with usbtmc-communication Jean Dubois <jeandubois314@gmail.com> - 2012-12-04 04:14 -0800
Re: [newbie] problem with usbtmc-communication wrw@mac.com - 2012-12-04 09:33 -0500
Re: problem with usbtmc-communication Jean Dubois <jeandubois314@gmail.com> - 2012-12-04 08:12 -0800
Re: problem with usbtmc-communication wrw@mac.com - 2012-12-05 10:26 -0500
Re: problem with usbtmc-communication Jean Dubois <jeandubois314@gmail.com> - 2012-12-05 12:38 -0800
Re: problem with usbtmc-communication wrw@mac.com - 2012-12-05 17:21 -0500
Re: problem with usbtmc-communication Jean Dubois <jeandubois314@gmail.com> - 2012-12-06 05:50 -0800
Re: problem with usbtmc-communication wrw@mac.com - 2012-12-06 09:50 -0500
Re: problem with usbtmc-communication Jean Dubois <jeandubois314@gmail.com> - 2012-12-06 11:41 -0800
Re: problem with usbtmc-communication Dave Angel <d@davea.name> - 2012-12-06 15:10 -0500
Re: problem with usbtmc-communication wrw@mac.com - 2012-12-06 15:15 -0500
Re: problem with usbtmc-communication Jean Dubois <jeandubois314@gmail.com> - 2012-12-07 05:46 -0800
Re: problem with usbtmc-communication Jean Dubois <jeandubois314@gmail.com> - 2012-12-10 05:31 -0800
Re: problem with usbtmc-communication wrw@mac.com - 2012-12-10 10:34 -0500
Re: problem with usbtmc-communication Jean Dubois <jeandubois314@gmail.com> - 2012-12-10 22:58 -0800
Re: problem with usbtmc-communication wrw@mac.com - 2012-12-11 09:34 -0500
Re: problem with usbtmc-communication Jean Dubois <jeandubois314@gmail.com> - 2012-12-11 12:48 -0800
Re: problem with usbtmc-communication wrw@mac.com - 2012-12-11 21:21 -0500
Re: problem with usbtmc-communication Jerry Hill <malaclypse2@gmail.com> - 2012-12-11 19:49 -0500
Re: problem with usbtmc-communication Jean Dubois <jeandubois314@gmail.com> - 2012-12-12 08:16 -0800
Re: problem with usbtmc-communication Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-12-05 18:08 -0500
Re: [newbie] problem with usbtmc-communication Terry Reedy <tjreedy@udel.edu> - 2012-12-04 14:55 -0500
Re: problem with usbtmc-communication Jean Dubois <jeandubois314@gmail.com> - 2012-12-06 06:05 -0800
Re: problem with usbtmc-communication Jean Dubois <jeandubois314@gmail.com> - 2012-12-06 07:44 -0800
Re: problem with usbtmc-communication Terry Reedy <tjreedy@udel.edu> - 2012-12-06 15:28 -0500
Re: problem with usbtmc-communication Jean Dubois <jeandubois314@gmail.com> - 2012-12-07 05:51 -0800
csiph-web