| Contents | Index |
For GPIB, VISA-GPIB, VISA-VXI, and VISA-GPIB-VXI objects, you can configure EOSMode to be none, read, write, or read&write.
If EOSMode is none, the End-Of-String (EOS) character is ignored. If EOSMode is read, the EOS character is used to terminate a read operation. If EOSMode is write, the EOS character is appended to the ASCII command being written whenever \n is encountered. When the EOS character is written to the instrument, the End Or Identify (EOI) line is asserted. If EOSMode is read&write, the EOS character is used in both read and write operations.
The EOS character is specified by the EOSCharCode property. For GPIB objects, the CompareBits property specifies the number of bits that must match the EOS character to complete a read operation, or to assert the EOI line.
For any EOSMode value, the read operation completes when
The EOI line is asserted.
Specified number of values is read.
A timeout occurs.
Additionally, if EOSMode is read or read&write (reading is enabled), then the read operation can complete when the EOSCharCode property value is detected.
Regardless of the EOSMode value, a write operation completes when
The specified number of values is written.
A timeout occurs.
Additionally, if EOSMode is write or read&write, the EOI line is asserted each time the EOSCharCode property value is written to the instrument.
Usage | GPIB, VISA-GPIB, VISA-VXI, VISA-GPIB-VXI |
Read only | Never |
Data type | String |
{none} | The EOS character is ignored. |
read | The EOS character is used for each read operation. |
write | The EOS character is used for each write operation. |
read&write | The EOS character is used for each read and write operation. |
Suppose you input a nominal voltage signal of 2.0 volts into a function generator, and read back the voltage value using fscanf.
g = gpib('ni',0,1);
fopen(g)
fprintf(g,'Volt?')
out = fscanf(g)
out =
+2.00000E+00The EOSMode and EOSCharCode properties are configured to terminate the read operation when an E character is encountered.
set(g,'EOSMode','read') set(g,'EOSCharCode','E') fprintf(g,'Volt?') out = fscanf(g) out = +2.00000
CompareBits, EOIMode, EOSCharCode

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |