LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

rt

Hi,

 

      I'm using a pxi 2567 to control multiple number of relays indivisually in my project, for that i made a subvi which could turn on and off the relay but when i used this subvi multiple times in my main program the RT target was hanging due to Deadlock problem, so i used semaphores so that the subvi is executed once at a time now as i increase the use of subvi the activation and deactivation of relays is getting delayed from minimum of 1sec to max of 4sec but my system can only afford maximum of 1sec delay. Can someone please give a solution for how i can reduce the delay caused to less than 1sec without deadlocking my RT.  

 

 

Regards,

Vishwas 

0 Kudos
Message 1 of 4
(2,294 Views)

Install the NI System State Publisher and use the NI Distributed System Manager to monitor the CPU load of your RT CPU. The deadlock is probably caused by a 100% CPU load. Try to avoid untimed while loops on the RT because they often cause such problems.

 

BTW: You didn't mentioned what kind of RT target you use.

 

Hope it helps

Christian

0 Kudos
Message 2 of 4
(2,291 Views)

Hi Christian,

 

        Thanks for your reply I'm using a pxi target and the deadlock is not caused because of over cpu load i suppose as I'm using only timed loops and the program runs fine when I'm not using this subvi more than 1 time. I think it is caused because the pxi 2567 can be used once at a time if i want to activate two different relays AT A TIME it gives me a deadlock error and pxi hangs.

 

 

Vishwas.

0 Kudos
Message 3 of 4
(2,280 Views)

Had a look at your VI...

I'm not sure but I think you should split the VI functionality into a device initi/deinit (open/close device session) and the actual switching (use the current device session). Opening multiple device sessions may cause problems and closing the reference after each switching is also not what you really want, isn't it ?

 

Christian

0 Kudos
Message 4 of 4
(2,270 Views)