01-06-2017 03:24 PM
Hi. I'm connecting a laser (Spectra-Physics MaiTai HP, manual attached) to a Windows 10 PC by LabView. First of all, I have and am connecting the instrument to the PC by a provided UI, successfully using RS-232 connection. Second, the goal of this question is to figure out how I could connect to the laser, give commands and queries using LabView to integrate the laser with the rest of my system. Finally, please see Chapter 6-10 of the manual for RS-232 guidelines.
Here's the question:
I tried connecting to the instrument by NI-MAX by selecting the proper COM port. I configured the port to whatever the manual listed (9600 baud rate, XON/XOFF enabled, 1 stop bit, no parity, and 8 data bits). Then I open the VISA test panel.
I was able to write, but not read or query the instrument using the command *IDN?\n nor READ:HUM?\n. The error was a simple timeout.
I troubleshooted by doing a loopback test (connecting pin 2 and 3 then querying --> success --> not a cable problem). Well, I use the same cable and was able to connect using the UI anyway.
I thought the problem was some kind of termination character, so I selected the enable Terminal Character option. My instrument will recognize LF or CR or both, but I chose LF just to choose one. The timeout error is still there.
I tried connecting by Putty. But I wasn't able to open a connection even.
Please advise me on what else to try.
Thank you.
01-06-2017 05:03 PM
Shot in the dark here, did you set the term character for output or input to LF ? I believe for serial it is defaulted to use a term char (LF) for the input...so if you set it for the output and are including an '\n' with the command, it would be like sending "*IDN?\n\n"
01-06-2017 06:30 PM
Thanks for your headsup. I set the term character for input to LF (which is what how the instrument sends back its response).
01-09-2017 05:04 PM
Putty wont work here since your instrumnt is talking SCPI. This is actually a good thing since it makes it easier to control the instrument. I wouldn't worry about cabling either since you are able to talk to the insturment already. One of the most common reasons for getting a VISA timeout when trying to query an instrument with a SCPI command is that you might be trying to read more bytes of data than available. By default MAX wants to read 1024 bytes for any query. I'd suggest trying to set that to a much smaller number (e.g. 5 bytes) and trying again. Sometmes certian commands result in a return with variable lengths and you end up having to know how many bytes to expect, otherwise you may run into a VISA timeout.
01-09-2017 08:39 PM
I solved my own problem by scanning through all the baud rates. I found out that the setting was reconfigured on the instrument when it was serviced/used by the previous owner.
01-10-2017 12:12 AM
Hello there. I am having the similar issue. I have an excimer laser that I should communicate with (receive and transmit certain data). But unfortunately I am not able to communicate with the laser. when I do visa configuration I am able to see all the existing COMs but I cant receive or send any data from/to the laser. Is there anyone who can give some advice on this case?
01-10-2017 03:14 AM
First you (and we) need more information about the protocol 🙂
What documentation do you have ? (Hint: RTFM really helps 😉 )
01-10-2017 04:06 AM
Right now in the lasers own program communication is set using RS232. By using RS232 operators able to read/right number of pulses, pulse energy, laser chamber temperature etc. In the program I will write using LabVIEW should be able to receive such parameters also.
Is there any specific info you want to know Henrik_Volkers?
Btw thanks for your kind reply.
01-10-2017 05:52 AM
Well, I usually start looking at the device, try to identify the model . Get the manual!
The next thing: LabVIEW-Help-Find_Instrument_Drivers... 🙂
use a search engine, RTFM, pick up the phone and ask the manufactor
If you have a working communication solution, some reverse engineering : Try to find out the baudrate,... listen to the communication to identify the commands...
01-10-2017 06:45 AM
Surely will consider.
Thanks again for the help