06-21-2011 04:54 AM
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:
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
06-21-2011 08:43 AM
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.
06-21-2011 09:03 AM
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
06-21-2011 09:10 AM - edited 06-21-2011 09:11 AM
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.
06-21-2011 09:19 AM
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
06-21-2011 09:31 AM
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?
06-21-2011 09:41 AM
in LabVIEW it would be
06-22-2011 09:10 AM - edited 06-22-2011 09:10 AM
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?
06-22-2011 10:24 AM
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.
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.
03-12-2012 09:16 AM
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