12-22-2010 02:11 AM
When I want to communicate with serial instrument I am always required to set these three attributes
VI_ATTR_TERM_CHAR, VI_ATTR_TERM_CHAR_EN,VI_ATTR_TERM_CHAR_EN
But for communication with USB/GPIB/TCP, I am never required to set these attributes.
Is it possible that I can work with one attribute(VI_ATTR_TERM_CHAR) for serial channel just like USB/GPIB/TCP.
On the other hand, What will be side effects if I set all these three attributes if VISA session is of USB/GPIB/TCP.
12-22-2010 12:48 PM - edited 12-22-2010 12:54 PM
@Sandeepvd wrote:
When I want to communicate with serial instrument I am always required to set these three attributes
VI_ATTR_TERM_CHAR, VI_ATTR_TERM_CHAR_EN,VI_ATTR_TERM_CHAR_EN
But for communication with USB/GPIB/TCP, I am never required to set these attributes.
Is it possible that I can work with one attribute(VI_ATTR_TERM_CHAR) for serial channel just like USB/GPIB/TCP.
On the other hand, What will be side effects if I set all these three attributes if VISA session is of USB/GPIB/TCP.
VI_ATTR_TERM_CHAR and VI_ATTR_TERM_CHAR_EN are used to control VISA Reads when talking to serial instruments. VI_ATTR_TERM_CHAR_EN tells VISA Read to stop reading from the serial port when it sees the character that matches the value of VI_ATTR_TERM_CHAR. When you do this you do not need to tell VISA Read exactly how many characters to read. You specify some sufficiently large number, and VISA Read will automatically stop reading once it sees the termination character. If you do not set VI_ATTR_TERM_CHAR_EN to "True" then you need to tell VISA Read exactly how many characters to read.
But for communication with USB/GPIB/TCP, I am never required to set these attributes.
Because they're not needed and/or not used.
Oh, and please stop asking the same question in different ways, creating new threads. This is very annoying. Original thread: http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/VISA-settable-attraibutes-integer-values/td-p...