-
-
Notifications
You must be signed in to change notification settings - Fork 245
-
-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Message Based write_ascii_values Incorrectly Formats Commands #372
Comments
This may very well be instrument dependent. Some instruments expect for example |
I think another proposal would be to change the signature to allow for a 'joining' string.
where prefix would specify the string placed between the message and value blocks. This would permit Also, I was assuming the layer underneath VISA was SCPI (in which case the values are spaced), so thanks for bringing up other scenarios when spaces aren't required. :) |
No sadly not all instruments use SCPI (or respect the standard at the letter). We could have a joining string but we would have to keep the current behavior for backward compatibility. If you want to go this route please add the same option to |
The takeaway here is that write_ascii/binary_values append the values right after the specified header without inserting any extra character. Closing for now, feel free to reopen if necessary. |
Utilizing Message-based resources to write ascii values contains an error in creating the message. A space needs to be inserted between the message and the values blocks to form the message properly.
pyvisa/pyvisa/resources/messagebased.py
Line 257 in 7f26022
Example:
Returns 4 bytes transmitted because the message that was sent was
RES4
instead of the properly formattedRES 4
, which is 5 bytes in length when the space is included.The text was updated successfully, but these errors were encountered: