Soohwan Posted April 2, 2019 Share Posted April 2, 2019 Hi, I want to control a solenoid valve (120VAC) using Daqfactory. I connected the valve with Labjack U3-LV and RB12 with a 70G-OAC5A relay. According to the Labjack forum(https://forums.labjack.com/index.php?showtopic=6716), it seems I have to make a function to change the digital direction (output↔ input). Please let me know how to do this. Thanks, Soohwan Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted April 4, 2019 Share Posted April 4, 2019 For the U series devices there is the DAQFactory - LabJack Application Guide which is installed with DAQFactory. This covers most everything you need to know. To control an output, you just need to create a Channel in DAQFactory with device type Dig Out. DAQFactory will switch the pin direction for you in this case. Quote Link to comment Share on other sites More sharing options...
LabJackSupport Posted April 4, 2019 Share Posted April 4, 2019 The comment you are seeing in LabJack forum topic is about directly controlling a solid-state relay (SSR), which is best done using "sinking" control. When you do that you need to change the DIO between input (relay off) and output-low (relay-on). https://labjack.com/support/app-notes/Controlling-Relays With the RB12, however, you just change the DIO between output-high (module off) and output-low (module on). The following is from the RB12 Datasheet: "The RB12 behaves with inverted or negative logic. For output modules that means the applicable LabJack DIO must be set to output-low to enable the I/O module. Output modules will be disabled with the DIO set to input or output-high." https://labjack.com/support/datasheets/accessories/rb12 Quote Link to comment Share on other sites More sharing options...
patrickokeeffe Posted February 11, 2020 Share Posted February 11, 2020 I would also like to comply with the guidelines for controlling relays published by Labjack. @LabJackSupport says: Quote When you do that you need to change the DIO between input (relay off) and output-low (relay-on). Does this mean the correct way to control relays (to comply with app note) is: // to turn off myChannel.strIOType = "Dig In" myChannel.restart() // to turn on myChannel.strIOType = "Dig Out" myChannel.restart() myChannel = 0 ...instead of just using a Dig Out type channel: myChannel = 0 //off myChannel = 1 //on Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted February 12, 2020 Share Posted February 12, 2020 I'm going to let LabJack comment on what should be done on a hardware level. But if you do, in fact, need to change between Dig Input and Dig output, you'd be better off just making two channels with the same channel #, but different I/O types, and using read(digInChannel) to do the digital input, and digOutChannel = 0 for the digital out. Doing channel.restart() all the time is not very efficient. Quote Link to comment Share on other sites More sharing options...
LabJackSupport Posted February 12, 2020 Share Posted February 12, 2020 I found another topic here about sinking or open-collector style of control: https://support.azeotech.com/topic/3761-output-low/?tab=comments#comment-12245 Turns out we have an example called Open-Collector_Output.ctl: https://labjack.com/support/software/examples/ud/daqfactory Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.