How to use PyVisa or maybe sockets in Ignition to talk to VISA/SCPI device?

@ghuck @cmaynes could one you post some examples of scripts you used for Raw Socket connection with SCPI commands ?

This thread contains the code that I use to access all of my SCPI devices. It uses the OPC server to pass data back and forth to the SCPI device, so speed is s little limited, but works for anything that does not require pushing the speed of the end device.
Most of the code has to be put onto the gateway, and it uses one UDT to manage the connection.
http://forum.inductiveautomation.com/t/scpi/23357/5

ghuck, The link is gone. I am very interested to find out how you did this. Any way I can get to see your code?

Thank you.

Are solution never used PyVisa, are VISA instruments all use SCPI so we wrote a client side python driver, which sends and receives SCPI data though the OPC server using a raw TCP/IP device connection. But are solution only works with SCPI enabled instruments.

There is a lot of code to post, and probably why the link no longer works. But if your still interested in going down the route, I can find a better way to post that here. It involves three gateway tag change scripts. one to generate the outgoing SCPI instructions, one to monitor and parse the returning data, and one to keep things running.

ghuck,

Yes I am very interested. It would be nice if there was a configurable SCPI OPC-UA server, but I can not find any information on that. So I would like to see how you did it and see if I can resolve my issue with looking at your code. I am also connecting to a Keysight DAQ970A instrument.

Thanks.

mrutten;

All of my code bits can be found in this link;
http://forum.inductiveautomation.com/t/scpi/23357/5

Hi ghuck,

The link isnā€™t available anymore. Would you mind sharing your code one more time ?

Strange the link http://forum.inductiveautomation.com/t/scpi/23357/5 still works for me. If you not in a hurry Iā€™ll put it out the Ignition Exchange but I wonā€™t be able to get to it until Sunday.

This is what I get when going to that link

I can't see it either:

Oops! That page doesnā€™t exist or is private.

That might be admin action based on a copyright complaint. Examine your post to verify you haven't cut-n-pasted somebody else's code.

He's linking to a message in a private exchange between him and Kyle Chase. (I think?)

1 Like

Iā€™ll just put it out on the Ignition Exchange next weekend, it will be more accessible, and easier to use. Now that I know the code is very stable, and I have used it many times on lots of systems that have SCPI interfaces.

I put the full set of scripts out on the Ignition exchange last night. It will take a few days (usually) before IA vets everything that I put into that downloadable resource. So just do a search for SCPI in a few days and it should be there.

Thank you so much. I appreciate your help.

@ghuck, were you able to upload your script? I still can not find it?

Marcel

@mrutten Iā€™m assuming itā€™s this? Ignition Exchange | Inductive Automation

Yes. Just follow the readme instructions in the download.

Thank you @Matthew.gaitan and @ghuck.
That was the link I was looking for.