Showing results for 
Search instead for 
Did you mean: 

Optical Spectrum Analyzer

Go to solution

Optical Spectrum Analyzer

Dear all,

I am encountering troubles relating to controlling optical spectrum
analyzer.. I follow exactly the commands in programming user guide but
it turns out many errors. So, is there anyone here having some
experiences with OSA controller? Could you help me?

Thank all
0 Kudos
Message 1 of 13

Re: Optical Spectrum Analyzer

Provide the make and model of the instrument as well as the actual error codes you are getting.

0 Kudos
Message 2 of 13

Re: Optical Spectrum Analyzer

The OSA is 79052B. In the programming manual, the HP-BASIC language is used. I dont know how to implement such commands in Labview ( send, query, read).


I guess that we need to append some strings before and after original commands of instruments. Is it correct?


Is there anyone encourtered this problem for implementing HP-BASIC in labview?


Thank you

0 Kudos
Message 3 of 13

Re: Optical Spectrum Analyzer

In LabVIEW, you will be using GPIB Write/Read or VISA Write/Read. You can do the same in MAX. This is such an old instrument that you may have to append termination characters such as CR or LF. This is the purpose of the mode input of the GPIB functions, With VISA, you can concantanate the constants.


If you are getting errors, please provide the error codes like I asked.

0 Kudos
Message 4 of 13

Re: Optical Spectrum Analyzer

It seems that I cannot implement commands.

Everytime I wrote the commands, the screen of OSA display alphanumeric characters and then nothing changes. Even the light indicator does not change to remote control.


How can I deal with problems?




0 Kudos
Message 5 of 13

Re: Optical Spectrum Analyzer

What are you using to write the commands and are you appending any termination character? What does the manual say about ternination characters. Can you attach the manual?

0 Kudos
Message 6 of 13

Re: Optical Spectrum Analyzer

Yes, I tried to appen both termination characters: carriage return and linefeed.

For example:


This is the original command for instruments: " CENTERWL 950NM; SP 20NM;" and when I wrote it to VISA write, it does not work.

When I append \n, or \r at the end of each command above, it still does not work


I enclosed the manual for your consideration.

0 Kudos
Message 7 of 13

Re: Optical Spectrum Analyzer



did you type in the \r \n in a normal string or in "\codes display" mode.

You find out by right clicking on the stringcontrol in LabVIEW

greetings from the Netherlands
Message 8 of 13

Re: Optical Spectrum Analyzer

You can also configure GPIB in MAX to automatically send LF with EOI. Or use the GPIB functions with mode 2. Or, as I originally said, concantanate the string with the constant. By constant, I mean the constant on the string palette.


Start with something more basic. Send ID? and then do a read.


Personally, I do all of this initial debug of the commands in MAX.

0 Kudos
Message 9 of 13
Accepted by topic author milano
08-27-2015 04:09 PM

Re: Optical Spectrum Analyzer

For ID? and *IDN command, it returns the name of display. Other commands does not work

But it is strange that when I connect GPIB to instruments (OSA), two devices are scanned ( display HP7004A, other(HP 70952B) is not recognized/responsed). It may be the source of mistake when writing commands to instruments.


Actually, when using MAX, I chose HP70004A to communicate. I dont know how to make other active.



0 Kudos
Message 10 of 13