LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

shared variables properties

Solved!
Go to solution

Hi all...I'm looking for a tutorial or knowledgebase article to explain the following:

 

Using:  Labview 8.6 RT Professional, no DSC module (cannot upgrade at this time, no funds available)

 

System:  PXI (called Target) communicating with various instruments and a PC (called Host) via TCP/IP; operator enters control variables through separate Labview program running on PC (XP).

 

Background:  Development of Labview project since version 4.3, have only done one other PXI RT project that communicated with an HMI via Modbus.

 

Question regarding Shared Variables:  On my last RT project, I had to "read" all the shared variables in the PXI program before using them so they would be "available" to the HMI. I'm not sure I'm setting the variables up correctly now:

 

Setting up the "Network Variables" on the PXI with the following properties - Type:  Network Published, Network:  Use Buffering,  Number of Elements: 1,  RT FIFO: enabled, Number of elements: 1,  FIFO type: single element

 

On the host side, I've defined the same variables with the following properties:  Enable Aliasing, Bind to: PSP URL.

 

It seems I have to set the same properties as the other variables:  Network: Use Buffering, Number of Elements: 1, etc.

 

Is this the correct way to do this? I've read a couple of posts about problems with "deploying" the variables, whether the PXI program or the Host program does it and such. I've seen a couple of "flaky" things going on, variables not updating. I just want to make sure I'm doing this correctly. The PXI will always be the one in control if the Host program is not running.

 

Thanks for any help and I will keep searching for more information. And, just to reiterate, there are NO funds available to upgrade any of my software right now.

 

0 Kudos
Message 1 of 14
(3,906 Views)

If you only want binding to NSV's on your HMI then I would disable the buffering especially RT FIFO.  Also you can create binding right to your HMI controls and Indicators which is pretty cool.

This is what I have done with a cRIO that has around 100 NSV's bound to PC HMI NSV's and HMI controls, it works very well.

0 Kudos
Message 2 of 14
(3,902 Views)

could you explain a little bit more? Not quite following. I don't have a separate HMI on this project, it's a PC with monitor running a simple Labview program. I know how to bind to objects using an HMI (CMore in fact) but this is a little different.

 

It seemed that when I didn't set all the shared variable properties the same on both sides, they weren't communicating.

 

Thanks.

0 Kudos
Message 3 of 14
(3,899 Views)

OK I use HMI but in your case its the Host PC.  I experimented with using buffering and decided that it not not make sense and in some cases (RTFIFO) prohibited me from certian programatic manipulation of the NSV's.  Buffering is useful if you actually need to collect each change of the NSV.  For remote monitoring or control application this usually is not necessary since you pretty much just need to deal with the latest value of the NSV.  I do not see any reason why a binding would not work if the buffering properties were different.

0 Kudos
Message 4 of 14
(3,897 Views)

Here is the low down on NSV buffering...

 

http://zone.ni.com/devzone/cda/tut/p/id/12176

0 Kudos
Message 5 of 14
(3,896 Views)

Thanks, I will dig into that...probably should have read it on Monday rather than Friday afternoon! It's starting to make a little more sense, I appreciate the help.

0 Kudos
Message 6 of 14
(3,894 Views)

I'm still having some issues, very basic ones. I'm looking for a very simple explanation on how to configure my two programs. I tried binding my variables to the NSVs but now the two programs do not interact unless I have the PXI actually running on the computer. I deploy it (run as start up) but the actual program has to be running for any data transfer to work.

 

I went through the RT Wizard to generate a project kind of like I'm doing and I see the network variables are set up differently. The variables in the "host" program are not bound to the NSVs. Not sure if this is the correct way or not.

 

Hope I'm explaining this correctly! Just want to know how to go about getting the 2 programs to communicate correctly. Obviously the PXI will be running on it's own and then the separate computer will be turned on/off by itself.

 

Thanks for any help.

0 Kudos
Message 7 of 14
(3,874 Views)

Would it be possible to see your project?

0 Kudos
Message 8 of 14
(3,865 Views)

I'll put together a quick condensed version...not sure of proprietary info but you'll see what I'm trying to do. Give me a few minutes...thanks for any help, I'm a little stumped.

0 Kudos
Message 9 of 14
(3,861 Views)

Here a few quick screenshots, I have to leave early today and need to finish a few things quickly before I go.

 

The ProjectView.jpg shows my project (I combined the Host and Target programs into one project). The Host is going to be my separate computer, the Target is my PXI.

 

I know the files are a little messy, transferring stuff from one project to another, trying different layouts. Been a little hectic but it will be refined. I'm not usually this disorganized!

 

Thanks.

0 Kudos
Message 10 of 14
(3,858 Views)