FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial device responds to *IDN?, but not the commands that should turn it on.

Hi,
I'm working on a LabVIEW program to control a Spectra Physics P51 power supply for a Nd:YAG laser via a RS232 serial connection. So far, using MAX and then a LabVIEW program, I've managed to send the query, "*IDN?\r\n" and get a response from the P51 that has the model and serial number. So, I think that I have this connected correctly, with the right settings on the serial port. But the device does not respond to any of the commands that should turn it on. The manual has a GW basic program to do this, and with the help of some regulars in the LabVIEW forum I tried to emulate this, with no success. (I also tried the basic program, but I'm not certain I did it just right, it didn't work) I've attached their program and the GW basic program. I have a couple of questions about this:

Is *IDN? a universal language command that could be masking a format change necessary for other commands? For instance, maybe the device responds to it, but needs another translation to get the usual commands to work.

I hope this is enough info... I've been puzzling on this for a while.

Thanks,
Karl
Download All
0 Kudos
Message 1 of 5
(12,989 Views)

Hi Karl,

you enable the termination character while the configuration and then you add another termination character to every command. I think, disable the termination character at the "VISA Configure Serial Port" should help.

Mike

0 Kudos
Message 2 of 5
(12,977 Views)

Mike,

I don't think that is a problem.  My understanding is that the Enable termination character applies to incoming messages, to tell the VISA read to stop and pass on the message once the termination character is received.  It will still require termination characters to be added to the outgoing message if necessary.

Karl,

Now the possibility is that the termination characters are not correct for the outgoing message.  The manual page attached shows the command for Basic to be a Print#1 command.  I don't remember if that means the message would end with a carriage return, linefeed, CRLF, or LFCR.  It might be worth experimenting with the various combinations.

I don't know why you would need the VISA flush command.  I don't think that should be necessary.  Also experiment with the delay between commands.  Maybe it needs a little more time to act on one command before it is ready to accept the next command.  Also, put indicators on some of the error wires to see if any VISA commands are generating errors.  Try running it in Highlight execution mode as well to see if anything unusual is happening either in the data, errors, or timing of the commands.

0 Kudos
Message 3 of 5
(12,964 Views)

Karl:

Did you ever get the laser to function manually first to verify that it is functional?

(referring to this thread)

http://forums.ni.com/ni/board/message?board.id=170&message.id=319165#M319165

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 4 of 5
(12,955 Views)
Hi again! (and thanks again for so much help!)
The laser does work, we run it often, but we are working towards remote control of the system so that we can run it while we aren't in the room. I'll play around with the termination characters later today, to see if that helps.

I haven't had much time to play with this lately (hence the delay in postings), but I'll see what I can figure out.

Karl
0 Kudos
Message 5 of 5
(12,944 Views)