Download 1.6 PDF - Read the Docs

Transcript
PyVISA Documentation, Release 1.6
write(session, data)
Writes data to device or interface synchronously.
Corresponds to viWrite function of the VISA library.
Parameters
• session – Unique logical identifier to a session.
• data (str) – data to be written.
Returns Number of bytes actually transferred, return value of the library call.
Return type int, pyvisa.constants.StatusCode
write_asynchronously(session, data)
Writes data to device or interface asynchronously.
Corresponds to viWriteAsync function of the VISA library.
Parameters
• session – Unique logical identifier to a session.
• data – data to be written.
Returns Job ID of this asynchronous write operation, return value of the library call.
Return type jobid, pyvisa.constants.StatusCode
write_from_file(session, filename, count)
Take data from a file and write it out synchronously.
Corresponds to viWriteFromFile function of the VISA library.
Parameters
• session – Unique logical identifier to a session.
• filename – Name of file from which data will be read.
• count – Number of bytes to be written.
Returns Number of bytes actually transferred, return value of the library call.
Return type int, pyvisa.constants.StatusCode
write_memory(session, space, offset, data, width, extended=False)
Write in an 8-bit, 16-bit, 32-bit, value to the specified memory space and offset.
Corresponds to viOut* functions of the VISA library.
Parameters
• session – Unique logical identifier to a session.
• space – Specifies the address space. (Constants.*SPACE*)
• offset – Offset (in bytes) of the address or register from which to read.
• data – Data to write to bus.
• width – Number of bits to read.
• extended – Use 64 bits offset independent of the platform.
Returns return value of the library call.
Return type pyvisa.constants.StatusCode
50
Chapter 3. More information