
Multiple Solenoid Control Using U12,RB-16 and OS X
#1
Posted 10 March 2013 - 11:12 PM
#2
Posted 11 March 2013 - 10:32 AM
#3
Posted 11 March 2013 - 10:33 AM
#4
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
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
Posted 11 March 2013 - 11:26 AM
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
Posted 11 March 2013 - 04:56 PM
#8
Posted 11 March 2013 - 08:09 PM
#9
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
Posted 12 March 2013 - 11:57 AM
#11
Posted 12 March 2013 - 12:28 PM
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
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
Posted 12 March 2013 - 02:46 PM
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
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
Posted 13 March 2013 - 12:26 PM
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
Posted 13 March 2013 - 03:57 PM
#17
Posted 13 March 2013 - 05:16 PM
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
Posted 14 March 2013 - 04:07 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users