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.


Photo

Multiple Solenoid Control Using U12,RB-16 and OS X


  • Please log in to reply
17 replies to this topic

#1 VHD

VHD
  • Members
  • 34 posts

Posted 10 March 2013 - 11:12 PM

Greetings LabJack Forum: I am interested in controlling 6 24VDC 4 Watt solenoids individually with the posibillty of controlling two or more at the same time. I will be using the Exodrive and LabJackPython library to do the actual control using OS X. Based on the various topics on this forum I do understand I will need the U12, RB-16 and 6 Grayhill 70M-ODC5 I/O modules due to the fact that the DIO do not provide enough current to activate the relays. What I have right now besides the 24VDC 4 Watt solenoids are 6 crydom SSR with the following specs: SOLID STATE PANEL MOUNT RELAY Control Voltage Range: 3.5V DC to 32V DC Operating Voltage Min: 3V DC Operating Voltage Max: 60V DC Contact Configuration: SPST-NO Load Current: 3A Switching Mode: DC Switch Relay Terminals: Screw Clamp RoHS Compliant: Yes and a 24V 2.5A, 60W power supply. My concern is the wiring, I have attached a schematic of what I think the wiring should be (I'm a chemical engineer by trade dabbling in I/O control for a reactor). The (-) from the power supply is going to all the (-) of the solenoid The (+) from the power supply is going to the first SSR Output1, and the others SSR's are daisy chained The (+) from the individual solenoid is going Output 2 to its respective SSR VIA the DB25 connector the RB-16 is connected to the U12, I have 6 70M-ODC5 on R1-R6. Here is my concern: Do I connect R1(+) to SSR1 Input (+) and Ground 0 to SSR1 Input (-)? Do I connect R2(+) to SSR2 Input (+) and Ground 0 to SSR2 Input (-)? Do I connect R3(+) to SSR3 Input (+) and Ground 0 to SSR3 Input (-)? Do I connect R4(+) to SSR4 Input (+) and Ground 0 to SSR4 Input (-)? Do I connect R5(+) to SSR1 Input (+) and Ground 0 to SSR5 Input (-)? Do I connect R6(+) to SSR1 Input (+) and Ground 0 to SSR6 Input (-)? or do I connect the respective R(-)'s to the SSR input (-)'s? Sorry for the long description and problem. Thanks VHD

Attached Thumbnails

  • Screen_Shot_2013_03_11_at_2.11.44_AM.png


#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 11 March 2013 - 10:32 AM

Before we look at the details, it seems to me that you could get rid of 1 layer of SSRs. You have RB16 SSRs, controlling external Crydom SSRs, which in turn control your 24V/167mA solenoids. The RB16 SSRs could control the 24V/167mA solenoids directly, or the U12 D-lines could likely control the external Crydom SSRs directly.

#3 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 11 March 2013 - 10:33 AM

One added consideration is that solenoids present an inductive load. Did you choose the Crydom relays such that they are specifically rated for inductive loads?

#4 VHD

VHD
  • Members
  • 34 posts

Posted 11 March 2013 - 10:49 AM

Before we look at the details, it seems to me that you could get rid of 1 layer of SSRs. You have RB16 SSRs, controlling external Crydom SSRs, which in turn control your 24V/167mA solenoids.

The RB16 SSRs could control the 24V/167mA solenoids directly, or the U12 D-lines could likely control the external Crydom SSRs directly.



Greetings:

Thank you for your reply, I thought the D-lines could not provide enough current to the SSR's that is why I was leaning towards the RB-16. Furthermore my thinking was that the SSR's would provide an extra layer of protection for the solenoids (which are driving some expensive swagelok valves) correct me if I am wrong. I have not purchased and LabJack hardware yet, but looking at a previous post and as you mentioned maybe using a SSR is not needed would the following rout be more direct?

U3-LV with with RB-12 and 6 G4ODC5A (Opto22, 5-200 VDC Output @ 1 A)?

Even going this rout my concern is the wiring.

Thank you.

--Vivek

#5 VHD

VHD
  • Members
  • 34 posts

Posted 11 March 2013 - 10:54 AM

One added consideration is that solenoids present an inductive load. Did you choose the Crydom relays such that they are specifically rated for inductive loads?



Unfortunately the are not and I will need a diode, but as I replied in the previous post maybe going about using the U3-LV with the RB12 with 6 G4ODC5A (Opto22, 5-200 VDC Output @ 1 A) would be the best rout to control those valves.

Thank you.

--VHD

#6 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 11 March 2013 - 11:26 AM

What are trying to protect the valves from? What are the failure modes or other things that might be of concern?

The digital I/O on all our devices can control most solid-state relays directly, but cannot control most mechanical relays directly:

http://labjack.com/s...trolling-relays

If you don't have a U12 already, I would suggest the U3 as it is newer and generally better in most ways.

There are a lot of ways to do this with the U3.

- RB12 with proper module.
- PS12DC.
- External SSR.
- LJTick-RelayDriver controlling external relay.

These are all pretty similar. A couple possible advantages to the external SSR, are that you can choose an SSR specified for inductive loads, and you can place the SSR close to the solenoid (and keep the U3/computer further from the loads). Perhaps if you go with the external SSR, go ahead and buy LJTick-RelayDrivers so there is no question about driving the SSRs.

#7 VHD

VHD
  • Members
  • 34 posts

Posted 11 March 2013 - 04:56 PM

Dear LabJack Support: Based on your comments I have come up the following solution: 1) U3 connected with the RB-12 relay board 2) Since I am trying to control 6 24VDC 4W solenoids, I will need 6 DC-output modules, G4ODC5MA (Opto22, 5-60 VDC Output @ 3 A, Manual Override) 3) The 6 DC-output modules will be placed on R0-R5 4) Switch S3 and S4 banks to OFF The wiring solution that I have come up with: Using my 24V power supply: Connect the (-) from the PS to each of the (-) solenoid inputs Connect the (+) from the PS to R0(+) Daisy Chain R0(+) -> R1(+) -> R2(+) -> R3(+) -> R4(+) -> R5(+) Connect R0(-) -> Solenoid-1(+) Connect R1(-) -> Solenoid-2(+) Connect R2(-) -> Solenoid-3(+) Connect R3(-) -> Solenoid-4(+) Connect R4(-) -> Solenoid-5(+) Connect R5(-) -> Solenoid-6(+) I have attached my interpretation of the wiring schematic... I have a few questions 1) Does the wiring make sense 2) Can I actually daisy chain: R0(+) -> R1(+) -> R2(+) -> R3(+) -> R4(+) -> R5(+) 3) The I/O module is that correct for DC output for my 24VDC solenoid? Thank you for your help. --VHD

