GPIB programming in C#

Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.
Highlighted

IronPython 2.7 does not work with Pyvisa 1.6.3

I am new on python , and I just create a small python script to communicate with one instrument using GPIB. and pyvisa 1.6.3

     import visa

     rm = visa.resourceManager()

     my_instrument = rm.open_resource('GPIB::5::INST')

     my_instrument.write('MEAS:CURR?")

     rv = my_instrument.read

     print (rv)

If I run this script with python 3.4, everything works fine

but I want to use visual studio  C# with IronPython 2.7 to control the instruments

and I cant't load the visa.py

I received a lot of error messages

unexpected token 'from'

(because does not recognize "from pyvisa.highlevel import ResourceManager"), I moved the highlevel.py to the same visa.py directory and changed the command to ("from haiglevel import ResourceManager)

looks that the IronPython does not recognize the commanf

"from *

from pyvisa.highlevel) the period on this command

etc.

looks thet the from command does not compatible between python 3.4 and IronPython 2.7

some one knows if I can use pyvisa 1.6.3 under IronPython 2.7?

0 Kudos
Message 1 of 1
(1,187 Views)
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.