Pump control using analog input


Chris

Recommended Posts

I would like to be able to control a peristaltic pump using a table of data (time vs voltage output; see attached simple file by way of example). The goal is to increase pump speed over time.  If you look at the simple Excel table it has 2 columns; column 1 is time (in hours) and column 2 is the voltage output (0-5V for pump control). So, I would like to be able to create a table like the one attached (in any suitable format), have a program read it (DAQFactory) and then via the Labjack send the nominated voltage output (for that particular time) to the pump to control its speed.

 

Many Thanks

Example.xlsx

Link to comment
Share on other sites

OK, here is a working sample.  You have to convert the Excel file to a simple CSV file.  I've attached the one you gave.  If your data is always this simple you might want to skip Excel and just edit it in Notepad.  Put that file in c:\daqfactory, though you can change the path in the controlPump sequence.  That sequence will read the file, then change a channel called "output" based on those values and the time.  Change the output channel to point to the LabJack output.

 

 

chris.csv

filePlayback.ctl

Link to comment
Share on other sites

The problem is that there are actually 3 different LabJack drivers, based on the generation of LabJack device you are using.  The U12 uses one driver, the U3, U6, UE9 use a different one (the UD), and the T7 and other T devices use a third (the M series).  This is because LabJack created new drivers for new generations of devices.  It looks like you selected the device for the U12.  You need to select the one for UD devices.

 

Link to comment
Share on other sites

Is the LabJack set to ID 1?  (you can find out in the Test Panel).  You might want to use D# 0, which means "First found", though that is not recommended if you are ever going to have more than 1 LabJack.  Also note that the UD does not support having two programs accessing it at the same time, so DAQFactory won't be able to access your device if you have Test Panel running.  You may even have to quit both then start DAQFactory after the Test Panel has quit.

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.