Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Send and Read with GPIB

Hello Community,

 

i have a problem with my GPIB USB HS Converter. My device supports different interfaces like usb, ethernet, rs 232, lwl and ieee 488. I can communicate with the device with commands:

 

>M0 ?\n

>M1 ?\n

...

 

to get status informations. The termination char can be switched from CRLF to LF or only CR. The answer could be:

 

M0:100\n

M1:240\n

...

 

I have to read a larg number of these register informations (10-30) more than 3 times a sek.  I dont want to send each command seperatly, so that i did this:

 

I

 

The code block contains the commands is this form: ">M0 ?\n>M1 ?\n..."

 

For RS232 and Ethernet this configuration works fine! I get as answer an Array (Echo Array) which looks like:

 

0: M0:200

1: M1:300

...

 

But when i connect the GPIB Interface and try the same configuration, the device seems to get only the last command. Because the Echo Array contains:

 

0: M1:300

1: E1

 ...

 

E1 means: no data

 

What is wrong ? 😞 Do i have to change the GPIB EOI or termination?


Sorry but i am a student and i am new in LabView.

 

I hope you can help me 🙂

 

Martin

 

::sorry for my bad/simple english::

0 Kudos
Message 1 of 2
(3,284 Views)

I don't think your problem has anything to do with LabVIEW, the termination character, or the GPIB controller. Typically with a GPIB instrument, you have to immediately follow the query (the one with the '?') with a read. I have no idea why chaining the queries together works in serial or Etherent but it's not supposed to work with GPIB instruments. It's pretty simple to make an array of commands and wire that to a for loop with a Write and a Read. You don't even have to use the numeric to provide an input to the 'N' terminal of the for loop.

0 Kudos
Message 2 of 2
(3,273 Views)