Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with GPIB-RS232

Hello All,

 

I need help with the GPIB-RS232 device provided by National Instruments.

 

The setup is as follows ('->' denotes connection and the brackets denote the protocol):

PC ->(USB) GPIB-USB-HS ->(GPIB) GPIB-RS232 ->(Serial) Serial Device

 

I would like to communicate with my serial device. Here are my questions:

  1. What mode do I setup the GPIB-RS232?
  2. How do I assert the EOI line from the GPIB-RS232? My serial device ends communication with the CR and LF termination characters.

Right now I am able to run the GPIB-RS232 device in D Mode but when I send the *IDN? command, I get the ID string back but then get the 'iberr = EABO' timeout error, which makes me wonder if I have set it up right. I am communicating using the NI-488.2 Communicator in MAX. Attached is the error.

 

Please note that the serial device has been designed in house. So, it might well be that I am not sending the CR and LF termination characters properly, so any insight on that would be helpful.

 

Take Care

Adnan

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 1 of 15
(5,723 Views)

Interesting problem. PC-RS232 through USB AND GPIB seems a bit strange (I wonder what requirements force this gyration?) I might suggest a phased approach to help isolate the issue.  Can you use the PC com port to test the serial link? Once you verified the underlying command protocol is solid then we could start adding in the other adapters.


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 15
(5,715 Views)

Looking through it a bit more> you may want G mode to be able to assert GPIB handshaking (EOI) when the 232 Term char is recieved


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 15
(5,712 Views)

Well, it's a serial instrument. But, the client is using GPIB to communicate with 9 instruments, so we thought of just using the GPIB-RS232. I did try G Mode but then not sure where we can set the EOI assert when termination character is received. We can definitely do that in C mode but I don't think it's the mode I need to use.

 

EDIT: Have looked at the string that is sent back from the Serial instrument and defintiely ends with CR and LF.

 

Hopefully, someone at NI can explain with proper steps. Please be aware that I am using the GPIB-RS232 Connection Wizard to change the configuration mode.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 4 of 15
(5,710 Views)

In G mode to set EOI on termchar send

 

 

viWrite (GPIB232, "EOS x,10\r", 9);

The programming message contains the function name, eos. x and 10 are the arguments, and \r is the terminating carriage return. This programming message tells the GPIB-RS232/485/422 to assert the EOI* line when it sends the end-of-string character linefeed. The viWrite is an NI-VISA function call that outputs the string eos x,10\r to the GPIB-RS232/485/422.

Asserting on 0x0A

 

I don't know if the wizzard exposes the functions


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 15
(5,707 Views)

Apologies for sounding ignorant but isn't that a VB call? I did see that in the help file. I just have access to LabVIEW and MAX. Can we use one of those tools to get this set? Also, are you sure about G mode?

 

I have tried doing the following:

http://digital.ni.com/public.nsf/allkb/7327A26E2B3A71ED86256C95005B6535

 

but not sure if the steps are right for the GPIB-RS232?

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 6 of 15
(5,704 Views)

in LabVIEW it would be

2.png


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 15
(5,699 Views)

OK so I tried setting this in G mode but then am not able to communicate with my instruments at all. Look at what it says at the bottom of the page. So, the only case where it actually works is D mode. But, I am still getting the timeout issues as explained above. Any other ideas?

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 8 of 15
(5,663 Views)

Adnan,

 

I'll see if I can help you understand a bit clearer.Sorry if I've added to the confusion.

 

converting from GPIB to Serial  there are a few reasons to do this.

  1. You have a serial device (instrument) that you want to talk to like it was on a COM port (VCP VIA GPIB).  In this case use mode S
  2. You have a serial device that will act a a GPIB controller.  Use mode C
  3. You have a serial device that will monitor Data on the GPIB bus but will not you do not care about handshaking (Like a chatty-cathy UART)- Mode D
  4. Serial device tha acts as a GPIB member- Mode G

In mode D when the serial device sends a response the data is buffered to the byte by byte as the device sends it and sprays it down to the GPIB bus when the converter is addressed.  You are limited to a 1M buffer.  HOWEVER a GPIB trasnfer ends on Bytes read = Bytes to read,  EOI (End or Identify) or TMO (Timeout).  in D mode EOI is never asserted and you must wait for TMO (or read a specific # bytes)  In G mode you address the serial device and read from the data buffer if EOSCHAR is read the converter knows to stop the transfer and assert EOI, so it asserts EOI and the read returns.  In your screenshot you show the properties of the converter not the instrument.


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 15
(5,656 Views)

Hi,

I'm new to the posting so forgive me if I miss a common cue. I have been following this thread and I am having the same problem. I have the GPIB-RS232 box that was purchased by the company I work for last week. I am trying to interface to a Watlow F4 Controller for a temp chamber. I am using LabVIEW 10. I open the VISA session with the primary address followed by the VISA write "EOS\sx,10\r" then an ID Query. I get a timout. I try it again using the second GPIB address for the controller and still get the timeout. I have the GPIB-RS232 box configured for G mode. Any suggestions?

Thanks in Advance

kzaneh

0 Kudos
Message 10 of 15
(5,453 Views)