Pump control using analog input


Chris
 Share

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share