08-28-2008 01:03 PM
I am trying to communicate with 7265 amplifier from signal recovery via rs232 interface. I have already written vi's which communicate the same model of amplifier via GPIB. I am now trying to accomplish the same thing with rs232.
I can write commands and read its outputs via rs232 using hyperterminal in windows. But with labviews things are not good. Here are the main problems.
1) Due to lack of documentation that comes with this amplifier, it's not clear whether it needs carraige return and/or line feed character as the teriminating character. I think it needs at least a carriage return.
2) An example command is to set the frequency. For example command <of.1.234e+03> (without brackets) is supposed to set the frequency to 1.234kHz. Sometimes it
works and sets it to 1.234kHz. Sometimes amplifier does not respond at all. Sometimes the amplifier sets the frequency to 134 Hz (loping off digit 2); plus variations this problem.
3)With labview it's very particular about the format of the command. In hyperterminal I can just type <of.45> and the frequency is set to 45Hz. With labview I think it wants the command <of.4.5E+01>. I think Labview does not like <of.4.5E+1>; it insists on <of.4.5E+01>??
My labview 8.5 program starts with a VISA serial configure, then VISA clear, then, then VISA serial write, then VISA serial close.
Thanks in advance for your help.
k.z
08-28-2008 03:13 PM
1. If you are unsure, just send both. It should not matter. Hyperterminal usually sends both.
2. This may be related to 1 or it might require you to place a delay between each character as it is sent. Search the board for inter-character delay (and it's variants).
3. If you are not converting from numeric controls to strings, then LabVIEW neither knows or cares what the format of the string numeric you are sending. In other words, if you send a string of 'of.45', then you can send the exact same string in LabVIEW. If you are converting from a numeric control, you may be using the wrong conversion function or not using the Format Into String correctly. Would need to see your code.
08-29-2008 12:39 PM