Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

yokogawa aq6370

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

0 Kudos
Message 1 of 17
(8,735 Views)

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  

0 Kudos
Message 2 of 17
(8,724 Views)

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 🙂

0 Kudos
Message 3 of 17
(8,642 Views)

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  

Message 4 of 17
(8,640 Views)

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 🙂

 

 

0 Kudos
Message 5 of 17
(8,637 Views)

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?

0 Kudos
Message 6 of 17
(7,626 Views)

@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?

 

0 Kudos
Message 7 of 17
(7,611 Views)

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 

 

Download All
0 Kudos
Message 8 of 17
(6,928 Views)

Hi, I am facing the same problem whit VISA Read. Can you please post the solution if you figured it out? Thank you

0 Kudos
Message 9 of 17
(5,271 Views)

Hello sowmya,

As you revived a very old thread, please can you give us some more information about your issue?

  • Are you using the Yokogawa AQ6370 as well?
  • Which model of it do you use (AQ6370, AQ6370B, C, D...)?
  • Which driver are you using (link please, if available)?
  • Are you using LabVIEW or Python?
  • What type of connection are you using? Serial, Ethernet, IEEE 488.2 (GPIB), or something else?
  • What is the exact problem you are facing? There are at least two different error numbers given in this thread, therefore "the same problem" is a bit unambiguous...

Ingo – LabVIEW 2013, 2014, 2015, 2016, 2017, 2018, NXG 2.0, 2.1, 3.0
CLADMSD
0 Kudos
Message 10 of 17
(5,261 Views)