1

Is it a library like pyvisa which permits connect from Ironpython to a rs232 device?

Anne
  • 13
  • 5
  • What are you trying to do? Have you looked at .NET serial port capabilities? e.g. http://stackoverflow.com/a/21513060/468244 – Simon Opelt Feb 20 '15 at 13:36
  • Yes, but I need to control a device through rs232. At the end, I use the .Net library (VISA) of National Instrument, and I can control my device. – Anne Feb 24 '15 at 09:35

1 Answers1

1

I have been able to use the alternate VISA library from Tektronix. Install TekVisa and then use the DLL located in the GAC_32 folder.

Example Ironpython 2.7 code:

import clr  clr.AddReferenceToFileAndPath('C:\Windows\\assembly\\GAC_32\\TekVISANet\\1.1.1.0__7f19bb2a5a9ae6e8\\TekVISANet.dll')

import TekVISANet
v = TekVISANet.VISA()
v.Open("GPIB0::6::INSTR")
id =v.Write("*IDN?",50)
s = v.Read(50)
print s