-
Notifications
You must be signed in to change notification settings - Fork 332
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
add example HP 34401A with RS232 #993
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: d-el <d2.718l@gmail.com>
Signed-off-by: d-el <d2.718l@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution.
What do you want to show with your example?
You can add yourself to the authors.txt.
adapter = SerialAdapter(port=args.serial, | ||
baudrate=1200, # Recommend value | ||
parity=serial.PARITY_NONE, | ||
stopbits=serial.STOPBITS_TWO, | ||
bytesize=serial.EIGHTBITS, | ||
xonxoff=True, | ||
dsrdtr=True, | ||
rtscts=False, | ||
write_termination='\n', | ||
read_termination='\n', | ||
) | ||
meter = HP34401A(adapter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why don't you just use the default connection (VISA)?
adapter = SerialAdapter(port=args.serial, | |
baudrate=1200, # Recommend value | |
parity=serial.PARITY_NONE, | |
stopbits=serial.STOPBITS_TWO, | |
bytesize=serial.EIGHTBITS, | |
xonxoff=True, | |
dsrdtr=True, | |
rtscts=False, | |
write_termination='\n', | |
read_termination='\n', | |
) | |
meter = HP34401A(adapter) | |
meter = HP34401A("ASRL" + args.serial) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm facing a problem where the "SYSTem:REMOte" command is missing.
Only now I see the solution in the previous PR.
meter = HP34401A("ASRL/dev/ttyUSB0", timeout=5000, baud_rate=1200, data_bits=8, parity=0)
meter.write('SYSTem:REMote')
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be probably added in the __init__
method.
Add example with HP 34401A by RS232