Why do Single-Process shared variables create a single variable VI in my dir.
I'm creating an application VI following the example which is created by starting a two loop Real-Time project which creates a Single-Process shared variable and a Network-Published shared variable for each variable that needs to be sent to a non-Realtime host VI. Each of the Single-Process variables shows up as a VI file with the following format: <variable library>_<variable name>.vi. The VI has one control which is the shared variable. I have a large number of variables and this creates a lot of clutter in the directory. I expected them to be rolled up into the library file. Is this expected behavior? I'm attaching a screen shot to show the behavior.
Shared Variables in Directory.JPG:
http://forums.ni.com/attachments/ni/170/343767/1/Shared Variables in Directory.JPG
This is a known issue with single process variables that are saved in a
project that has the .lvproj and .lvlib files initially saved in different
locations, as is the case with Real-Time projects. This has been
previously reported to our R&D department with the ID #56580, and
is being worked on for a fix in a future release of LabVIEW.
This should be only a problem for Single-Process variables, and not
Network-Published variables, so if you want to keep your folder from
getting cluttered up, changing the variable types to Network-Published
should get you around the problem for now.
...Network Published Shared Variables Example
I downloaded NI?s Shard Variable Example (Shared Variable Executable Example.zip) and built the executable. Note, you need to change the path in the Publisher code to point to the library. It works fine when they are both run on the same PC. The issue is I can?t make it work across a network. Any ideas? Does this work across a network for anyone else? I am using LV 8.20 with no DSC.
This is what I tried:
� Both PC?s can ping each other
� They are both on the same subnet
� Windows Firewall is OFF
Link to example: <a href="http://digital.ni.com/public.nsf/allkb/A1767CAD4B99A3A6862572800067436A" target="_blank">http://digital.ni.com/public.nsf/allkb/A1767CAD4B99A3A6862572800067436A</a>
I downloaded the program, and was able to get it running. When you build the exe's, two other files are also created:
Shared Variable Publisher.aliases
Shared Variable Subscriber.aliases
If you open these files with a text editor, you will see their contents are trivial.
I went into each file, and changed "localhost&quo...Trouble using Shared Variables over my Network
I'm having problems using shared variables over a network. I have been succesful at this before in another network but for some reason I cannot access the shared variable in the host computer this time. I have binded the shared variable correctly in the client computer to the address over the network of the host computer shared variable. When I try to access the shared variable in the client computer I receive the following error.
Error - 1950679022 ocurred at ni_tagger_lv_Read
LabVIEW: (Hex 0x8BBB0012) The process was not found or is not responding.
(I'm assuming this message suggest that the variable was not found)
I can and access both computers over the Microsoft Network. However either computer will not connect with the Shared Variable Engine. I have tried by disabling the firewall on both computers and had no success. Please advice. Thank you.
Please read through the KnowledgeBase articles listed below. Hope this helps!
<a>Error -1950679022 Occurs When Attempting to Use Shared Variables</a>
<a href="http://ae.natinst.com/operations/ae/public.nsf/webPreview/FE6A63983AC8289E86256B22005A067A?OpenDocument" target="_blank">What Ports Do I Need to Open on My Firewall for National Instruments Software Products?</a>
...LabVIEW could not generate code for the shared variable.You must open the VI in the project that contains the library where the shared variable resides
When I put a network shared variable with fifo RT activated on my diagram, the arrow is broken.and I' ve got this message:
""LabVIEW could not generate code for the shared variable.You must open the VI in the project that contains the library where the shared variable resides""
If I uncheck FIFO RT option for this variable the arrow isn't broken anymore.
I 've no idea how to correct this weird error?
Autodeploy is on, and I've check copy / delete in diagram in tool/options\diagram
nobody can help me??
I don't reproduce this error.
Could you send your VI?
...Network OPC Modbus TCP/IP / SQL trouble after deploying variables/process (DSC) Same software runs well for one months before
I need help with a curious problem. Unfortunately I don't have any ideas where I can start to debug the mistake.
I wrote an application on LabVIEW 8.5 + DSC where the DSC integrated Modbus TCP/IP + OPC-Client is used. The data are acquired over 2 different Ethernet card in different subnets.
Some values are stored on a full version of MS SQL-Workstation 2005.
Here is my problem:
The first version runs since one months without any trouble. Last week I wanted to make an update. The software run well. I stopped the system, restarted and made at first step a complete HDD- Backup with Acronis.
Then I made my update and deployed the libraries again (without errors).
Starting of the software failed with a message "Cannot read shared variable XY" or "Cannot write shared variable XY". After 10 hours of playing around, restarting refreshing backups and ....... I decided to use the old version.
I made a complete disc restore including formatting. The system comes up well.
The "old" program is not running anymore as well with the same errors. Playing around with rebooting, deploying but without any code changes let the program start two times, but failed for approximated (no kidding) 50 times. Deploying simplest libraries with just one value bounded to a modbus node destroy all (different) deployed processes and variables, no connection is pos...Using network shared variables in two computers connected via a network switch
let me start by saying im a rookie to the programming environment but i have used Labview a couple of times to understand the basics, i have a computer and a laptop (both using vista), both of them with Labview Full development System (Student ed. with Mathscript) installed, so what im tryin to do is to use the built in microphone located in the laptop to aquire sound and then use a Shared Variable to transfere the sound signal from the laptop to the computer, the laptop and the computer are connected to a network via a network switch and ethernet cables, so far i nothing worked, i can manage to create the shared variable in the laptop and use it there but it doesnt appear in the computer, im not sure whats the problem i have even disabled firewalls in both systems, help from anyone wil be appreciated.....
This KB should be of some assistance to you.
<a href="http://digital.ni.com/public.nsf/websearch/6E37AC5435E44F9F862570D2005FEF25?OpenDocument" target="_blank">Trouble shooting network published shared variables</a>
Also the following link gives some instructions on the use of shared variables.
<a href="http://zone.ni.com/reference/en-XX/help/371361B-01/lvhowto/bind_to_source/" target="_blank">http://zone.ni.com/reference/en-XX/help/371361B-01/lvhowto/bind_to_source/</a> <a href="http://zone.ni.com/reference/en-XX/help/371361B-01/lvhowto/bind_to...polling variables using Modbus IP and labview 8.2.0 shared variables
I'm using shared variable in order to read/write register on a Watlow PM controller over Modbus IP standard. Once I make a change to FP control, the shared variable polling starts and I no longer get update of any controls or indicators on the FP.
Just wondering if this is an LV 8.2.0 issue and if any of this is addressed in LV 8.5?
Thx ahead of time
Thank you for contacting National Instruments. I need to get a little more information about your modbus setup. Are you using the DSC module within LabVIEW, or are you using the Modbus VI's?
Also, are you connecting to any sort of Modbus server?
I look forward to hearing back from you.
Kevin thanks for the response, I'm using DSC module within Labview. I'm using my PC and a Watlow PM controller thats it. (I guess the PC is the server). I don't have any code yet, just a library of Modbus shared variables (SV). I slide a few SV controls on the FP to observe and run a loop with a stop button that it.
Kevin, there is a problem with the UpdateNow shared variable. It always shows X in the Variable Manager window. This is just a write only control and I have no idea why an X is shown while the others, i.e. "Updating, OffHook, Commfail and UpdateRate" appear OK.
pic is attached below
modbus UpdateN...Need a help to share a variable of Dynamic Shared Library across the processes using that library.
I am developing an application which has got 1 dynamic
shared library (implementing some common functionalities) and 3 other
process which use that library.
I have a variable defined in library and I need all
processes to share that variable. That is any change made by any of
these processes should "automatically" reflect in two other processes
(by automatically i mean is without intervention of my program).
From the literature study i got it the way like, only the
code segment of shared library gets shared between processes. Else the
data...occurance as network shared variable
I am new to LabVIEW Real Time. I want to create an Occurance as network shared variable. I created occurance and saved it as a custom control. I am able to create a single process shared variable for the occurance but not a network shared variable.
Is there any other way to create an Occurance as network shared variables?
If yes please let me know so that i can use for my application.
If no please let me know the reason which would be useful for my future design.
Thanks and Regards,
DAQ occurence's are supported in LabVIEW Real-Time. Please check the following links: <a href="http://digital.ni.com/public.nsf/allkb/B882A2568DF88B9D86256E8200711DB2" target="_blank">LabVIEW Real-Time Support for DAQ Occurrences</a> <a href="http://digital.ni.com/public.nsf/websearch/9F3DAD3E227E4203862566C2005B11EB?OpenDocument" target="_blank">DAQ Events and Occurrences</a> This <a href="http://forums.ni.com/ni/board/message?board.id=170&message.id=25832&requireLogin=False" target="_blank">discussion forum</a> might also be useful for you.
...Inconsistent Network Shared Variables
I will eventually be implementing a controls program on a machine using cfp. Before the cfp gets here, I am getting practice in network shared variables by trying to pass shared variables between two VIs on my computer. I have attached the two VIs and a screen shot of my project. I run a queued state machine and after the initialization routine is done, I run the control portion of the program. The control program is titled 'The4Mprocedure2.vi' and the QSM is titled '4M_QueueDrivenStateMachine'. In the initialization routine of the QSM, 'FALSE' is written to the boolean network shared variable, 'Run_4M_Procedure'. After the initialization routine is done, and a set of certain parameters are met, the QSM writes the value 'TRUE' to 'Run_4M_Procedure'. Ideally, The4Mprocedure2.vi would read the shared variable, and when the value is 'TRUE' The4Mprocedure2.vi would run. The4Mprocedure2.vi has a case statement that causes to run the program when 'Run_4M_Procedure' = TRUE. The4Mprocedure2.vi does not run when the variable is FALSE.The problem that I am having is that The4Mprocedure2.vi does not always recognize that the value of my shared variable has changed. When the QSM passes the value of 'TRUE' to the controls program, The4Mprocedure2.vi will sometimes still read the network shared variable as FALSE. Sometimes, I have to restart the controls program several times while the QSM is running to ensure that ...Shared variables through a global network
basically i need to conect 2 computers running executables @ different countries using shared variables.
I already have a static IP for the server but cannot conect to it from the client Pc.
Tried it on a local network and it works just fine..
<a href="http://forums.ni.com/ni/board/message?board.id=170&thread.id=312515" target="_blank">continue here</a>
...Network Shared Variable Description
I've created alot of Network Shared Variables through Project Explorer...and i have also added a description for each one in the shared variable properties screen
Could someone please tell me how i can get access to the description through LabVIEW?
Thanks for that - the only problem i have now is that if i put a shared variable on the page and link it to a display. I then have to create a seperate reference to the shared variable io server to get the description. Is there a way of using this same reference to get the value so if i change that both the description and value update. At the moment i would have to change this reference and then also the shared variable itself.
Hope i have made myself clear
Hi attached is a sample of code in which i am viewing a value and also its description.
Ideally id just like to have the channel name once and the description and value be taken off that, rather than if i ever change it , then have to change the input to the description and also the variable displaying the value. Hope that makes sense
opctest3Kep for forum.vi:
http://forums.ni.com/attachments/ni/170/288969/1/opctest3Kep for forum.vi
I'm not sure if what your asking is possible without needing to rename the channel, as the channel is a reference wired to the inp...Shared Network Variable timeout?
Is there such a thing as a timeout when trying to read a TCP based Shared Network Variable? Just how long does the Shared Variable Read wait before returning an error if the variable/variable engine are not available? If so, does anyone know what the default is and if it can be changed?
I'm troubleshooting a problem that involves a cFP hosting the SVE and a program deployed on a host pc. I believe the problem is related to network response times being very slow at certain times of the day. Particularly first thing in the AM when everyone is logging in, checking E-mail etc.
Centerbolt, Do you get an error message on your host computer? This <a href="http://digital.ni.com/public.nsf/allkb/7BA64956A475405F862570ED007B2A88" target="_blank">kb</a> might be helpful.
Just getting started with this. Due to the nature of the application the error handling is a bit different and I will have to modify it so I can see what is happening in the host and target executables. I will probably have to start logging them to a .txt file. If I'm not standing right there when the problem occurs, the operator is going to reset the cFP and continue on.
I asked about the timeout because I know the network has been experiencing BW issues at certain times of the day and this would explain the behaviour I'm seein...How do I find shared variables across a network?
Sort of self-explanatory. I need to find the shared variables available on a remote computer. What is the best way to do this?
Sounds like you're trying to bind a shared variable on your machine to one on the network. You can browse the network to choose what you'd like to bind to as follows:
In the shared variable properties dialog:
1. place a check in the "Bind to Source" checkbox
2. click the Browse button in that section
3. from the Network-Published Source drop-down box, choose Network Items
You should now see the ...No data received from some network shared variables
My project is a UI with approx. 20 indicators bound to corresponding network shared variables. These variables are written by a separate thread that is run dynamically by the UI thread upon a user event. Of the twenty indicators, three booleans and three arrays are not receiving any data. I don't understand why only some indicators work and others don't, when all the variables are being written in the same dynamically called thread. It's always the same indicators that are the trouble (the arrays always show "empty", booleans always show "FALSE").I have read all the knowledgebase articles. I AM deploying my library successfully using the Application method. Variable Manager shows all my variables as deployed. PSP indicators on all the indicators are "GREEN". "Watching" these variables in Variable Manager shows that each has a static timestamp year of 1903. Variables that ARE working show a current timestamp that is updated at the rate they are written.Anyone have a clue?
Just to be clear, ALL the shared variables work in development mode. The problem appears when I run the executable.
I'm not sure why you are seeing this behavior in your shared variables. I would like to take a look at your code if possible. Also would you try reading from the variable and writting to the variable multiple times.
Is there any difference at all between the variables that work and the ones that don't? ...Shared variables though a global network
My scenario: I was able to conect two PC's on a local network using shared variables (2 .exe's, a publisher and a subscriber) but my project requires communication of x VI's between two PC's @ diferent countries.
i think one solution could be to create a specifically communication between your two programs over TCP/IP.
Hi Pinwinox, you should be able to use the shared Variables trough internet but as both computers are not in the same subnet you have to register it.
From LabVIEW you have to go to Tools � Shared Variable � Register Computer...
You can find more information in this link: <a href="http://digital.ni.com/public.nsf/allkb/6E37AC5435E44F9F862570D2005FEF25?OpenDocument" target="_blank">http://digital.ni.com/public.nsf/allkb/6E37AC5435E44F9F862570D2005FEF25?OpenDocument</a>
...Strange process causing network trouble
This is my first post to the group, I've been reading for a while though.
In summary, my network consists of:
Internet <-> Router <-> m0n0wall <-> LAN
m0n0wall is a BSD-based firewall/router. I'm not going to go into all
the boring details but basically this morning my m0n0wall broke down and
I removed it from the network. After re-assigning some IPs, my LAN was
directly connected to the Router (a Netgear DG834, no problems with this).
On the LAN side, I have two gigabit switches chained together to cover
two rooms. In the first room (nearest the router, ~10m of cable away) I
have my main PC and in the second room (a further ~20m away) I have two
servers. All day, I have been getting in the region of 80-85% packet
loss between all PCs and the router. Before I removed m0n0, I was
getting the same issue between the PCs and m0n0. In both cases, I could
get no traffic to the net or to the router.
Suspecting some hardware/wiring issues, I swapped NICs in my main PC and
rewired the lot. No difference - still 80%+ loss over these fairly short
Somewhat worried at this point, I SSHd into my Linux server to see what
was going on. Using "top", I saw that there was a process I had never
heard of, simply called "s", at the top of the list, using 96-99% CPU
time, owned by nobody. I have no idea whatsoever what this was but I
killed it. And suddenly all my packet loss disappeared.
Aside from this rather ...How do you synchronize accesses to a LabVIEW Shared Variable?
I would like to create an ad-hoc weather station program (I'll explain more in a bit). I am using LabVIEW 8.0 Full Edition, and I would like to share data over a network between stations with the LabVIEW Shared Variable. Here's what I want to be able to do:
- A node would start up, and begin publishing data to a network via a shared variable.
- The shared variable is an array of clusters
- The cluster information would hold things like:
- Station Name
- Station Location
- Weather information cluster (temperature, rainfall, windspee...RT Networked Shared Variables do not update
I havew a CRIO 9012 that has code that populates shared variables so vi on a PC can see the data.
The code on the CRIO appears to run fine, the web interface works like a champ.
When I launch the vi on the PC it does not appear to be recievince data from the CRIO netwrked shared variables.
When i launch the CRIO RT Host VI from the dev envirionment then launch the vi on the PC, the pc application recieves the
shared variables. But as soon as the CRIO RT host vi is shut down the PC vi stops recieving data. I know the CRIO is still operating because i can go back into teh web page and see the recent data.....
Does anyone have any ideas on why this situation would occur?
Do not wire shared variables to property nodes of front panel objects on a RT target. Reason - If the front panel is not open thru the web interface then the front panel is not active and cannot populate the shared variables.
The correct way to use the shared variable on the RT target is to wire it directly to the I/O point or directly after any conditioning vi that directly recives the I/O.
Hope this helps some folks,
One more part of the solution, at least for my app.
When I build my CRIO startup app I tend to do it with the build spec open and hit the build button, Before I build i select the shared ...pthread condition variable shared between processes
I have a server application which communicates to it's clients thru
shared memory (mmap()). The server initializes the mutex and condition
as process shared. That is done, before the clients connect...
When for instance two clients are waiting on a condition, and the server
calls pthread_cond_signal(), one client wakes up. That's ok, but when I
call pthread_cond_broadcast(), nothing happens.
Is this a known issue? If required I could post some example code. I
don't have the code here right now. The system I am using has NTPL (I
think it is version 0.60)
"Daniel Kay" <email@example.com> wrote in message
> When for instance two clients are waiting on a condition, and the server
> calls pthread_cond_signal(), one client wakes up. That's ok, but when I
> call pthread_cond_broadcast(), nothing happens.
Are you using the conditional wait functions the correct way: ie, a while()
loop testing the condition and executing the wait only if the condition
tested false? Perhaps you can post some code?
Arnold Hendriks wrote:
> "Daniel Kay" <firstname.lastname@example.org> wrote in message
>>When for instance two clients are waiting on a condition, and the server
>>calls pthread_cond_signal(), one client wakes up. That...trouble processing variables using char array
I am trying to automated my code and I am having trouble loading my
variables for processing. I have numerous variables named WW1, WW2,
WW3, WW4, etc. already loaded into the Matlab workspace. For
example, WW2 is a double array of dimensions 10000 x 1.
I have written code to generically process each variable separately
by substituting "fname" in the code for each variable. For example,
here is how I set "fname" to equal the variable I wish to process:
Now fname is a char array equal to "WW2".
How can I get fn...How do I convert a program I wrote in Labview to a single block
I was wondering how I could create a block with an input and output from a fairly large program I wrote with connections between LabView pre-defined blocks. The reason I want to do this is that I want to incorporate this code in a larger program without making it look untidy.
...How do I access LabVIEW shared variables from a CVI program?
I would like to have a RT CVI program write to / read from a 7830R FPGA. Is there a way to obtain the physical addresses of global/shared variables in my FPGA VI, or maybe a pointer to them, so that my C code can access those variables directly?
Thanks for the request, To program a FPGA target you must have the module
Labview FPGA. So you cannot directly access the FPGA with LabWindows/CVI.
But there is a way. Firstly create with Labview a Host VI that communicate with
the FPGA target and compile this VI into a dll and then call it from CVI program.
See the fo...LabVIEW DSC 8 Alarm State shared variable
it was possible in LabVIEW 7.xx to read the alarm state with "Read Tag Alarm".
I didn�t find such in LabVIEW 8.20.
I testet "Read Alarms" and the "property knot".
Hi Torsten,to read the alarms in Labview DSC 8.20 you can use the "Read Alarms.vi" in combination with the "Format Alarm data.vi".You are using shared varibales with DSC 8.20. There you can set the proprties (attached Screenshot.zip)In Labview you can get these alarms with the two VIs (see above).I also attached a little example project. There you can open the "DSC Read Alarms Demo.vi" inside of the program to see how it works.Hope this helpsBest regardsDippi
thank you for your fast replie.
I need the Funktion of the Demo in an other VI.
But my first question was only to read the tag/shared variable state.
I attached a sample as picture.
Message Edited by Torsten Lochner on 07-13-2007 08:37 AM