Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


How to use labjack U12 and RB16 card to control solenoid directiona​l valve with Labview

U12 RB16 Relay

  • Please log in to reply
3 replies to this topic

#1 zjzx3853

  • Members
  • 2 posts

Posted 25 May 2015 - 01:55 PM

Hi Everybody, I am very new to Labjack,  please be patient with my "acknowledge".


I need to control a solenoid operated directional valve in hydraulic system with Labjack U12 and RB16 Relay Board. I am using recommend relays (Grayhill) but  no idea which vi. I should use or which example I can use to control the relays as a switch.


The coil voltage for the solenoid valve is : AC120V, 60Hz; AC110V, 50Hz


My goal is to control this solenoid valve open/close at certain time, am using Labview 2011. Any advise would be helpful.


Thank you!


#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 26 May 2015 - 07:58 AM

The U12 has 2 sets of digital I/O.  The IO lines and the D lines:






The RB16 connects to the DB25 connector and thus each module is controlled by the associated D line.  Note from the RB16 datasheet that they are controlled with negative logic, so output-low turns the module on and output-high (or input) turns the module off:




I suggest you start with LJlogger.exe.  Set the direction of the desired line to output, and then toggle the state of that line to confirm the module turns on and off.


In LabVIEW, the easiest way to control the output state of a particular D line is with EDigitalOut:




Check out the example "e fuction example.vi" which calls the different easy functions.


For general information about using the U12 with LabVIEW, see the following:





#3 zjzx3853

  • Members
  • 2 posts

Posted 28 May 2015 - 11:26 AM

Thanks for all the information, now I have confirmed the relays are working with LJlogger. I need some more help on the Labview vi set up. I am using  a 2-way solenoid valve to control a piston set and retract, I need to automate this piston for 3000 cycles ( assume 30 sec for one cycle, one cycle: set and then retract).


For EDigitalOut vi. would you give me more specific instruction? ( how to set up the ID number? Chanel? Write D? State? etc....) An example would be really helpful!!

Really appreciate your help!

#4 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 28 May 2015 - 01:51 PM

This topic is duplicated on NI's forum:



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users