LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Optical Spectrum Analyzer

Solved!
Go to solution
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
(5,054 Views)

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

0 Kudos
Message 2 of 13
(5,044 Views)

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
(5,017 Views)

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
(5,012 Views)

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
(5,001 Views)

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
(4,993 Views)

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
(4,980 Views)

Hi

 

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
(4,964 Views)

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
(4,961 Views)
Solution
Accepted by topic author milano

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
(4,941 Views)