jds6600_python icon indicating copy to clipboard operation
jds6600_python copied to clipboard

Channel enable/disable started behaving weird...

Open DrBwts opened this issue 4 years ago • 4 comments

It was all working fine before Xmas but now whenever I uses j.setchannelenable(True, True) the channels sometimes turn on & off but always raises the exception UnexpectedReplyError(ret)

It doesnt seem to matter which channel I'm enable/disabling I sometimes get what I asked for but always get that exception.

Things I've changed, I'm now running from a virtual environment which has QCodes in it that needs Python 3.8 or above, will this effect the functionality of your code?

DrBwts avatar Jan 17 '22 14:01 DrBwts

Hi,

On 17.01.22 15:49, DrBwts wrote:

It was all working fine before Xmas but now whenever I uses |j.setchannelenable(True, True)| the channels sometimes turn on & off but always raises the exception |UnexpectedReplyError(ret)|

It doesnt seem to matter which channel I'm enable/disabling I sometimes get what I asked for but always get that exception.

Things I've changed, I'm now running from a virtual environment which has QCodes in it that needs Python 3.8 or above, will this effect the functionality of your code?

Thanks for your feedback.

Two questions:

  • do you only have an issue with that specific command? Or do other commands also give that exception?

  • What version of python do you use?

Kr.Message ID: @.***

on1arf avatar Jan 18 '22 10:01 on1arf

All the commands return the exception. When I put them in a try: .. except: ... they all do their jobs except the change frequency method that does nothing.

DrBwts avatar Jan 18 '22 14:01 DrBwts

Hi,

On 18.01.22 15:10, DrBwts wrote:

All the commands return the exception. When I put them in a |try: .. except: ...| they all do their jobs except the change frequency method that does nothing.

I have just tried on an ubuntu 20.04LTS with python 3.8.10 and python 3.9.5 and both seems to work correctly.

The error you get indicate that the module does not receive a ":ok" after issuing a command to the device. Can you try the following debug commands. (You should get the following answers)

j.DEBUG_readregister(0,0) b':r00=60.\r\n'

j.DEBUG_writeregister(0,100) b':ok\r\n'

j.DEBUG_readregister(0,0) b':r00=60.\r\n'

Note, that changing the frequency does not work is normal as the method first calls a "self.getmode()" before changing the frequency.

If that command fails, it will not continue, so the frequency is never set.

Kr.

Message ID: @.***

on1arf avatar Jan 18 '22 19:01 on1arf

j.DEBUG_readregister(0, 0) b':r00=15.\r\n j.DEBUG_writeregister(0, 100) b':ok\r\n j.DEBUG_readregister(0, 0) b':r00=15.\r\n

DrBwts avatar Jan 19 '22 13:01 DrBwts