07-16-2009 03:48 AM
hi, i ama working on a application which gets optical spectrum data from an Optical Spectrum Analyser (OSA) by Yokogawa, it supports tcp/ip ethernet interface so i have developed a code using labview VIs they have provided(i am a beginner to labView :-] ), following closely with the example VIs they have given to communicate with the OSA. However after much trouble trying to establish a communication, i finally managed to make a connection and then i get error 1074003951, Identification Query failed.
the example VIs also return this error and i have tried to run the program with ID query turned off, but for no avail. Has anyone got experiance with such an instrument? or got more detail on TCP/IP communication via labview/on the error than what NI provide?
thank you very much, i stress the urgency since the rest of my project requires this initial step to be working correctly :S
Asiri
07-16-2009 09:21 AM
i have tracked down the error to VISA read on the VI that establishes connection with the OSA and i get error 1073807339 - timeout ... i have used the default timeout value 30000ms and the byte count of 256 that was given with the VIs ... should i change either of the values as suggested by NI? i don't understand why the default values give this error...
thanks a lot
asiri
08-06-2009 08:46 AM
Hi Asiri,
The identification error is usually generated when you try using an instrument driver that is not designed for the instrument you have.
You should see in the Instrument Open VI that the command *IDN? is sent and the response is then checked. If the response does not match to certain keywords then an error is generated.
Can you tell me what driver you have and were you downloaded this driver from as I can not find the AQ6370 on www.ni.com/idnet These are the only drivers supported by National Instruments and only if the page states the driver is supported.
Regards
JamesC
NIUK and Ireland
It only takes a second to rate an answer 🙂
08-06-2009 08:51 AM
Hi, sorry i didnt know how to delete a previous question because infact this problem is now solved, it was a error with the firmware of the OSA that caused this, so a simple upgrade worked 🙂 the drivers were downloaded from the Yokogawa (y-link) site and is for the AQ6370 model i am using through ip/TCP connectivity.
again, sorrry for wasting your time and thanks for replying.
Asiri
08-06-2009 08:57 AM
Hi Asiri,
You are welcome, in future if you want to delete a post, the best way is just to post the answer to the forum, so others here can use that information to solve any issues they have.
Thanks for letting all the users know the solution to this problem.
Regards
JamesC
NIUK and Ireland
It only takes a second to rate an answer 🙂
04-03-2013 04:56 PM
Asiri, I've just unpacked a new AQ6370, and I'm interested in getting control through LabView going. Any chance you would be willing to share some of your LabView VI's with someone just getting started?
04-04-2013 07:43 AM
@David* wrote:
Asiri, I've just unpacked a new AQ6370, and I'm interested in getting control through LabView going. Any chance you would be willing to share some of your LabView VI's with someone just getting started?
Any reason you can't start with the LabVIEW drivers for the instrument?
03-22-2016 01:24 PM
Hi all,
I want to control my AQ6370C OSA over TCP/IP using Python.
The IP addresse and the TCP-port are ok, I manage to ping the OSA.
Yet I get only empty string responses from my OSA -- would anyone have an idea to what this is due? What am I doing wrong?
My Python code is as follows:
""" library for fetching data from the Yokogawa OSA AQ6370C """ import socket def OpenTCPsocket(TCP_IP, TCP_PORT, BUFFER_SIZE): print(TCP_IP, TCP_PORT, BUFFER_SIZE) s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: s.connect((TCP_IP, TCP_PORT)) except Exception: print('failed opening the socket', s.error) buf = s.recv(BUFFER_SIZE) print('Opening buf: ', len(buf) , buf) return s def CloseTCPSocket(s): s.close() def Read_OSA(s, BUFFER_SIZE): data = s.recv(BUFFER_SIZE) return data.decode('ascii') def Write_OSA(s, MESSAGE, BUFFER_SIZE): N = s.send(MESSAGE.encode()) ReadBuffer = s.recv(BUFFER_SIZE) print('Wrote: ', N, ', Response: ', ReadBuffer) return ReadBuffer.decode('ascii') if '__main__' == __name__: # execute only if run as a script TCP_IP_yokogawa = '192.168.0.67' TCP_PORT = 10001 BUFFER_SIZE = 1024 OpeningYokogawa_str = "open anonymous" +"\n" s = OpenTCPsocket(TCP_IP_yokogawa, TCP_PORT, BUFFER_SIZE) buf = Write_OSA(s, OpeningYokogawa_str , BUFFER_SIZE) #LOGIN step1 print(buf) buf = Write_OSA(s, " " + "\n" , BUFFER_SIZE) #LOGIN step2 print(buf) # shall be stg like "ready" when fine CloseTCPSocket(s)
And the response I get when executing the above script is:
192.168.0.67 10001 1024 Opening buf: 0 b'' Wrote: 15 , Response: b'' Wrote: 2 , Response: b''
Thank you ! 🙂
Florian
07-31-2018 03:00 PM
Hi, I am facing the same problem whit VISA Read. Can you please post the solution if you figured it out? Thank you
08-01-2018 04:06 AM
Hello sowmya,
As you revived a very old thread, please can you give us some more information about your issue?