LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Relay Conflict

I have built a control system for 36 doors. They all require that a switch be closed every 30-40 seconds, independent of one another. I am running into issues every hour or so where apparently I am trying to close them at the "same time" and it's locking up my application. Apparently, since it's a 400mS "closure" another door may try to close a relay when the device is already in use. I am using a PXI 2569. Is there a way for me to make a connection wait until the card is available? It a 400mS contact I have to make, so when I get ten or twelve doors up and running, the conflict is pretty regular. I am not sure, at all, if this is what is locking up my application, I just know that when I have only a couple of doors running, it happens much less frequently. I don't get an error message or anything, the front panel just goes "inactive" and gray. Please help, boss is FREAKING!!
 
Thanks. Switch Newbie
One should welcome adversity as an opportunity to excel.
0 Kudos
Message 1 of 5
(2,344 Views)
In post #2 of my Action Engine Nugget I posted an Action Engine that can be used to ensure no two values are changed at the same time while also enusring no updates are missed.
 
If that does not help you with your situation, then please post your code so we can advise further.
 
I hope that helps,
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 5
(2,333 Views)

You could use Semaphores to protect the Card from multiple callers.  See what is a semaphore.

http://digital.ni.com/public.nsf/allkb/A1BA7477550DBFDE862565BC006CD410

Visualize the Solution

CLA

LabVIEW, LabVIEW FPGA
0 Kudos
Message 3 of 5
(2,329 Views)
Without seeing your code, I'm just guessing here. Are you sending the commands to change the relays in sequece with a timed delay? Are you sending a command to change one individual relay at a time, or all 36 relays at once? If done properly, you should be able to control the data flow from one "set relays" command to the next, perhaps using Error In/Error Out, which should prevent the software from trying to send commands simultaneously.

The specs for the board say the maximum relay operation time is 3.5mS, so you should not have any trouble with the timing of the board.

If you can post part or all of your code, that would definitely help.

B-)
0 Kudos
Message 4 of 5
(2,305 Views)

It turns out that this wasn't my problem at all. I had placed too short of a "wait" in my DAQ section (it was not allowing my DAQ loop to complete every time), that was causing the grayed out condidtion. As for the relay conflict. I had structured it properly, like you suggested already. The only time I was getting the conflict was when I was "manually" throwing the relay. My program had already accounted for the possibility of multiple access. The commands are in an arrray, so they were going to be handled sequentially anyway. This was just a case of me jumping the gun and blaming my architecture rather than keeping it simple when diagnosing.

Thanks for your help!!  Have a great day!!

Chris

One should welcome adversity as an opportunity to excel.
0 Kudos
Message 5 of 5
(2,302 Views)