LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to communicate with Lamdba ESS power supply using RS232

How to communicate with Lamdba ESS power supply using RS232? I tried ComWrt() with all the different strings that the user manual offers but it doesn's seem that the power supply is getting anything. The power supply has an RSTL for RS232 and GPIB communications.
0 Kudos
Message 1 of 3
(3,254 Views)
If you are properly calling OpenCom or OpenComConfig to setup the com port to meet the specifications of your instrument before calling ComWrt and you are not getting any errors (you are checking the generated error values right?) then it is most likely that either the instrument is not setup correctly or the commands you are sending are not being implemented properly.

What you should do is take a look at the following two serial tutorials that explain how to troubleshoot common serial communications problems:

http://zone.ni.com/devzone/devzoneweb.nsf/Opendoc?openagent&93FD9F2AD3D0641E8625682100067F39

http://zone.ni.com/devzone/conceptd.nsf/2d17d611efb58b22862567a9006ffe76/5113574c27098cf7862568210005f0dd?OpenDocument

Make sure that once you have the function cal
ls implemented properly (look at the example serial.prj in your cvi\samples\rs232 directory, you can most likely use it to communicate with your instrument directly), you have either tried the loopback test mentioned at the first link or you can try communicating between two com ports on one pc with a "null-modem" cable (have the serial.prj example monitor one port and something like hyperterminal monitor the other to get the hang of sending back and forth).

This material just about covers all of the info that we can give you on our end, if all else fails you may need to contact the instrument manufacturer to clarify the operation of their device.

Jason F.
Applications Engineer
National Instruments
www.ni.com/ask
Message 2 of 3
(3,254 Views)
RE How to communicate with Lamdba ESS power supply using RS232,
yariv said;
>How to communicate with Lamdba ESS power supply using RS232? I tried
>ComWrt() with all the different strings that the user manual offers
>but it doesn's seem that the power supply is getting anything. The
>power supply has an RSTL for RS232 and GPIB communications.

RS232 can be difficult, there are quite a few possibilities;

1. Have you opened the port?
2. Do the port setting match the instrument?
- Baud rate.
- Data bits.
- Stop bits.
- Parity.
- Hardware handshake.
- Software handshake (XON/XOFF).
3. Have you set sensible values for time-out, input and output buffers?
4. Is the instrument set to RS232 rather than GPIB?
5. Have you tested the value
s (error numbers) returned by the RS232
functions?

If that lot is OK then you might want to consider an inter-character
delay you can implement that by using ComWrtByte() to send one byte at a
time. Don't send a subsequent byte until the output queue is empty;
GetOutQLen().

Speaking as someone who has struggled with poorly implemented RS232
instruments, I can't stress enough how important it is to be in full
control of the settings, inter-character delays and to test the function
return values.

--
Regards,
John Cameron.
0 Kudos
Message 3 of 3
(3,254 Views)