Attached Thumbnails

  • Screen_Shot_2013_03_11_at_7.54.04_PM.png
  • Screen_Shot_2013_03_11_at_7.54.04_PM.png


#8 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 11 March 2013 - 08:09 PM

1&3) Module choice looks good and wiring looks good. 2) With the point-to-point wiring you describe, the first leg of the wire has to carry the total current for all 6 loads. If you use more of a hub/spoke pattern, then each wire just carries the current for its load. So the point-to-point is fine, but just make sure you use wire than can handle 6*167 mA.

#9 VHD

VHD
  • Members
  • 34 posts

Posted 12 March 2013 - 09:00 AM

1&3) Module choice looks good and wiring looks good.

2) With the point-to-point wiring you describe, the first leg of the wire has to carry the total current for all 6 loads. If you use more of a hub/spoke pattern, then each wire just carries the current for its load. So the point-to-point is fine, but just make sure you use wire than can handle 6*167 mA.


Thank you for your reply. I don't quite understand the hob/spoke pattern. Could you please elaborate on that. My next question has to do with control, I would simply like to turn on or turn off my solenoid using python, MAC OS X and the exodriver for control is there a simple way of doing that, I am not quite sure if this forum is appropriate for my question or should I go to the python/OS X forum.

Thank you again for all of your help.

Best regards.

--VHD

#10 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 12 March 2013 - 11:57 AM

The power supply is the "hub", and then you have a "spoke" going to each Rn+. So you have 6 wires from the power supply positive to each Rn+ and each wire carries the 167mA needed for 1 solenoid. Will have someone else post about software, but you want to set D0 to output-low to enable R0 and set D0 to output-high to disable R0.

#11 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 12 March 2013 - 12:28 PM

Using LabJackPython, http://labjack.com/s...t/labjackpython , to set a D0 line you will want to use either the eDigitalOut or rawDIO method in the U12 class of the u12 module. Documentation can be found in the u12.py source code or using the Python help function on the class. Here's a quick Python example:

import u12

d = u12.U12() #open first found device

#Set D0 to output-high
d.eDigitalOut(channel = 0, state = 1, writeD = 1)

#Set D0 to output-low
d.eDigitalOut(channel = 0, state = 0, writeD = 1)


#12 VHD

VHD
  • Members
  • 34 posts

Posted 12 March 2013 - 02:37 PM

Using LabJackPython, http://labjack.com/s...t/labjackpython , to set a D0 line you will want to use either the eDigitalOut or rawDIO method in the U12 class of the u12 module. Documentation can be found in the u12.py source code or using the Python help function on the class. Here's a quick Python example:

import u12

d = u12.U12() #open first found device

#Set D0 to output-high
d.eDigitalOut(channel = 0, state = 1, writeD = 1)

