08-21-2008 06:17 PM
I have an instrument that I am trying to communicate with via RS232. I am having a difficult time figuring out how to write a command to the instrument using the VISA write VI. I am able to successfully communicate with the instrument using a software program called Terminal (similar to hyperterminal). A typical command starts and ends with ^m in Terminal. For example, here is the command ^md01v00,00^m that returns the heat rate. How do I write this command in the VISA write VI? Is the ^m an unprintable character in LabVIEW that is represented in some other format?
08-21-2008 06:42 PM
08-21-2008 07:12 PM
08-21-2008 07:39 PM
08-21-2008 08:40 PM
08-22-2008 12:25 PM
I did try the <CR+LF> constant before starting to play with other characters (as shown in the VI I posted) but did not get the communication to work. I just recently changed the terminating character back to <CR+LF> and added a 500 ms time delay between the VISA read and write VIs, which solved the communication problem. Now I'm running into a new problem where I get the error message "A framing error occurred during transfer". My communication port is set properly as the device settings. I think that there is no noise in my cable (because the manufacturer's software reads fine at the same rate I'm reading). What could possibly be wrong?
08-22-2008 03:06 PM
Hi SumTumWong,
I'm thrilled to hear that you resolved your serial communication issue. As for your framing error that occurs, this is a common issue and we have a Knowledge Base article that explains what this error in full and how to resolve it. The most common reason why this error occurs is that your serial port and device are configured to use a different settings. The article shows how make sure that the settings of both your serial port and device are configured properly using Measurement & Automation Explorer (MAX). Let us know if you have any more questions. Have a great day!
Regards,
Todd Venable
08-27-2008 07:01 AM