Switching between channels on signal generator

57 views
Skip to first unread message

MTC

unread,
May 21, 2018, 3:10:19 PM5/21/18
to python-ivi
I am learning python and trying to write a code for a Berkeley Nucleonics 845 signal generator and I need to switch between channels 1 and 2 to proportionally change the frequency. For now I have this code which turns the first output channel on without any error. 

However, when I change the output to 2 it still turns on the output 1 instead of 2. I'm not sure why. I am also hoping for some insight into turning the output channel off or turning both of them on. 

The commands to turn it on I have been using are :


sgn.write("FREQUENCY:MODE CW")
time.sleep(0.1)
sgn.write("OUTPUT 1")
time.sleep(0.1)


Thanks for any help

Alex Forencich

unread,
May 21, 2018, 4:12:02 PM5/21/18
to pytho...@googlegroups.com

If I'm not mistaken, that instrument only has 1 output channel, so, what, exactly, are you trying to do?

Alex Forencich
--
You received this message because you are subscribed to the Google Groups "python-ivi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-ivi+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

MTC

unread,
May 21, 2018, 4:36:41 PM5/21/18
to python-ivi
It is a dual output. The reason I am writing this code is to simulate a dual sweep with the frequencies changing in proportion to one another.

Alex Forencich

unread,
May 21, 2018, 4:40:17 PM5/21/18
to pytho...@googlegroups.com

Oh, are you using an 855 and not an 845, then?

Looks like you need to add the channel number to the command, so instead of output 1 to turn on the output, you would use output1 1 or output2 1. 

Alex Forencich

MTC

unread,
May 21, 2018, 4:48:40 PM5/21/18
to python-ivi
it is an 845 but they're super similar. Thanks for the advice! I will try that. :)

sporks...@gmail.com

unread,
May 21, 2018, 4:50:51 PM5/21/18
to Alex Forencich, pytho...@googlegroups.com

Would

 

sgn.write("OUTPUT1 0")
sgn.write("OUTPUT2 0")

 

turn off the outputs for him?   I haven’t written Python code in a long time and don’t use python-ivi (but am very interested in the this mailing list and the progresses made), so please forgive me if this is the incorrect command to turn off the outputs for him.   Just thought I’d try to help (and hopefully, not mislead him).

 

Kenneth Swarthout

Alex Forencich

unread,
May 21, 2018, 4:55:53 PM5/21/18
to pytho...@googlegroups.com

Yeah, that looks right, at least according to the manual.  For changing the frequency, it seems the correct command would be something like

sgn.write("SOURCE1:FREQUENCY:CW 1e9")

and for the other channel:

sgn.write("SOURCE2:FREQUENCY:CW 1e9")


Alex Forencich

MTC

unread,
May 21, 2018, 4:58:46 PM5/21/18
to python-ivi
what manual are you using? can you link it? 

Alex Forencich

unread,
May 21, 2018, 5:02:14 PM5/21/18
to pytho...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages