Quentin Posted March 31, 2023 Share Posted March 31, 2023 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? Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted March 31, 2023 Share Posted March 31, 2023 I would have to see your document. Can you post your .ctl doc? Quote Link to comment Share on other sites More sharing options...
Quentin Posted March 31, 2023 Author Share Posted March 31, 2023 Here is my setup, it's a bit messy because I'm also struggling to make a PID loop to control the Relay with 3 temperature setpoints from user inputs with their respective duration. Test2.ctl Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted March 31, 2023 Share Posted March 31, 2023 The text display labelled "Relay_control" doesn't work because the toggle action's channel is set to LED_Control, not Relay_control. It looks like maybe you had some other channels for controlling a LED and it got left over. Quote Link to comment Share on other sites More sharing options...
Quentin Posted April 4, 2023 Author Share Posted April 4, 2023 Yes sorry, this has nothing to do with the issue, I had just changed all the names so it would not be confusing for you. Here is a cleaner document. I still have the same issue. It switches the relay off for 1 second and then it's on again... Test2.ctl Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted April 4, 2023 Share Posted April 4, 2023 Are you sure you don't have either the Temperature_Loop sequence running or PID_loop1. Both of these would automatically change that channel. Quote Link to comment Share on other sites More sharing options...
Quentin Posted April 4, 2023 Author Share Posted April 4, 2023 No, I have even deleted them now end I still have the same issue. I tried making a sequence that would keep it on or off depending on the status but it overrides the button action... Test2_debug.ctl Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted April 4, 2023 Share Posted April 4, 2023 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. Quote Link to comment Share on other sites More sharing options...
Quentin Posted April 4, 2023 Author Share Posted April 4, 2023 alright then it might be an issue with my relay/ labjack pulg ins. Currently have NC/NO/COM relay with NC on FIO0 and COM on GND Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted April 4, 2023 Share Posted April 4, 2023 I doubt it. Reboot, then start a new document adding just the digital out channel and a button to toggle it and see if it works. Quote Link to comment Share on other sites More sharing options...
Quentin Posted April 4, 2023 Author Share Posted April 4, 2023 this is weird, how come the sequence had anything to do with it, especially when they were not running?? And how come now it could be a reboot, does it lack robustness? I though this was industrial grade software. Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted April 4, 2023 Share Posted April 4, 2023 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. Quote Link to comment Share on other sites More sharing options...
Quentin Posted April 4, 2023 Author Share Posted April 4, 2023 ok understood. Still doesn't work after rebooting. Troubleshooting my setup right now Quote Link to comment Share on other sites More sharing options...
Quentin Posted April 4, 2023 Author Share Posted April 4, 2023 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 Quote Link to comment Share on other sites More sharing options...
Quentin Posted April 4, 2023 Author Share Posted April 4, 2023 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... Quote Link to comment Share on other sites More sharing options...
Quentin Posted April 4, 2023 Author Share Posted April 4, 2023 My relay needs to operate at 3V does the labjack automatically adapt to 3v or I need to plug my relay on DAC0 and set the output (D to A) to 3v? Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted April 4, 2023 Share Posted April 4, 2023 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. Quote Link to comment Share on other sites More sharing options...
Quentin Posted April 5, 2023 Author Share Posted April 5, 2023 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) 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.