#Set D0 to output-low
d.eDigitalOut(channel = 0, state = 0, writeD = 1)


Thank you for your help, however after talking to the LabJack support, I went the U3, RB12 rout with my solenoids connected to R0-R6. Looking at U3.py there is no method, eDigitalOut to control the solenoid channel. Is there another function specific to the U3 with RB12 to use?

Thank you.

--VHD

#13 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 12 March 2013 - 02:46 PM

Take a look at the LabJackPython page's quick start:

http://labjack.com/s...t/labjackpython

It demonstrates setting a digital output on FIO4 using Modbus and low-level commands, and the class methods to use.

#14 VHD

VHD
  • Members
  • 34 posts

Posted 12 March 2013 - 07:06 PM

Take a look at the LabJackPython page's quick start:

http://labjack.com/s...t/labjackpython

It demonstrates setting a digital output on FIO4 using Modbus and low-level commands, and the class methods to use.



Ok that makes sense....Since my solenoids will be connected to R0-R5 which correspond to EIO0 - EIO5 and thus registers: 6701-6706

The following code should be able to turn on valves 4,5,6:

>>> import U3
>>> d = u3.U3()
>>> EIO1_STATE_REGISTER = 6701
>>> EIO2_STATE_REGISTER = 6702
>>> EIO3_STATE_REGISTER = 6703
>>> EIO4_STATE_REGISTER = 6704
>>> EIO5_STATE_REGISTER = 6705
>>> EIO6_STATE_REGISTER = 6706
>>> d.writeRegister(EIO1_STATE_REGISTER, 1) 
>>> d.writeRegister(EIO2_STATE_REGISTER, 1) 
>>> d.writeRegister(EIO3_DIR_REGISTER, 1) 
>>> d.readRegister(EIO4_STATE_REGISTER,0)
>>> d.readRegister(EIO5_STATE_REGISTER,0)
>>> d.readRegister(EIO5_STATE_REGISTER,0)

Is this correct?? Do I need to set anything else in the code??

Thanks.

--VHD

#15 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 13 March 2013 - 12:26 PM

Your code should look like this:

import U3

d = u3.U3()

EIO0_STATE_REGISTER = 6008
EIO1_STATE_REGISTER = 6009
EIO2_STATE_REGISTER = 6010
EIO3_STATE_REGISTER = 6011
EIO4_STATE_REGISTER = 6012
EIO5_STATE_REGISTER = 6013
d.writeRegister(EIO0_STATE_REGISTER, 1) #EIO0 output-high -> turn off R0
d.writeRegister(EIO1_STATE_REGISTER, 1) #EIO1 output-high -> turn off R1
d.writeRegister(EIO2_STATE_REGISTER, 1) #EIO2 output-high -> turn off R2
d.writeRegister(EIO3_STATE_REGISTER,0) #EIO3 output-low -> turn on R3
d.writeRegister(EIO4_STATE_REGISTER,0) #EIO4 output-low -> turn on R4
d.writeRegister(EIO5_STATE_REGISTER,0) #EIO5 output-low -> turn on R5

To set a single state, use registers 6000-6007 for FIO0-7, 6008-6015 for EIO0-7 and 6016-6019 for CIO0-3. Register 6701 sets all EIO states in one 16 bit value, where bits 0-7 are the EIO states and bits 8-15 are the EIO write masks. That would only require one write like:

EIO_STATES_REGISTER = 6701
d.writeRegister(EIO_STATES_REGISTER, 16135) #b0011111100000111

Also, to clarify EIO3-5 are turning on valves 4 (R3), 5 (R4) and 6 (R5).

#16 VHD

VHD
  • Members
  • 34 posts

Posted 13 March 2013 - 03:57 PM

Great wonderful, thank you for all of your help I cant wait to for my LabJack to come in. I have a few related questions: 1) How do you know for certain that your channel is open or set to high? Can you request channel information or do you need to change from output to input? 2) Related to one can you place a LED in series with the solenoid to allowing it to brighten when the channel is open? 3) Are there enclosures available for the RB12? Thanks again. --VHD

#17 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 13 March 2013 - 05:16 PM

1) Use the readRegister method to read current direction and state settings. It will not change settings. States start at address 6000 (FIO0) and directions at 6100 (FIO0). Reading EIO0 direction and state would look like:

state_eio0 = d.readRegister(6008)
dir_eio0 = d.readRegister(6108)

2) The LED app note will be helpful for your second question and U3 connections:

http://labjack.com/s...t/app-notes/led

As for your third question I'll have someone else here respond back. Also, they may have more to add to my second question response.

#18 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 14 March 2013 - 04:07 PM

2) I suggest you put an LED with resistor in parallel with the solenoid, rather than in series. Just have the 24 volts feed both loads in parallel. 3) No, we don't have any enclosures specific to the RB12.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users