Open u625355 opened 1 year ago
It returns a table because a buffer object is Lua a table. You can do nothing with it.
In order to get measurements back you must use the "printbuffer" command.
In order to use the buffer you must use the string name of it.
Fundamentally, the make buffer command should return the string name of the buffer if it was successfully made or raise an error of it isn't. It's the only way to do anything useful with it.
Addressing the way to make the api behave.. why is a write returning anything?... Does it really return the variable name? If so why? Seems highly inconsistent with the visa definitions of "write","read"and "query"
I found something like this works with visa. buffervarname = "buff1" Smu.write(f"{buffervarname} = buffer.make(100) ") *Do stuff to fill Smu.query(f"printbuffer(1,{buffervarname}.n, {buffervarname}. readings)")
As for the incorrect mapping of a str variable to an integer, reference manual (2450 rev E. 2019 ) page 14-50 and 14-51. Is the relevant documentation for those interested.
Description of the bug
Arguments data type is mismatched in the following APIs:
Models affected: Keithley SMU 2450|2451|2460|2470 Source Measure Units.
API | PI | Comments -- | -- | -- smu.commands.buffer.write.format() | buffer.write.format() | String argument mapped to integer. smu.commands.buffer.make() | buffer.make() | Return type is a table instead of a variable.Steps To Reproduce
Use the "smu" driver object to write and query the above-mentioned APIs. Examples:
Environment Information
Operating System:
Software Version:
Additional Information
Alternative way to make the API functional as expected: