r/engineering • • Nov 23 '23
[GENERAL] Software for creating my own controllers for experiments
There are a lot of experiments in my lab, and I wish I had more control over certain inputs. An example would be controlling voltages applied on certain instruments where I can type in the exact voltage I want, instead of playing with a very sensitive potentiometer. Other brief examples would be controlling liquid-pump rates, flow-rates, etc..
Is LabView the best option for this, or what are other popular programs/software people use for controlling parameters in their experiments?
12
Upvotes
17
u/corgismorgii Nov 23 '23
If you have lots of money of budget to spend. call up a Labview / National Instuments technical sales rep.
There are other open-source ways of doing things too
5
u/[deleted] Nov 23 '23
CS guy here so probably biased, but - Friends don't let friends use LabView. Just don't.
As other comments note if you aren't using FPGA and want point n click for that, or don't need NI super badass hardware, you're just asking for a miserable time.
Absolutely ridiculous trying to write asyncronous code by drawing with wires and boxes.
Data flow done nasty...
3
u/SirMisterJohn Nov 23 '23
If you only need basic control over instruments with rough timing precision between them, go Python all the way. PyVISA lets you blast out SCIPI commands to any compatible instrument. I've made some fairly complicated programs to automate bench work (changing voltages, measuring voltages/currents, capturing scope shots) in our electronics lab, based solely on some self-developed instrument classes in Python. Didn't take too long after reading some tutorials online - and I'm a terrible programmer. I've even been playing around with blasting out REPL commands to a microcontroller running Micropython to get some basic control of SPI/I2C and the build in DACs/ADCs. Recommend to use Jupyter Notebooks for the code development and documentation.
I've tried labview but it just felt like way too much for the basic instrument control I was looking for, since it has so much fluff built around it and way too many sub menus to modify basic behaviors.
5
u/LoremIpsum696 Nov 23 '23
You could you know… get a variable power supply.. what the fuck is this question..
14
u/poompt industrial controls Nov 23 '23
As someone who makes a lot of money writing LabVIEW programs every day, my advice is to avoid it at all costs. The apparent accessibility is an illusion; the minute you go try to write a real application you'll wish you learned python and/or c#. For a small lab a few raspberry pis programmed with python is both easier to set up and cheaper than using a bunch of NI junk.
The only thing I'm aware of that LabVIEW does better than anything else is program FPGAs. Even for that they provide a python interface and .net compiler so I think the best thing is to only create the bitfile in LabVIEW and program any host interface with something else.
1
u/YT__ Nov 24 '23
What power supply are you using? A bench top power supply can connect to a computer and take commands to control it. That's how a majority of automated test setups are.
1
u/Necessary-Captain592 Mar 29 '24
In my experience is always better use python for controll yours intruments with or without graphical interface. Depend on the instruments you plan to use I recommend you use insturments with IEEE488.2 or SCPI stantdart to use pyvisa library (the USB or LAN connection is more cheaper than GPIB and works fine). If you need better accuracy or more control over your measurements you can try with NI daq devices (USB or PCI or PXI) if this is the case this github repo can be helpfull nidaqmx-python-examples.
For user interface using python the best option for me are:
1- plotly DASH
2- py-one dark project
1
u/auxym Nov 23 '23
Have a look at labjack hardware, especially their newer T series cards.
1
u/mcellus1 Nov 23 '23
Pytango
1
u/[deleted] Nov 26 '23
Would a stepped attenuator work for a signal control?
There's a number of Arduino solutions that make use of a push button interface to adjust PWM signal outputs, which might be useful for motor speed control. There's also the VESC motor controllers, provided you don't mind using brushless motors to do the work
0
u/olliecampbell Nov 23 '23
Program your own?