11-17-2009 07:02 PM
I have been communicating to a GPIB-232CT-A using read/write C functions. The lack of a serial driver for 2.6 Linux kernels is a big pain.
I am able to read and write data seemingly successfully. but a 'stat n' returns Error 17 <ECMD> after every read, but not write. The read format is fairly simple, and succeeds. The documentation on ECMD error indicates I made a typo.
Can anyone give me insight into what could be happening?
here is an example
wrt #8 13\n*IDN?\r
rd #80 13\r
<reads the IDN data successfully>
stat n
ERR,END,CMPL,REM,CIC,LACS
ECMD
NSER
33
Thanks,
N0pes
11-24-2009 03:44 PM
Hi Nopes,
I had a look through the 488.2 help and I am having trouble figuring out what your "stat n" command is supposed to do, where did you find this command?
Thanks
Scott McCaig
11-24-2009 03:53 PM
Thank you for taking the time to help.
Here is a link to the user manual. stat n is located on page 88.
-N0pes
12-04-2009 07:31 AM
N0pes wrote:
here is an example
wrt #8 13\n*IDN?\r
I do see an error in your write syntax, it could be that the error is not detected until it starts processing the read. In the above wrt command, you specify a length of 8, but your string is only 5 characters long. The count is optional on the wrt command, so I would just omit it unless your string needs to include a carriage return as part of the data.
If you do need the carriage return as part of the data, then the command should be:
wrt #6 13\n*IDN?\r\r
I hope that solve the problem,
Jason S.