LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

host pc error on shared variable

Hi

 

I am using shared variable, network deployed to communicate between two target PC

I built an execution file for each target PC; one is as host PC and the other is client PC.

The host PC contains the shared variable. When the client PC is running while Host PC is turned OFF,

it will generate an error that host PC`s deploy data is not available (-1950679035). I can use this error to activate another logic. 

 

But if the other way around; Host PC is running while the client PC is turned OFF it will NOT generate an error.

I would like to create an error indicator that the client PC`s deploy data is not available thus i can start another logic on the host PC. 

 

Any advise or sample VI will greatly help me. Thank you very much.

0 Kudos
Message 1 of 8
(3,174 Views)

I don't understand the issue. Where are you deploying the libraries? What do you mean when you say that you are activating a logic?

 

Error -1950679035 when Using Shared Variables.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 8
(3,160 Views)

Thanks Adnan for the reply. Sorry for not explaining well.

here is the scenario: i have 2 target PC that is communicating between each other using wireless radio. One is host PC and the other is Client PC. I created an executable application for each PC.

Host PC shares variables to Client PC. Likewise Client PC shares variables to Host PC.

 

If the Host PC is shutdown, the Client PC will show an error -1950679035 (which means shared variable is not deployed). This is OK.  

 

But, if the Client PC is shutdown, the Host PC will NOT show any error! I am expecting that it will show the same error as above but nothing.

 

How can I create an error indicator or information on the Host PC whenever Client PC is not available?? Why Error -1950679035 will not show up?

 

Thanks a lot.

 

0 Kudos
Message 3 of 8
(3,154 Views)

Hello.

 

I am attaching my sample VI`s (Project File) hoping somebody can help me find the solution to my problem.

 

I am running the Host.Vi in one target PC and Client.VI on another target PC.

If i will run the attached VI's and simulate an error by removing the LAN cable at Host Target PC, it will generate error 1950679035 on Client Target PC which is normal.

But i hope either way, it will show an error on Host Target PC too.

 

Any advise please.

 

Thanks.

 

 

0 Kudos
Message 4 of 8
(3,130 Views)

From one I see, you have only one shared variable library, and it sounds like you are deploying it on the host PC.  So if the network is down, the client PC raises an error because it can't access the shared variable library which is located on the host PC.  The reason the host PC doesn't throw an error is because it always has access to the shared variable library because it's ON THE SAME PC!

 

If you want the host PC to throw an error when the network is down, then place one of the shared variables in its own library on the client PC.

0 Kudos
Message 5 of 8
(3,120 Views)

Thank you for the reply. 

 

 ---------------------------------------------------------------

 If you want the host PC to throw an error when the network is down, then place one of the shared variables in its own library on the client PC.

--------------------------------------------------------------------

 

I have tried this but i CAN NOT seems to make it runSmiley Sad. I have attached a screen shot of what i did.

I made two projects, separate shared variable. Kindly teach me what could be that i am missing.

If there is any sample VI i would greatly appreciate.

 

Thank you.

0 Kudos
Message 6 of 8
(3,107 Views)

Put one shared variable in one library on one PC.  Put the other shared variable in another library on the other PC.

 

It is impossible to see everything that could be going on from a screenshot as it doesn't show how the variable are configured.  You might be able to do it with the two variables in the two libraries, but you would need to bind one variable to its counterpart in the other library.  You'll have to play around with it a bit to make sure you get the correct variable as the independent one and the other one as the bound variable.  I would guess that in the PC that writes to a variable, you would want its shared variable to be undbound.  In the other PC that does the reading of a shared variable, you want its version of the shared variable to be bound to the one on the other PC.  Likewise for the other variable whose read/write action is occurring in the opposite direction.

0 Kudos
Message 7 of 8
(3,103 Views)

Thanks again for the reply. I appreciate all your comments.

 

I think i am doing exactly as your explanation. But seems i CAN'T make the exe VI run on each target PC.

I created Project File for each target PC. I created shared variable library to each PC and bound that does

the reading of the shared variable.

 

Also on the build specification, source file setting, I made the shared variable library to be "Support Directory".

 

I have attached my example VI to show how the variables and the build specifications are configured.

 

Thank you very much for any advise.

 

0 Kudos
Message 8 of 8
(3,094 Views)