Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

NPSV problem

Hello everyone,

 

I am having a problem, and I would really use any advice.

 

I have created two VIs: Master (on my PC) and Slave (on my cRIO). On cRIO I have assembled DO module, and cRIO is programmed for scan interface mode, and my DO channel is under chassis, as I/O variable. I have also created a NPSV within cRIO, in order to transfer change of control button to Slave vi.

 

I have created a control button, since I wanted to control DO channel. I have connected that control with NPSV (master VI, my PC). And in Slave vi (on cRIO) I have connected this variable with I/O variable for that digital output channel.

It did not work if I run only master vi. When I was running master and slave vi, it worked, and the led was on. 

 

I still dont know how to explain that, and I would really really use your help.

 

Another thing, when I connect just a control button with I/O variable, in my master vi, without changing anything in slave, the led is on. It is one thing which I also dont understand. If I didnt change anything in slave, how does master vi communicates with the module. 

 

Thank you for your help.

0 Kudos
Message 1 of 2
(2,451 Views)

I can pinpoint your problem to one thing:


@User002 wrote:

created a NPSV


NPSVs have just been a nightmare for me.  They are meant to be simple, but they introduce all kinds of weird race conditions and other weird behavior like what you are describing.  I actually deem NPSVs to be evil.

 

Instead, use a simple TCP/IP connection to send the updates/data back and forth.  Network Streams are another option.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 2
(2,403 Views)