1
votes

I like to control a VISA device (PAX1000 polarimeter).

I start programming under Windows using ni-visa backend for pyvisa and the communication works perfectly. Also if I use the pyvisa-py backend with winusb driver (changing the driver with zadig), everything works ok.

Then I move the polarimeter to a Raspberry Pi, using also the pyvisa lib, but with pyvisa-py backend (ni-visa is not available for ARM). Most of the commands works as expected and I get the expected answer. But there where also some commands, whichs doesent work. For example if I use

inst.write('SENS:CALC 9;:INP:ROT:STAT 1')

I get:

(40, <StatusCode.success: 0>)

The device doesn't set the value. (The same code runs fine under Windows.)

So I have no idea, whats going on.

Samplecode:

import pyvisa
import numpy as np

#rm = pyvisa.ResourceManager('@py')
rm = pyvisa.ResourceManager()
rm.list_resources()

#ni-visa
inst = rm.open_resource('USB0::0x1313::0x8031::M00587150::INSTR')
#pyvisa-py
#inst = rm.open_resource('USB0::4883::32817::M00587150::0::INSTR')

print(inst.query('*IDN?'))

print(inst.write('SENS:CALC 9;:INP:ROT:STAT 1'))

print(inst.query('SENS:DATA:LAT?'))

1

1 Answers

0
votes

Ok, I found a solution. Updateing python 3.7 to latest (3.9.2) solved the problem.