Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting an instrument through Serial without driver

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.

0 Kudos
Message 1 of 10
(4,878 Views)

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" 

0 Kudos
Message 2 of 10
(4,850 Views)

Thanks for your headsup. I set the term character for input to LF (which is what how the instrument sends back its response).

0 Kudos
Message 3 of 10
(4,842 Views)

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.

Certified LabVIEW Architect (CLA)
0 Kudos
Message 4 of 10
(4,789 Views)

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.

0 Kudos
Message 5 of 10
(4,781 Views)

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?

Add 273 on whatever Celcius said.
-Kelvin
0 Kudos
Message 6 of 10
(4,771 Views)

First you (and we) need more information about the protocol 🙂

What documentation do you have ?  (Hint: RTFM really helps 😉 )

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 7 of 10
(4,766 Views)

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.

Add 273 on whatever Celcius said.
-Kelvin
0 Kudos
Message 8 of 10
(4,764 Views)

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...

 

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 9 of 10
(4,762 Views)

Surely will consider.

Thanks again for the help

Add 273 on whatever Celcius said.
-Kelvin
0 Kudos
Message 10 of 10
(4,758 Views)