Controlling a relay with a labjack U6


Quentin

Recommended Posts

I have a relay connected to my digital I/O (FIO0) on my labjack, I have created a channel (Dig Out) called relay_control to switch on/off this relay with a daqfactory page0 - descriptive text component (expression: relay_control[0], action: toggle between). for some reason when i click on the page component it does send a signal but then the relay switches back off because the signal is not sustained... I though that was the whole point of a "toggle". Do you know how I can fix this? 

Link to comment
Share on other sites

The problem with the new doc is that you created a new sequence called "relay_control" which overrides the channel with the same name.  Both channels and sequences are in the global namespace so you have to give them unique names.  Once I deleted the sequence the application works correctly.  In fact, your last document also worked correctly with no modifications.

Link to comment
Share on other sites

Sequences are objects within DAQFactory script, so you can reference their status, start and stop them, etc.  So, when you name a sequence the same as a Channel or variable, you now have two different objects in DAQFactory that have the same name.  DAQFactory has a particular order for checking names and Sequence names are checked before Channel names.  So, once you created a sequence called relay_control your screen controls / script could no longer access the Channel but instead was accessing the sequence.

As to the reboot.  That is just a check that most service techs do to ensure that you don't have interfering software running in the background that you have forgotten about, or a result of other things you have done.  It has nothing to do with the robustness of DAQFactory.  Likewise creating a blank document with a single digital output is simplifying the problem and removing any possible interference.  This is also a common, and in many ways one of the most important debugging techniques for really  anything, not just DAQFactory.

Link to comment
Share on other sites

ok the layout is good, i confirm it is an issue with DAQ factory. it seems like the signal doesn't stay high by using the toggle between feature... since it only goes to zero for a second and then back to 1. If i click continuously it stays at zero

Link to comment
Share on other sites

Maybe it is because my labjack is not configured on DAQfactory? When I click on configure device it only has the LabJack UD option that would correspond to U6 but then it promts me for a U9 ethernet. So I have configured any device...

 

Link to comment
Share on other sites

You are setting an output, not reading the state of that output so your hardware configuration isn't going to matter.  In fact, you could test by simply changing the channel from a LabJackUD device to a Test Device Dig Out channel and you will likely see the same behavior.

Any chance I can remote into your system to just see?  You are doing something that isn't getting across in these forum posts.  Just email us direct at support @.

The UD devices I believe output 3.3V when active, but that is more a question for LabJack.

Link to comment
Share on other sites

Ok it's all good! I got it fixed with the labjack support. 

Setup solution:

Relay + port connect to VS on LJ

Relay - port connect to GND

Relay D port connect to FIO0 

Then setup your channel like this:

Rout = 1 (relay open)

Rout = 0 (relay closed)

image.png

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.