From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Faster way to switch relays on RT PXI-2564?

Solved!
Go to solution

I am trying to switch relays on a PXI-2564 relay card on a PXI-8184 running LVRT. I am running a host vi on my laptop that is switching networked boolean variables such that True=closed and False=open. The way I am doing it now the vi eats up 64% of my PXI processor load. Is there a more efficient way to do this?

 

Michael

Download All
0 Kudos
Message 1 of 4
(2,918 Views)
Solution
Accepted by topic author Michael_Fidler
There is a settling time associated with writing to a relay.  I would suggest converting your switched relay array of booleans to an ascii list of relays that you want to open and another ascii list of relays you want to close.  You would also have to check if the relay has already been commanded to open (or close).  Then just send this list to one instance of the "open relays" vi or the "close relays" vi.  So you are minimizing the amount of communication to Dev 2.
Message 2 of 4
(2,897 Views)

Success!!! I am now only communicating to Dev2 two times - one time for open and once for close. I am down to 13% load on the processor, which is good enough for now. I am sure it would go down even more if I compared the boolean state to the previous iteration and only wrote to Dev2 if the state changed... maybe a project for a later date...

 

Thanks!

 

Michael

 

 

Code
Message Edited by Michael Fidler on 01-13-2010 10:42 AM
Download All
Message 3 of 4
(2,876 Views)

FYI, I had to add "k" to the beginning of each channel number to make this work...

 

 

vi_snippet3.PNG
0 Kudos
Message 4 of 4
(2,823 Views)