Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB-232CT-A Unrecognized command succeeds Error 17 ECMD

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 

0 Kudos
Message 1 of 4
(4,114 Views)

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

Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(4,073 Views)

Thank you for taking the time to help.

 

Here is a link to the user manual. stat n is located on page 88.

 

 

-N0pes

0 Kudos
Message 3 of 4
(4,071 Views)

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. 

 

0 Kudos
Message 4 of 4
(3,984 Views)